Package org.openscience.cdk.stereo
Class TetrahedralChirality
- java.lang.Object
-
- org.openscience.cdk.stereo.TetrahedralChirality
-
- All Implemented Interfaces:
Cloneable,ICDKObject,IStereoElement<IAtom,IAtom>,ITetrahedralChirality
public class TetrahedralChirality extends Object implements ITetrahedralChirality
Stereochemistry specification for tetravalent atoms. SeeITetrahedralChiralityfor further details.- See Also:
ITetrahedralChirality- Source code:
- main
- Belongs to CDK module:
- core
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openscience.cdk.interfaces.ITetrahedralChirality
ITetrahedralChirality.Stereo
-
-
Field Summary
Fields Modifier and Type Field Description protected static intAprotected static intBprotected static intCprotected static intDprotected static intEprotected static intF-
Fields inherited from interface org.openscience.cdk.interfaces.IStereoElement
AL, Allenal, AT, Atropisomeric, CFG_MASK, CisTrans, CLS_MASK, CT, CU, Cumulene, GRP_ABS, GRP_MASK, GRP_NUM_MASK, GRP_NUM_SHIFT, GRP_RAC, GRP_RAC1, GRP_RAC2, GRP_RAC3, GRP_RAC4, GRP_RAC5, GRP_REL, GRP_REL1, GRP_REL2, GRP_REL3, GRP_REL4, GRP_REL5, GRP_TYPE_MASK, HBPY8, HBPY9, HeptagonalBipyramidal, HexagonalBipyramidal, LEFT, OC, Octahedral, OPPOSITE, PBPY, PentagonalBipyramidal, RIGHT, SP, SP4, SPU, SPY, SPZ, SquarePlanar, SquarePyramidal, TBPY, Tetrahedral, TH, TOGETHER, TrigonalBipyramidal
-
-
Constructor Summary
Constructors Constructor Description TetrahedralChirality(IAtom chiralAtom, IAtom[] ligands, int config)TetrahedralChirality(IAtom chiralAtom, IAtom[] ligands, ITetrahedralChirality.Stereo stereo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(IAtom atom)Does the stereo element contain the provided atom.protected IStereoElement<IAtom,IAtom>create(IAtom focus, List<IAtom> carriers, int config)IChemObjectBuildergetBuilder()Returns aIChemObjectBuilderfor the data classes that extend this class.List<C>getCarriers()The carriers of the stereochemistryIAtomgetChiralAtom()Atom that is the chirality center.intgetConfig()Access the configuration order and class of the stereochemistry.intgetConfigClass()The configuration class of the stereochemistry.intgetConfigOrder()The configuration order of the stereochemistry.FgetFocus()The focus atom or bond at the 'centre' of the stereo-configuration.intgetGroupInfo()Access the stereo group information - see class doc.IAtom[]getLigands()Returns an array of ligand atoms around the chiral atom.ITetrahedralChirality.StereogetStereo()Defines the stereochemistry around the chiral atom.protected static <T> T[]invapply(T[] src, int[] perm)ITetrahedralChiralitymap(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.ITetrahedralChiralitymap(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.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.protected static intnumCarriers(int cfg)voidsetBuilder(IChemObjectBuilder builder)voidsetConfigOrder(int cfg)Set the configuration order of the stereochemistry.voidsetGroupInfo(int grp)Set the stereo group information - see class doc.voidsetStereo(ITetrahedralChirality.Stereo stereo)Set the stereochemistry of this tetrahedral centre.StringtoString()Returns aStringrepresentation of this chiral element.IStereoElement<F,C>updateCarriers(C remove, Iterable<C> adds)IStereoElement<F,C>updateCarriers(Set<C> remove, C rep)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
-
Methods inherited from interface org.openscience.cdk.interfaces.IStereoElement
contains, getCarriers, getConfig, getConfigClass, getConfigOrder, getFocus, getGroupInfo, mapStrict, setConfigOrder, setGroupInfo, updateCarriers, updateCarriers, updateCarriers
-
-
-
-
Field Detail
-
A
protected static final int A
- See Also:
- Constant Field Values
-
B
protected static final int B
- See Also:
- Constant Field Values
-
C
protected static final int C
- See Also:
- Constant Field Values
-
D
protected static final int D
- See Also:
- Constant Field Values
-
E
protected static final int E
- See Also:
- Constant Field Values
-
F
protected static final int F
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TetrahedralChirality
public TetrahedralChirality(IAtom chiralAtom, IAtom[] ligands, ITetrahedralChirality.Stereo stereo)
-
-
Method Detail
-
getLigands
public IAtom[] getLigands()
Description copied from interface:ITetrahedralChiralityReturns an array of ligand atoms around the chiral atom. If the chiral centre has an implicit hydrogen or lone pair one of the ligands will be the chiral atom (ITetrahedralChirality.getChiralAtom()).- Specified by:
getLigandsin interfaceITetrahedralChirality- Returns:
- an array of four
IAtoms.
-
getChiralAtom
public IAtom getChiralAtom()
Description copied from interface:ITetrahedralChiralityAtom that is the chirality center.- Specified by:
getChiralAtomin interfaceITetrahedralChirality- Returns:
- the chiral
IAtom.
-
getStereo
public ITetrahedralChirality.Stereo getStereo()
Description copied from interface:ITetrahedralChiralityDefines the stereochemistry around the chiral atom. The value depends on the order of ligand atoms.- Specified by:
getStereoin interfaceITetrahedralChirality- Returns:
- the
ITetrahedralChirality.Stereofor this stereo element.
-
setStereo
public void setStereo(ITetrahedralChirality.Stereo stereo)
Description copied from interface:ITetrahedralChiralitySet the stereochemistry of this tetrahedral centre.- Specified by:
setStereoin interfaceITetrahedralChirality- Parameters:
stereo- the new stereo assignment
-
create
protected IStereoElement<IAtom,IAtom> create(IAtom focus, List<IAtom> carriers, int config)
-
map
public ITetrahedralChirality 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:
mapin interfaceIStereoElement<IAtom,IAtom>- Specified by:
mapin interfaceITetrahedralChirality- Parameters:
atoms- used to convert the original atoms to their mapped counterpartsbonds- 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
public ITetrahedralChirality map(Map<IChemObject,IChemObject> chemobjs)
Description copied from interface:IStereoElementUpdate 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 useIStereoElement.mapStrict(java.util.Map<org.openscience.cdk.interfaces.IChemObject, org.openscience.cdk.interfaces.IChemObject>).- Specified by:
mapin interfaceIStereoElement<IAtom,IAtom>- Parameters:
chemobjs- chem object mapping- Returns:
- a new stereo element in the same configuration but with atoms/bonds replaced with their mapped equivalence.
-
setBuilder
public void setBuilder(IChemObjectBuilder builder)
-
numCarriers
protected static int numCarriers(int cfg)
-
getFocus
public F getFocus()
The focus atom or bond at the 'centre' of the stereo-configuration.- Specified by:
getFocusin interfaceIStereoElement<F extends IChemObject,C extends IChemObject>- Returns:
- the focus
-
getCarriers
public List<C> getCarriers()
The carriers of the stereochemistry- Specified by:
getCarriersin interfaceIStereoElement<F extends IChemObject,C extends IChemObject>- Returns:
- the carriers
-
getConfigClass
public int getConfigClass()
The configuration class of the stereochemistry.- Specified by:
getConfigClassin interfaceIStereoElement<F extends IChemObject,C extends IChemObject>- Returns:
- configuration class
-
getConfigOrder
public int getConfigOrder()
The configuration order of the stereochemistry.- Specified by:
getConfigOrderin interfaceIStereoElement<F extends IChemObject,C extends IChemObject>- Returns:
- configuration
-
getConfig
public int getConfig()
Access the configuration order and class of the stereochemistry.- Specified by:
getConfigin interfaceIStereoElement<F extends IChemObject,C extends IChemObject>- Returns:
- the configuration
-
setConfigOrder
public void setConfigOrder(int cfg)
Set the configuration order of the stereochemistry.- Specified by:
setConfigOrderin interfaceIStereoElement<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:
getGroupInfoin interfaceIStereoElement<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:
setGroupInfoin interfaceIStereoElement<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:
containsin interfaceIStereoElement<F extends IChemObject,C extends IChemObject>- Parameters:
atom- an atom to test membership- Returns:
- whether the atom is present
-
updateCarriers
public IStereoElement<F,C> updateCarriers(C remove, Iterable<C> adds)
- Specified by:
updateCarriersin interfaceIStereoElement<F extends IChemObject,C extends IChemObject>
-
updateCarriers
public IStereoElement<F,C> updateCarriers(Set<C> remove, C rep)
- Specified by:
updateCarriersin interfaceIStereoElement<F extends IChemObject,C extends IChemObject>
-
mapStrict
public final IStereoElement<F,C> mapStrict(Map<IChemObject,IChemObject> chemobjs)
Description copied from interface:IStereoElementUpdate 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:
mapStrictin interfaceIStereoElement<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 aIChemObjectBuilderfor the data classes that extend this class.- Specified by:
getBuilderin interfaceICDKObject- Returns:
- The
IChemObjectBuildermatching thisICDKObject
-
invapply
protected static <T> T[] invapply(T[] src, int[] perm)
-
-