-
-
Save egonw/c83f980108ddf27b317e626db42c0894 to your computer and use it in GitHub Desktop.
COP(=O)([O-])OCC P not seen as chiral | |
[C@](COP(=O)([O-])OCC[N+](C)(C)C)([H])(O)COC=O P seen as chiral | |
[C@](COP(=O)([O-])OCC[N+](C)(C)C)([H])(OC=O)COC=O P seen as chiral | |
[C@](COP(=O)([O-])OCC[N+](C)(C)C)([H])(OC(CCCCCCCCCCCCCCCCC)=O)COC(CCCCCCCCCCCCCCCCC)=O P seen as chiral |
@Test | |
public void phosphate() throws Exception { | |
none( "COP(=O)([O-])OCC"); | |
none("[C@](COP(=O)([O-])OCC[N+](C)(C)C)([H])(O-)COC=O"); | |
none("[C@](COP(=O)([O-])OCC[N+](C)(C)C)([H])(OC=O)COC=O"); | |
// LMGP01010006 below | |
none("[C@](COP(=O)([O-])OCC[N+](C)(C)C)([H])(OC(CCCCCCCCCCCCCCCCC)=O)COC(CCCCCCCCCCCCCCCCC)=O"); | |
} |
Okay, reboot. My use of none()
was wrong.
So, I rewrote my tests, and I now have these two:
none("P(O)(=O)(OC)OCC");
none("P([OH])(=O)(OC)OCC");
none("P([O-])(=O)(OC)OCC");
The first two pass, but the third fails.
(Or does the InChI code consider the last one a stereocenter??)
I don't know what none() is doing. Where is this?
Nvm found it just was lacking context, you're looking at Stereocenters
right?
The thing seems to be this description: https://github.com/cdk/cdk/blob/master/base/standard/src/main/java/org/openscience/cdk/stereo/Stereocenters.java#L80-L83
Here it says that P's with two oxygens (along with some other elements) should not be tetra. The current code (and my none()
examples as others in StereocentersTest
) indeed finds *-P(=O)(O)-*
groups not tetrahedral, but as soon as the hydroxyl group is deprotonated, the current CDK code make is tetrahedral. Is that a bug or a feature (of InChI)?
Ah, you wrote a patch. Thanks!
Okay, not
True
, butPara
. Okay, got it. Darn, John, you did so much work. Takes me ages to catch up with everything :(