org.openscience.cdk.modeling.builder3d
Class TemplateHandler3D

java.lang.Object
  extended by org.openscience.cdk.modeling.builder3d.TemplateHandler3D

public class TemplateHandler3D
extends Object

Helper class for ModelBuilder3D. Handles templates. This is our layout solution for 3D ring systems

Author:
cho, steinbeck
Created on:
2004-09-21
Belongs to CDK module:
builder3d
Source code:
HEAD

Method Summary
static BitSet getBitSetFromFile(StringTokenizer st)
           
static TemplateHandler3D getInstance()
           
 IRingSet getLargestRingSet(List<IRingSet> ringSystems)
          Returns the largest (number of atoms) ring set in a molecule
 IAtomContainer getTemplateAt(int position)
          Gets the templateAt attribute of the TemplateHandler object
 int getTemplateCount()
          Gets the templateCount attribute of the TemplateHandler object
 void mapTemplates(IAtomContainer ringSystems, double NumberOfRingAtoms)
          Checks if one of the loaded templates is a substructure in the given Molecule.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static TemplateHandler3D getInstance()
                                     throws CDKException
Throws:
CDKException

getBitSetFromFile

public static BitSet getBitSetFromFile(StringTokenizer st)
                                throws Exception
Throws:
Exception

getLargestRingSet

public IRingSet getLargestRingSet(List<IRingSet> ringSystems)
Returns the largest (number of atoms) ring set in a molecule

Parameters:
ringSystems - RingSystems of a molecule
Returns:
The largestRingSet

mapTemplates

public void mapTemplates(IAtomContainer ringSystems,
                         double NumberOfRingAtoms)
                  throws CDKException,
                         CloneNotSupportedException
Checks if one of the loaded templates is a substructure in the given Molecule. If so, it assigns the coordinates from the template to the respective atoms in the Molecule.

Parameters:
ringSystems - AtomContainer from the ring systems.
NumberOfRingAtoms - double
Throws:
CloneNotSupportedException - The atomcontainer cannot be cloned.
CDKException

getTemplateCount

public int getTemplateCount()
Gets the templateCount attribute of the TemplateHandler object

Returns:
The templateCount value

getTemplateAt

public IAtomContainer getTemplateAt(int position)
Gets the templateAt attribute of the TemplateHandler object

Parameters:
position - Description of the Parameter
Returns:
The templateAt value