(Discussed on openbabel-discuss mailing list, under same subject)
I'm using Open Babel 2.3.2 to canonicalize some SMILES strings.
I thought that each fragment of a disconnected SMILES would be canonicalized separately (which I believe agrees what what is explained in http://openbabel.org/dev-api/canonical_code_algorithm.shtml)
However, that is not the case in the below example, adding a fragment causes the first fragment to canonicalize differently:
echo 'OC(=O)C@@HO)O.CNCC@@HO)O' | obabel -ismi -ocan
OC(=O)C@@HO)O.CNCC@@HO)O
1 molecule converted
echo 'OC(=O)C@@HO)O' | obabel -ismi -ocan
OC@HO)C(=O)O
1 molecule converted
The formatting on this ticket get mangled. Let me try again with correct formatting.
Thanks for the bug and the follow-up. This is now fixed in git master, so I'm closing the bug. Thanks!