Package org.openscience.cdk.stereo
Class TrigonalBipyramidal
- java.lang.Object
-
- org.openscience.cdk.stereo.TrigonalBipyramidal
-
- All Implemented Interfaces:
Cloneable
,ICDKObject
,IStereoElement<IAtom,IAtom>
public final class TrigonalBipyramidal extends Object
Describes a trigonal-bipyramidal configuration. The configuration carriers are arranged with two co-linear on an axis and three equatorial. The configuration order is between 1 and 20 and follows the same meaning as SMILES.d c TB1 \ / a---x---e where a: first carrier, b: second carrier, ... * | x: focus b 'c' is in front of 'x', 'd' is behind
The configuration can be normalized to the lowest order (1) using thenormalize()
function.- See Also:
-
Trigonal Bipyramidal, OpenSMILES,
Octahedral
,SquarePlanar
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
A
protected static int
B
protected static int
C
protected static int
D
protected static int
E
protected static int
F
-
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 TrigonalBipyramidal(IAtom focus, IAtom[] carriers, int order)
Create a new trigonal bipyramidal configuration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(IAtom atom)
Does the stereo element contain the provided atom.protected TrigonalBipyramidal
create(IAtom focus, List<IAtom> carriers, int cfg)
IChemObjectBuilder
getBuilder()
Returns aIChemObjectBuilder
for the data classes that extend this class.List<C>
getCarriers()
The carriers of the stereochemistryint
getConfig()
Access the configuration order and class of the stereochemistry.int
getConfigClass()
The configuration class of the stereochemistry.int
getConfigOrder()
The configuration order of the stereochemistry.F
getFocus()
The focus atom or bond at the 'centre' of the stereo-configuration.int
getGroupInfo()
Access the stereo group information - see class doc.protected static <T> T[]
invapply(T[] src, int[] perm)
IStereoElement<F,C>
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.IStereoElement<F,C>
map(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.TrigonalBipyramidal
normalize()
Normalize the configuration to the lowest configuration order (1) - the axis goes from the first to last carrier, the three middle carriers are anti-clockwise looking from the first carrier.protected static int
numCarriers(int cfg)
protected void
setBuilder(IChemObjectBuilder builder)
void
setConfigOrder(int cfg)
Set the configuration order of the stereochemistry.void
setGroupInfo(int grp)
Set the stereo group information - see class doc.
-
-
-
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
-
-
Method Detail
-
normalize
public TrigonalBipyramidal normalize()
Normalize the configuration to the lowest configuration order (1) - the axis goes from the first to last carrier, the three middle carriers are anti-clockwise looking from the first carrier.- Returns:
- the normalized configuration
-
create
protected TrigonalBipyramidal create(IAtom focus, List<IAtom> carriers, int cfg)
-
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:
getFocus
in interfaceIStereoElement<F extends IChemObject,C extends IChemObject>
- Returns:
- the focus
-
getCarriers
public List<C> getCarriers()
The carriers of the stereochemistry- Specified by:
getCarriers
in interfaceIStereoElement<F extends IChemObject,C extends IChemObject>
- Returns:
- the carriers
-
getConfigClass
public int getConfigClass()
The configuration class of the stereochemistry.- Specified by:
getConfigClass
in interfaceIStereoElement<F extends IChemObject,C extends IChemObject>
- Returns:
- configuration class
-
getConfigOrder
public int getConfigOrder()
The configuration order of the stereochemistry.- Specified by:
getConfigOrder
in interfaceIStereoElement<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 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:
setConfigOrder
in 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:
getGroupInfo
in 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:
setGroupInfo
in 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:
contains
in interfaceIStereoElement<F extends IChemObject,C extends IChemObject>
- Parameters:
atom
- an atom to test membership- Returns:
- whether the atom is present
-
map
public IStereoElement<F,C> 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 interfaceIStereoElement<F extends IChemObject,C extends IChemObject>
- 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 IStereoElement<F,C> map(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 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:
map
in 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.
-
mapStrict
public final IStereoElement<F,C> 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 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 aIChemObjectBuilder
for the data classes that extend this class.- Specified by:
getBuilder
in interfaceICDKObject
- Returns:
- The
IChemObjectBuilder
matching thisICDKObject
-
setBuilder
protected void setBuilder(IChemObjectBuilder builder)
-
invapply
protected static <T> T[] invapply(T[] src, int[] perm)
-
-