MakingAllINPUTFiles

This section will take the previously generated .param and .pdb files and get them ready for simulations using "thecode." Also outlined below is how to generate all other INPUT files.
All scripts needed to execute these steps are in the shared folder on the supercomputer.
The following is a list of all modified or generated INPUT files (type needed may vary with model used):

  • .param
  • .crd
  • mol.input
  • gyration.inp
  • contacts.inp
  • simul.psf
  • simul0.crd
  • simul.input
  • simul#.crd
  • repex#.input
  • box_config.txt
  • repex_summary.txt
  • rest#.input
  • wall#.input

Making thecode-compatable .param file

This section outlines how to take the mmtsb-generated .param and .top files and make one concise .param file to be inputted into your simulation. This process is a little excessive and could be simplified if someone were to make a script, but currently we don't have one.

  1. Acquire some reference .param file. We will be using this as a guide to ensure the corrections made will be compatible with "thecode"
    • I will be using the new_1IGT.param as a reference. It is currently located in the shared group folder.
  2. Ensure this reference .param file is in the same folder as your mmtsb generated .param and .top files. (Instruction to get these are on the previous page)
    • I will be using GO_2LZM as my newly generated protein. Values used are dependent on situation, but the process is the same.
  3. Open your GO_2LZM.param file in vim, then open GO_2LZM.top in another vim field
    • $ vim GO_2LZM.param (opens vim)
    • :e GO_2LZM.top (opens this file in another vim field)
      Note: We are going to copy MW information in this .top file and put it in our .param file.
  4. In the current GO_2LZM.top file, select every line pre-labeled with "MASS"
    • :8,171y (This copies/yanks lines 8 to 171; obviously the numbers will be different for different proteins)
  5. Go to the GO_2LZM.param field in vim by typing ":b1"
  6. In the line before the BONDS section, paste the MASS selection by typing ":P"
  7. In you .param file, get into visual block mode “cntrl + v” (bash) or “cntrl + q” (for windows)
  8. Select all the "MASS" headings and hit "d" to delete them
  9. Go through your .param file and delete all the excess lines that aren’t in the reference file (new_1IGT.param)
  10. Add in the ATOM line with the number of amino acids in it. (see your reference file to get the format right)
  11. Now format the rest of your .param file to match the reference file.
    • You will need to add in a dummy at the end of the ATOM section just cuz…no real reason for it. See your reference file. I think it is for some for loop referencing?
    • You will need to add in the number of bonds in the molecule before the BONDS section. Same is true for all sections. See your reference file. Be careful, we are using base-0 math; don’t forget to add 1.
    • For NONBONDED you will need to remove the excess 0.0 column with visual block.
    • You will also have to copy your NONBONDED section and make the new NONBONDED 1-4 section.
    • You will also need to add in the IMPROPERS section. A blank section should suffice for most applications.
  12. If you have them, you will need to manually add in disulfide bonds.
    • Remember to change your total number before BOND if you do add them.
  13. Move this CHARM compatible .param file into your INPUT folder if it is not already there.



Generating Model INPUT files

Making the .crd file

Intro: What is in the .crd file.

  1. Put a copy of the pdb2crd.m AND pdb_read_v4.m scripts into your INPUT folder.
  2. Open pdb2crd.m with vim
  3. Change the file path and names for the .pdb and .crd file you want to read and write, respectively.
    • The .crd should be written into your INPUT folder.
    • The .crd file must be named: simul0.crd
  4. Load matlab and run the script.
    • $ module load matlab (if necessary)
    • $ matlab < pdb2crd.m
  5. Your new simul0.crd file will be generated.
    • Delete you pdb2crd.m script inside your INPUT folder if you want to, it will not be used again.
    • Do NOT delete pdb_read_v4.m, it will be used again.

Making the mol.input file

Intro: What is the mol.input file

  1. Put a copy of another model’s mol.input file and put it into your current INPUT folder. There should be one in the shared folder. This will not have the information for your specific protein, but we will be changing that.
  2. Using vim, open the mol.input file, look at the information written and manually change all the differences to fit your given model.
    • “Total number of molecules” = total # molecules per core. For a single protein RepX, this number is typically = 1
    • Number or atoms/site can be found in your .param file and equals the number next to the ATOM section header MINUS one. This is also equal to the number of contacts in the course grain simulation.
    • “Fancy moves” relate to Monte Carlo simulations and is primarily used for umbrella sampling. Does not matter for single simulations and replica exchange.
  3. The now-altered mol.input file is ready for simulation and should be put in your INPUT folder if it is not already there.

Making the gyration.inp file

Intro: What is the gyration.inp file

  1. Put a copy of the pdb2gyration.m script into your INPUT folder
  2. Open pdb2gyration.m with vim
  3. Change the filepath and name for the .pdb file you want to read. The gyration.inp file will be automatically generated, no need to give a name or path.
    • The gyration.inp will be written into the folder you run the script
  4. Change the number of boxes to correspond to the number of boxes in your model.
  5. Load Matlab and run the script.
    • $ module load matlab (if necessary)
    • $ matlab < pdb2gyration.m
  6. Your new gyration.inp file will be generated.
  7. Delete your pdb2gyration.m script inside your INPUT folder if you want to, it will not be used again.
    • do NOT delete pdb_read_v4.m

Making the contacts.inp file

Intro: What is contacts.inp

  1. Put a copy of the param2contacts.m script into your INPUT folder
  2. Open param2contacts.m with vim
  3. Change the file path and names for the .param and contacts.inp file you want to respectively read and write
    • You much name the created file contacts.inp and should be written to your INPUT folder
  4. Change the number of boxes to correspond to the number of boxes in your simulation.
  5. Load Matlab and run the script.
    • $ module load matlab (if necessary)
    • $ matlab < param2contacts.m
  6. Your new contacts.inp file will be generated
  7. Delete your param2contacts.m script inside your INPUT folder if you want to, it will not be used again.
    • do NOT delete pdb_read_v4.m

Making the simul.psf file

Intro: what is the simul.psf file

  1. Put a copy of the pdb2psf.m script into your INPUT folder
  2. Open pdb2psf.m with vim
  3. Change the file path and names for the .pdb, .param and simul.psf file you want to read (2) and write, respectively
    • You much name the created file simul.psf and should be written to your INPUT folder
  4. Load Matlab and run the script.
    • $ module load matlab (if necessary)
    • $ matlab < pdb2psf.m
  5. Your new simul.psf file will be generated
  6. Delete your pdb2psf.m script inside your INPUT folder if you want to, it will not be used again
    • do NOT delete pdb_read_v4.m

Making the rest0.input file

Intro: This is an optional restraint file. You must compile with -DREST flag to enable functionality. Use this feature to create a surface tether or to force contacts from separating/denaturing.

  1. Put a copy of rest0.input (from some other location) into your INPUT folder. There should be one in the shared folder. This will not have the information for your specific protein, but we will be changing that.
  2. Using vim, open the rest0.input file, input the specification you want for your particular simulation.
    • Make sure "Number of restraints" is indicated
    • For site-site restraints follow the method: site1, site2, k, r_equilibrium
    • For a site-surface restraint (a.k.a. a protein tether) follow the method: tether site, 0, k, 0.0, x, y, z
      • Note site2=0 where 0 means "surface" in the code.
      • Note if a wall is indicated (via site2=0 declaration) thecode will not use the r_eq value. Set to 0.0 to prevent read errors.
  3. The now-altered rest0.input file is ready for simulation and should be put in your INPUT folder if it is not already there.

Making the wall0.input file

Intro: This is an optional wall file. You must compile with -DWWALL make flag to enable functionality. Use this feature to create a wall (site 0) in you code. Note this wall will be generated in the z-direction and must be below all other sites.

  1. Put a copy of wall0.input (from some other location) into your INPUT folder. There should be one in the shared folder. This will not have the information for your specific simulation, but we will be changing that.
  2. Using vim, open the wall0.input file, input the specifications you want for you particular wall.
    • Make sure your z-coordinate is appropriate
    • Hydrophobicity is appropriate for your simulation.
  3. The now-altered wall0.input file is ready for simulation and should be put in your INPUT folder if it is not already there.
    • Note: If doing a replica exchange simulation you will need to rename the file to be wall.input




