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
support for bond types >4 in MDLV3000Reader and MDLV3000Writer #1061
Comments
Sure, how would represent these? Ideally I would want these to come out as query bond expressions. |
Agreed. That would be my aim, too. I planned on using whatever is implemented in Do you want to merge PR #972 first before I start with this? |
Oh yes, sorry I misread - V3000 should do whatever V2000 does. Not's bond type 9/10 is also undocumented and supported in V2000 - that might be need to be a different representation and is a bigger challenge. |
Just had a look at the spec. I heard about I am mainly interested in the query bonds at this time, and would probably just throw an exception / log a warning if bond type 9 or 10 is encountered. Current behavior in Does CDK have anything in place to represent a dative/coordinative bond? |
Sort of - but it's not as simple as just adding a representation. Many places need to be updated/considered. For example in SMARTS does a dative bond count towards D and X? Are new operators needed to query it? |
For now throw an exception and handle the query bonds since the representation in V2000 is already established. I'll get the other PR you referenced on the properties merged today. |
I would like to read a MDL V3000 file that has a bond type >4, that is, a query bond type. Looking at the code, an exception is raised for any bond type >4.
I'd be happy to add the ability to deal with query bond types to
MDLV3000Reader
andMDLV3000Writer
. Given that there is support for query bond types inMDLV2000Reader
andMDLV2000Writer
it should be straightforward to add this to the V3000 reader and writer.However, browsing through the issues (#952 , #971 ) a potential re-write of the MDL/SDF readers/writers was mentioned by @johnmay a while ago. There is also an open PR (#972) that changes some of the code of the MDL V3000 reader and writer.
I am happy to put in the work even if it might be replaced later. Some code (I am thinking tests) might be useful even if refactored later on.
Looking forward to feedback before starting with this :)
The text was updated successfully, but these errors were encountered: