Hi,
On Fri, Aug 28, 2015 at 11:33 AM, Jose Manuel <
[email protected]> wrote:
> Hi RDKitters,
> I would like to know if it's possible to set one given double bond stereo
> to "STEREOANY" without modifying the others?
>
> For example, I have a molecule with two specified double bond stereo
> centers but want to set only one to STEREOANY and get the '3' stereo flag
> in bond block of the output MolBlock. I could find a GetStereo function for
> bonds but not its Set counterpart. With the RemoveStereochemistry function,
> I get the '3' stereo flag, but for both stereo double bonds.
>
>
SetStereo() doesn't exist in Python because it is difficult/impossible to
provide the additional information required to specify bond stereo when
it's not STEREOANY or STEREONONE.
A solution is to set the direction of an adjacent single bond to UNKNOWN
like this:
In [10]: m = Chem.MolFromSmiles('C/C=C/CC/C=C/F')
In [11]: m.Debug()
Atoms:
0 6 C chg: 0 deg: 1 exp: 1 imp: 3 hyb: 4 arom?: 0 chi: 0
1 6 C chg: 0 deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 0 chi: 0
2 6 C chg: 0 deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 0 chi: 0
3 6 C chg: 0 deg: 2 exp: 2 imp: 2 hyb: 4 arom?: 0 chi: 0
4 6 C chg: 0 deg: 2 exp: 2 imp: 2 hyb: 4 arom?: 0 chi: 0
5 6 C chg: 0 deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 0 chi: 0
6 6 C chg: 0 deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 0 chi: 0
7 9 F chg: 0 deg: 1 exp: 1 imp: 0 hyb: 4 arom?: 0 chi: 0
Bonds:
0 0->1 order: 1 dir: 4 conj?: 0 aromatic?: 0
1 1->2 order: 2 stereo: 3 conj?: 0 aromatic?: 0
2 2->3 order: 1 dir: 4 conj?: 0 aromatic?: 0
3 3->4 order: 1 conj?: 0 aromatic?: 0
4 4->5 order: 1 dir: 4 conj?: 0 aromatic?: 0
5 5->6 order: 2 stereo: 3 conj?: 0 aromatic?: 0
6 6->7 order: 1 dir: 4 conj?: 0 aromatic?: 0
In [12]: m.GetBondWithIdx(0).SetBondDir(Chem.BondDir.UNKNOWN)
In [13]: Chem.AssignStereochemistry(m,force=True,cleanIt=True)
In [14]: m.Debug()
Atoms:
0 6 C chg: 0 deg: 1 exp: 1 imp: 3 hyb: 4 arom?: 0 chi: 0
1 6 C chg: 0 deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 0 chi: 0
2 6 C chg: 0 deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 0 chi: 0
3 6 C chg: 0 deg: 2 exp: 2 imp: 2 hyb: 4 arom?: 0 chi: 0
4 6 C chg: 0 deg: 2 exp: 2 imp: 2 hyb: 4 arom?: 0 chi: 0
5 6 C chg: 0 deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 0 chi: 0
6 6 C chg: 0 deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 0 chi: 0
7 9 F chg: 0 deg: 1 exp: 1 imp: 0 hyb: 4 arom?: 0 chi: 0
Bonds:
0 0->1 order: 1 dir: 6 conj?: 0 aromatic?: 0
1 1->2 order: 2 conj?: 0 aromatic?: 0
2 2->3 order: 1 dir: 4 conj?: 0 aromatic?: 0
3 3->4 order: 1 conj?: 0 aromatic?: 0
4 4->5 order: 1 dir: 4 conj?: 0 aromatic?: 0
5 5->6 order: 2 stereo: 3 conj?: 0 aromatic?: 0
6 6->7 order: 1 dir: 4 conj?: 0 aromatic?: 0
This works because the RDKit supports (well, it attempts to support) the
IUPAC recommendation for drawing double bonds with unknown stereochemistry:
drawing one of the single bonds as a squiggle bond (UNKNOWN).
Best,
-greg
------------------------------------------------------------------------------
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss