-
Notifications
You must be signed in to change notification settings - Fork 19
Fix eval v3000 dative bond issue #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Do you have the SDF file so that we could potentially fix this directly in OpenStructure? |
|
I was able to reproduce the behavior by changing a bond type to 9 in an arbitrary SDF file manually. There's a fix in OST now (upcoming 2.9.0 release branch) where you can set fault_tolerant=True (on the call to LoadSDF directly, or on the IO profile for LoadEntity) to force OST to read the file with the invalid bond type. However I'm not sure exactly in which context this came up. RDKit itself doesn't like SDF files with a bond type 9, and if I read it with The bond type is then marked as unspecified in the resulting mol, not as dative: I was also not able to trigger RDKit to save a V3000 file with a dative bond: Clearly it looks like dative bonds (whatever they are) should not end up in SDF files to start with. Bond type 9 is not part of the SDF standard. I don't know how the invalid file was created. Regarding the fix: I'm not sure what bond type number results from setting it to unspecified in RDKit. Bond types 4-8 should also not be in SDF files (they are reserved for queries). OpenStructure 2.9.0 will complain about it but read it anyways. It is unlikely to have any effect in any algorithm in OpenStructure as we ignore bond order throughout. It might affect other external tools you are using in Plinder, though. |
Context:
rdkit automatically saves any molecule with dative bond (e.g HEM) automatically as v3000 sdf.
However,
ostcan't load v3000 files with DATIVE bond. ThrowsException: Bad bond line 100: Bond type number '9' not within accepted range (1-8).Fix:
Change DATIVE bond to UNSPECIFIED on the fly