Skip to content

Instantly share code, notes, and snippets.

@egonw
Last active January 28, 2020 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egonw/c83f980108ddf27b317e626db42c0894 to your computer and use it in GitHub Desktop.
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");
}
@johnmay
Copy link

johnmay commented Jan 28, 2020

Nvm found it just was lacking context, you're looking at Stereocenters right?

@egonw
Copy link
Author

egonw commented Jan 28, 2020

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)?

@egonw
Copy link
Author

egonw commented Jan 28, 2020

Ah, you wrote a patch. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment