Interface IStereoElement<F extends IChemObject,C extends IChemObject>

All Superinterfaces:
Cloneable, ICDKObject
All Known Subinterfaces:
IDoubleBondStereochemistry, ITetrahedralChirality
All Known Implementing Classes:
Atropisomeric, DoubleBondStereochemistry, ExtendedCisTrans, ExtendedTetrahedral, Octahedral, SquarePlanar, TetrahedralChirality, TrigonalBipyramidal

public interface IStereoElement<F extends IChemObject,C extends IChemObject> extends ICDKObject
Representation of stereochemical configuration. The abstract configuration is described by three pieces of information:
  • the focus of the stereo chemistry
  • the carriers of the configuration
  • the configuration of the carriers

The focus/carriers may be either atoms or bonds. For example in the case of common tetrahedral stereochemistry the focus is the chiral atom, and the carriers are the bonds (or atoms) connected to it. The configuration is then either left-handed (anti-clockwise) or right-handed (clockwise).

Configuration
The configuration is stored as an integral value. Although the common geometries like tetrahedral and cis/trans bonds only have 2 possible configurations (e.g. left vs right) more complex geometries like square planar and octahedral require more to describe. For convenience the constants LEFT and RIGHT are provided but are synonymous with the values 1 (odd) and 2 (even).
Special values (e.g. 0) may be used to represent unknown/unspecified or racemic in future but are currently undefined.

Configuration Class
There stereo class defines the type of stereochemistry/geometry that is captured. The stereo class is also defined as a integral value. The following classes are available with varied support through out the toolkit. Each class is named with a short mnemonic code:
  • TH: Tetrahedral
  • CT: CisTrans a double-bond
  • AL: Extended Tetrahedral (Allenal)
  • AT: Atropisomeric
  • SP: Square Planar
  • SPY: Square Pyramidal
  • TBPY: Trigonal Bipyramidal
  • PBPY: Pentagonal Bipyramidal
  • OC: Octahedral
  • HBPY8: Hexagonal Bipyramidal
  • HBPY9: Heptagonal Bipyramidal
Stereo Groups (Enhanced stereo): Stereochemistry group information, aka "enhanced stereochemistry" in V3000 MOLFile etc allows you to specify racemic and unknown enantiomers. In V2000 MOLfile if the chiral flag is 0 it indicates the structure is a mixture of enantiomers. V3000 extended this concept to not only encode mixtures (and enantiomer) but also unknown stereochemistry (or enantiomer) and to be per chiral centre allow representation of any epimers. Reading an MDLV2000 molfile a chiral flag of 0 is equivalent to setting all stereocentres to GRP_RAC1. This information can also be encoded in CXSMILES. By default all stereocentres are GRP_ABS. The stereo group information is stored in the high bytes of the stereo configuration. You can access the basic information as follows:

 int grpconfig = stereo.getGroupInfo();
 if (grpconfig & IStereoElement.GRP_RAC1) {
     // group is RAC1
 } else if (config & IStereoElement.GRP_REL1) {
     // group is OR1
 }
 
You can also unpack the various parts of the information manually.

 int grpconfig = stereo.getGroupInfo();
 switch (grpconfig & IStereoElement.GRP_TYPE_MASK) {
   case IStereoElement.GRP_ABS:
   break;
   case IStereoElement.GRP_AND:
   break;
   case IStereoElement.GRP_OR:
   break;
 }

 // the group number 1, 2, 3, 4 is a little more tricky, you can mask off the value as
 // follows but it's shifted up into position
 int num = grpconfig & IStereoElement.GRP_NUM_MASK;

 // to get the number 1, 2, 3, etc you can simply shift it down as follows
 int num_act = grpconfig >>> IStereoElement.GRP_NUM_SHIFT;
 
