Protein Molecular Dynamics Tutorilas -1

1 minute read

Published:

This is a MD tutorial of chignolin. The code can be found in my github repo

Protein Structure File Preprocessing

Here, I use the ‘pdbixer’ python package to preprocess the protein structure file. The protein structure file is downloaded directly from RCSB website. Basically, ‘pdbxier’ supports multiplile ways to preprocess the protien structure.

You can type pdbxier directly in your command line, like

pdbxier

and a visual UI will pop up to guide you through protein structure processing step by step.

For programmatic control, pdbxier can be integrated into Python workflows to preprocess protein structures. Here’s an example using PDBFixer。

# Import the PDBFixer class from the pdbfixer module
from pdbfixer import PDBFixer  

# Initialize PDBFixer with your input PDB file
fixer = PDBFixer(filename='1UAO.pdb')  

# Identify missing residues in the structure. After calling this method, the missing residue information will be stored in fixer.missingResidues
fixer.findMissingResidues()  

# Detect non-standard residues (e.g., modified amino acids)
fixer.findNonstandardResidues()  

# Replace non-standard residues with standard equivalents
fixer.replaceNonstandardResidues()  

# Locate missing heavy atoms (e.g., in incomplete side chains)
fixer.findMissingAtoms()  

# Add missing atoms to the structure
fixer.addMissingAtoms()  

# Add missing hydrogen atoms at pH 7.0
fixer.addMissingHydrogens(7.0)  

# Remove heterogens (ligands/ions), including water molecules
fixer.removeHeterogens(keepWater=False)  

# Save the processed structure to a new PDB file
from openmm.app import PDBFile
PDBFile.writeFile(fixer.topology, fixer.positions, open('input.pdb', 'w'))

By they way, if you need to add a water box and neutralize your system, you can use the following command

fixer.addSolvent(boxSize, positiveIon='Na+', negativeIon='Cl-', ionicStrength=0*molar)

If you need to add membrane, you can use the following command

pdbfixer.addMembrane( lipidType='POPC', membraneCenterZ=0*nanometer, minimumPadding=1*nanometer, positiveIon='Na+', negativeIon='Cl-', ionicStrength=0*molar)

Openmm

Here, the oepnmm is applied to running the molecular dynamics. Details can be found in the code of my repo. Different from ‘gromacs’, openmm builds the forcefiled dynamically based on the offered topology. In ‘gromacs’, the topology file is created based on the choosen forcefiled.

Openmm doesn’t support the Parallel Tempering Molecular Dynamics. So here, I use the openmmtools to run the PTMD. The gromacs has a very nice document to introduce the implement of this algorithm.

Pymol