Potential energy minimization#

Relaxing molecular structures to local potential energy minima using molecular mechanics optimizers.

The function molsysmt.molecular_mechanics.potential_energy_minimization() relieves steric clashes and relaxes coordinates to a local energy minimum using gradient-based optimization algorithms (e.g. L-BFGS).

Added in version 1.0.0.

Basic usage#

Let’s load the Trp-Cage miniprotein and minimize its potential energy:

import molsysmt as msm
import pyunitwizard as puw
molsys = msm.convert(msm.systems['Trp-Cage']['1l2y.h5msm'], structure_indices=0)

We inspect the potential energy of the experimental model before and after energy minimization:

u_pre = msm.molecular_mechanics.get_potential_energy(molsys)
molsys_min = msm.molecular_mechanics.potential_energy_minimization(molsys)
u_post = msm.molecular_mechanics.get_potential_energy(molsys_min)

print('Energy before minimization:', u_pre)
print('Energy after minimization:', u_post)
Energy before minimization: -1233.2570634358794 kilojoule / mole
Energy after minimization: -2123.098243435527 kilojoule / mole

In-place coordinate minimization#

Setting in_place=True updates the input molecular system coordinates directly without returning a new copy:

msm.molecular_mechanics.potential_energy_minimization(molsys, in_place=True)
print('Minimized in-place energy:', msm.molecular_mechanics.get_potential_energy(molsys))
Minimized in-place energy: -2122.784023466525 kilojoule / mole