gamd_we.gamd_we_bpti

Module Contents

Functions

create_vectors(x)

Extracts peridic box information from the

prepare_bpti()

Prepares the Bovine pancreatic trypsin inhibitor

simulated_annealing(parm='system_TIP4P.prmtop', rst='system_TIP4P.inpcrd', annealing_output_pdb='system_annealing_output.pdb', annealing_steps=100000, pdb_freq=100000, starting_temp=0, target_temp=300, temp_incr=3)

Performs simulated annealing of the system from

npt_equilibration(parm='system_TIP4P.prmtop', npt_output_pdb='system_npt_output.pdb', pdb_freq=500000, npt_steps=5000000, target_temp=300, npt_pdb='system_annealing_output_last_frame.pdb')

Performs NPT equilibration MD of the system

nvt_equilibration(parm='system_TIP4P.prmtop', nvt_output_pdb='system_nvt_output.pdb', pdb_freq=500000, nvt_steps=5000000, target_temp=300, nvt_pdb='system_npt_output_last_frame.pdb')

Performs NVT equilibration MD of the system

run_equilibration()

Runs systematic simulated annealing followed by

create_starting_structures()

Prepares starting structures for Amber GaMD simulations.

add_vec_inpcrd()

Adds box dimensions captured from the last saved

add_vec_prmtop()

Adds box dimensions captured from the last saved

create_filetree(nst_lim=251000000, ntw_x=1000, nt_cmd=1000000, n_teb=1000000, n_tave=50000, ntcmd_prep=200000, nteb_prep=200000)

Creates a directory named gamd_simulations. Inside

run_simulations()

Runs GaMD simulations for each of the dihedral, dual and total

create_data_files(index_phi=[200, 202, 204, 207], index_psi=[584, 586, 588, 591], jump=10, traj='system_final.nc', topology='system_final.prmtop', T=300)

Extracts data from GaMD log files and saves them as

create_data_files(index_phi=[200, 202, 204, 207], index_psi=[584, 586, 588, 591], jump=10, traj='system_final.nc', topology='system_final.prmtop', T=300)

Extracts data from GaMD log files and saves them as

create_bins(lower_bound, width, upper_bound)

Creates bin if given the lower and upper bound

find_bin(value, bins)

Finds which value belongs to which bin.

reweight_1d(binspace=10, n_structures=4, Xdim=[-180, 180], T=300.0, min_prob=1e-06)

Reweights boosted potential energies in one-dimension based on

reweight_2d(binspace=10, n_structures=4, Xdim=[-180, 180], Ydim=[-180, 180], T=300.0, min_prob=1e-06)

Reweights boosted potential energies in two-dimensions

arrange_files()

Creates directories and move files to appropriate folders.

run_reweigh()

Runs reweighing calculations systematically

clean_for_analysis()

Rstructures the entire filetree to start reweighing

gamd_we.gamd_we_bpti.create_vectors(x)[source]

Extracts peridic box information from the given line.

gamd_we.gamd_we_bpti.prepare_bpti()[source]

Prepares the Bovine pancreatic trypsin inhibitor system for Gaussian Accelerated Molecular Dynamics (GaMD) simulations. Downloads the pdb structure from http://ambermd.org/tutorials/advanced/tutorial22/files/5PTI-DtoH-dry.pdb and parameterizes it using General Amber Force Field (GAFF).

gamd_we.gamd_we_bpti.simulated_annealing(parm='system_TIP4P.prmtop', rst='system_TIP4P.inpcrd', annealing_output_pdb='system_annealing_output.pdb', annealing_steps=100000, pdb_freq=100000, starting_temp=0, target_temp=300, temp_incr=3)[source]

Performs simulated annealing of the system from 0K to 300 K (default) using OpenMM MD engine and saves the last frame of the simulation to be accessed by the next simulation.

Parameters
  • parm (str) – System’s topology file

  • rst (str) – System’s coordinate file

  • annealing_output_pdb (str) – System’s output trajectory file

  • annealing_steps (int) – Aneealing steps at each temperatrure jump

  • pdb_freq (int) – Trajectory to be saved after every pdb_freq steps

  • starting_temp (int) – Initial temperature of Simulated Annealing

  • target_temp (int) – Final temperature of Simulated Annealing

  • temp_incr (int) – Temmperature increase for every step

gamd_we.gamd_we_bpti.npt_equilibration(parm='system_TIP4P.prmtop', npt_output_pdb='system_npt_output.pdb', pdb_freq=500000, npt_steps=5000000, target_temp=300, npt_pdb='system_annealing_output_last_frame.pdb')[source]

Performs NPT equilibration MD of the system using OpenMM MD engine and saves the last frame of the simulation to be accessed by the next simulation.

Parameters
  • parm (str) – System’s topology file

  • npt_output_pdb (str) – System’s output trajectory file

  • pdb_freq (int) – Trajectory to be saved after every pdb_freq steps

  • npt_steps (int) – NPT simulation steps

  • target_temp (int) – Temperature for MD simulation

  • npt_pdb (str) – Last frame of the simulation

gamd_we.gamd_we_bpti.nvt_equilibration(parm='system_TIP4P.prmtop', nvt_output_pdb='system_nvt_output.pdb', pdb_freq=500000, nvt_steps=5000000, target_temp=300, nvt_pdb='system_npt_output_last_frame.pdb')[source]

Performs NVT equilibration MD of the system using OpenMM MD engine saves the last frame of the simulation to be accessed by the next simulation.

Parameters
  • parm (str) – System’s topology file

  • nvt_output_pdb (str) – System’s output trajectory file

  • pdb_freq (int) – Trajectory to be saved after every pdb_freq steps

  • nvt_steps (int) – NVT simulation steps

  • target_temp (int) – Temperature for MD simulation

  • nvt_pdb (str) – Last frame of the simulation

gamd_we.gamd_we_bpti.run_equilibration()[source]

Runs systematic simulated annealing followed by NPT and NVT equilibration MD simulation.

gamd_we.gamd_we_bpti.create_starting_structures()[source]

Prepares starting structures for Amber GaMD simulations. All input files required to run Amber GaMD simulations are placed in the starting_structures directory.

gamd_we.gamd_we_bpti.add_vec_inpcrd()[source]

Adds box dimensions captured from the last saved frame of the NVT simulations to the inpcrd file. Only to be used when the box dimensions are not present in the inpcrd file.

gamd_we.gamd_we_bpti.add_vec_prmtop()[source]

Adds box dimensions captured from the last saved frame of the NVT simulations to the prmtop file. Only to be used when the box dimensions are not present in the prmtop file.

gamd_we.gamd_we_bpti.create_filetree(nst_lim=251000000, ntw_x=1000, nt_cmd=1000000, n_teb=1000000, n_tave=50000, ntcmd_prep=200000, nteb_prep=200000)[source]

Creates a directory named gamd_simulations. Inside this directory, there are subdirectories for dihedral, dual and total potential-boosted GaMD with upper and lower threshold boosts separately.

Parameters
  • nst_lim (int) – Total simulation time including preparatory simulation. For example, if nst_lim = 251000000, then, we may have 2 ns of preparatory simulation i.e. 1000000 preparation steps and 500 ns of GaMD simulation i.e. 250000000 simulation steps

  • ntw_x (int) – Saving coordinates of the simulation every ntw_x timesteps. For example, 2 ps implies 1000 timesteps

  • nt_cmd (int) – Number of initial MD simulation step, 2 ns of preparatory simulation requires 1000000 preparation timesteps

  • n_teb (int) – Number of biasing MD simulation steps

  • n_tave (int) – Number of simulation steps used to calculate the average and standard deviation of potential energies

  • ntcmd_prep (int) – Number of preparation conventional molecular dynamics steps.This is used for system equilibration and potential energies are not collected for statistics

  • nteb_prep (int) – Number of preparation biasing molecular dynamics simulation steps. This is used for system equilibration

