gamd_we.gamd_we_alanine_dipeptide

Module Contents

Functions

fix_cap_remove_ace(pdb_file)

Removes the H atoms of the capped ACE residue.

fix_cap_replace_ace(pdb_file)

Replaces the alpha carbon atom of the

fix_cap_remove_nme(pdb_file)

Removes the H atoms of the capped NME residue.

fix_cap_replace_nme(pdb_file)

Replaces the alpha carbon atom of the

prepare_alanine_dipeptide()

Prepares the alanine dipeptide system for Gaussian

create_vectors(x)

Extracts peridic box information from the

simulated_annealing(parm='system_TIP3P.prmtop', rst='system_TIP3P.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_TIP3P.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_TIP3P.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=26000000, 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(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

save_frames()

Creates a directory named we_structures. Inside this

save_we_inputs()

Writes an input file in each of the simulation folder.

arrange_files()

Creates directories and move files to appropriate folders.

run_reweigh()

Runs reweighing calculations systematically

save_westpa_inputs()

Creates separate folders to initiate WE simulations.

run_westpa_inputs()

Systematically runs save_westpa_inputs function in

transfer_files()

Deletes unnecessary files in the simulation

add_vectors_westpa_files()

Adds box vector dimensions to the inpcrd file.

we_analysis()

Runs short MD simulation for saved inpcrd files.

correction_westpa()

Eliminates all inpcrd files crashed during the short MD simulation

plot_contrib()

Plots to review the analysis done. Plot bar

clean_for_analysis()

Rstructures the entire filetree to start reweighing

gamd_we.gamd_we_alanine_dipeptide.fix_cap_remove_ace(pdb_file)[source]

Removes the H atoms of the capped ACE residue.

gamd_we.gamd_we_alanine_dipeptide.fix_cap_replace_ace(pdb_file)[source]

Replaces the alpha carbon atom of the capped ACE residue with a standard name.

gamd_we.gamd_we_alanine_dipeptide.fix_cap_remove_nme(pdb_file)[source]

Removes the H atoms of the capped NME residue.

gamd_we.gamd_we_alanine_dipeptide.fix_cap_replace_nme(pdb_file)[source]

Replaces the alpha carbon atom of the capped NME residue with a standard name.

gamd_we.gamd_we_alanine_dipeptide.prepare_alanine_dipeptide()[source]

Prepares the alanine dipeptide system for Gaussian Accelerated Molecular Dynamics (GaMD) simulations. Downloads the pdb structure from https://markovmodel.github.io/mdshare/ALA2/ and parameterizes it using General Amber Force Field (GAFF).

gamd_we.gamd_we_alanine_dipeptide.create_vectors(x)[source]

Extracts peridic box information from the given line.

gamd_we.gamd_we_alanine_dipeptide.simulated_annealing(parm='system_TIP3P.prmtop', rst='system_TIP3P.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_alanine_dipeptide.npt_equilibration(parm='system_TIP3P.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_alanine_dipeptide.nvt_equilibration(parm='system_TIP3P.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_alanine_dipeptide.run_equilibration()[source]

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

gamd_we.gamd_we_alanine_dipeptide.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_alanine_dipeptide.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_alanine_dipeptide.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_alanine_dipeptide.create_filetree(nst_lim=26000000, 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 = 26000000, then, we may have 2 ns of preparatory simulation i.e. 1000000 preparation steps and 50 ns of GaMD simulation i.e. 25000000 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_alanine_dipeptide.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_alanine_dipeptide.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_alanine_dipeptide.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_alanine_dipeptide.find_bin(value, bins)[source]

Finds which value belongs to which bin.

gamd_we.gamd_we_alanine_dipeptide.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_alanine_dipeptide.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_alanine_dipeptide.save_frames()[source]

Creates a directory named we_structures. Inside this directory, there are six subdirectories (three for one-dimension reweighing and other three for two-dimensional reweighted frames). All frames for one, two and three-degree Maclaurin series expanded reweighted frames are present in their respective folders.

gamd_we.gamd_we_alanine_dipeptide.save_we_inputs()[source]

Writes an input file in each of the simulation folder. Input file contains one column each for the name of the PDB file and its respective probability.

gamd_we.gamd_we_alanine_dipeptide.arrange_files()[source]

Creates directories and move files to appropriate folders.

gamd_we.gamd_we_alanine_dipeptide.run_reweigh()[source]

Runs reweighing calculations systematically in the simulation folder.

gamd_we.gamd_we_alanine_dipeptide.save_westpa_inputs()[source]

Creates separate folders to initiate WE simulations.

gamd_we.gamd_we_alanine_dipeptide.run_westpa_inputs()[source]

Systematically runs save_westpa_inputs function in the simulation directory.

gamd_we.gamd_we_alanine_dipeptide.transfer_files()[source]

Deletes unnecessary files in the simulation directory and creates a new WE simulation folder

gamd_we.gamd_we_alanine_dipeptide.add_vectors_westpa_files()[source]

Adds box vector dimensions to the inpcrd file. To be used only when the box vector dimensions are not available at the last line of inpcrd file.

gamd_we.gamd_we_alanine_dipeptide.we_analysis()[source]

Runs short MD simulation for saved inpcrd files.

gamd_we.gamd_we_alanine_dipeptide.correction_westpa()[source]

Eliminates all inpcrd files crashed during the short MD simulation run. Also create folders for .rst files in case it is needed for WE simulations

gamd_we.gamd_we_alanine_dipeptide.plot_contrib()[source]

Plots to review the analysis done. Plot bar graphs for the number of structures obtained for WE simulation for each of the potential boosts during GaMD simulation.

gamd_we.gamd_we_alanine_dipeptide.clean_for_analysis()[source]

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