Author:
Egon Willighagen, John Mayfield
Source code:
main
Belongs to CDK module:
interfaces
Keywords:
stereochemistry
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    ExtendedTetrahedral a.k.a.
    static final int
    ExtendedTetrahedral (e.g.
    static final int
    Atropisomeric (e.g.
    static final int
    Atropisomeric (e.g.
    static final int
     
    static final int
    Geometric CisTrans (e.g.
    static final int
     
    static final int
    Geometric CisTrans (e.g.
    static final int
    ExtendedCisTrans a.k.a.
    static final int
    Cumulene
    static final int
    Absolute stereo group, the exact stereo configuration of this atom is known.
    static final int
    Mask for the stereo group information
    static final int
    Mask for the stereo group number information, 0x0 ..
    static final int
     
    static final int
    Racemic stereo group type, the stereo configuration of this atom is a mixture of R/S.
    static final int
    Convenience field for testing if the stereo is group RAC1 (&1).
    static final int
    Convenience field for testing if the stereo is group RAC2 (&2).
    static final int
    Convenience field for testing if the stereo is group RAC3 (&3).
    static final int
    Convenience field for testing if the stereo is group RAC4 (&4).
    static final int
    Convenience field for testing if the stereo is group RAC5 (&5).
    static final int
    Relative stereo group type, the stereo configuration of this atom is unknown but is relative to another atom in the same group.
    static final int
    Convenience field for testing if the stereo is group OR1 (&1).
    static final int
    Convenience field for testing if the stereo is group OR2 (&2).
    static final int
    Convenience field for testing if the stereo is group OR3 (&3).
    static final int
    Convenience field for testing if the stereo is group OR4 (&4).
    static final int
    Convenience field for testing if the stereo is group OR5 (&5).
    static final int
    Mask for the stereo group type information, GRP_ABS, GRP_AND, GRP_OR
    static final int
    Hexagonal Bipyramidal (HBPY-8)
    static final int
    Heptagonal Bipyramidal (HBPY-9)
    static final int
    Heptagonal Bipyramidal (HBPY-9)
    static final int
    Hexagonal Bipyramidal (HBPY-8)
    static final int
     
    static final int
    Octahedral (OC-6)
    static final int
    Octahedral (OC-6)
    static final int
     
    static final int
    Pentagonal Bipyramidal (PBPY-7)
    static final int
    Pentagonal Bipyramidal (PBPY-7)
    static final int
     
    static final int
    Square Planar (SP-4) (e.g.
    static final int
    Square Planar Configutation in 4 Shape
    static final int
    Square Planar Configutation in U Shape
    static final int
    Square Pyramidal (SPY-5)
    static final int
    Square Planar Configutation in Z Shape
    static final int
    Square Planar (SP-4) (e.g.
    static final int
    Square Pyramidal (SPY-5)
    static final int
    Trigonal Bipyramidal (TBPY-5)
    static final int
    Tetrahedral (T-4) (e.g.
    static final int
    Tetrahedral (T-4) (e.g.
    static final int
     
    static final int
    Trigonal Bipyramidal (TBPY-5)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Does the stereo element contain the provided atom.
    The carriers of the stereochemistry
    int
    Access the configuration order and class of the stereochemistry.
    int
    The configuration class of the stereochemistry.
    int
    The configuration order of the stereochemistry.
    The focus atom or bond at the 'centre' of the stereo-configuration.
    int
    Access the stereo group information - see class doc.
    map(Map<IAtom,IAtom> atoms, Map<IBond,IBond> bonds)
    Map the atoms/bonds in this instance to a new stereo element using the provided atom/bond mapping.
    Update the stereo using the remapping of atoms/bonds in this instance to a new stereo element using the provided atom/bond mapping.
    Update the stereo using the remapping of atoms/bonds in this instance to a new stereo element using the provided atom/bond mapping.
    void
    setConfigOrder(int cfg)
    Set the configuration order of the stereochemistry.
    void
    setGroupInfo(int grp)
    Set the stereo group information - see class doc.

    Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject

    getBuilder
  • Field Details

    • CLS_MASK

      static final int CLS_MASK
      See Also:
    • CFG_MASK

      static final int CFG_MASK
      See Also:
    • LEFT

      static final int LEFT
      See Also:
    • OPPOSITE

      static final int OPPOSITE
      See Also:
    • TOGETHER

      static final int TOGETHER
      See Also:
    • CT

      static final int CT
      Geometric CisTrans (e.g. but-2-ene)
      See Also:
    • TH

      static final int TH
      Tetrahedral (T-4) (e.g. butan-2-ol)
      See Also:
    • AL

      static final int AL
      ExtendedTetrahedral a.k.a. allene (e.g. 2,3-pentadiene)
      See Also:
    • CU

      static final int CU
      ExtendedCisTrans a.k.a. cumulene (e.g. hexa-2,3,4-triene)
      See Also:
    • AT

      static final int AT
      Atropisomeric (e.g. BiNAP)
      See Also:
    • SP

      static final int SP
      Square Planar (SP-4) (e.g. cisplatin)
      See Also:
    • SPY

      static final int SPY
      Square Pyramidal (SPY-5)
      See Also:
    • TBPY

      static final int TBPY
      Trigonal Bipyramidal (TBPY-5)
      See Also:
    • OC

      static final int OC
      Octahedral (OC-6)
      See Also:
    • PBPY

      static final int PBPY
      Pentagonal Bipyramidal (PBPY-7)
      See Also:
    • HBPY8

      static final int HBPY8
      Hexagonal Bipyramidal (HBPY-8)
      See Also:
    • HBPY9

      static final int HBPY9
      Heptagonal Bipyramidal (HBPY-9)
      See Also:
    • CisTrans

      static final int CisTrans
      Geometric CisTrans (e.g. but-2-ene)
      See Also:
    • Tetrahedral

      static final int Tetrahedral
      Tetrahedral (T-4) (e.g. butan-2-ol)
      See Also:
    • Allenal

      static final int Allenal
      ExtendedTetrahedral (e.g. 2,3-pentadiene)
      See Also:
    • Cumulene

      static final int Cumulene
      Cumulene
      See Also:
    • Atropisomeric

      static final int Atropisomeric
      Atropisomeric (e.g. BiNAP)
      See Also:
    • SquarePlanar

      static final int SquarePlanar
      Square Planar (SP-4) (e.g. cisplatin)
      See Also:
    • SquarePyramidal

      static final int SquarePyramidal
      Square Pyramidal (SPY-5)
      See Also:
    • TrigonalBipyramidal

      static final int TrigonalBipyramidal
      Trigonal Bipyramidal (TBPY-5)
      See Also:
    • Octahedral

      static final int Octahedral
      Octahedral (OC-6)
      See Also:
    • PentagonalBipyramidal

      static final int PentagonalBipyramidal
      Pentagonal Bipyramidal (PBPY-7)
      See Also:
    • HexagonalBipyramidal

      static final int HexagonalBipyramidal
      Hexagonal Bipyramidal (HBPY-8)
      See Also:
    • HeptagonalBipyramidal

      static final int HeptagonalBipyramidal
      Heptagonal Bipyramidal (HBPY-9)
      See Also:
    • SPU

      static final int SPU
      Square Planar Configutation in U Shape
      See Also:
    • SP4

      static final int SP4
      Square Planar Configutation in 4 Shape
      See Also:
    • SPZ

      static final int SPZ
      Square Planar Configutation in Z Shape
      See Also:
    • GRP_MASK

      static final int GRP_MASK
      Mask for the stereo group information
      See Also:
    • GRP_TYPE_MASK

      static final int GRP_TYPE_MASK
      Mask for the stereo group type information, GRP_ABS, GRP_AND, GRP_OR
      See Also:
    • GRP_NUM_MASK

      static final int GRP_NUM_MASK
      Mask for the stereo group number information, 0x0 .. 0xf (1..15)
      See Also:
    • GRP_NUM_SHIFT

      static final int GRP_NUM_SHIFT
      See Also:
    • GRP_ABS

      static final int GRP_ABS
      Absolute stereo group, the exact stereo configuration of this atom is known.
      See Also:
    • GRP_RAC

      static final int GRP_RAC
      Racemic stereo group type, the stereo configuration of this atom is a mixture of R/S. An atom can be
      See Also:
    • GRP_REL

      static final int GRP_REL
      Relative stereo group type, the stereo configuration of this atom is unknown but is relative to another atom in the same group.
      See Also:
    • GRP_RAC1

      static final int GRP_RAC1
      Convenience field for testing if the stereo is group RAC1 (&1).
      See Also:
    • GRP_RAC2

      static final int GRP_RAC2
      Convenience field for testing if the stereo is group RAC2 (&2).
      See Also:
    • GRP_RAC3

      static final int GRP_RAC3
      Convenience field for testing if the stereo is group RAC3 (&3).
      See Also:
    • GRP_RAC4

      static final int GRP_RAC4
      Convenience field for testing if the stereo is group RAC4 (&4).
      See Also:
    • GRP_RAC5

      static final int GRP_RAC5
      Convenience field for testing if the stereo is group RAC5 (&5).
      See Also:
    • GRP_REL1

      static final int GRP_REL1
      Convenience field for testing if the stereo is group OR1 (&1).
      See Also:
    • GRP_REL2

      static final int GRP_REL2
      Convenience field for testing if the stereo is group OR2 (&2).
      See Also:
    • GRP_REL3

      static final int GRP_REL3
      Convenience field for testing if the stereo is group OR3 (&3).
      See Also:
    • GRP_REL4

      static final int GRP_REL4
      Convenience field for testing if the stereo is group OR4 (&4).
      See Also:
    • GRP_REL5

      static final int GRP_REL5
      Convenience field for testing if the stereo is group OR5 (&5).
      See Also:
  • Method Details

    • getFocus

      F getFocus()
      The focus atom or bond at the 'centre' of the stereo-configuration.
      Returns:
      the focus
    • getCarriers

      List<C> getCarriers()
      The carriers of the stereochemistry
      Returns:
      the carriers
    • getConfigClass

      int getConfigClass()
      The configuration class of the stereochemistry.
      Returns:
      configuration class
    • getConfigOrder

      int getConfigOrder()
      The configuration order of the stereochemistry.
      Returns:
      configuration
    • setConfigOrder

      void setConfigOrder(int cfg)
      Set the configuration order of the stereochemistry.
      Parameters:
      cfg - the new configuration
    • getConfig

      int getConfig()
      Access the configuration order and class of the stereochemistry.
      Returns:
      the configuration
    • getGroupInfo

      int getGroupInfo()
      Access the stereo group information - see class doc.
      Returns:
      the group info
    • setGroupInfo

      void setGroupInfo(int grp)
      Set the stereo group information - see class doc.
      Parameters:
      grp - the group info
    • contains

      boolean contains(IAtom atom)
      Does the stereo element contain the provided atom.
      Parameters:
      atom - an atom to test membership
      Returns:
      whether the atom is present
    • map

      Update the stereo using the remapping of atoms/bonds in this instance to a new stereo element using the provided atom/bond mapping. This allows the stereo element to be transferred between a cloned or aligned (i.e. isomorphic) chemical graph. If no mapping is found for a given atom or bond the existing atom/bond it is left intact. If you want to remove stereo in such cases please use mapStrict(java.util.Map<org.openscience.cdk.interfaces.IChemObject, org.openscience.cdk.interfaces.IChemObject>).
      Parameters:
      chemobjs - chem object mapping
      Returns:
      a new stereo element in the same configuration but with atoms/bonds replaced with their mapped equivalence.
    • mapStrict

      IStereoElement<F,C> mapStrict(Map<IChemObject,IChemObject> chemobjs)
      Update the stereo using the remapping of atoms/bonds in this instance to a new stereo element using the provided atom/bond mapping. This allows the stereo element to be transferred between a cloned or aligned (i.e. isomorphic) chemical graph. If no mapping is found for a given atom or bond a new element is NOT created.
      Parameters:
      chemobjs - chem object mapping
      Returns:
      a new stereo element in the same configuration but with atoms/bonds replaced with their mapped equivalence.
    • map

      IStereoElement map(Map<IAtom,IAtom> atoms, Map<IBond,IBond> bonds)
      Map the atoms/bonds in this instance to a new stereo element using the provided atom/bond mapping. This allows the stereo element to be transferred between a cloned or aligned (i.e. isomorphic) chemical graph. If no mapping is found for a given atom or bond it is left intact. However the provided atom and bonds maps must not be null.
      Parameters:
      atoms - used to convert the original atoms to their mapped counterparts
      bonds - used to convert the original bonds to their mapped counterparts
      Returns:
      a new stereo element in the same configuration but with atoms/bonds replaced with their mapped equivalence.