Path A - Module 42: Molecular Mechanics (Energies)#
Geometry is only half of the story. To understand if your peptide will stay bound to the Alzheimer’s fibril, you need to look at the Physics.
In this module, you will learn to calculate the potential energy and the forces acting on your system using MolSysMT’s molecular mechanics engine.
import molsysmt as msm
from molsysmt import systems
# Load our solvated complex
fibril = msm.convert('pdb:2BEG', to_form='molsysmt.MolSys')
msm.build.add_missing_hydrogens(fibril)
peptide = msm.build.build_peptide('KLVFF')
msm.build.add_missing_hydrogens(peptide)
molsys = msm.merge([fibril, peptide])
1. Calculating Potential Energy#
The function get_potential_energy() calculates how much energy is stored in the current conformation of the system. High energy often means the system is unstable or has atom clashes.
# Calculate the total potential energy
# Note: MolSysMT uses OpenMM as the default engine for this calculation.
energy = msm.molecular_mechanics.get_potential_energy(molsys)
print(f"Total Potential Energy: {energy}")
2. Force Retrieval#
Energy tells you the “what”, but Forces tell you the “where”. Forces show the direction in which atoms want to move to reach a more stable state.
# Get the forces acting on all atoms
forces = msm.molecular_mechanics.get_forces(molsys)
print(f"Forces shape: {forces.shape} (Atoms, Space)")
print(f"Force on the first atom: {forces[0]}")
3. Non-Bonded Energy (Interaction Energy)#
One of the most useful metrics is the Interaction Energy: how much of the energy comes from the contact between the peptide and the fibril.
# Calculate the non-bonded energy between the two selections
interaction_energy = msm.molecular_mechanics.get_non_bonded_potential_energy(molsys,
selection='molecule_type=="peptide"',
selection_2='molecule_type=="protein"')
print(f"Peptide-Fibril Interaction Energy: {interaction_energy}")
🏆 Path A Challenge: The Energy Auditor#
Calculate the potential energy of your mutated fibril from Module 23.
Compare it with the energy of the original fibril (PDB 2BEG).
Identify the residue in your peptide that has the highest acting force (the most “stressed” residue).
What happens to the energy if you solvate the system? (Hint: it will change significantly because of the water-protein interactions).
You have moved from geometry to energetics. In Module 43, we will learn how to use these energies to optimize the system: Energy Minimization.