On Sun, Jun 26, 2011 at 12:38 PM, nms_uk <noureddine...@yahoo.com> wrote: > Can openbabel build a molfile given a graph data structure representing a > molecule? > If so, Which function/module can do that?
Assuming you have a graph data structure, you first convert the vertices to OBAtom objects. This can be done using OBMol::NewAtom and then OBAtom::SetAtomicNum. Depending on how your graph data structure stores edges, it might be needed to create a std::map to map the vertices to indices. Next, the bonds can be added using OBMol::AddBond (int beginIdx, int endIdx, ...). Tim > Regards > > -- > View this message in context: > http://forums.openbabel.org/build-molfile-SMILES-from-graph-tp3625750p3625750.html > Sent from the openbabel-devel mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > OpenBabel-Devel mailing list > OpenBabel-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-devel > ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel