Package src :: Package propagators :: Package classes :: Module HMC :: Class HMC
[hide private]
[frames] | no frames]

Class HMC

source code

??-28 --+
        |
       HMC

Implements Hybrid Monte Carlo sampling. HMC Integrator is implemented as Multiple-Timestepping (MTS) Wraps an inner integrator and takes into account the energy change as a result of this integration. The changes in position and velocity that result from this integration are accepted with Metropolis probability based on the resulting energy change P = e^{-DH/kT}, where DH is the change in energy, k is boltzmann constant and T is temperature. If we reject, we roll back positions and velocities. cf. S. Duane, A. D. Kennedy, B. J. Pendleton and D. Roweth. Hybrid Monte Carlo. Phys. Lett. B. vol. 195 pages 216-222, 1987.

Instance Methods [hide private]
int
metropolis(self, new, curr, phys)
Metropolis function which computes an acceptance probability for sets of positions depending on energy change dE.
source code
 
init(self, phys, forces, prop)
Initialize propagator: seed the generator, invoke the next propagator in the chain, and compute forces.
source code
 
run(self, phys, forces, prop)
Run propagator.
source code
 
finish(self, phys, forces, prop)
Finish propagator; in this case just invoke the finish method of the next propagator in the chain
source code
Method Details [hide private]

metropolis(self, new, curr, phys)

source code 

Metropolis function which computes an acceptance probability for sets of positions depending on energy change dE. P = e^-dE/kt

Parameters:
  • new (float) - Hypothetical new energy with flip.
  • curr (float) - Current energy.
  • phys (Physical) - The physical system.
Returns: int
0 for reject, 1 for accept

init(self, phys, forces, prop)

source code 

Initialize propagator: seed the generator, invoke the next propagator in the chain, and compute forces.

Parameters:
  • phys (Physical) - The physical system.
  • forces (Forces) - MDL Forces object.
  • prop (Propagator) - MDL Propagator object.

run(self, phys, forces, prop)

source code 

Run propagator.

Parameters:
  • phys (Physical) - The physical system.
  • forces (Forces) - MDL Forces object.
  • prop (Propagator) - MDL Propagator object.

finish(self, phys, forces, prop)

source code 

Finish propagator; in this case just invoke the finish method of the next propagator in the chain

Parameters:
  • phys (Physical) - The physical system.
  • forces (Forces) - MDL Forces object.
  • prop (Propagator) - MDL Propagator object.