Hi Shani, This is a limitation of the RDKit's 2D coordinate generation code. The workaround is to use the RDKit's coordgen integration to generate 2D coordinates. You can toggle this on by doing:
from rdkit.Chem import rdDepictor rdDepictor.SetPreferCoordGen(True) That will, in general, give nicer 2D coordinates anyway. Best regards, -greg On Thu, Jan 27, 2022 at 10:37 AM Shani Zev <levishan...@gmail.com> wrote: > Hi everyone, > I'm trying to create coordinates for a molecule containing a TRANS double > bond in a ring. However, while I try to create coordinate from the mol > object, the structure that was created is CIS and not TRANS. > I check both options (cis and trans) and check that bond > specificity correctly using FindPotentialStereo, then I use MolToMolBlock > in order to create coordinate, and both structures (cis and trans) are > created as CIS. > any ideas/suggestions? > > thanks in advance, > Shani > > For example my code: > > import rdkit > from rdkit import Chem > from rdkit.Chem import AllChem > print(rdkit.__version__) > > smiles = {'Cis':'C/C1=C\CCCCCCCC1', 'Trans':'C/C1=C/CCCCCCCC1'} > for key in smiles: > mol = Chem.MolFromSmiles(smiles[key]) > mol = Chem.AddHs(mol) > AllChem.EmbedMolecule(mol) > si = Chem.FindPotentialStereo(mol) > for element in si: > print(f' {key} Type: {element.type}, Descriptor: > {element.descriptor} ') > print(Chem.MolToMolBlock(mol), file=open(str(key)+'.mol', 'w+')) > > *the output: * > > 2021.09.4 > Cis Type: Bond_Double, Descriptor: Bond_Cis > Trans Type: Bond_Double, Descriptor: Bond_Trans > > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss