Bias
- class mlptrain.sampling.bias.Bias(zeta_func: ReactionCoordinate, kappa: float, reference: float)
Bases:
ASEConstraint,FunctionModifies the forces and energy of a set of ASE atoms under a bias
- __call__(atoms)
Value of the bias for set of atom pairs in atoms
- __init__(zeta_func: ReactionCoordinate, kappa: float, reference: float)
Bias that modifies the forces and energy of a set of atoms under a harmonic bias function.
Harmonic biasing potential: ω = κ/2 (ζ(r) - ζ_ref)^2
e.g. bias = mlt.bias.Bias(to_average=[[0, 1]], reference=2, kappa=10)
- Parameters:
kappa – Value of the spring constant, κ
reference – Reference value of the reaction coordinate, ζ_ref
- adjust_forces(atoms, forces)
Adjust the forces of a set of atoms in place using the gradient of the bias function:
F = -∇E -∇B
where ∇E is the gradient of the energy with respect to the coordinates and B is the bias.
- adjust_positions(atoms, newpositions)
Method required for ASE but not used in mlp-train
- adjust_potential_energy(atoms)
Adjust the energy of a set of atoms using the bias function
- grad(atoms)
Gradient of the biasing potential a set of atom pairs in atoms