Dear David,

   Sorry about a very slow follow-up indeed - I did not get any answer
about using OBAtom::SetTitle, but it turns out the virtual Get/SetTitle
method does nothing except for OBMolecule - hence the empty titles...
   So I have instead used the OBPairData API to store the atom labels,
which should be the correct way for openbabel.

   I have now committed this to the subversion repository HEAD. The way
to read this data is the same as at the end of the cifformat file (which
will now preserve atom labels when converting), e.g. :


if (atom->HasData("_atom_site_label"))
{
  OBPairData *label = dynamic_cast<OBPairData *>
    (atom->GetData("_atom_site_label"));
  cout << label->GetValue()<<endl;
}

   Incidentally, a lot more cif data could be transferred that way now
that I know how to use the OBPairData API...

        Best regards,
                Vincent
-- 
Vincent Favre-Nicolin                    http://inac.cea.fr

CEA/Grenoble              Institut Nanosciences & Cryogénie
Laboratoire SP2M/Nano-structures et Rayonnement Synchrotron
17, rue des Martyrs
38054 Grenoble Cedex 9 - France

Université Joseph Fourier        http://www.ujf-grenoble.fr

tél: (+33) 4 38 78 95 40           fax: (+33) 4 38 78 51 38



------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to