Reported by:
W. D. Ihlenfeldt
Xemistry GmbH
wdi@xemistry.com
Take the following completely legal SD file record:
-ISIS- 03190722292D
$$$$
1 0 0 0 0 0 0 0 0 0999 V2000
-2.3167 -0.2167 0.0000 Au 0 0 0 1 0 0 1 0 0 0 0 0
M END
<PRICE>
$$$$
While on superficial inspection the Babel output looks correct when run on the first records, a closer look shows that critical information has been lost. Babel needs to read records into its internal datastructure before output via conversion.However, its Molfile parser is rather simple and supports few of the more advanced Molfile encoding conventions. In this case, Babel silently drops the critical H0 designator flag (plus a second flag) which lets a Molfile reader distinguish between metal Au and AuH3 with implicit H. So after the pass through Babel, the compound has changed, without any notification, from metal Au to AuH3. That can be a problem.
Logged In: YES
user_id=21420
Originator: NO
First off, the "second flag" is listed as deprecated in the MDL CT file documentation. As for the "critical H0 flag," this is indicated as being relevant only to query files. On the other hand, it's probably worth extracting this -- if it's non-zero, it indicates the maximum number of implicit hydrogens + 1 (i.e., 1 => 0 hydrogens, 2=> 1 hydrogen, etc.)
Essentially, this would just call OBAtom::SetImplicitValence() after making sure it's been perceived on the remaining atoms.
It's certainly easy enough to also write to this field on output (i.e., implicit valence - 1). Whether other software actually reads it is unclear.
-Geoff