Package ffx.potential.nonbonded.pme
Class PolarizationEnergyRegion
java.lang.Object
edu.rit.pj.ParallelConstruct
edu.rit.pj.ParallelRegion
ffx.potential.nonbonded.pme.PolarizationEnergyRegion
Parallel computation of the polarization energy as sum over atomic contributions (-1/2 u.E).
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
finish()
Perform finalization actions after parallel execution ends.double
Return the final polarization energy.void
init
(Atom[] atoms, double[] polarizability, double[][][] inducedDipole, double[][] directDipoleCR, double polarizationScale) void
run()
Execute parallel code.void
setPolarizationEnergy
(double energy) Set the current polarization energy.void
start()
Perform initialization actions before parallel execution begins.Methods inherited from class edu.rit.pj.ParallelRegion
barrier, barrier, critical, critical, criticalNonexclusive, criticalNonexclusive, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute
Methods inherited from class edu.rit.pj.ParallelConstruct
getThreadCount, getThreadIndex, isExecutingInParallel, region, team
-
Constructor Details
-
PolarizationEnergyRegion
public PolarizationEnergyRegion(int nt, double electric)
-
-
Method Details
-
finish
public void finish()Description copied from class:ParallelRegion
Perform finalization actions after parallel execution ends. Only one thread calls thefinish()
method.The
finish()
method may be overridden in a subclass. If not overridden, thefinish()
method does nothing.- Overrides:
finish
in classParallelRegion
-
getPolarizationEnergy
public double getPolarizationEnergy()Return the final polarization energy.- Returns:
- The polarization energy.
-
setPolarizationEnergy
public void setPolarizationEnergy(double energy) Set the current polarization energy.- Parameters:
energy
- Value to set the polarization energy to.
-
init
public void init(Atom[] atoms, double[] polarizability, double[][][] inducedDipole, double[][] directDipoleCR, double polarizationScale) -
run
Description copied from class:ParallelRegion
Execute parallel code. All threads of the parallel team call therun()
method concurrently.The
run()
method must be implemented in a subclass.- Specified by:
run
in classParallelRegion
- Throws:
Exception
- Therun()
method may throw any exception.Exception
- if any.
-
start
public void start()Description copied from class:ParallelRegion
Perform initialization actions before parallel execution begins. Only one thread calls thestart()
method.The
start()
method may be overridden in a subclass. If not overridden, thestart()
method does nothing.- Overrides:
start
in classParallelRegion
-