Class ExtendedTetrahedral

java.lang.Object
org.openscience.cdk.stereo.ExtendedTetrahedral
All Implemented Interfaces:
Cloneable, ICDKObject, IStereoElement<IAtom,IAtom>

public final class ExtendedTetrahedral extends Object
Extended tetrahedral configuration. Defines the winding configuration in a system with an even number of cumulated pi bonds. Examples include, (R)-laballenic acid (CHEBI:38401) and (S)-laballenic acid (CHEBI:38402). The extended tetrahedral stereochemistry can be represented and handled the same as normal tetrahedral stereochemistry. However the handling of the neighbours is subtly different. To assist in the description here are how atoms are referred to.

 p0           p2     p<i>: periphals
  \          /       t<i>: terminals
   t0 = f = t1       f:    focus
  /          \
 p1           p3
 
The data structure stores, the central 'focus' atom and the four peripheral atoms. The peripheral atoms are stored in a single array, {p0, p1, p2, p3}, the first two and last two entries should be attached to the same terminal atom (t0 or t1). For convenience the terminal atoms can be found with findTerminalAtoms(IAtomContainer).

 p0           p2          p0   p2
  \          /              \ /
   t0 = f = t1       -->     c       c: t0/f/t1
  /          \              / \
 p1           p3           p1  p3
 
The configuration treats the focus and terminal atoms as a single atom, the neighbours {p1, p2, p3} then proceeded either clockwise or anti-clockwise when the centre (t0/f/t1) is viewed from the first peripheral atom p0. If any of the peripherals are implicit hydrogen atoms, then the terminal atom to which the hydrogen is attached can be used as a placeholder.
Author:
John May
Keywords:
extended tetrahedral, allene, axial chirality
  • Field Details

  • Constructor Details

    • ExtendedTetrahedral

      public ExtendedTetrahedral(IAtom focus, IAtom[] peripherals, ITetrahedralChirality.Stereo winding)
      Create an extended tetrahedral stereo element for the provided 'focus' and 'peripherals' in the given 'winding'. See class documentation an annotated storage description.
      Parameters:
      focus - the central cumulated atom
      peripherals - atoms attached to the terminal atoms
      winding - the configuration
    • ExtendedTetrahedral

      public ExtendedTetrahedral(IAtom focus, IAtom[] peripherals, int config)
  • Method Details

    • focus

      public IAtom focus()
      The central atom in the cumulated system.
      Returns:
      the focus
    • peripherals

      public IAtom[] peripherals()
      The neighbouring peripherals atoms, these are attached to the terminal atoms in the cumulated system.
      Returns:
      the peripheral atoms
    • winding

      public ITetrahedralChirality.Stereo winding()
      The winding of the peripherals, when viewed from the first atom.
      Returns:
      winding configuration
    • findTerminalAtoms

      public static IAtom[] findTerminalAtoms(IAtomContainer container, IAtom focus)
      Helper method to locate two terminal atoms in a container for a given focus.
      Parameters:
      container - structure representation
      focus - cumulated atom
      Returns:
      the terminal atoms (unordered)
    • findTerminalAtoms

      public IAtom[] findTerminalAtoms(IAtomContainer container)
      Helper method to locate two terminal atoms in a container for this extended tetrahedral element. The atoms are ordered such that the first index is attached to the first two peripheral atoms and the second index is attached to the second two peripheral atoms.
      Parameters:
      container - structure representation
      Returns:
      the terminal atoms (ordered)
    • getLength

      public static int getLength(IAtomContainer container, IAtom focus)
    • create

      protected IStereoElement<IAtom,IAtom> create(IAtom focus, List<IAtom> carriers, int cfg)
    • numCarriers

      protected static int numCarriers(int cfg)
    • getFocus

      public IAtom getFocus()
      The focus atom or bond at the 'centre' of the stereo-configuration.
      Specified by:
      getFocus in interface IStereoElement<F extends IChemObject,C extends IChemObject>
      Returns:
      the focus
    • getCarriers

      public List<IAtom> getCarriers()
      The carriers of the stereochemistry
      Specified by:
      getCarriers in interface IStereoElement<F extends IChemObject,C extends IChemObject>
      Returns:
      the carriers
    • getConfigClass

      public int getConfigClass()
      The configuration class of the stereochemistry.
      Specified by:
      getConfigClass in interface IStereoElement<F extends IChemObject,C extends IChemObject>
      Returns:
      configuration class
    • getConfigOrder

      public int getConfigOrder()
      The configuration order of the stereochemistry.
      Specified by:
      getConfigOrder in interface IStereoElement<F extends IChemObject,C extends IChemObject>
      Returns:
      configuration
    • getConfig

      public int getConfig()
      Access the configuration order and class of the stereochemistry.
      Specified by:
      getConfig in interface IStereoElement<F extends IChemObject,C extends IChemObject>
      Returns:
      the configuration
    • setConfigOrder

      public void setConfigOrder(int cfg)
      Set the configuration order of the stereochemistry.
      Specified by:
      setConfigOrder in interface IStereoElement<F extends IChemObject,C extends IChemObject>
      Parameters:
      cfg - the new configuration
    • getGroupInfo

      public int getGroupInfo()
      Access the stereo group information - see class doc.
      Specified by:
      getGroupInfo in interface IStereoElement<F extends IChemObject,C extends IChemObject>
      Returns:
      the group info
    • setGroupInfo

      public void setGroupInfo(int grp)
      Set the stereo group information - see class doc.
      Specified by:
      setGroupInfo in interface IStereoElement<F extends IChemObject,C extends IChemObject>
      Parameters:
      grp - the group info
    • contains

      public boolean contains(IAtom atom)
      Does the stereo element contain the provided atom.
      Specified by:
      contains in interface IStereoElement<F extends IChemObject,C extends IChemObject>
      Parameters:
      atom - an atom to test membership
      Returns:
      whether the atom is present
    • map

      public IStereoElement<IAtom,IAtom> 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.
      Specified by:
      map in interface IStereoElement<F extends IChemObject,C extends IChemObject>
      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.
    • map

      Description copied from interface: IStereoElement
      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 IStereoElement.mapStrict(java.util.Map<org.openscience.cdk.interfaces.IChemObject, org.openscience.cdk.interfaces.IChemObject>).
      Specified by:
      map in interface IStereoElement<F extends IChemObject,C extends 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

      public final IStereoElement<IAtom,IAtom> mapStrict(Map<IChemObject,IChemObject> chemobjs)
      Description copied from interface: IStereoElement
      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.
      Specified by:
      mapStrict in interface IStereoElement<F extends IChemObject,C extends IChemObject>
      Parameters:
      chemobjs - chem object mapping
      Returns:
      a new stereo element in the same configuration but with atoms/bonds replaced with their mapped equivalence.
    • getBuilder

      public IChemObjectBuilder getBuilder()
      Returns a IChemObjectBuilder for the data classes that extend this class.
      Specified by:
      getBuilder in interface ICDKObject
      Returns:
      The IChemObjectBuilder matching this ICDKObject
    • setBuilder

      protected void setBuilder(IChemObjectBuilder builder)
    • invapply

      protected static <T> T[] invapply(T[] src, int[] perm)