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 TypeMethodDescriptionvoidfinish()Perform finalization actions after parallel execution ends.doubleReturn the final polarization energy.voidinit(Atom[] atoms, double[] polarizability, double[][][] inducedDipole, double[][] directDipoleCR, double polarizationScale) voidrun()Execute parallel code.voidsetPolarizationEnergy(double energy) Set the current polarization energy.voidstart()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, executeMethods 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:ParallelRegionPerform 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:
finishin 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:ParallelRegionExecute parallel code. All threads of the parallel team call therun()method concurrently.The
run()method must be implemented in a subclass.- Specified by:
runin classParallelRegion- Throws:
Exception- Therun()method may throw any exception.Exception- if any.
-
start
public void start()Description copied from class:ParallelRegionPerform 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:
startin classParallelRegion
-