[x] Remove extraneous checks when checking for molecule instance (#19)
[x] Better handling of connectivity table bond order
[x] Do not perceive bond order when loading an oemol from a JSON QCArchive molecule (#21)
[x] Generate rdmol with explicit hydrogen is SMILES has explicit hydrogen
[x] When explicit H has map indices, rdkit will use that information when checking for potential sterocenters #20. This PR adds a workaround.
Testing
The laster version of rdkit (2019.03.1) has better handling of stereoisomers and also now considers a N in a three membered ring as stereogenic. (https://github.com/rdkit/rdkit/issues/2268)
This broke some tests for canonical isomeric SMILES and InChIs.
The older version of rdkit dropped some stereo information for these SMILES:
C1[C@H]2N1C(=O)N=C2N Imexon - Corner case. The N is bridged with the C and therefore the chirality of the N is implicitly defined. RDKit considers it undefined but openeye does not
[H][C@@]1(C)C[N@@]1C1=CC(=O)C2=C(C(CO)=C(N2C)C2=CC=CC=C2)C1=O - This might be a bug in rdkit. It seems like rdkit ignores the stereo information on the N and considers the chirality undefined.
Because of these changes and fixes to the tests, CI environments were changed to start testing against rdkit 2019 and later.
The 3 SMILES that behave differently between rdkit and openey were added to a separate test that only tests it against openeye.
Handle non integer bond orders in connectivity table
Fixed provenance
Do not remove explicit hydrogen when loading an rdkit molecule from an explicit H SMILES (This is not the default behavior in rdkit)
This fix introduced spurious stereo warnings because rdkit considers the the map indices on H when checking for stereo. Removing the map indices and storing them in atom data does not help because that information is used as well.
This PR fixes several issues:
[x] Remove extraneous checks when checking for molecule instance (#19)
[x] Better handling of connectivity table bond order
[x] Do not perceive bond order when loading an oemol from a JSON QCArchive molecule (#21)
[x] Generate rdmol with explicit hydrogen is SMILES has explicit hydrogen
[x] When explicit H has map indices, rdkit will use that information when checking for potential sterocenters #20. This PR adds a workaround.
Testing
The laster version of rdkit (2019.03.1) has better handling of stereoisomers and also now considers a N in a three membered ring as stereogenic. (https://github.com/rdkit/rdkit/issues/2268) This broke some tests for canonical isomeric SMILES and InChIs. The older version of rdkit dropped some stereo information for these SMILES:
3 SMILES that have a N in a three membered ring now behave differently between rdkit and openeye.
CC1=C(C(=O)C2=C(C1=O)[N@@]3C[C@H]4[C@@H]([C@@]3([C@@H]2COC(=O)N)OC)N4)N Mitomycin
- The N here has an H bonded to it. OE does not consider it stereogenic (https://github.com/openforcefield/openforcefield/issues/146#issuecomment-490177618)C1[C@H]2N1C(=O)N=C2N Imexon
- Corner case. The N is bridged with the C and therefore the chirality of the N is implicitly defined. RDKit considers it undefined but openeye does not[H][C@@]1(C)C[N@@]1C1=CC(=O)C2=C(C(CO)=C(N2C)C2=CC=CC=C2)C1=O
- This might be a bug in rdkit. It seems like rdkit ignores the stereo information on the N and considers the chirality undefined.Because of these changes and fixes to the tests, CI environments were changed to start testing against rdkit 2019 and later. The 3 SMILES that behave differently between rdkit and openey were added to a separate test that only tests it against openeye.