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 27, 2020

Need more info. The P should not be chiral in any of these.

@johnmay
Copy link

johnmay commented Jan 27, 2020

Any none are in CDK depict..

CO[P@](=O)([O-])OCC.[C@](CO[P@](=O)([O-])OCC[N+](C)(C)C)([H])(O-)COC=O.[C@](CO[P@](=O)([O-])OCC[N+](C)(C)C)([H])(OC=O)COC=O.[C@](CO[P@](=O)([O-])OCC[N+](C)(C)C)([H])(OC(CCCCCCCCCCCCCCCCC)=O)COC(CCCCCCCCCCCCCCCCC)=O

All don't show and R/S. Note the wedges will be shown because we put them in, depiction is not standardisation.

@johnmay
Copy link

johnmay commented Jan 27, 2020

@egonw
Copy link
Author

egonw commented Jan 27, 2020

Need more info. The P should not be chiral in any of these.

Agreed, but why don't the none() all succeed then?

This is in StereocentersTest.java.

@egonw
Copy link
Author

egonw commented Jan 27, 2020

Does this mean that the Stereocenters class just do a first approximation of which atoms are stereo? Or does it return stereogenic? And only when the [O-] of the phosphates get methylated/-ated?

@egonw
Copy link
Author

egonw commented Jan 27, 2020

Okay, not True, but Para. Okay, got it. Darn, John, you did so much work. Takes me ages to catch up with everything :(

@egonw
Copy link
Author

egonw commented Jan 27, 2020

Okay, reboot. My use of none() was wrong.

@egonw
Copy link
Author

egonw commented Jan 27, 2020

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.

@egonw
Copy link
Author

egonw commented Jan 27, 2020

(Or does the InChI code consider the last one a stereocenter??)

@johnmay
Copy link

johnmay commented Jan 28, 2020

I don't know what none() is doing. Where is this?

@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