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

acemd.minimizer.cgmin_compute(context: Context, start_step: int, end_step: int, threshold: float)#
acemd.minimizer.get_energy_forces(context: Context, positions: ndarray, getForces=True)#

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(context: Context, n_steps: int, outcoor=None)#
acemd.minimizer.update_pos(oldpos, a, s)#