Class ForceFieldConfigurator
- java.lang.Object
-
- org.openscience.cdk.modeling.builder3d.ForceFieldConfigurator
-
public class ForceFieldConfigurator extends Object
Reads in a force field configuration file, set the atom types into a vector, and the data into a hashtable Therefore, it uses the classMM2BasedParameterSetReader
. private Hashtable parameterSet; key=nameofdatafield+atomid1+;atomid2;atomxidMM2 and MMFF94 force field are implemented With force field data it configures the cdk atom (assign atomtype, van der Waals radius, charge...)
- Author:
- chhoppe
- Source code:
- main
- Belongs to CDK module:
- forcefield
- Created on:
- 2004-09-07
-
-
Constructor Summary
Constructors Constructor Description ForceFieldConfigurator()
Constructor for the ForceFieldConfigurator object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IRingSet
assignAtomTyps(IAtomContainer molecule)
Method assigns atom types to atoms (calculates sssr and aromaticity)boolean
checkForceFieldType(String ffname)
Sets the forceFieldType attribute of the ForceFieldConfigurator objectIAtom
configureAtom(IAtom atom, String hoseCode, boolean _boolean)
IAtom
configureMM2BasedAtom(IAtom atom, String hoseCode, boolean hetRing)
Configures an atom to a mm2 based atom typeIAtom
configureMMFF94BasedAtom(IAtom atom, String hoseCode, boolean isInHetRing)
Configures an atom to a mmff94 based atom typeList<IAtomType>
getAtomTypes()
Gets the atomTypes attribute of the ForceFieldConfigurator objectString[]
getFfTypes()
gives a list of possible force field typesMap<String,Object>
getParameterSet()
Gets the parameterSet attribute of the ForceFieldConfigurator objectString
removeAromaticityFlagsFromHoseCode(String hoseCode)
void
setAtomTypes(List<IAtomType> atomtypes)
Sets the atomTypes attribute of the ForceFieldConfigurator objectvoid
setForceFieldConfigurator(String ffname, IChemObjectBuilder builder)
Constructor for the ForceFieldConfigurator objectvoid
setInputStream(InputStream ins)
Sets the inputStream attribute of the ForceFieldConfigurator objectvoid
setMM2Parameters(IChemObjectBuilder builder)
Sets the parameters attribute of the ForceFieldConfigurator object, default is mm2 force fieldvoid
setMMFF94Parameters(IChemObjectBuilder builder)
void
setParameters(Map<String,Object> parameterset)
Sets the parameters attribute of the ForceFieldConfigurator object
-
-
-
Method Detail
-
setInputStream
public void setInputStream(InputStream ins)
Sets the inputStream attribute of the ForceFieldConfigurator object- Parameters:
ins
- The new inputStream value
-
getFfTypes
public String[] getFfTypes()
gives a list of possible force field types- Returns:
- the list
-
checkForceFieldType
public boolean checkForceFieldType(String ffname)
Sets the forceFieldType attribute of the ForceFieldConfigurator object- Parameters:
ffname
- The new forceFieldType name
-
setForceFieldConfigurator
public void setForceFieldConfigurator(String ffname, IChemObjectBuilder builder) throws CDKException
Constructor for the ForceFieldConfigurator object- Parameters:
ffname
- name of the force field data file- Throws:
CDKException
-
setAtomTypes
public void setAtomTypes(List<IAtomType> atomtypes)
Sets the atomTypes attribute of the ForceFieldConfigurator object- Parameters:
atomtypes
- The new atomTypes
-
setParameters
public void setParameters(Map<String,Object> parameterset)
Sets the parameters attribute of the ForceFieldConfigurator object- Parameters:
parameterset
- The new parameter values
-
setMM2Parameters
public void setMM2Parameters(IChemObjectBuilder builder) throws CDKException
Sets the parameters attribute of the ForceFieldConfigurator object, default is mm2 force field- Throws:
CDKException
-
setMMFF94Parameters
public void setMMFF94Parameters(IChemObjectBuilder builder) throws Exception
- Throws:
Exception
-
getAtomTypes
public List<IAtomType> getAtomTypes()
Gets the atomTypes attribute of the ForceFieldConfigurator object- Returns:
- The atomTypes vector
-
getParameterSet
public Map<String,Object> getParameterSet()
Gets the parameterSet attribute of the ForceFieldConfigurator object- Returns:
- The parameterSet hashtable
-
assignAtomTyps
public IRingSet assignAtomTyps(IAtomContainer molecule) throws CDKException
Method assigns atom types to atoms (calculates sssr and aromaticity)- Returns:
- sssrf set
- Throws:
CDKException
- Problems detecting aromaticity or making hose codes.
-
configureAtom
public IAtom configureAtom(IAtom atom, String hoseCode, boolean _boolean) throws CDKException
- Throws:
CDKException
-
configureMM2BasedAtom
public IAtom configureMM2BasedAtom(IAtom atom, String hoseCode, boolean hetRing) throws NoSuchAtomTypeException
Configures an atom to a mm2 based atom type- Parameters:
atom
- atom to be configuredhoseCode
- the 4 sphere hose code of the atom- Returns:
- atom
- Throws:
NoSuchAtomTypeException
- atomType is not known
-
removeAromaticityFlagsFromHoseCode
public String removeAromaticityFlagsFromHoseCode(String hoseCode)
-
configureMMFF94BasedAtom
public IAtom configureMMFF94BasedAtom(IAtom atom, String hoseCode, boolean isInHetRing) throws NoSuchAtomTypeException
Configures an atom to a mmff94 based atom type- Parameters:
atom
- atom to be configuredhoseCode
- the 4 sphere hose code of the atom- Returns:
- atom
- Throws:
NoSuchAtomTypeException
- atomType is not known
-
-