Class ForceFieldConfigurator
java.lang.Object
org.openscience.cdk.modeling.builder3d.ForceFieldConfigurator
Reads in a force field configuration file, set the atom types into a vector, and the data into a hashtable
Therefore, it uses the class
MM2BasedParameterSetReader
.
private Hashtable parameterSet;
key=nameofdatafield+atomid1+;atomid2;atomxid
MM2 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 -
Method Summary
Modifier and TypeMethodDescriptionassignAtomTyps
(IAtomContainer molecule) Method assigns atom types to atoms (calculates sssr and aromaticity)boolean
checkForceFieldType
(String ffname) Sets the forceFieldType attribute of the ForceFieldConfigurator objectconfigureAtom
(IAtom atom, String hoseCode, boolean _boolean) configureMM2BasedAtom
(IAtom atom, String hoseCode, boolean hetRing) Configures an atom to a mm2 based atom typeconfigureMMFF94BasedAtom
(IAtom atom, String hoseCode, boolean isInHetRing) Configures an atom to a mmff94 based atom typeGets the atomTypes attribute of the ForceFieldConfigurator objectString[]
gives a list of possible force field typesGets the parameterSet attribute of the ForceFieldConfigurator objectremoveAromaticityFlagsFromHoseCode
(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
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
-
Constructor Details
-
ForceFieldConfigurator
public ForceFieldConfigurator()Constructor for the ForceFieldConfigurator object
-
-
Method Details
-
setInputStream
Sets the inputStream attribute of the ForceFieldConfigurator object- Parameters:
ins
- The new inputStream value
-
getFfTypes
gives a list of possible force field types- Returns:
- the list
-
checkForceFieldType
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
Sets the atomTypes attribute of the ForceFieldConfigurator object- Parameters:
atomtypes
- The new atomTypes
-
setParameters
Sets the parameters attribute of the ForceFieldConfigurator object- Parameters:
parameterset
- The new parameter values
-
setMM2Parameters
Sets the parameters attribute of the ForceFieldConfigurator object, default is mm2 force field- Throws:
CDKException
-
setMMFF94Parameters
- Throws:
Exception
-
getAtomTypes
Gets the atomTypes attribute of the ForceFieldConfigurator object- Returns:
- The atomTypes vector
-
getParameterSet
Gets the parameterSet attribute of the ForceFieldConfigurator object- Returns:
- The parameterSet hashtable
-
assignAtomTyps
Method assigns atom types to atoms (calculates sssr and aromaticity)- Returns:
- sssrf set
- Throws:
CDKException
- Problems detecting aromaticity or making hose codes.
-
configureAtom
- 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
-
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
-