Package org.openscience.cdk.interfaces
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 constantsLEFT
andRIGHT
are provided but are synonymous with the values1
(odd) and2
(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
: TetrahedralCT
: CisTrans a double-bondAL
: Extended Tetrahedral (Allenal)AT
: AtropisomericSP
: Square PlanarSPY
: Square PyramidalTBPY
: Trigonal BipyramidalPBPY
: Pentagonal BipyramidalOC
: OctahedralHBPY8
: Hexagonal BipyramidalHBPY9
: Heptagonal Bipyramidal
GRP_RAC1
. This information can also be encoded in CXSMILES. By default all stereocentres areGRP_ABS
. The stereo group information is stored in the high bytes of the stereo configuration. You can access the basic information as follows:
You can also unpack the various parts of the information manually.int grpconfig = stereo.getGroupInfo(); if (grpconfig & IStereoElement.GRP_RAC1) { // group is RAC1 } else if (config & IStereoElement.GRP_REL1) { // group is OR1 }
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
Cumulenestatic int
GRP_ABS
Absolute stereo group, the exact stereo configuration of this atom is known.static int
GRP_MASK
Mask for the stereo group informationstatic 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_ORstatic 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 Shapestatic int
SPU
Square Planar Configutation in U Shapestatic int
SPY
Square Pyramidal (SPY-5)static int
SPZ
Square Planar Configutation in Z Shapestatic 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
contains(IAtom atom)
Does the stereo element contain the provided atom.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.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.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.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 Detail
-
CLS_MASK
static final int CLS_MASK
- See Also:
- Constant Field Values
-
CFG_MASK
static final int CFG_MASK
- See Also:
- Constant Field Values
-
LEFT
static final int LEFT
- See Also:
- Constant Field Values
-
RIGHT
static final int RIGHT
- See Also:
- Constant Field Values
-
OPPOSITE
static final int OPPOSITE
- See Also:
- Constant Field Values
-
TOGETHER
static final int TOGETHER
- See Also:
- Constant Field Values
-
CT
static final int CT
Geometric CisTrans (e.g. but-2-ene)- See Also:
- Constant Field Values
-
TH
static final int TH
Tetrahedral (T-4) (e.g. butan-2-ol)- See Also:
- Constant Field Values
-
AL
static final int AL
ExtendedTetrahedral a.k.a. allene (e.g. 2,3-pentadiene)- See Also:
- Constant Field Values
-
CU
static final int CU
ExtendedCisTrans a.k.a. cumulene (e.g. hexa-2,3,4-triene)- See Also:
- Constant Field Values
-
AT
static final int AT
Atropisomeric (e.g. BiNAP)- See Also:
- Constant Field Values
-
SP
static final int SP
Square Planar (SP-4) (e.g. cisplatin)- See Also:
- Constant Field Values
-
SPY
static final int SPY
Square Pyramidal (SPY-5)- See Also:
- Constant Field Values
-
TBPY
static final int TBPY
Trigonal Bipyramidal (TBPY-5)- See Also:
- Constant Field Values
-
OC
static final int OC
Octahedral (OC-6)- See Also:
- Constant Field Values
-
PBPY
static final int PBPY
Pentagonal Bipyramidal (PBPY-7)- See Also:
- Constant Field Values
-
HBPY8
static final int HBPY8
Hexagonal Bipyramidal (HBPY-8)- See Also:
- Constant Field Values
-
HBPY9
static final int HBPY9
Heptagonal Bipyramidal (HBPY-9)- See Also:
- Constant Field Values
-
CisTrans
static final int CisTrans
Geometric CisTrans (e.g. but-2-ene)- See Also:
- Constant Field Values
-
Tetrahedral
static final int Tetrahedral
Tetrahedral (T-4) (e.g. butan-2-ol)- See Also:
- Constant Field Values
-
Allenal
static final int Allenal
ExtendedTetrahedral (e.g. 2,3-pentadiene)- See Also:
- Constant Field Values
-
Cumulene
static final int Cumulene
Cumulene- See Also:
- Constant Field Values
-
Atropisomeric
static final int Atropisomeric
Atropisomeric (e.g. BiNAP)- See Also:
- Constant Field Values
-
SquarePlanar
static final int SquarePlanar
Square Planar (SP-4) (e.g. cisplatin)- See Also:
- Constant Field Values
-
SquarePyramidal
static final int SquarePyramidal
Square Pyramidal (SPY-5)- See Also:
- Constant Field Values
-
TrigonalBipyramidal
static final int TrigonalBipyramidal
Trigonal Bipyramidal (TBPY-5)- See Also:
- Constant Field Values
-
Octahedral
static final int Octahedral
Octahedral (OC-6)- See Also:
- Constant Field Values
-
PentagonalBipyramidal
static final int PentagonalBipyramidal
Pentagonal Bipyramidal (PBPY-7)- See Also:
- Constant Field Values
-
HexagonalBipyramidal
static final int HexagonalBipyramidal
Hexagonal Bipyramidal (HBPY-8)- See Also:
- Constant Field Values
-
HeptagonalBipyramidal
static final int HeptagonalBipyramidal
Heptagonal Bipyramidal (HBPY-9)- See Also:
- Constant Field Values
-
SPU
static final int SPU
Square Planar Configutation in U Shape- See Also:
- Constant Field Values
-
SP4
static final int SP4
Square Planar Configutation in 4 Shape- See Also:
- Constant Field Values
-
SPZ
static final int SPZ
Square Planar Configutation in Z Shape- See Also:
- Constant Field Values
-
GRP_MASK
static final int GRP_MASK
Mask for the stereo group information- See Also:
- Constant Field Values
-
GRP_TYPE_MASK
static final int GRP_TYPE_MASK
Mask for the stereo group type information, GRP_ABS, GRP_AND, GRP_OR- See Also:
- Constant Field Values
-
GRP_NUM_MASK
static final int GRP_NUM_MASK
Mask for the stereo group number information, 0x0 .. 0xf (1..15)- See Also:
- Constant Field Values
-
GRP_NUM_SHIFT
static final int GRP_NUM_SHIFT
- See Also:
- Constant Field Values
-
GRP_ABS
static final int GRP_ABS
Absolute stereo group, the exact stereo configuration of this atom is known.- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
GRP_RAC1
static final int GRP_RAC1
Convenience field for testing if the stereo is group RAC1 (&1).- See Also:
- Constant Field Values
-
GRP_RAC2
static final int GRP_RAC2
Convenience field for testing if the stereo is group RAC2 (&2).- See Also:
- Constant Field Values
-
GRP_RAC3
static final int GRP_RAC3
Convenience field for testing if the stereo is group RAC3 (&3).- See Also:
- Constant Field Values
-
GRP_RAC4
static final int GRP_RAC4
Convenience field for testing if the stereo is group RAC4 (&4).- See Also:
- Constant Field Values
-
GRP_RAC5
static final int GRP_RAC5
Convenience field for testing if the stereo is group RAC5 (&5).- See Also:
- Constant Field Values
-
GRP_REL1
static final int GRP_REL1
Convenience field for testing if the stereo is group OR1 (&1).- See Also:
- Constant Field Values
-
GRP_REL2
static final int GRP_REL2
Convenience field for testing if the stereo is group OR2 (&2).- See Also:
- Constant Field Values
-
GRP_REL3
static final int GRP_REL3
Convenience field for testing if the stereo is group OR3 (&3).- See Also:
- Constant Field Values
-
GRP_REL4
static final int GRP_REL4
Convenience field for testing if the stereo is group OR4 (&4).- See Also:
- Constant Field Values
-
GRP_REL5
static final int GRP_REL5
Convenience field for testing if the stereo is group OR5 (&5).- See Also:
- Constant Field Values
-
-
Method Detail
-
getFocus
F getFocus()
The focus atom or bond at the 'centre' of the stereo-configuration.- Returns:
- the focus
-
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
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. 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 usemapStrict(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 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.
-
-