Otis, I'm integrating this into Jmol today. Should be able to distinguish constitutional, configurational, and conformational isomers.
Command will be: X=compare({1.1},{2.1},"ISOMER") Bob On Aug 8, 2010, at 2:00 AM, Otis Rothenberger <osrot...@chemagic.com> wrote: > Bob, > > I tacked your compare suggestions on to the end of our two model (same > frame) identity check. After a 1 second delay, your isomer type > comparison is displayed. In case users interested in this type of thing > missed your code in my previous verbose email chain re SMILES problems, > I'll post it in this separate note. All I can say is great and useful > toy. I've been playing with variations (2R,3R)-2-bromo-3-chlorobutane > and others way past bed time. > > Otis > > Bob Hanson Wrote: > > The way I was thinking to categorize two models is this: > > var m1 = {molecule=1} # or whatever > var m2 = {molecule=2} # or whatever > > # check molecular formulas > > var sameMF = (m1.find("MF") == m2.find("MF")) > > # get SMILES string for molecule 1 > > var smiles = m1.find("SMILES") > var smiles_enantiomer = > sm.replace("@@","!@").replace("@","@@").replace("!@@","@") > var smiles_nostereo = smiles.replace("@","") > > # note: we can't just compare SMILES strings like we can molecular formulas > # because SMILES strings here are not "cannonical" - but that is no > problem at all > # instead, we "find" the SMILES string for one model in the other. Using > "SMILES" > # here instead of "SMARTS" guarantees an exact search and not a > substructure search > > var identical = sameMF && (m2.find("SMILES",smiles)> 0) > var configurationalIsomers = sameMF && !identical && > (m2.find("SMILES",sm_nostereo) > 0) > var enantiomers = configurationalIsomers && > (m2.find("SMILES",smiles_enantiomer) > 0) > var diastereomers = configurationalIsomers && !enantiomers > var constitutionalIsomers = sameMF && !identical && !configurationalIsomers > > -- > Otis Rothenberger > chemagic.com > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Jmol-users mailing list > Jmol-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-users ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users