Difference between revisions of "2023 AMBER tutorial 2 with PDBID 3WZE"

From Rizzo_Lab
Jump to: navigation, search
(Equilibration)
(Production)
Line 346: Line 346:
  
 
=='''Production'''==
 
=='''Production'''==
 +
To generate the actual MD simulation, change to the following directory:
 +
cd 005_production
 +
And open the following file:
 +
vi 10.prod.mdin
 +
Note the restraint mask should include ONLY protein residues this time. Insert the following text:
 +
MD simulations
 +
  &cntrl
 +
  imin=0,          ! Perform MD
 +
  nstlim=5000000,  ! Number of MD steps
 +
  ntx=5,            ! Positions and velocities read formatted
 +
  irest=1,          ! Restart calculation
 +
  ntc=2,            ! SHAKE on for bonds with hydrogen
 +
  dt=0.002,        ! Timestep (ps)
 +
  ntb=2,            ! Constant Pressure
 +
  ntp=1,            ! Isotropic pressure scaling
 +
  barostat=1        ! Berendsen
 +
  taup=0.5          ! Pressure relaxtion time (ps)
 +
  ntf=2,            ! No force evaluation for bonds with hydrogen
 +
  ntt=3,            ! Langevin thermostat
 +
  gamma_ln=2.0      ! Collision Frequency for thermostat
 +
  ig=-1,            ! Random seed for thermostat
 +
  temp0=298.15      ! Simulation temperature (K)
 +
  ntwx= 2500,      ! Write to trajectory file every ntwx steps
 +
  ntpr= 2500,      ! Print to mdout every ntpr steps
 +
  ntwr= 5000000,    ! Write a restart file every ntwr steps
 +
  cut=8.0,          ! Nonbonded cutoff in Angstroms
 +
  ntr=1,            ! Turn on restraints
 +
  restraintmask=":1-298@CA,C,N", ! atoms to be restrained
 +
  restraint_wt=0.1, ! force constant for restraint
 +
  ntxo=1,     ! Write coordinate file in ASCII format
 +
  ioutfm=0,        ! Write trajectory file in ASCII format
 +
  iwrap=1,          ! iwrap is turned on
 +
/
 +
This will take a very long time to run on CPUs so here is a script to run on the GPU.
 +
Create the file:
 +
vi mdproduction.sh
 +
And insert the following text:
 +
#!/bin/sh
 +
#SBATCH --job-name=3wze_production
 +
#SBATCH --ntasks-per-node=28
 +
#SBATCH --nodes=1
 +
#SBATCH --time=48:00:00
 +
#SBATCH -p gpu-long
  
 +
module load intel/compiler/64/2018/18.0.3
 +
module load intel/mpi/64/2018/18.0.3
 +
module load amber/16
 +
 +
cd $SLURM_SUBMIT_DIR
 +
 +
echo "Started Production on `date` "
 +
#do_parallel="mpirun pmemd.MPI"
 +
do_parallel="/gpfs/software/intel/parallel-studio-xe/2018_3/compilers_and_libraries/linux/mpi/bin64/mpirun -np 80 /gpfs/software/amber/16/intel/cpu/bin/pmemd.MPI"
 +
do_parallel="pmemd.cuda"
 +
#do_cuda="pmemd.cuda"
 +
 +
prmtop="../002_leap/3wze.wet.complex.parm7"
 +
coords="../003_equil/09.equil"
 +
 +
 +
MDINPUTS=(10.prod)
 +
 +
for input in ${MDINPUTS[@]}; do
 +
 +
  $do_parallel -O -i ${input}.mdin -o ${input}.mdout -p $prmtop -c ${coords}.rst7 -ref ${coords}.rst7 -x ${input}.trj -inf ${input}.info -r ${input}.rst7
 +
  coords=$input
 +
done
 +
 +
echo "Finished Production on `date` "
  
 
=='''MD Analysis'''==
 
=='''MD Analysis'''==

Revision as of 08:40, 6 May 2023

Introduction

Directory Setup

As always, we set up folders to keep us organized as we move generate files:

mkdir 001_structure
mkdir 002_parameters
mkdir 003_leap
mkdir 004_equil
mkdir 005_production

3WZE Structures

Receptor

Ligand

Amber Simulation Parameters

To generate parameters for the simulation, we must implement the following:

antechamber -i ../001_structure/3wze_lig_wH.mol2 -fi mol2 -o 3wze_ligand_antechamber.mol2 -fo mol2 -at gaff2 -c bcc -rn LIG -nc 0

nc = 0 because the charge on the ligand is 0. If your ligand is non-zero, enter the appropriate charge at the end of this line. It may be helpful to check the protonation state of the ligand at pH 7. Once 3wze_ligand_antechamber.mol2 output file is generated, run parmch2:

parmchk2 -i 3wze_ligand_antechamber.mol2 -f mol2 -o 3wze_ligand.am1bcc.frcmod

TLEaP

Next we will generate the AMBER topology file and coordinate files. Switch to the directory:

vi leap.in

Two types of files will be generated, parm7 (topology) and rst7 (coordinates). Create the input file:

vi leap.in

And then input the following (make sure you change the username):

   #!/USERNAME/bin/sh 
   ###load protein force field
   source leaprc.protein.ff14SB
   ###load GAFF force field (for our ligand)
   source leaprc.gaff
   ###load TIP3P (water) force field
   source leaprc.water.tip3p
   ###load ions frcmod for the tip3p model 
   loadamberparams frcmod.ionsjc_tip3p
   ###needed so we can use igb=8 model 
   set default PBradii mbondi3
   ###load protein pdb file 
   rec=loadpdb ../000_structure/3wze_rec.pdb
   ##@make disulfide bond
   ###load ligand frcmod/mol2
   loadamberparams ../000_structure/3wze_ligand.am1bcc.frcmod  
   lig=loadmol2 ../000_structure/3wze_ligand_antechamber.mol2
   ###create gase-phase complex
   gascomplex= combine {rec lig}
   ###write gas-phase pdb
   savepdb gascomplex 3wze.gas.complex.pdb
   ###write gas-phase toplogy and coord files for MMGBSA calc
   saveamberparm gascomplex 3wze.complex.parm7 3wze.gas.complex.rst7
   saveamberparm rec 3wze.gas.receptor.parm7 3wze.gas.receptor.rst7
   saveamberparm lig 3wze.gas.ligand.parm7 3wze.gas.ligand.rst7
   ###create solvated complex (albeit redundant)
   solvcomplex= combine {rec lig}
   ###solvate the system
   solvateoct solvcomplex TIP3PBOX 12.0
   ###Neutralize system
   addions solvcomplex Cl- 0
   addions solvcomplex Na+ 0
   #write solvated pdb file
   savepdb solvcomplex 3wze.wet.complex.pdb
   ###check the system
   charge solvcomplex 
   check solvcomplex
   ###write solvated toplogy and coordinate file
   saveamberparm solvcomplex 3wze.wet.complex.parm7 3wze.wet.complex.rst7
   quit

Once the files are generated, transfer the parm7 and rst7 files to the local environment. You can run them in Chimera to check the build. Open the protein, then open TOOLS--MD/ENSEMBLE ANALYSIS--MD MOVIE. Open the parm7 in prmtop box and then add the rst7 as a trajectory. Then click OK.

Equilibration

Next, we will minimize and equilibrate the system over nine successive steps. For information about the different parameters see the AMBER16 manual.

Change directory to:

cd 004_equil

The first step is to create the new file:

vi 01.min.md

And insert the following: Minimize all the hydrogens

&cntrl
imin=1,           ! Minimize the initial structure
ntmin=2,          ! Use steepest descent Ryota Added
maxcyc=5000,      ! Maximum number of cycles for minimization
ntb=1,            ! Constant volume
ntp=0,            ! No pressure scaling
ntf=1,            ! Complete force evaluation
ntwx= 1000,       ! Write to trajectory file every ntwx steps
ntpr= 1000,       ! Print to mdout every ntpr steps
ntwr= 1000,       ! Write a restart file every ntwr steps
cut=  8.0,        ! Nonbonded cutoff in Angstroms
ntr=1,            ! Turn on restraints
restraintmask="!@H=", ! atoms to be restrained
restraint_wt=5.0, ! force constant for restraint
ntxo=1,           ! Write coordinate file in ASCII format
ioutfm=0,         ! Write trajectory file in ASCII format
/

You'll want to pay close attention to the restraint mask - it lifts in later steps. Next:

vi 02.equil.mdin

Insert:

