Workshop Part 1
Dates and Times of Workshop
Monday 14th February 2pm - 4pm
Tuesday 15th February 2pm - 4pm
Overview
The purpose of this workshop is to ensure that you have the computational skills needed to undertake the VMD and NAMD workshops (Workshop Parts 2 and 3), using the Centre for Scientific Computing (CSC) linux computing facilities.
Prior to the workshop you should have requested an account on the CSC machines and installed the NX Client on your laptop.
Aims
This workshop is not directly assessed but it is expected that by the end of the workshop you will be able to:
- Competently manipulate files, directories and utilities under the linux operating system;
- Demonstrate a familiarity with the emacs editor;
- Be able to plot data using xmgrace;
- Be able to run jobs on the COW (i.e. submit jobs to the queue).
Exercises
- Open up the NX client and log on to godzilla.csc.warwick.ac.uk. You will now be able to see your linux desktop.
- To open up a terminal window click on the green icon on the bottom left of the screen and the click on the terminal icon.
- For this workshop we will use the material from Session 1 of the CSC MSc module CY900 Foundations in Scientific Computing. Work through the material at your own pace; you do not need to do absolutely everything but you should make sure that you have achieved the aims of the workshop listed above.
- Follow the steps below to learn how to run jobs on the COW.
Running jobs on the COW
CSC desktops operate together as a Cluster of Workstations (COW) and any computation (job) expected to take more than a few minutes MUST be submitted to the COW.
You should only use godzilla for editing, compiling, and very short interactive runs (seconds, not minutes or hours).
Detailed instructions on using the COW are given at http://www2.warwick.ac.uk/fac/sci/csc/local/desktop/cow/ (you will need your CSC username and password to access the documentation).
Below is a worked example of how to submit a short, test molecular dynamics simulation of a box of water using the NAMD simulation package. The use of NAMD will be covered in detail in Part 3 of the Workshop but for now we will just focus on the practical aspect of running the simulation on the COW.
Make a new directory from which to run the test simulation of a box of water:
mkdir water_box
Navigate to the directory:
cd water_box
Download these input files and save them in the water_box directory. Unzip the files:
unzip water.zip
You will see that there are 4 NAMD input files (all called “water.something”) and a file called job.pbs which is the pbs script that enables you to submit the simulation to the queue. Examine job.pbs using:
cat job.pbs
Comments in the file begin with the # symbol. Commands to the queuing system begin with #PBS. Further explanation of the file format is given at https://rcs.csc.warwick.ac.uk/twiki/bin/view/Main/TorqueUserGuide.
Before you can run the simulation you need to load the NAMD module (this configures your linux environment for running NAMD):
module load namd
There is a dedicated queue (called "ch926") for running the simulations for this module. Now you can submit the test simulation using the qsub command:
qsub -q ch926 job.pbs
You can view the status of the queue using:
qstat
or:
qstat –u username
to view only the jobs that you have submitted.
The output of qstat looks something like this:
Job id Name User Time Use S Queue
-------------- ----------- ---------- -------- - -----
251799.foo run_01.pbs mssxxx 85:45:19 R troisi
251800.foo run_02.pbs mssxxx 85:42:46 R troisi
251802.foo job.pbs mssyyy 86:39:21 R nazgul
251805.foo volume20 msszzz 85:14:06 R troisi
251836.foo protein mssyyy 0 Q nazgul
251836.foo volume30 msszzz 0 Q troisi
The status of the job is indicated by Q or R (there are also some other possibilities). Q means a job is in the queue but has not started running; R means the job is running.
Note: To delete a job that you have submitted to the queue type:
qdel job_id
where the job_id is the number that appears in the left hand column.
Once your job is complete it will exit the queue and you will see two output files jobname.ejobid and jobhame.ojobid. The .e file will contain any error messages and the .o file will contain any standard output.
For completeness, you can visualise the simulation that you have just run using VMD. Again, we will cover the use of VMD in more detail in Part 2 of the workshop. First load the VMD module:
module load vmd
Then open the output trajectory file using vmd
vmd water.psf water.dcd
The trajectory will load into VMD and you can play it back from the VMD Main window.