I've done some in-memory translation of molecules to ROMols, and have used #2 without major problems. I do remember needing to make sure that the stereoatoms are in the correct order - that is, that the first stereoatom is bonded to the beginAtom of the bond. In Python, this is something like:
bond = mol.GetBondBetweenAtoms(begin, end) if bond.GetBeginAtomIdx() != begin: assert bond.GetBeginAtomIdx() == end stereoatom1, stereoatom2 = stereoatom2, stereoatom1 bond.SetStereoAtoms(stereoatom1, stereoatom2) bond.SetStereo(stereo) - dan nealschneider (né wandschneider) Senior Developer Schr*ö*dinger, Inc Portland, OR On Tue, Dec 4, 2018 at 7:02 AM Brian Cole <col...@gmail.com> wrote: > Hi Kovas, > > For your use-case #2 should suffice, "set STEREOCIS/STEREOTRANS tags + > manually set stereo atoms". This is what the EnumerateStereoisomers code > does: > https://github.com/rdkit/rdkit/blob/master/rdkit/Chem/EnumerateStereoisomers.py#L38 > > As to what is the 'ground truth', that is a more difficult question that I > fear the answer may be 'none of them'. STEREOCIS/STEREOTRANS are rather > recent additions to the RDKit API, while we strived to make sure > STEREOCIS/STEREOTRANS across the RDKit, there are probably looming bugs in > untested parts of the RDKit that don't handle them properly. However, I > think those other APIs should be fixed to handle them properly, so please > do report any problems you spot into the github issue tracker. > > Cheers, > Brian > > > > On Mon, Dec 3, 2018 at 7:00 PM Kovas Palunas <kovas.palu...@arzeda.com> > wrote: > >> Hi All, >> >> >> >> I’m looking for a bit more clarity regarding double bond stereochem in >> RDKit. Currently, my understanding is that there are 3 ways to currently >> store this information: >> >> >> >> 1. STEREOE/STEREOZ tags + stereo atoms on either side of bond set by >> CIP ranks, as computed when calling MolFromSmiles to make a new molecule >> or >> AssignStereochemistry on an existing molecule >> 2. Manually set STEREOCIS/STEREOTRANS tags + manually set stereo atoms >> 3. ENDUPRIGHT/etc. single bond directionality tags, which are set >> when reading a molecule from smiles/inchi/mol file >> >> >> >> Is one of these methods the “ground truth” that is looked for by RDKit >> functions that care about this info, like the substructure matching code or >> the SMILES writing code? >> >> >> >> I am currently working on code that mutates molecules using a >> predetermined list of changes to be made to the molecule. I’d like to be >> able to include bond stereochemistry changing/creation/destruction here, >> and was thinking of doing so using the STEREOCIS/STEREOTRANS tags (and also >> providing the reference stereo atoms). Before I do this I want to make >> sure that molecules with these tags will be handled correctly by other >> RDKit functions downstream. Would these tags be a good choice here? Are >> there any caveats I should keep in mind as I work with this information? >> >> >> >> Thanks! >> >> >> >> - Kovas >> >> >> _______________________________________________ >> 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 >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss