java.lang.Object
org.openscience.cdk.forcefield.mmff.Mmff

public class Mmff extends Object
Facade to access Merck Molecular Force Field (MMFF) functions.
Atom Types Symbolic atom types are assigned with assignAtomTypes(IAtomContainer). The atom type name can be accessed with IAtomType.getAtomTypeName().
Partial Charges Partial charges are assigned with partialCharges(IAtomContainer). Atom types must be assigned before calling this function. Effective formal charges can also be obtained with effectiveCharges(IAtomContainer) both charge values are accessed with IAtom.getCharge(). Atoms of unknown type are assigned a neutral charge - to avoid this check the return value of assignAtomTypes(IAtomContainer).

 IAtomContainer mol = ...;
 
 Mmff mmff = new Mmff();
 mmff.assignAtomTypes(mol);
 mmff.partialCharges(mol);
 mmff.clearProps(mol); // optional
 
Author:
John May
Source code:
main
  • Constructor Details

    • Mmff

      public Mmff()
  • Method Details

    • assignAtomTypes

      public boolean assignAtomTypes(IAtomContainer mol)
      Assign MMFF Symbolic atom types. The symbolic type can be accessed with IAtomType.getAtomTypeName(). An atom of unknown type is assigned the symbolic type 'UNK'. All atoms, including hydrogens must be explicitly represented.
      Parameters:
      mol - molecule
      Returns:
      all atoms had a type assigned
    • effectiveCharges

      public boolean effectiveCharges(IAtomContainer mol)
      Assign the effective formal charges used by MMFF in calculating the final partial charge values. Atom types must be assigned first. All existing charges are cleared.
      Parameters:
      mol - molecule
      Returns:
      charges were assigned
      See Also:
    • partialCharges

      public boolean partialCharges(IAtomContainer mol)
      Assign the partial charges, all existing charges are cleared. Atom types must be assigned first.
      Parameters:
      mol - molecule
      Returns:
      charges were assigned
      See Also:
    • clearProps

      public void clearProps(IAtomContainer mol)
      Clear all transient properties assigned by this class. Assigned charges and atom type names remain set.
      Parameters:
      mol - molecule