acemd.minimizer module#
- acemd.minimizer.bracket_and_golden_section_search(context, initpos, search_dir, u, zero_mass_particles)#
Bracket and golden section search algorithm.
- Parameters:
context (Context) – OpenMM context object
initpos (np.ndarray) – Initial position
search_dir (np.ndarray) – Search direction
u (float) – Should be initialized to be potential for pos, returns potential for min energy pos
zero_mass_particles (np.ndarray) – Mask of particles with zero mass
- acemd.minimizer.cgmin_compute(context, start_step, end_step, threshold, zero_mass_particles)#
- acemd.minimizer.get_energy_forces(context, positions, getForces=True, zero_mass_particles=None)#
Calculate the potential energy and forces of the system. It takes as input positions in Angstrom and returns the potential energy in kcal/mol and forces in kcal/mol/Angstrom.
- Parameters:
context (
Context) – OpenMM context objectpositions (
ndarray) – Positions of the atoms in Angstrom
- Returns:
ene (float) – Potential energy of the system in kcal/mol
forces (np.ndarray) – Forces on the atoms in kcal/mol/Angstrom
- acemd.minimizer.minimize(system, context, n_steps, outcoor=None)#