On 2012-11-14 17:36, Chris Morley wrote: > On 14/11/2012 16:02, David van der Spoel wrote: >> Hi, >> >> if I have an existing OBMol object, is there a simple way to get an >> InChi from it in C++ without rereading the file? >> >> Thanks, >> > > OBMol mol; > ... > OBConversion conv; > conv.SetOutFormat("inchi"); > std::string s = conv.WriteString(&mol);
close but no cigar: InChI=1S/H2O/h1H2 should be InChI=1S/H2O/h1H2 and InChI=1S/C2H6OS/c1-4(2)3/h1-2H3 should be InChI=1S/C2H6OS/c1-4(2)3/h1-2H3 Can I just chop off the last 5 characters? Looks like a line feed or so. > > Chris > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > OpenBabel-Devel mailing list > OpenBabel-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-devel > -- David van der Spoel, Ph.D., Professor of Biology Dept. of Cell & Molec. Biol., Uppsala University. Box 596, 75124 Uppsala, Sweden. Phone: +46184714205. sp...@xray.bmc.uu.se http://folding.bmc.uu.se ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel