acemd.minimizer module#

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 object

  • positions (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)#