MD Simulation
&cntrl
imin=0,           ! Perform MD
nstlim=50000      ! Number of MD steps
ntb=2,            ! Constant Pressure
ntc=1,            ! No SHAKE on bonds between hydrogens
dt=0.001,         ! Timestep (ps)
ntp=1,            ! Isotropic pressure scaling
barostat=1        ! Berendsen
taup=0.5          ! Pressure relaxtion time (ps)
ntf=1,            ! Complete force evaluation
ntt=3,            ! Langevin thermostat
gamma_ln=2.0      ! Collision Frequency for thermostat
ig=-1,            ! Random seed for thermostat
temp0=298.15      ! Simulation temperature (K)
ntwx= 1000,       ! Write to trajectory file every ntwx steps
ntpr= 1000,       ! Print to mdout every ntpr steps
ntwr= 1000,       ! Write a restart file every ntwr steps
cut=  8.0,        ! Nonbonded cutoff in Angstroms
ntr=1,            ! Turn on restraints
restraintmask=":!@H=", ! atoms to be restrained
restraint_wt=5.0, ! force constant for restraint
ntxo=1,           ! Write coordinate file in ASCII format
ioutfm=0,         ! Write trajectory file in ASCII format
iwrap=1,          ! iwrap is turned on
/

Then:

vi 03.min.mdin

and insert the following text:

Minimize all the hydrogens
&cntrl
imin=1,           ! Minimize the initial structure
maxcyc=1000,      ! Maximum number of cycles for minimization
ntb=1,            ! Constant volume
ntp=0,            ! No pressure scaling
ntf=1,            ! Complete force evaluation
ntwx= 1000,       ! Write to trajectory file every ntwx steps
ntpr= 1000,       ! Print to mdout every ntpr steps
ntwr= 1000,       ! Write a restart file every ntwr steps
cut=  8.0,        ! Nonbonded cutoff in Angstroms
ntr=1,            ! Turn on restraints
restraintmask="!@H=", ! atoms to be restrained
restraint_wt=2.0, ! force constant for restraint
ntxo=1,           ! Write coordinate file in ASCII format
ioutfm=0,         ! Write trajectory file in ASCII format
/

Next:

vi 04.min.mdin

input:

Minimize all the hydrogens
&cntrl
imin=1,           ! Minimize the initial structure
maxcyc=1000,      ! Maximum number of cycles for minimization
ntb=1,            ! Constant volume
ntp=0,            ! No pressure scaling
ntf=1,            ! Complete force evaluation
ntwx= 1000,       ! Write to trajectory file every ntwx steps
ntpr= 1000,       ! Print to mdout every ntpr steps
ntwr= 1000,       ! Write a restart file every ntwr steps
cut=  8.0,        ! Nonbonded cutoff in Angstroms
ntr=1,            ! Turn on restraints
restraintmask="!@H=", ! atoms to be restrained
restraint_wt=0.1, ! force constant for restraint
ntxo=1,           ! Write coordinate file in ASCII format
ioutfm=0,         ! Write trajectory file in ASCII format
/

Then:

vi 05.min.mdin

and insert the following text:

Minimize all the hydrogens
&cntrl
imin=1,           ! Minimize the initial structure
maxcyc=1000,      ! Maximum number of cycles for minimization
ntb=1,            ! Constant volume
ntp=0,            ! No pressure scaling
ntf=1,            ! Complete force evaluation
ntwx= 1000,       ! Write to trajectory file every ntwx steps
ntpr= 1000,       ! Print to mdout every ntpr steps
ntwr= 1000,       ! Write a restart file every ntwr steps
cut=  8.0,        ! Nonbonded cutoff in Angstroms
ntr=1,            ! Turn on restraints
restraintmask="!@H=", ! atoms to be restrained
restraint_wt=0.05, ! force constant for restraint
ntxo=1,           ! Write coordinate file in ASCII format
ioutfm=0,         ! Write trajectory file in ASCII format
/
Next:
vi 06.equil.mdin

And:

MD Simulation
&cntrl
imin=0,           ! Perform MD
nstlim=50000      ! Number of MD steps
ntb=2,            ! Constant Pressure
ntc=1,            ! No SHAKE on bonds between hydrogens
dt=0.001,         ! Timestep (ps)
ntp=1,            ! Isotropic pressure scaling
barostat=1        ! Berendsen
taup=0.5          ! Pressure relaxtion time (ps)
ntf=1,            ! Complete force evaluation
ntt=3,            ! Langevin thermostat
gamma_ln=2.0      ! Collision Frequency for thermostat
ig=-1,            ! Random seed for thermostat
temp0=298.15      ! Simulation temperature (K)
ntwx= 1000,       ! Write to trajectory file every ntwx steps
ntpr= 1000,       ! Print to mdout every ntpr steps
ntwr= 1000,       ! Write a restart file every ntwr steps
cut=  8.0,        ! Nonbonded cutoff in Angstroms
ntr=1,            ! Turn on restraints
restraintmask="!@H=", ! atoms to be restrained
restraint_wt=1.0, ! force constant for restraint
ntxo=1,           ! Write coordinate file in ASCII format
ioutfm=0,         ! Write trajectory file in ASCII format
iwrap=1,          ! iwrap is turned on
/

