Class AtomPlacer3D
- java.lang.Object
-
- org.openscience.cdk.modeling.builder3d.AtomPlacer3D
-
public class AtomPlacer3D extends Object
Place aliphatic chains with Z matrix method. Please useModelBuilder3D
to place general molecules.- Author:
- chhoppe
- See Also:
ModelBuilder3D
- Source code:
- main
- Belongs to CDK module:
- builder3d
- Keywords:
- AtomPlacer3D
- Created on:
- 2004-10-8
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allHeavyAtomsPlaced(IAtomContainer ac)
True is all the atoms in the given AtomContainer have been placed.int[]
findHeavyAtomsInChain(IAtomContainer molecule, IAtomContainer chain)
Count and find first heavy atom(s) (non Hydrogens) in a chain.javax.vecmath.Point3d
geometricCenterAllPlacedAtoms(IAtomContainer molecule)
Calculates the geometric center of all placed atoms in the atomcontainer.double
getAngleValue(String id1, String id2, String id3)
Gets the angleKey attribute of the AtomPlacer3D object.double
getBondLengthValue(String id1, String id2)
Gets the distanceValue attribute of the parameter set.IAtom
getFarthestAtom(javax.vecmath.Point3d refAtomPoint, IAtomContainer ac)
Gets the farthestAtom attribute of the AtomPlacer3D object.IAtom
getNextPlacedHeavyAtomWithUnplacedAliphaticNeighbour(IAtomContainer molecule)
Gets the nextPlacedHeavyAtomWithAliphaticPlacedNeigbor from an atom container or molecule.IAtom
getNextPlacedHeavyAtomWithUnplacedRingNeighbour(IAtomContainer molecule)
Gets the nextPlacedHeavyAtomWithUnplacedRingNeighbour attribute of the AtomPlacer3D object.IAtom
getNextUnplacedHeavyAtomWithAliphaticPlacedNeighbour(IAtomContainer molecule)
Gets the nextUnplacedHeavyAtomWithAliphaticPlacedNeighbour from an atom container or molecule.IAtom
getPlacedHeavyAtom(IAtomContainer molecule, IAtom atom)
Returns a placed atom connected to a given atom.IAtom
getPlacedHeavyAtom(IAtomContainer molecule, IAtom atomA, IAtom atomB)
Gets the first placed Heavy Atom around atomA which is not atomB.IAtomContainer
getPlacedHeavyAtoms(IAtomContainer molecule, IAtom atom)
Gets the placed Heavy Atoms connected to an atom.IAtom
getUnplacedRingHeavyAtom(IAtomContainer molecule, IAtom atom)
Gets the unplacedRingHeavyAtom attribute of the AtomPlacer3D object.void
initilize(Map parameterSet)
Initialize the atomPlacer class.IAtomContainer
markPlaced(IAtomContainer ac)
Mark all atoms in chain as placed.int
numberOfUnplacedHeavyAtoms(IAtomContainer ac)
Gets numberOfUnplacedHeavyAtoms (no Flag ISPLACED, no Hydrogens)void
placeAliphaticHeavyChain(IAtomContainer molecule, IAtomContainer chain)
Method assigns 3D coordinates to the heavy atoms in an aliphatic chain.void
zmatrixChainToCartesian(IAtomContainer molecule, boolean flagBranched)
Takes the given Z Matrix coordinates and converts them to cartesian coordinates.
-
-
-
Method Detail
-
initilize
public void initilize(Map parameterSet)
Initialize the atomPlacer class.- Parameters:
parameterSet
- Force Field parameter as Hashtable
-
findHeavyAtomsInChain
public int[] findHeavyAtomsInChain(IAtomContainer molecule, IAtomContainer chain)
Count and find first heavy atom(s) (non Hydrogens) in a chain.- Parameters:
molecule
- the reference molecule for searching the chainchain
- chain to be searched- Returns:
- the atom number of the first heavy atom the number of heavy atoms in the chain
-
markPlaced
public IAtomContainer markPlaced(IAtomContainer ac)
Mark all atoms in chain as placed. (CDKConstant ISPLACED)- Parameters:
ac
- chain- Returns:
- chain all atoms marked as placed
-
placeAliphaticHeavyChain
public void placeAliphaticHeavyChain(IAtomContainer molecule, IAtomContainer chain) throws CDKException
Method assigns 3D coordinates to the heavy atoms in an aliphatic chain.- Parameters:
molecule
- the reference molecule for the chainchain
- the atoms to be assigned, must be connected- Throws:
CDKException
- the 'chain' was not a chain
-
zmatrixChainToCartesian
public void zmatrixChainToCartesian(IAtomContainer molecule, boolean flagBranched)
Takes the given Z Matrix coordinates and converts them to cartesian coordinates. The first Atom end up in the origin, the second on on the x axis, and the third one in the XY plane. The rest is added by applying the Zmatrix distances, angles and dihedrals. Assign coordinates directly to the atoms.- Parameters:
molecule
- the molecule to be placed in 3DflagBranched
- marks branched chain author: egonw,cho
-
getBondLengthValue
public double getBondLengthValue(String id1, String id2)
Gets the distanceValue attribute of the parameter set.- Parameters:
id1
- atom1 idid2
- atom2 id- Returns:
- The distanceValue value from the force field parameter set
-
getAngleValue
public double getAngleValue(String id1, String id2, String id3)
Gets the angleKey attribute of the AtomPlacer3D object.- Parameters:
id1
- Description of the Parameterid2
- Description of the Parameterid3
- Description of the Parameter- Returns:
- The angleKey value
-
getNextUnplacedHeavyAtomWithAliphaticPlacedNeighbour
public IAtom getNextUnplacedHeavyAtomWithAliphaticPlacedNeighbour(IAtomContainer molecule)
Gets the nextUnplacedHeavyAtomWithAliphaticPlacedNeighbour from an atom container or molecule.- Parameters:
molecule
-- Returns:
- The nextUnplacedHeavyAtomWithAliphaticPlacedNeighbour value author: steinbeck,cho
-
getNextPlacedHeavyAtomWithUnplacedAliphaticNeighbour
public IAtom getNextPlacedHeavyAtomWithUnplacedAliphaticNeighbour(IAtomContainer molecule)
Gets the nextPlacedHeavyAtomWithAliphaticPlacedNeigbor from an atom container or molecule.- Parameters:
molecule
-- Returns:
- The nextUnplacedHeavyAtomWithUnplacedAliphaticNeigbor author: steinbeck,cho
-
getNextPlacedHeavyAtomWithUnplacedRingNeighbour
public IAtom getNextPlacedHeavyAtomWithUnplacedRingNeighbour(IAtomContainer molecule)
Gets the nextPlacedHeavyAtomWithUnplacedRingNeighbour attribute of the AtomPlacer3D object.- Parameters:
molecule
- The atom container under consideration- Returns:
- The nextPlacedHeavyAtomWithUnplacedRingNeighbour value
-
getFarthestAtom
public IAtom getFarthestAtom(javax.vecmath.Point3d refAtomPoint, IAtomContainer ac)
Gets the farthestAtom attribute of the AtomPlacer3D object.- Parameters:
refAtomPoint
- Description of the Parameterac
- Description of the Parameter- Returns:
- The farthestAtom value
-
getUnplacedRingHeavyAtom
public IAtom getUnplacedRingHeavyAtom(IAtomContainer molecule, IAtom atom)
Gets the unplacedRingHeavyAtom attribute of the AtomPlacer3D object.- Parameters:
molecule
-atom
- Description of the Parameter- Returns:
- The unplacedRingHeavyAtom value
-
geometricCenterAllPlacedAtoms
public javax.vecmath.Point3d geometricCenterAllPlacedAtoms(IAtomContainer molecule)
Calculates the geometric center of all placed atoms in the atomcontainer.- Parameters:
molecule
-- Returns:
- Point3d the geometric center
-
getPlacedHeavyAtom
public IAtom getPlacedHeavyAtom(IAtomContainer molecule, IAtom atom)
Returns a placed atom connected to a given atom.- Parameters:
molecule
-atom
- The Atom whose placed bonding partners are to be returned- Returns:
- a placed heavy atom connected to a given atom author: steinbeck
-
getPlacedHeavyAtom
public IAtom getPlacedHeavyAtom(IAtomContainer molecule, IAtom atomA, IAtom atomB)
Gets the first placed Heavy Atom around atomA which is not atomB.- Parameters:
molecule
-atomA
- Description of the ParameteratomB
- Description of the Parameter- Returns:
- The placedHeavyAtom value
-
getPlacedHeavyAtoms
public IAtomContainer getPlacedHeavyAtoms(IAtomContainer molecule, IAtom atom)
Gets the placed Heavy Atoms connected to an atom.- Parameters:
molecule
-atom
- The atom the atoms must be connected to.- Returns:
- The placed heavy atoms.
-
numberOfUnplacedHeavyAtoms
public int numberOfUnplacedHeavyAtoms(IAtomContainer ac)
Gets numberOfUnplacedHeavyAtoms (no Flag ISPLACED, no Hydrogens)- Parameters:
ac
- AtomContainer- Returns:
- #UnplacedAtoms
-
allHeavyAtomsPlaced
public boolean allHeavyAtomsPlaced(IAtomContainer ac)
True is all the atoms in the given AtomContainer have been placed.- Parameters:
ac
- The AtomContainer to be searched- Returns:
- True is all the atoms in the given AtomContainer have been placed
-
-