Hi,
I would like to create a carbocation "database" from my existing database
of unsaturated molecules.
The idea is as follows:
For each double bond, I would like to attach one Hydrogen, for each carbon
in the double bond.
So for example, if I have a molecule with one double bond, I will end up
with two different carbocations,
if I have a molecule with 2 double bonds, I would like to get 4
different carbocations.
I tried using GetSubstructMatch for ('C=C') and SetFormalCharge to 1.
e.g:
mol = Chem.MolFromSmiles('CC(C)C1=CC[C@H]2C(=C1)CC[C@@H]3[C@
@]2(CCCC3(C)C)C')
func = Chem.MolFromSmiles('C=C')
matches = mol.GetSubstructMatches(func)
mol.GetAtomWithIdx(matches[0][1]).SetFormalCharge(1)
The result is:
CC(C)C1=[C+]C[C@H]2C(=C1)CC[C@H]1C(C)(C)CCC[C@@]12C
I would like to get rid of the double bond.
(and get CC(C)C1[C+]C[C@H]2C(=C1)CC[C@H]1C(C)(C)CCC[C@@]12C )
How can I do that?
Thanks a lot in advance,
Shani
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss