$ ./bin/obabel -:"O=C1CCCc2c1cc[nH]2" -O test_can.mol2
$ ./bin/obabel test_can.mol2 -ocan
Expected result is that canonical smiles should be the same as the input canonical smiles. I've attached the intermediate mol2 file to the bug.
This works with sdf:
$ ./bin/obabel -:"O=C1CCCc2c1cc[nH]2" -O test_can.sdf
$ ./bin/obabel test_can.sdf -ocan
Note, the nitrogens and carbons that have been "de-aromatized" in the mol2 example are labeled as aromatic in test_can.mol2 , and all bonds in the 5-membered ring have been marked as aromatic in the mol2 file.
This problem did not exist in openbabel 2.3.1 , but it is present in 2.3.2 and bleeding edge master.
Doing git bisect reveals that this patch introduced the problem:
Note, this patch does indeed fix pyridinium ions (they do not work before the patch and work after), it just happens to break my molecule :(.