for the practical, it is useful to do the following: 
setenv TOPPAR $HOME/new_practical/toppar
alias cns 

the inputs directory contains all the input files. 
the results directory contains some results of calculations and modifications.

1) 
Go to the page with the spectrin repeat structure (1aj3) at the pdb (at http://www.rcsb.org/pdb or http://www.ebi.ac.uk/pdbe-srv). 
Visualise the structure (e.g., with jmol or astex (on the pdb web site), or locally with molmol or pymol).
What can you say about the quality of the structure? (use the validation link in the "links" menu).
Download the structure (standard PDB format). 
mv or cp it into the "inputs" directory and cd into the inputs directory.  

2) 
Using a text editor, extract the first model (from "model 1" to "model 2") and write it into a separate file. 
Remove the MODEL and ENDMDL lines from the file
The pdb format requires an END as the last line, so add the END to the last line. 
The header of the file can be removed. 
Save the structure as 1aj3_1.pdb (case-sensitive).

3) 
Look at the files toph19_mod.pro and param19_mod.pro in the toppar directory. These are the topology and parameter files. 

4) 
We will use CNS to perform some minimisation and dynamics. 
A structure from the PDB always needs to be prepared for modelling work (add missing atoms, adapt atom naming, ...). The first step is to define the topology for our protein. 

Look at the file generate.inp and understand the different steps.
What does the "patch" HISD do? Look it up in toph19_mod.pro.

run the script:

[aria1@localhost ~]$ cns < generate.inp > generate.out &

Look at the file generate.out. There are a lot of error messages... why?
Look at the file 1aj3_cns.pdb. Do you remark anything unusual? For which atoms?
Look at the file 1aj3.psf. Which information is in the file?

5)
Build unknown atoms
It is usually the case that some atoms are missing from the PDB file (flexible side chains and hydrogens in X-ray crystal structures; missing modifications, ...). In our case the PDB entry does not have the standard N- and C-terminal modifications, which leads to some missing atoms. A simple script adds them by minimisation (if there are more atoms missing, one would need to do something more ivolved). 

Try to understand the script build_unknown.inp.
What do the "flags" statements do?
What does the "fix" statement do?
What do the different "parameter" statements do?

run the script

[aria1@localhost ~]$ cns < build_unknown.inp > build_unknown.out &

Look at the resulting structure 1aj3_complete.pdb with a molecular viewer and locate the added atoms to make sure they are correctly built.

6) 
The next step is to remove any strain from the structure that may be due to insufficient refinement or significant differences between the geometry of the PDB entry and the force field. This is done with the script minimize.inp. 

First try to understand the script. 

What is the difference between the parameter statement in this script and build_unknown.inp?
What is the role of the "harm" term? 
Which three elements are necessary to set this term up?
What do the include files nbonds_LB89.inp and neutral19.inp do?
What do "coor copy" and "coor rms" do? 

[aria1@localhost ~]$ cns < minimize.inp > minimize.out &

modify the script and use nbonds_AB.inp instead of nbonds_LB89.inp (commenting out neutral19.inp with a ! ). Change the name of the output coordinate file for doing this. Do you see any differences in the structure? in the final energies ? Compare nbonds_AB.inp and nbonds_LB89.inp.

Modify the script and use 1aj3_cns.pdb as coordinate file. What happens?

7)
The minimized structure is at 0K and it needs to be brought to the desired temperature (usually around room temperature). This is done by the script equilibrate.inp.

First try to understand the script. 

[aria1@localhost ~]$ cns < equilibrate.inp > equilibrate.out &

8) 
Native dynamics
Run 5 ns of native dynamics with the script vdynamics.inp.

[aria1@localhost ~]$ cns < dynamics.inp > dynamics.out &

Which commands are responsible for writing the trajectory?
Visualize the trajectory with vmd. 

9)
Unfolding dynamics
Run the forced unfolding of the spectrin repeat with the script unfold.inp. This simulates a forced unfolding experiment by pulling N and C terminus apart.

[aria1@localhost ~]$ cns < unfold.inp > unfold.out &

Try and understand the script.
- How is the distance determined?
- How is the distance enforced?
- How is the trajectory written?

The script reports in the file unfold.dat the following values:
- the target distance
- the actual distance
- the NOE energy
- the CA rms to the starting structure
- the heavy atom rms to the starting structure

Using these values, plot force and energy against distance.

10)
Modify the script unfold.inp to investigate if the fact that the molecule is free to rotate plays a role: fix the N-terminus with the "fix" command and rerun script and analysis.

Which other parameters may have an influence on the results?

How would one write a constant force rather than a constant velocity unfolding script?

11)
Mutate the residues 17 and 67 to cysteins, and introduce a disulfide bridge. 
Try to understand each of the scripts
- run mutate1.inp to get a mutated pdb file, 1aj3_CC.pdb
- modify the script generate.inp to obtain a PSF file for the mutated pdb
- modify the script build_unknown.inp for the mutated molecule and run the script
- modify minimize.inp, equilibrate.inp, dynamics.inp, unfold.inp and run them on the mutated sequences.

If you want to have a look, the "mutated" input files are in the subdirectory results. 

12)
The script watermacro_big.inp puts a layer of water around the protein. 
There are some modified scripts to run the dynamics in water (with a W in the file name). Look at the files and compare to the vacuum version. Run the files miniheat_W.inp and unfoldW.inp (if possible leave overnight). For information, miniheatW.inp takes approx. 2 h to run. 

Compare the obtained trajectory and forces with the vacuum calculation. 


