Class ParticleMeshEwald

java.lang.Object
ffx.potential.nonbonded.ParticleMeshEwald
All Implemented Interfaces:
LambdaInterface

public class ParticleMeshEwald extends Object implements LambdaInterface
This Particle Mesh Ewald class implements PME for the AMOEBA polarizable mutlipole force field in parallel using a NeighborList for any Crystal space group. The real space contribution is contained within this class and the reciprocal space contribution is delegated to the ReciprocalSpace class.
Author:
Michael J. Schnieders
derived from:
TINKER code by Jay Ponder, Pengyu Ren and Tom Darden.
See Also:
  • Field Details Link icon

    • polarization Link icon

      public Polarization polarization
      Polarization modes include "direct", in which induced dipoles do not interact, and "mutual" that converges the self-consistent field to a tolerance specified by the "polar-eps" keyword.
    • coordinates Link icon

      public double[][][] coordinates
      Dimensions of [nsymm][xyz][nAtoms].
    • neighborLists Link icon

      public int[][][] neighborLists
      Neighbor lists, including atoms beyond the real space cutoff. [nsymm][nAtoms][nAllNeighbors]
    • globalMultipole Link icon

      public double[][][] globalMultipole
      Cartesian multipoles in the global frame with dimensions of [nsymm][nAtoms][10]
    • fractionalMultipole Link icon

      public double[][][] fractionalMultipole
      Fractional multipoles in the global frame with dimensions of [nsymm][nAtoms][10]
    • inducedDipole Link icon

      public double[][][] inducedDipole
      Dimensions of [nsymm][nAtoms][3]
    • inducedDipoleCR Link icon

      public double[][][] inducedDipoleCR
    • directDipole Link icon

      public double[][] directDipole
      Direct induced dipoles.
    • directDipoleCR Link icon

      public double[][] directDipoleCR
    • directField Link icon

      public double[][] directField
    • directFieldCR Link icon

      public double[][] directFieldCR
    • vacuumInducedDipole Link icon

      public double[][][] vacuumInducedDipole
      Vacuum induced dipoles
    • vacuumInducedDipoleCR Link icon

      public double[][][] vacuumInducedDipoleCR
    • vacuumDirectDipole Link icon

      public double[][] vacuumDirectDipole
      Vacuum induced dipoles
    • vacuumDirectDipoleCR Link icon

      public double[][] vacuumDirectDipoleCR
    • electric Link icon

      @FFXProperty(name="electric", propertyGroup=LocalGeometryFunctionalForm, defaultValue="332.063713", description="Specifies a value for the so-called \"electric constant\" allowing conversion unit of electrostatic\npotential energy values from electrons^2/Angstrom to kcal/mol. Internally, FFX stores a default value\nfor this constant as 332.063713 based on CODATA reference values. Since different force fields are\nintended for use with slightly different values, this keyword allows overriding the default value.\n") public double electric
      Coulomb constant in units of kcal*Ang/(mol*electron^2)
    • soluteDielectric Link icon

      public double soluteDielectric
      The requested permittivity for the solute.
    • atoms Link icon

      protected Atom[] atoms
      An ordered array of atoms in the system.
    • nAtoms Link icon

      protected int nAtoms
      The number of atoms in the system.
    • ip11 Link icon

      protected int[][] ip11
      Polarization groups.
    • ip12 Link icon

      protected int[][] ip12
    • ip13 Link icon

      protected int[][] ip13
    • totalMultipoleEnergy Link icon

      protected double totalMultipoleEnergy
      Total multipole energy = permanentMultipoleEnergy + polarizationEnergy.
      This does not include GK.
    • permanentMultipoleEnergy Link icon

      protected double permanentMultipoleEnergy
      Permanent multipole energy = permanentRealSpaceEnergy + permanentSelfEnergy + permanentReciprocalEnergy.
    • permanentRealSpaceEnergy Link icon

      protected double permanentRealSpaceEnergy
    • permanentSelfEnergy Link icon

      protected double permanentSelfEnergy
    • permanentReciprocalEnergy Link icon

      protected double permanentReciprocalEnergy
    • polarizationEnergy Link icon

      protected double polarizationEnergy
      Polarization energy = inducedRealSpaceEnergy + inducedSelfEnergy + inducedReciprocalEnergy.
    • inducedRealSpaceEnergy Link icon

      protected double inducedRealSpaceEnergy
    • inducedSelfEnergy Link icon

      protected double inducedSelfEnergy
    • inducedReciprocalEnergy Link icon

      protected double inducedReciprocalEnergy
    • scfAlgorithm Link icon

      protected SCFAlgorithm scfAlgorithm
    • LambdaDefaults Link icon

      public final ParticleMeshEwald.LambdaFactors LambdaDefaults
      The defaults are effectively final, as the implementation of setFactors in the base class is always a no-op.
  • Constructor Details Link icon

    • ParticleMeshEwald Link icon

      public ParticleMeshEwald(Atom[] atoms, int[] molecule, ForceField forceField, Crystal crystal, NeighborList neighborList, ForceField.ELEC_FORM elecForm, double ewaldCutoff, double gkCutoff, ParallelTeam parallelTeam)
      ParticleMeshEwald constructor.
      Parameters:
      atoms - the Atom array to do electrostatics on.
      molecule - the molecule number for each atom.
      forceField - the ForceField the defines the electrostatics parameters.
      crystal - The boundary conditions.
      neighborList - The NeighborList for both van der Waals and PME.
      elecForm - The electrostatics functional form.
      ewaldCutoff - The Ewald real space cutoff.
      gkCutoff - The generalized Kirkwood cutoff.
      parallelTeam - A ParallelTeam that delegates parallelization.
  • Method Details Link icon

    • getElecForm Link icon

      public ForceField.ELEC_FORM getElecForm()
      Returns the ELEC_FORM.
    • getLambdaTerm Link icon

      public boolean getLambdaTerm()
      If true, there are alchemical atoms impacted by the lambda state variable.
      Returns:
      True if there are alchemical atoms impacted by the lambda state variable.
    • getAlchemicalParameters Link icon

      public AlchemicalParameters getAlchemicalParameters()
      Return the PME AlchemicalParameters.
    • computeInduceDipoleField Link icon

      public void computeInduceDipoleField()
    • destroy Link icon

      public void destroy()
    • energy Link icon

      public double energy(boolean gradient, boolean print)
      Calculate the PME electrostatic energy.
      Parameters:
      gradient - If true, the gradient will be calculated.
      print - If true, extra logging is enabled.
      Returns:
      return the total electrostatic energy (permanent + polarization).
    • expandInducedDipoles Link icon

      public void expandInducedDipoles()
    • getAxisAtoms Link icon

      public int[][] getAxisAtoms()
    • getCavitationEnergy Link icon

      public double getCavitationEnergy()
    • getCoordinates Link icon

      public double[][][] getCoordinates()
    • getDispersionEnergy Link icon

      public double getDispersionEnergy()
    • getEwaldCoefficient Link icon

      public double getEwaldCoefficient()
    • getEwaldCutoff Link icon

      public double getEwaldCutoff()
    • getGK Link icon

      public GeneralizedKirkwood getGK()
    • getGKEnergy Link icon

      public double getGKEnergy()
      getGeneralizedKirkwoodEnergy.
      Returns:
      a double.
    • getGKInteractions Link icon

      public int getGKInteractions()
      getGKInteractions
      Returns:
      The number of GK interactions.
    • getInteractions Link icon

      public int getInteractions()
      Getter for the field interactions.
      Returns:
      The number of PME interactions.
    • getLambda Link icon

      public double getLambda()
      Get the current value of the state variable.

      Get the current lambda scale value.

      Specified by:
      getLambda in interface LambdaInterface
      Returns:
      state
    • setLambda Link icon

      public void setLambda(double lambda)
      Set the current value of the state variable. May be ignored if lambda is not being applied.

      Set the electrostatic lambda scaling factor.

      Specified by:
      setLambda in interface LambdaInterface
      Parameters:
      lambda - a double.
    • getPermanentEnergy Link icon

      public double getPermanentEnergy()
    • getIndRealEnergy Link icon

      public double getIndRealEnergy()
      getIndRealEnergy.
      Returns:
      a double.
    • getIndRecipEnergy Link icon

      public double getIndRecipEnergy()
      getIndRecipEnergy.
      Returns:
      a double.
    • getIndSelfEnergy Link icon

      public double getIndSelfEnergy()
      getIndSelfEnergy.
      Returns:
      a double.
    • getPermSelfEnergy Link icon

      public double getPermSelfEnergy()
      getPermSelfEnergy.
      Returns:
      a double.
    • getPermRealEnergy Link icon

      public double getPermRealEnergy()
    • getPermRecipEnergy Link icon

      public double getPermRecipEnergy()
    • getPolarEps Link icon

      public double getPolarEps()
    • getPolarization11 Link icon

      public int[][] getPolarization11()
    • getPolarization12 Link icon

      public int[][] getPolarization12()
    • getPolarization13 Link icon

      public int[][] getPolarization13()
    • getPolarizationEnergy Link icon

      public double getPolarizationEnergy()
      Getter for the field polarizationEnergy.
      Returns:
      a double.
    • getPolarizationType Link icon

      public Polarization getPolarizationType()
    • getReciprocalSpace Link icon

      public ReciprocalSpace getReciprocalSpace()
    • getScale14 Link icon

      public double getScale14()
    • getSolvationEnergy Link icon

      public double getSolvationEnergy()
      getGKEnergy
      Returns:
      a double.
    • getMultipoleType Link icon

      public MultipoleType getMultipoleType(int i)
      Get the MultipoleType for Atom i.
      Parameters:
      i - The atom index.
      Returns:
      The MultipoleType.
    • getPolarizeType Link icon

      public PolarizeType getPolarizeType(int i)
      Get the PolarizeType for Atom i.
      Parameters:
      i - The atom index.
      Returns:
      The PolarizeType.
    • getd2EdL2 Link icon

      public double getd2EdL2()
      Get the 2nd partial derivative of the energy with respect to lambda.
      Specified by:
      getd2EdL2 in interface LambdaInterface
      Returns:
      d2EdL2
    • getdEdL Link icon

      public double getdEdL()
      Get the partial derivative of the energy with respect to lambda.
      Specified by:
      getdEdL in interface LambdaInterface
      Returns:
      dEdL
    • getdEdXdL Link icon

      public void getdEdXdL(double[] gradient)
      Get the gradient of dEdL with respect to each parameter.
      Specified by:
      getdEdXdL in interface LambdaInterface
      Parameters:
      gradient - - A double array of length the number of parameters in the model (commonly 3 * number of atoms).
    • setAtoms Link icon

      public void setAtoms(Atom[] atoms, int[] molecule)
    • setCrystal Link icon

      public void setCrystal(Crystal crystal)
    • getTotalMultipoleEnergy Link icon

      public double getTotalMultipoleEnergy()
      Getter for the field totalMultipoleEnergy.
      Returns:
      a double.
    • setPolarization Link icon

      public void setPolarization(Polarization set)
      Setter for the field polarization.
      Parameters:
      set - a Polarization object.
    • assignPolarizationGroups Link icon

      protected void assignPolarizationGroups()
      AssignPolarizationGroups.
    • computeMoments Link icon

      public void computeMoments(Atom[] activeAtoms, boolean forceEnergy)
      Compute multipole moments for an array of atoms.
      Parameters:
      activeAtoms - Atom array to consider.
      forceEnergy - Force calculation of the electrostatic energy (rotate multipoles, perform SCF).
    • attachExtendedSystem Link icon

      public void attachExtendedSystem(ExtendedSystem system)
      Attach system with extended variable such as titrations.
      Parameters:
      system - a ExtendedSystem object.