Package org.openscience.cdk.geometry.cip
Class CIPTool
java.lang.Object
org.openscience.cdk.geometry.cip.CIPTool
Tool to help determine the R,S and stereochemistry definitions of a subset of the
CIP rules [Cahn, R.S. et. al.. Angew. Chem. Int. Ed.. 1966. 5]. The used set up sub rules are specified in the
CIPLigandRule
class.
Basic use starts from a ITetrahedralChirality
and therefore
assumes atoms with four neighbours:
IAtom[] ligandAtoms = mol.getConnectedAtomsList(centralAtom).toArray(new IAtom[4]); ITetrahedralChirality tetraStereo = new TetrahedralChirality( centralAtom, ligandAtoms, Stereo.ANTI_CLOCKWISE ); CIP_CHIRALITY cipChirality = CIPTool.getCIPChirality(mol, tetraStereo);The
IBond.Stereo
value can be
reconstructed from 3D coordinates with the StereoTool
.- Source code:
- main
- Belongs to CDK module:
- cip
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumeration with the two tetrahedral chiralities defined by the CIP schema. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
IAtom index to indicate an implicit hydrogen, not present in the chemical graph. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkIfAllLigandsAreDifferent
(ILigand[] ligands) Checks if each nextILigand
is different from the previous one according to theCIPLigandRule
.static org.openscience.cdk.geometry.cip.LigancyFourChirality
defineLigancyFourChirality
(IAtomContainer container, int chiralAtom, int ligand1, int ligand2, int ligand3, int ligand4, ITetrahedralChirality.Stereo stereo) Creates a ligancy for chirality around a single chiral atom, where the involved atoms are identified by there index in theIAtomContainer
.static ILigand
defineLigand
(IAtomContainer container, VisitedAtoms visitedAtoms, int chiralAtom, int ligandAtom) Creates a ligand attached to a single chiral atom, where the involved atoms are identified by there index in theIAtomContainer
.static CIPTool.CIP_CHIRALITY
getCIPChirality
(org.openscience.cdk.geometry.cip.LigancyFourChirality stereoCenter) Returns the R or S chirality according to the CIP rules, based on the given chirality information.static CIPTool.CIP_CHIRALITY
getCIPChirality
(IAtomContainer container, IDoubleBondStereochemistry stereoCenter) static CIPTool.CIP_CHIRALITY
getCIPChirality
(IAtomContainer container, ITetrahedralChirality stereoCenter) Returns the R or S chirality according to the CIP rules, based on the given chirality information.static ILigand[]
getLigandLigands
(ILigand ligand) Returns a CIP-expanded array of side chains of a ligand.static void
label
(IAtomContainer container) Convenience method for labelling all stereo elements.static ILigand[]
Reorders theILigand
objects in the array according to the CIP rules.
-
Field Details
-
HYDROGEN
public static final int HYDROGENIAtom index to indicate an implicit hydrogen, not present in the chemical graph.- See Also:
-
-
Constructor Details
-
CIPTool
public CIPTool()
-
-
Method Details
-
getCIPChirality
public static CIPTool.CIP_CHIRALITY getCIPChirality(org.openscience.cdk.geometry.cip.LigancyFourChirality stereoCenter) Returns the R or S chirality according to the CIP rules, based on the given chirality information.- Parameters:
stereoCenter
- Chiral center for which the CIP chirality is to be determined asLigancyFourChirality
object.- Returns:
- A
CIPTool.CIP_CHIRALITY
value.
-
label
Convenience method for labelling all stereo elements. TheCIPTool.CIP_CHIRALITY
is determined for each element and stored as asString
on theCDKConstants.CIP_DESCRIPTOR
property key. Atoms/bonds that are not stereocenters have no label assigned and the property will be null.- Parameters:
container
- structure to label
-
getCIPChirality
public static CIPTool.CIP_CHIRALITY getCIPChirality(IAtomContainer container, ITetrahedralChirality stereoCenter) Returns the R or S chirality according to the CIP rules, based on the given chirality information.- Parameters:
container
-IAtomContainer
to which thestereoCenter
belongs.stereoCenter
- Chiral center for which the CIP chirality is to be determined asITetrahedralChirality
object.- Returns:
- A
CIPTool.CIP_CHIRALITY
value.
-
getCIPChirality
public static CIPTool.CIP_CHIRALITY getCIPChirality(IAtomContainer container, IDoubleBondStereochemistry stereoCenter) -
checkIfAllLigandsAreDifferent
Checks if each nextILigand
is different from the previous one according to theCIPLigandRule
. It assumes that the input is sorted based on that rule.- Parameters:
ligands
- array ofILigand
to check- Returns:
- true, if all ligands are different
-
order
Reorders theILigand
objects in the array according to the CIP rules. -
defineLigancyFourChirality
public static org.openscience.cdk.geometry.cip.LigancyFourChirality defineLigancyFourChirality(IAtomContainer container, int chiralAtom, int ligand1, int ligand2, int ligand3, int ligand4, ITetrahedralChirality.Stereo stereo) Creates a ligancy for chirality around a single chiral atom, where the involved atoms are identified by there index in theIAtomContainer
. For the four ligand atoms,HYDROGEN
can be passed as index, which will indicate the presence of an implicit hydrogen, not explicitly present in the chemical graph of the givencontainer
.- Parameters:
container
-IAtomContainer
for which the returnedILigand
s are definedchiralAtom
- int pointing to theIAtom
index of the chiral atomligand1
- int pointing to theIAtom
index of the firstILigand
ligand2
- int pointing to theIAtom
index of the secondILigand
ligand3
- int pointing to theIAtom
index of the thirdILigand
ligand4
- int pointing to theIAtom
index of the fourthILigand
stereo
-ITetrahedralChirality.Stereo
for the chirality- Returns:
- the created
LigancyFourChirality
-
defineLigand
public static ILigand defineLigand(IAtomContainer container, VisitedAtoms visitedAtoms, int chiralAtom, int ligandAtom) Creates a ligand attached to a single chiral atom, where the involved atoms are identified by there index in theIAtomContainer
. For ligand atom,HYDROGEN
can be passed as index, which will indicate the presence of an implicit hydrogen, not explicitly present in the chemical graph of the givencontainer
.- Parameters:
container
-IAtomContainer
for which the returnedILigand
s are definedvisitedAtoms
- a list of atoms already visited in the analysischiralAtom
- an integer pointing to theIAtom
index of the chiral atomligandAtom
- an integer pointing to theIAtom
index of theILigand
- Returns:
- the created
ILigand
-
getLigandLigands
Returns a CIP-expanded array of side chains of a ligand. If the ligand atom is only connected to the chiral atom, the method will return an empty list. The expansion involves the CIP rules, so that a double bonded oxygen will be represented twice in the list.
-