I'm a beginner with openbabel and I want to know how to have tag in a SDF
I read the doc but I have not found what I was looking for.
Do I have to add it myself or there is a way to have them automatically
(especially the unique ID)?
View this message in context: http://forums.openbabel.org/SDF-tag-tp4655342.html
Sent from the General discussion mailing list archive at Nabble.com.
From: Chris Morley <c.morley@ga...> - 2012-08-02 10:10:21
On 02/08/2012 10:17, Altyr wrote:
> Hi all,
> I'm a beginner with openbabel and I want to know how to have tag in a SDF
> I read the doc but I have not found what I was looking for.
> Do I have to add it myself or there is a way to have them automatically
> (especially the unique ID)?
The file produced using the command line
obabel -:"CO methanol" -O out.sdf --property MyID 1234
would add have a title "methanol" and a property MyID with a value 1234.
If you would like OpenBabel to provide the unique ID:
obabel infile.xxx -O out.sdf --add inchi inchikey cansmi
would add properties containing InChI, InChIKey and canonical SMILES.
(You would need only one.)
You could also do this from the GUI or from scripting or Pybel.