loss of atom numbers in stereoisomer enumeration

User 870ab5b546

02-07-2012 18:37:26

The code:


    public static List<Molecule> enumerateStereo(Molecule cpd) {
final String SELF = "StereoFunctions.enumerateStereo: ";
convert0DTo2D(cpd);
debugPrint(SELF + "after converting 0D to 2D: ", cpd);
allWavyToCrissCross(cpd);
debugPrint(SELF + "after converting wavy bonds to crisscross bonds: ", cpd);
List<Molecule> stereoisomers = null;
try {
final StereoisomerPlugin plugin = new StereoisomerPlugin();
plugin.setMolecule(cpd);
plugin.setStereoisomerismType(StereoisomerPlugin.BOTH);
plugin.setProtectTetrahedralStereo(true);
plugin.setProtectDoubleBondStereo(true);
plugin.run();
final Molecule[] molArray = plugin.getStereoisomers();
stereoisomers = Utils.molArrayToList(molArray);
} catch (PluginException e) {
Utils.alwaysPrint(SELF + "caught PluginException while "
+ "generating stereoisomers of ", cpd);
stereoisomers = new ArrayList<Molecule>();
stereoisomers.add(cpd);
} // try
debugPrint(SELF + "enumerated ", stereoisomers.size(),
" stereoisomer(s) from ", cpd, ": ", stereoisomers);
return stereoisomers;
} // enumerateStereo(Molecule)

The log:


StereoFunctions.enumerateStereo: after converting 0D to 2D: C[CH:1]1[CH:2]=[CH:3][CH2:4][CH2:5][CH:6]1C=O
StereoFunctions.enumerateStereo: after converting wavy bonds to crisscross bonds: C[CH:1]1[CH:2]=[CH:3][CH2:4][CH2:5][CH:6]1C=O
StereoFunctions.enumerateStereo: enumerated 4 stereoisomer(s) from C[CH:1]1[CH:2]=[CH:3][CH2:4][CH2:5][CH:6]1C=O: [C[C@H]1C=CCC[C@@H]1C=O.C[C@@H]1C=CCC[C@@H]1C=O.C[C@H]1C=CCC[C@H]1C=O.C[C@@H]1C=CCC[C@H]1C=O]

Note that the atom numbers disappeared when the stereoisomers were enumerated.  I would like them to be preserved.  

ChemAxon a3d59b832c

03-07-2012 06:12:09

Dear Bob,


I have moved the question to the calculator plugins area of the forum, where it belongs. My colleagues will answer soon.


Best regards,


Szabolcs

ChemAxon e08c317633

04-07-2012 09:24:51

When stereoisomers are generated the atom maps are not copied from the input molecule to stereoisomers. Hovewer the atom order [of the original molecule] is preserved in stereoisomers, so it's possible to iterate through atoms  and copy map numbers from the atoms of the input molecule to the atoms of the generated stereoisomers.


Let me know if you need more help.


Zsolt

User 870ab5b546

05-07-2012 13:36:05

OK, I guess that will suffice for now, but please put it on your requested feature list.  Unless you need to assign new map numbers for the internal stereoisomer generation process, there's no reason not to copy the map numbers over into the stereoisomers.

ChemAxon e08c317633

18-07-2012 13:43:50

We added this request to the requested features list, with low priority.


Zsolt