Class CIPTool

java.lang.Object
org.openscience.cdk.geometry.cip.CIPTool

public class CIPTool extends Object
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
  • Field Details

    • HYDROGEN

      public static final int HYDROGEN
      IAtom 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 as LigancyFourChirality object.
      Returns:
      A CIPTool.CIP_CHIRALITY value.
    • label

      public static void label(IAtomContainer container)
      Convenience method for labelling all stereo elements. The CIPTool.CIP_CHIRALITY is determined for each element and stored as as String on the CDKConstants.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 the stereoCenter belongs.
      stereoCenter - Chiral center for which the CIP chirality is to be determined as ITetrahedralChirality object.
      Returns:
      A CIPTool.CIP_CHIRALITY value.
    • getCIPChirality

      public static CIPTool.CIP_CHIRALITY getCIPChirality(IAtomContainer container, IDoubleBondStereochemistry stereoCenter)
    • checkIfAllLigandsAreDifferent

      public static boolean checkIfAllLigandsAreDifferent(ILigand[] ligands)
      Checks if each next ILigand is different from the previous one according to the CIPLigandRule. It assumes that the input is sorted based on that rule.
      Parameters:
      ligands - array of ILigand to check
      Returns:
      true, if all ligands are different
    • order

      public static ILigand[] order(ILigand[] ligands)
      Reorders the ILigand objects in the array according to the CIP rules.
      Parameters:
      ligands - Array of ILigands to be reordered.
      Returns:
      Reordered array of ILigands.
    • 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 the IAtomContainer. 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 given container.
      Parameters:
      container - IAtomContainer for which the returned ILigands are defined
      chiralAtom - int pointing to the IAtom index of the chiral atom
      ligand1 - int pointing to the IAtom index of the first ILigand
      ligand2 - int pointing to the IAtom index of the second ILigand
      ligand3 - int pointing to the IAtom index of the third ILigand
      ligand4 - int pointing to the IAtom index of the fourth ILigand
      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 the IAtomContainer. 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 given container.
      Parameters:
      container - IAtomContainer for which the returned ILigands are defined
      visitedAtoms - a list of atoms already visited in the analysis
      chiralAtom - an integer pointing to the IAtom index of the chiral atom
      ligandAtom - an integer pointing to the IAtom index of the ILigand
      Returns:
      the created ILigand
    • getLigandLigands

      public static ILigand[] getLigandLigands(ILigand ligand)
      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.
      Parameters:
      ligand - the ILigand for which to return the ILigands
      Returns:
      a ILigand array with the side chains of the ligand atom