Minor change that allows MDLV2000 to read the atom parity from atom block.
Wasn't closing the unit test
I can't download these patchs - SF.net is screwing up. Can you publish a Git branch for me to pull from?
John, if that is too much effort, you can also send the patch to the cdk-patches mailing list:
Have sent the cdk-patches list.
I'm getting bounced... but I'm on the list and rejoined just to confirm :-s.
Your mail to 'Cdk-patches' with the subject
Fwd: Read/Write Atom Parity - MDLV2000 (patch files)
Is being held until the list moderator can review it for approval.
The reason it is being held:
Post by non-member to a members-only list
Either the message will get posted to the list, or you will receive
notification of the moderator's decision. If you would like to cancel
this posting, please visit the following URL:
Apologies, just realised I sent from the wrong email. Not with it today, thanks Egon :-).
Yeah, I did not get around to replying on it ... I though I had approved your first email too, but it seems I did something wrong there. Both alternative email addresses should now be automatically approved.
Looking into the CTFile format it seems that the stereo parity should be ignored when read, invalidating this patch I guess. However I need the parity for a project and have found an algorithm to determine the parity. If I wanted to include this would a method : "AtomContainerManipulator.assignStereoParity(IAtomContainer)" be appropriate?
The format doesn't given any justification, would be interested if anyone know why you wouldn't want to read it?
John, can you have a quick look at my patch of a while back? I was merely reading the bit, not the value, and marking the atom as chiral... needed that at the time...
I'm leaning towards supporting it... which we can do in the same way as we support other non-default features... accept in RELAXED mode and trigger a warning, and throw an error in STRICT mode...
I can't seem to find the code from patch in the current MDLV2000Reader, was it pushed?
I can rewrite the patch on Monday so support relaxed/strict.
Do you think it would be good to have the algorithm to calculate the stereo parity when only up/down bond's are set? Found a nice bit of linear algebra to do it, here (bit old but the method makes sense): http://www.mdpi.org/molecules/papers/61100915/61100915.htm.
There might be such functionality already... I think Stefan Kuhn did work in this area too, but don't remember the details right now... that should be explored first...
Oh yes, just did a quick search and found org.openscience.cdk.stereo.StereoTool with a "getHandedness" and getStereo methods :-). These look like they do what I need.
Have redone the patch. The parity is read only when in relaxed mode
Patches from the cdk-patches mailing list applied. Had to add an additional patch, for backporting it to cdk-1.4.x.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.