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 int AL
      ExtendedTetrahedral a.k.a.
      static int Allenal
      ExtendedTetrahedral (e.g.
      static int AT
      Atropisomeric (e.g.
      static int Atropisomeric
      Atropisomeric (e.g.
      static int CFG_MASK  
      static int CisTrans
      Geometric CisTrans (e.g.
      static int CLS_MASK  
      static int CT
      Geometric CisTrans (e.g.
      static int CU
      ExtendedCisTrans a.k.a.
      static int Cumulene
      Cumulene
      static int GRP_ABS
      Absolute stereo group, the exact stereo configuration of this atom is known.
      static int GRP_MASK
      Mask for the stereo group information
      static int GRP_NUM_MASK
      Mask for the stereo group number information, 0x0 ..
      static int GRP_NUM_SHIFT  
      static int GRP_RAC
      Racemic stereo group type, the stereo configuration of this atom is a mixture of R/S.
      static int GRP_RAC1
      Convenience field for testing if the stereo is group RAC1 (&1).
      static int GRP_RAC2
      Convenience field for testing if the stereo is group RAC2 (&2).
      static int GRP_RAC3
      Convenience field for testing if the stereo is group RAC3 (&3).
      static int GRP_RAC4
      Convenience field for testing if the stereo is group RAC4 (&4).
      static int GRP_RAC5
      Convenience field for testing if the stereo is group RAC5 (&5).
      static 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.
      static int GRP_REL1
      Convenience field for testing if the stereo is group OR1 (&1).
      static int GRP_REL2
      Convenience field for testing if the stereo is group OR2 (&2).
      static int GRP_REL3
      Convenience field for testing if the stereo is group OR3 (&3).
      static int GRP_REL4
      Convenience field for testing if the stereo is group OR4 (&4).
      static int GRP_REL5
      Convenience field for testing if the stereo is group OR5 (&5).
      static int GRP_TYPE_MASK
      Mask for the stereo group type information, GRP_ABS, GRP_AND, GRP_OR
      static int HBPY8
      Hexagonal Bipyramidal (HBPY-8)
      static int HBPY9
      Heptagonal Bipyramidal (HBPY-9)
      static int HeptagonalBipyramidal
      Heptagonal Bipyramidal (HBPY-9)
      static int HexagonalBipyramidal
      Hexagonal Bipyramidal (HBPY-8)
      static int LEFT  
      static int OC
      Octahedral (OC-6)
      static int Octahedral
      Octahedral (OC-6)
      static int OPPOSITE  
      static int PBPY
      Pentagonal Bipyramidal (PBPY-7)
      static int PentagonalBipyramidal
      Pentagonal Bipyramidal (PBPY-7)
      static int RIGHT  
      static int SP
      Square Planar (SP-4) (e.g.
      static int SP4
      Square Planar Configutation in 4 Shape
      static int SPU
      Square Planar Configutation in U Shape
      static int SPY
      Square Pyramidal (SPY-5)
      static int SPZ
      Square Planar Configutation in Z Shape
      static int SquarePlanar
      Square Planar (SP-4) (e.g.
      static int SquarePyramidal
      Square Pyramidal (SPY-5)
      static int TBPY
      Trigonal Bipyramidal (TBPY-5)
      static int Tetrahedral
      Tetrahedral (T-4) (e.g.
      static int TH
      Tetrahedral (T-4) (e.g.
      static int TOGETHER  
      static int TrigonalBipyramidal
      Trigonal Bipyramidal (TBPY-5)
    • Method Detail

      • 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
      • 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.