Then:

vi 07.equil.mdin

Insert:

MD simulation
&cntrl
imin=0,           ! Perform MD
nstlim=50000      ! Number of MD steps
ntx=5,            ! Positions and velocities read formatted
irest=1,          ! Restart calculation
ntc=1,            ! No SHAKE on for bonds with hydrogen
dt=0.001,         ! Timestep (ps)
ntb=2,            ! Constant Pressure
ntp=1,            ! Isotropic pressure scaling
barostat=1        ! Berendsen
taup=0.5          ! Pressure relaxtion time (ps)
ntf=1,            ! Complete force evaluation
ntt=3,            ! Langevin thermostat
gamma_ln=2.0      ! Collision Frequency for thermostat
ig=-1,            ! Random seed for thermostat
temp0=298.15      ! Simulation temperature (K)
ntwx= 1000,       ! Write to trajectory file every ntwx steps
ntpr= 1000,       ! Print to mdout every ntpr steps
ntwr= 1000,       ! Write a restart file every ntwr steps
cut=  8.0,        ! Nonbonded cutoff in Angstroms
ntr=1,            ! Turn on restraints
restraintmask="!@H=", ! atoms to be restrained
restraint_wt=0.5, ! force constant for restraint
ntxo=1,           ! Write coordinate file in ASCII format
ioutfm=0,         ! Write trajectory file in ASCII format
iwrap=1,          ! iwrap is turned on
/

Next:

vi 08.equil.mdin

Here, you will need to specify the exact residues of your COMPLEX to enter at the restraintmask line. This means the total protein residues plus the ligand. Residue numbers which can be found in the wet.complex.pdb file generated in the 003_leap directory. So here, 3WZE is 298 residues plus the ligand is 299.

Insert the following:
MD simulations
&cntrl
imin=0,           ! Perform MD
nstlim=50000      ! Number of MD steps
ntx=5,            ! Positions and velocities read formatted
irest=1,          ! Restart calculation
ntc=1,            ! No SHAKE on for bonds with hydrogen
dt=0.001,         ! Timestep (ps)
ntb=2,            ! Constant Pressure
ntp=1,            ! Isotropic pressure scaling
barostat=1        ! Berendsen
taup=0.5          ! Pressure relaxtion time (ps)
ntf=1,            ! Complete force evaluation
ntt=3,            ! Langevin thermostat
gamma_ln=2.0      ! Collision Frequency for thermostat
ig=-1,            ! Random seed for thermostat
temp0=298.15      ! Simulation temperature (K)
ntwx= 1000,       ! Write to trajectory file every ntwx steps
ntpr= 1000,       ! Print to mdout every ntpr steps
ntwr= 1000,       ! Write a restart file every ntwr steps
cut=  8.0,        ! Nonbonded cutoff in Angstroms
ntr=1,            ! Turn on restraints
restraintmask=":1-299@CA,C,N", ! atoms to be restrained
restraint_wt=0.1, ! force constant for restraint
ntxo=1,           ! Write coordinate file in ASCII format
ioutfm=0,         ! Write trajectory file in ASCII format
iwrap=1,          ! iwrap is turned on
/

Next:

vi 09.equil.mdin

Insert the following paying attention to the restraintmask line once more:

MD simulation
&cntrl
imin=0,           ! Perform MD
nstlim=50000      ! Number of MD steps
ntx=5,            ! Positions and velocities read formatted
irest=1,          ! Restart calculation
ntc=1,            ! No SHAKE on for bonds with hydrogen
dt=0.001,         ! Timestep (ps)
ntb=2,            ! Constant Pressure
ntp=1,            ! Isotropic pressure scaling
barostat=1        ! Berendsen
taup=0.5          ! Pressure relaxtion time (ps)
ntf=1,            ! Complete force evaluation
ntt=3,            ! Langevin thermostat
gamma_ln=2.0      ! Collision Frequency for thermostat
ig=-1,            ! Random seed for thermostat
temp0=298.15      ! Simulation temperature (K)
ntwx= 1000,       ! Write to trajectory file every ntwx steps
ntpr= 1000,       ! Print to mdout every ntpr steps
ntwr= 1000,       ! Write a restart file every ntwr steps
cut=  8.0,        ! Nonbonded cutoff in Angstroms
ntr=1,            ! Turn on restraints
restraintmask=":1-299@CA,C,N", ! atoms to be restrained
restraint_wt=0.1, ! force constant for restraint
ntxo=1,           ! Write coordinate file in ASCII format
ioutfm=0,         ! Write trajectory file in ASCII format
iwrap=1,          ! iwrap is turned on
/

