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: Context, start_step: int, end_step: int, threshold: float, zero_mass_particles: ndarray)#
acemd.minimizer.get_energy_forces(context: Context, positions: ndarray, getForces=True, zero_mass_particles: ndarray | None = 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 (np.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: System, context: Context, n_steps: int, outcoor=None)#