@TestClass(value="org.openscience.cdk.layout.TemplateHandlerTest") public class TemplateHandler extends Object
Constructor and Description |
---|
TemplateHandler(IChemObjectBuilder builder)
Creates a new TemplateHandler.
|
Modifier and Type | Method and Description |
---|---|
void |
addMolecule(IAtomContainer molecule)
Adds a Molecule to the list of templates use by this TemplateHandler.
|
IAtomContainerSet |
getMappedSubstructures(IAtomContainer molecule)
Checks if one of the loaded templates is a substructure in the given
Molecule and returns all matched substructures in a IAtomContainerSet.
|
IAtomContainer |
getTemplateAt(int position)
Gets the templateAt attribute of the TemplateHandler object
|
int |
getTemplateCount()
Gets the templateCount attribute of the TemplateHandler object
|
void |
loadTemplates(IChemObjectBuilder builder)
Loads all existing templates into memory.
|
boolean |
mapTemplateExact(IAtomContainer molecule)
Checks if one of the loaded templates is isomorph to the given
Molecule.
|
boolean |
mapTemplates(IAtomContainer molecule)
Checks if one of the loaded templates is a substructure in the given
Molecule.
|
IAtomContainer |
removeMolecule(IAtomContainer molecule) |
@TestMethod(value="testInit") public TemplateHandler(IChemObjectBuilder builder)
@TestMethod(value="testInit") public void loadTemplates(IChemObjectBuilder builder)
@TestMethod(value="testAddMolecule") public void addMolecule(IAtomContainer molecule)
molecule
- The molecule to be added to the TemplateHandler@TestMethod(value="testRemoveMolecule") public IAtomContainer removeMolecule(IAtomContainer molecule) throws CDKException
CDKException
public boolean mapTemplateExact(IAtomContainer molecule) throws CDKException
molecule
- The molecule to be check for potential templatesCDKException
@TestMethod(value="testRemoveMolecule") public boolean mapTemplates(IAtomContainer molecule) throws CDKException
molecule
- The molecule to be check for potential templatesCDKException
@TestMethod(value="testInit") public int getTemplateCount()
public IAtomContainer getTemplateAt(int position)
position
- Description of the Parameter@TestMethod(value="getMappedSubstructures_IAtomContainer") public IAtomContainerSet getMappedSubstructures(IAtomContainer molecule) throws CDKException
molecule
- The molecule to be check for potential templatesCDKException
- if an error occurs