All nine files will be run simultaneously. First we create the file:

vi mdequilibration.sh

And insert the script:

#!/bin/bash
#
#SBATCH --job-name=3wze_equilibration
#SBATCH --output=equilibration_output.txt
#SBATCH --ntasks-per-node=24
#SBATCH --nodes=1
#SBATCH --time=48:00:00
#SBATCH -p long-24core

module load amber/16

do_parallel="mpirun -np 80 pmemd.MPI"

prmtop="../003.tleap/3wze.wet.complex.prmtop"
coords="../003.tleap/3wze.wet.complex" 

MDINPUTS=(01.min 02.equil 03.min 04.min 05.min 06.equil 07.equil 08.equil 09.equil)

for input in ${MDINPUTS[@]}; do

$do_parallel -O -i ${input}.mdin -o ${input}.mdout -p $prmtop -c ${coords}.rst7 -ref ${coords}.rst7 -x ${input}.trj -inf ${input}.info -r ${input}.rst7
  coords=$input
done
  • Keep in mind that the 24 core is likely discontinued as of May 2023.

Production

To generate the actual MD simulation, change to the following directory:

cd 005_production

And open the following file:

vi 10.prod.mdin

Note the restraint mask should include ONLY protein residues this time. Insert the following text:

MD simulations
 &cntrl
 imin=0,           ! Perform MD
 nstlim=5000000,   ! Number of MD steps
 ntx=5,            ! Positions and velocities read formatted
 irest=1,          ! Restart calculation
 ntc=2,            ! SHAKE on for bonds with hydrogen
 dt=0.002,         ! Timestep (ps)
 ntb=2,            ! Constant Pressure
 ntp=1,            ! Isotropic pressure scaling
 barostat=1        ! Berendsen 
 taup=0.5          ! Pressure relaxtion time (ps)
 ntf=2,            ! No force evaluation for bonds with hydrogen
 ntt=3,            ! Langevin thermostat
 gamma_ln=2.0      ! Collision Frequency for thermostat
 ig=-1,            ! Random seed for thermostat
 temp0=298.15      ! Simulation temperature (K)
 ntwx= 2500,       ! Write to trajectory file every ntwx steps
 ntpr= 2500,       ! Print to mdout every ntpr steps
 ntwr= 5000000,    ! Write a restart file every ntwr steps
 cut=8.0,          ! Nonbonded cutoff in Angstroms
 ntr=1,            ! Turn on restraints
 restraintmask=":1-298@CA,C,N", ! atoms to be restrained
 restraint_wt=0.1, ! force constant for restraint
 ntxo=1,	    ! Write coordinate file in ASCII format
 ioutfm=0,         ! Write trajectory file in ASCII format
 iwrap=1,          ! iwrap is turned on
/

This will take a very long time to run on CPUs so here is a script to run on the GPU. Create the file:

vi mdproduction.sh

And insert the following text:

#!/bin/sh
#SBATCH --job-name=3wze_production
#SBATCH --ntasks-per-node=28
#SBATCH --nodes=1
#SBATCH --time=48:00:00
#SBATCH -p gpu-long
module load intel/compiler/64/2018/18.0.3
module load intel/mpi/64/2018/18.0.3
module load amber/16

cd $SLURM_SUBMIT_DIR
echo "Started Production on `date` "
#do_parallel="mpirun pmemd.MPI"
do_parallel="/gpfs/software/intel/parallel-studio-xe/2018_3/compilers_and_libraries/linux/mpi/bin64/mpirun -np 80 /gpfs/software/amber/16/intel/cpu/bin/pmemd.MPI"
do_parallel="pmemd.cuda"
#do_cuda="pmemd.cuda"
prmtop="../002_leap/3wze.wet.complex.parm7"
coords="../003_equil/09.equil"


MDINPUTS=(10.prod)
for input in ${MDINPUTS[@]}; do
 $do_parallel -O -i ${input}.mdin -o ${input}.mdout -p $prmtop -c ${coords}.rst7 -ref ${coords}.rst7 -x ${input}.trj -inf ${input}.info -r ${input}.rst7
 coords=$input
done

echo "Finished Production on `date` "

MD Analysis

RMSD

Hydrogen Bonding

MM-GBSA