>> After skimming the spec, It looks like cml doesn't have a way to
>> specify conformers, either. I suppose a separate cml string for each
>> conformer would be the best solution I can think of at this point.
> 
> This may sound hokey, but if you want to "roll your own," storing canonical 
> SMILES with X/Y/Z coordinates is very easy to do, and very easy to parse. 
> It's also very compact and compresses about 10- or 20-to-1 with gzip.

IIRC, this is the "FIX" format, probably created by Open Eye -- I can't find 
any reference to it anywhere else.

> prints out the X/Y coordinates in canonical order.  The code to do this is 
> about 15 lines of C++ in smilesformat.cpp (look for IsOption("x")).  You can 
> copy the code and just add the Z coordinate and it would do what you want.
> Parsing is pretty simple too because the coordinates are in the same order as 
> the atoms.  If you're interested, I can send you a function that parses a 
> string of X/Y coordinates into an OBMol object - it's about 50 lines of C++ 
> code and includes a certain amount of error checking.  Again, all you'd have 
> to change is to add the Z coordinate.

At the moment, I think FIX only supports writing and not reading, but as Craig 
said, it's trivial to add.

All the code (for Craig's -xx and the FIX format) is in 
src/formats/smilesformat.cpp.

BTW, CML (the format) does allow multiple conformations -- it's basically as 
you said, just a catenation of multiple coordinate sets. XYZ format is similar, 
albeit without bonds.

-Geoff
------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to