gamd_we.gamd_we_bpti.run_simulations()[source]

Runs GaMD simulations for each of the dihedral, dual and total potential boosts for both thresholds i.e. upper and lower potential thresholds. (Remember to check md.in files for further details and flag information).

gamd_we.gamd_we_bpti.create_data_files(index_phi=[200, 202, 204, 207], index_psi=[584, 586, 588, 591], jump=10, traj='system_final.nc', topology='system_final.prmtop', T=300)[source]

Extracts data from GaMD log files and saves them as weights.dat, Psi.dat and Phi_Psi.dat. gamd.log file contains data excluding the initial equilibration MD simulation steps but trajectory output file has all the trajectories including the initial equilibration MD steps. This part has ben taken care to make the data consistent.

Parameters
  • index_phi (list) – List of indices of the phi dihedral to be calculated

  • index_phi (list) – List of indices of the phi dihedral to be calculated

  • jump (int) – Every nth frame to be considered for reweighting

  • traj (str) – System’s trajectory file

  • topology (str) – System’s topology file

  • T (int) – MD simulation temperature

gamd_we.gamd_we_bpti.create_data_files(jump=10, traj='system_final.nc', topology='system_final.prmtop', T=300)[source]

Extracts data from GaMD log files and saves them as weights.dat, Psi.dat and Phi_Psi.dat. gamd.log file contains data excluding the initial equilibration MD simulation steps but trajectory output file has all the trajectories including the initial equilibration MD steps. This part has ben taken care to make the data consistent.

Parameters
  • jump (int) – Every nth frame to be considered for reweighting

  • traj (str) – System’s trajectory file

  • topology (str) – System’s topology file

  • T (int) – MD simulation temperature

gamd_we.gamd_we_bpti.create_bins(lower_bound, width, upper_bound)[source]

Creates bin if given the lower and upper bound with the wirdth information.

gamd_we.gamd_we_bpti.find_bin(value, bins)[source]

Finds which value belongs to which bin.

gamd_we.gamd_we_bpti.reweight_1d(binspace=10, n_structures=4, Xdim=[- 180, 180], T=300.0, min_prob=1e-06)[source]

Reweights boosted potential energies in one-dimension based on Maclaurin series expansion to one, two and three degrees.

Parameters
  • binspace (int) – Spacing between the bins

  • n_structures (int) – Number of structures per bin chosen for Weighted Ensemble (WE) simulations

  • Xdim (list) – Range of dihedral angles

  • T (float) – MD simulation temperature

  • min_prob (float) – minimum probability threshold

gamd_we.gamd_we_bpti.reweight_2d(binspace=10, n_structures=4, Xdim=[- 180, 180], Ydim=[- 180, 180], T=300.0, min_prob=1e-06)[source]

Reweights boosted potential energies in two-dimensions based on Maclaurin series expansion to one, two and three degrees.

Parameters
  • binspace (int) – Spacing between the bins

  • n_structures (int) – Number of structures per bin chosen for Weighted Ensemble (WE) simulations

  • Xdim (list) – Range of dihedral angles (1st dimension)

  • Ydim (list) – Range of dihedral angles (2nd dimension)

  • T (float) – MD simulation temperature

  • min_prob (float) – minimum probability threshold

gamd_we.gamd_we_bpti.arrange_files()[source]

Creates directories and move files to appropriate folders.

gamd_we.gamd_we_bpti.run_reweigh()[source]

Runs reweighing calculations systematically in the simulation folder.

gamd_we.gamd_we_bpti.clean_for_analysis()[source]

Rstructures the entire filetree to start reweighing analysis again. Used only when we want to run the analysis again.