Package org.openscience.cdk.geometry
Class BondTools
java.lang.Object
org.openscience.cdk.geometry.BondTools
A set of static utility classes for geometric calculations on
IBonds.
The methods for detecting stereo configurations are described in CDK news, vol 2, p. 64 - 66.- Author:
- shk3
- Created on:
- 2005-08-04
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancloseEnoughToBond(IAtom atom1, IAtom atom2, double distanceFudgeFactor) Returns true if the two atoms are within the distance fudge factor of each other.static doubleCalls giveAngleBothMethods with bool = true.static doublegiveAngleBothMethods(javax.vecmath.Point2d from, javax.vecmath.Point2d to1, javax.vecmath.Point2d to2, boolean bool) Deprecated.this function should be internalstatic doublegiveAngleBothMethods(IAtom from, IAtom to1, IAtom to2, boolean bool) Deprecated.this function should be internalstatic doublegiveAngleFromMiddle(IAtom from, IAtom to1, IAtom to2) Calls giveAngleBothMethods with bool = false.static booleanisCisTrans(IAtom firstOuterAtom, IAtom firstInnerAtom, IAtom secondInnerAtom, IAtom secondOuterAtom, IAtomContainer ac) Says if two atoms are in cis or trans position around a double bond.static booleanSays if an atom is on the left side of a another atom seen from a certain atom or not.static booleanisSquarePlanar(IAtomContainer container, IAtom atom) Deprecated.Stereochemistry in CDK is now stored withIStereoElements.static booleanisStereo(IAtomContainer container, IAtom stereoAtom) Deprecated.Stereochemistry in CDK is now stored withIStereoElements.static intisTetrahedral(IAtomContainer container, IAtom atom, boolean strict) Deprecated.Stereochemistry in CDK is now stored withIStereoElements.static intisTrigonalBipyramidalOrOctahedral(IAtomContainer container, IAtom atom) Deprecated.Stereochemistry in CDK is now stored withIStereoElements.static booleanisValidDoubleBondConfiguration(IAtomContainer container, IBond bond) Tells if a certain bond is center of a valid double bond configuration.static voidmakeUpDownBonds(IAtomContainer container) static booleanstereosAreOpposite(IAtomContainer container, IAtom atom) Deprecated.Stereochemistry in CDK is now stored withIStereoElements.
-
Constructor Details
-
BondTools
public BondTools()
-
-
Method Details
-
isValidDoubleBondConfiguration
Tells if a certain bond is center of a valid double bond configuration.- Parameters:
container- The atomcontainer.bond- The bond.- Returns:
- true=is a potential configuration, false=is not.
-
isCisTrans
public static boolean isCisTrans(IAtom firstOuterAtom, IAtom firstInnerAtom, IAtom secondInnerAtom, IAtom secondOuterAtom, IAtomContainer ac) throws CDKException Says if two atoms are in cis or trans position around a double bond. The atoms have to be given to the method like this: firstOuterAtom - firstInnerAtom = secondInnterAtom - secondOuterAtom- Parameters:
firstOuterAtom- See above.firstInnerAtom- See above.secondInnerAtom- See above.secondOuterAtom- See above.ac- The atom container the atoms are in.- Returns:
- true=trans, false=cis.
- Throws:
CDKException- The atoms are not in a double bond configuration (no double bond in the middle, same atoms on one side)
-
isLeft
Says if an atom is on the left side of a another atom seen from a certain atom or not.- Parameters:
whereIs- The atom the position of which is returnedviewFrom- The atom from which to lookviewTo- The atom to which to look- Returns:
- true=is left, false = is not
-
closeEnoughToBond
Returns true if the two atoms are within the distance fudge factor of each other.- Parameters:
atom1- Description of Parameteratom2- Description of ParameterdistanceFudgeFactor- Description of Parameter- Returns:
- Description of the Returned Value
- Keywords:
- join-the-dots, bond creation
-
giveAngleBothMethods
@Deprecated public static double giveAngleBothMethods(IAtom from, IAtom to1, IAtom to2, boolean bool) Deprecated.this function should be internalGives the angle between two lines starting at atom from and going to to1 and to2. If bool=false the angle starts from the middle line and goes from 0 to PI or 0 to -PI if the to2 is on the left or right side of the line. If bool=true the angle goes from 0 to 2PI.- Parameters:
from- the atom to view from.to1- first direction to look in.to2- second direction to look in.bool- true=angle is 0 to 2PI, false=angel is -PI to PI.- Returns:
- The angle in rad.
-
giveAngleBothMethods
@Deprecated public static double giveAngleBothMethods(javax.vecmath.Point2d from, javax.vecmath.Point2d to1, javax.vecmath.Point2d to2, boolean bool) Deprecated.this function should be internal -
isTetrahedral
Deprecated.Stereochemistry in CDK is now stored withIStereoElements.Says if an atom as a center of a tetrahedral chirality. This method uses wedge bonds. 3D coordinates are not taken into account. If there are no wedge bonds around a potential stereo center, it will not be found.- Parameters:
atom- The atom which is the centercontainer- The atomContainer the atom is in- Returns:
- 0=is not tetrahedral; >1 is a certain depiction of tetrahedrality (evaluated in parse chain)
-
isTrigonalBipyramidalOrOctahedral
@Deprecated public static int isTrigonalBipyramidalOrOctahedral(IAtomContainer container, IAtom atom) Deprecated.Stereochemistry in CDK is now stored withIStereoElements.Says if an atom as a center of a trigonal-bipyramidal or actahedral chirality. This method uses wedge bonds. 3D coordinates are not taken into account. If there are no wedge bonds around a potential stereo center, it will not be found.- Parameters:
atom- The atom which is the centercontainer- The atomContainer the atom is in- Returns:
- true=is square planar, false=is not
-
isStereo
Deprecated.Stereochemistry in CDK is now stored withIStereoElements. andStereocentersandStereoElementFactorySays if an atom as a center of any valid stereo configuration or not. This method uses wedge bonds. 3D coordinates are not taken into account. If there are no wedge bonds around a potential stereo center, it will not be found.- Parameters:
stereoAtom- The atom which is the centercontainer- The atomContainer the atom is in- Returns:
- true=is a stereo atom, false=is not
-
isSquarePlanar
Deprecated.Stereochemistry in CDK is now stored withIStereoElements.Says if an atom as a center of a square planar chirality. This method uses wedge bonds. 3D coordinates are not taken into account. If there are no wedge bonds around a potential stereo center, it will not be found.- Parameters:
atom- The atom which is the centercontainer- The atomContainer the atom is in- Returns:
- true=is square planar, false=is not
-
stereosAreOpposite
Deprecated.Stereochemistry in CDK is now stored withIStereoElements.Says if of four atoms connected two one atom the up and down bonds are opposite or not, i. e.if it's tetrehedral or square planar. The method does not check if there are four atoms and if two or up and two are down- Parameters:
atom- The atom which is the centercontainer- The atomContainer the atom is in- Returns:
- true=are opposite, false=are not
-
giveAngle
Calls giveAngleBothMethods with bool = true.- Parameters:
from- the atom to view fromto1- first direction to look into2- second direction to look in- Returns:
- The angle in rad from 0 to 2*PI
-
giveAngleFromMiddle
Calls giveAngleBothMethods with bool = false.- Parameters:
from- the atom to view fromto1- first direction to look into2- second direction to look in- Returns:
- The angle in rad from -PI to PI
-
makeUpDownBonds
-