Pascal Muller wrote:
Going by the man page (hint hint) @ http://openbabel.org/wiki/Babel, perhaps --title "" would help.Right. Doing babel --title "" --append ", ID EC50" file.sdf new.sdf generate this kind of title: ,ID,6.63 It's OK, but, for me, the beginning comma is undesirable. But yes, it's needed if the replacing title is not empty... By the way, may "_" be considered as a punctuation character, which could be used as the separator for --append? Would clash with the space/_ in the property name, isn't it?
A leading separator is undesirable and I've modified the trunk code (for the next release). You are right, a "_" is NOT regarded as a punctuation character and changing that is a bit too tedious for me to do at the moment.
The following output is obtained with the attached file Mol5.sdf. It shows the removal of the original name, the combining of properties and descriptors and the need for an underscore in a property with a space. (The additional property is a "feature" of the trunk code and shows why I am going to remove it.)
>babel Mol5.sdf --title "" --append "-REAL_NAME ORIG_NAME MW" -osdf ethanol-ethyl alcohol-46.0684 OpenBabel11260917282D 3 2 0 0 0 0 0 0 0 0999 V2000 0.0000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 2 3 1 0 0 0 0 M END > <REAL_NAME> ethanol > <ORIG NAME> ethyl alcohol > <OpenBabel Symmetry Classes> 2 3 1 $$$$
Mol5 OpenBabel11260916142D 3 2 0 0 0 0 0 0 0 0999 V2000 0.0000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 2 3 1 0 0 0 0 M END > <REAL_NAME> ethanol > <ORIG NAME> ethyl alcohol $$$$
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss