 
 
 
 
 
   
Hopefully your constant velocity SMD simulation has finished successfully and you can proceed with analyzing the generated data, specifically the trajectory and the force applied to the SMD atom. In case you have not succeeded with your simulations we provide the respective files in the subdirectories example-output. For instance, if you do not find a file in the directory common, you should find it in the directory common/example-output.
In the screen you should be able to see the trajectory of the molecular dynamics simulation. 
By choosing an appropriate representation (e.g. New Cartoon) look how the  strands behave along the trajectory and how one end of the protein remains fixed while the other one is pulled as you had set it up (Fig. 21). Note that secondary structure will be calculated for the New Cartoon representation based on the frame of the trajectory you are viewing. If you move to another trajectory frame and would like to view the protein's secondary structure in that frame, type mol ssrecalc top in the TkCon window and VMD will update it.
 strands behave along the trajectory and how one end of the protein remains fixed while the other one is pulled as you had set it up (Fig. 21). Note that secondary structure will be calculated for the New Cartoon representation based on the frame of the trajectory you are viewing. If you move to another trajectory frame and would like to view the protein's secondary structure in that frame, type mol ssrecalc top in the TkCon window and VMD will update it.  
After inspecting your trajectory you should extract the force applied to the SMD atom from the NAMD output file:
You will now use a script designed to remove the necessary information from the NAMD log file and calculate the force of pulling. The NAMD log file provides SMD information on lines beginning with the tag ``SMD": the current timestep, current position of the center of mass of the restrained atoms, and the current force applied to the center of mass (in piconewtons).
| source ft.tcl | 
In order to obtain the force in the direction of pulling you need to calculate 
 , where
, where  is the normalized direction of pulling (in our example it was 0.443, 0.398, 0.803). The script will ask you for these values.  Simply enter them as n_x, n_y, and n_z. The script will create a file ft.dat (in the analysis directory) which contains just the simulation timestep and the magnitude of the force on the dummy atom at that time.
 is the normalized direction of pulling (in our example it was 0.443, 0.398, 0.803). The script will ask you for these values.  Simply enter them as n_x, n_y, and n_z. The script will create a file ft.dat (in the analysis directory) which contains just the simulation timestep and the magnitude of the force on the dummy atom at that time.  
### Open the log file for reading and the output .dat file for writing
set file [open ubq_ww_pcv.log r]
set output [open analysis/ft.dat w]
### Gather input from user.
puts "Enter a value for n_x:"
set nx [gets stdin]
puts "Enter a value for n_y:"
set ny [gets stdin]
puts "Enter a value for n_z:"
set nz [gets stdin]
### Loop over all lines of the log file
set file [open ubq_ww_pcv.log r]
while { [gets $file line] != -1 } {
### Determine if a line contains SMD output. If so, write the
### timestep followed by f(dot)n to the output file
  if {[lindex $line 0] == "SMD"} {
      puts $output "[lindex $line 1] [expr $nx*[lindex $line 5]
    + $ny*[lindex $line 6] + $nz*[lindex $line 7]]"
    }
  }
### Close the log file and the output .dat file
close $file
close $output
|     | 
 
|     | 
 Delete Molecule menu item.
 Delete Molecule menu item. 
In the OpenGL Display window you will see the trajectory of the constant force pulling simulation.
 Representations... menu item. 
In the Graphical Representations window choose the New Cartoon drawing method.
 Representations... menu item. 
In the Graphical Representations window choose the New Cartoon drawing method. 
 atoms at the end of your protein as spheres.
 atoms at the end of your protein as spheres. 
 Labels... menu item. In the Labels window, choose the label type Bonds. Select the bond displayed, click on the Graph tab and then click on the Graph button. This will create a plot of the distance between these two atoms over time (Fig. 23). You also have the option to write the data and to a file, which can then be read by an external graphing program.
 Labels... menu item. In the Labels window, choose the label type Bonds. Select the bond displayed, click on the Graph tab and then click on the Graph button. This will create a plot of the distance between these two atoms over time (Fig. 23). You also have the option to write the data and to a file, which can then be read by an external graphing program.  
 
This is the end of the NAMD tutorial. We hope you can now make use of VMD and NAMD in your work.
 
 
 
 