Model-Specific INPUT files


Equlibrium Models

For simple equilibrium models you only need to further generate: simul.input

Making simul.input files

Intro: What is simul.input

  1. Put a copy of another equlibrium model’s simul.input file, put it into your current INPUT folder. This will not have information for your specific protein, but we will be changing that.
  2. Using vim, open the simul.input file, look at the information written and manually change all the differences to match your model. Typical changes include:
    • sim_paramfile
    • sim_eq_steps
    • sim_pr_steps
  3. Your simul.input file is ready
  4. Delete your pdb_read_v4.m script inside your INPUT folder if you want to, it will not be used again.

Replica Exchange

For replica exchange models you need to generate: box_config.txt, simul#.crd, repex#.input, repex_summary.txt, and simul.input

Making box_config.txt

Intro: This text file tells you what RepX box corresponds to what temperature.

  1. Put a copy of box_config_setup.py into your INPUT folder
  2. Change the parameter settings in the python script:
    • Set the starting temp, last temp, and temperature steps (dT) to match your simulation parameters
  3. Load Python onto your shell and run the script
    • $ module load python (if necessary)
    • $ python < box_config_setup.py
  4. Your new box_config.txt file will be generated
  5. Delete your box_config_setup.py script inside your INPUT folder if you want to, it will not be used again.

Making all simul#.crd files

Intro: This step copies the simul0.crd and the optional rest0.input files already created and makes a summary text file for the simulation and individual simul#.crd, repex#.input and rest#.input (if included) files for each box.

  1. Put a copy of setup_repex.m into your INPUT folder
  2. Load Matlab onto your shell and run the Matlab script
    • $ module load matlab (if necessary)
    • $ matlab < setup_repex.m
  3. Generates all the repex#.input, simul#.crd, rest#.input files and the repex_summary.txt
  4. Delete your setup_repex.m script inside your INPUT folder if you want to, it will not be used again.

Making simul.input files

Intro: What is simul.input

  1. Put a copy of another replica exchange model’s simul.input file, put it into your current INPUT folder. This will not have information for your specific protein, but we will be changing that.
  2. Using vim, open the simul.input file, look at the information written in the sim_* section and manually change all the differences. Typical changes include:
    • sim_paramfile
    • sim_eq_steps
    • sim_pr_steps
  3. In the copied simul.input file, delete all the box_* information; keep the sim_* stuff (vim command dG: deletes everything after the cursor)
  4. Copy the contents of your repex_summary.txt and paste the correct box information into simul.input file after the sim_* stuff section.
    • Note: If using vim copy, will need to open buffers (:e simul.input; similar to what we did before)
  5. Your simul.input file is ready
  6. Delete your pdb_read_v4.m script and the repex_summary.txt inside your INPUT folder if you want to, it will not be used again.

Checking all the restraints

Intro: This section is for the files: rest#.input and wall#.input

  1. If you have this optional functionality enabled, you should already have a rest0.input and/or a wall0.input in your INPUT folder. If not, make them (see above)
  2. You will need a restraint files for every box in your RepX simulation, see above, Making all simul#.crd files
  3. Make sure that each restraint file satisfies you simulation conditions.
  4. Make sure your wall0.input is renamed to wall.input. You only need one per replica exchange simulation



Summary of INPUT files

All Equlibrium Model INPUT files

You should now have all necessary input files in your INPUT folder ("*"=optional):

  • .param
  • .pdb
  • mol.input
  • gyration.inp
  • contacts.inp
  • simul.psf
  • simul0.crd
  • simul.input
  • *rest0.input
  • *wall0.input

All Replica Exchange Model INPUT files

You should now have all necessary input files in your INPUT folder ("*"=optional):

  • .param
  • .pdb
  • mol.input
  • gyration.inp
  • contacts.inp
  • simul.psf
  • simul#.crd
  • repex#.input
  • simul.input
  • *rest#.input
  • *wall.input