cdk / cdk

The Chemistry Development Kit
https://cdk.github.io/
GNU Lesser General Public License v2.1
496 stars 159 forks source link

Parsing stereochemistry? #1113

Closed ChemMitch closed 1 month ago

ChemMitch commented 1 month ago

Is there a way perceive the R/S stereochemistry from a structure with marked bonds? test_stereo.mol.txt

For example, read the attached molfile and return that atom 2 and 4 are both R.

johnmay commented 1 month ago

There is an OK CIP implement in CDK but I would recommend using the dedicate library: https://github.com/SiMolecule/centres. This uses CDK and provides a command line tool and an API. The simplest thing though is to use CDK depict.

https://www.simolecule.com/cdkdepict/depict.html

Screenshot 2024-09-27 at 09 39 12

I would caution though CIP isn't perhaps as useful as you might think, what is your use case?

ChemMitch commented 1 month ago

Thanks! My use case was to take a structure with one unspecified stereocenter and generate 2 stereoisomers, one with R the other with S. I found a way to set bonds so we have both stereoisomers but I didn't know which was which.