Class 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 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 Detail

      • ForceFieldConfigurator

        public ForceFieldConfigurator()
        Constructor for 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
      • 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.
      • 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 configured
        hoseCode - 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 configured
        hoseCode - the 4 sphere hose code of the atom
        Returns:
        atom
        Throws:
        NoSuchAtomTypeException - atomType is not known