On Wed, Jul 7, 2010 at 6:54 PM, Geoffrey Hutchison <ge...@geoffhutchison.net> wrote: >> isomorph code (identity checking), so in the meanwhile we would have >> to specify a convention such as all molecules with the same title are >> the same. > > I've been thinking about this for a while. The easiest detection is that: > a) The number of atoms is the same > b) The element list is the same (and in the same order)
Another option is to keep track of canonical smiles. a & b don't guarantee the molecules are the same (especially binding). However, the symmetry classes encode a variety of properties (connectivity, element, aromaticity, formal charge, in ring, bond orders) and can be used for this purpose. We actually have an implementation using a & b in avogadro. It's in the ReafFileThread in libavogadro/src/moleculefile.cpp (http://github.com/cryos/avogadro/blob/master/libavogadro/src/moleculefile.cpp). This implementation assumes you have a file with different molecules or all the same. It doesn't support N conformers of different molecules in the same file but this should not be hard to write. There is much extra code here though. My suggestion would be to add an option to OBConversion to enable conformer reading. When enabled, a Read call will read the same molecules until it finds a different molecule. The first molecule is kept and coordinates of the following conformers are added to it. > I don't think I'd want it to be automatic, though. There has to be a > mechanism to "turn off" (or "turn on") the feature in case you want to splice > out a particular frame or conformer, much like we do with multi-molecule > files. Yes, usually when you need it the user will know. Or a program that uses it (e.g. obspectrophore) can always enable it. Tim > Cheers, > -Geoff > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss