How to run a long MD simulation

1. Running in background on Athena using the longjobs utility

Molecular Dynamics simulations can run for a very long time, depending on the size (i.e. number of atoms) of the system being simulated and the number of time steps specified in the run. It is inappropriate to lock up a workstation for the duration of jobs which are longer than an hour or two. It is now possible to run such long simulations using a special Athena service called "longjobs". Simulations up to 24 hours can be run using this utility. For faster turnaround, there is also a service for running jobs up to a maximum of 6 hrs.

Information about the longjob utility on Athena can be found at http://web.mit.edu/longjobs/www. Before running a molecular dynamics simulation as a longjob, you should first prepare the system for simulation using the interactive commands available in InsightII. This includes constructing the model, specifying the force field, performing any preliminary, short energy minimizations or molecular dynamics simulations, etc. This page only addresses how to run the Discover job for long energy minimizations or molecular dynamics simulations. For any new problem, it is generally a good idea to run a short MD simulation directly from the InsighII interface, to make sure that the job will execute correctly.

To prepare a job for MD simulation using longjob, follow these steps:

  • Start up InsightII and prepare your model for MD simulation just as you would for running the simulation from InsightII.

  • When ready to run an MD simulation, go to the Discover_3 module and use the Setup, Commands and Analyze menus to define the simulation parameters and output.

  • Write the input file for Discover to disk by executing the Background_Job/Setup_Bkgd_Job command with the Execution_Mode parameter set to Cmd_File_Only and then executing the D_Run/Run command. This should create files with names like run_name.car, run_name.mdf and run_name.inp.

  • Edit the run_name.inp file to include "set PROJECT run_name" as the first BCTL command (before any other line that does not begin with #). This tells Discover the name of your simulation.

  • Create a script file to run the longjob utilty. The following is an example: ###############################################################
    # This is a basic script to run a molecular dynamics simulation
    # with CDiscover
    #
    # created by G.C. Rutledge, Jan 2002.

    # Set working directory (here, it is the submit directory)
    cd $PBS_O_WORKDIR

    # Remember to add the following line as first bctl command in
    # run_name.inp file:
    # set PROJECT run_name

    # Clean up any output from previous runs
    if (-e aapla0_cell0.out) then
    /bin/rm -f run_name.out
    endif

    # add Biosym locker and set environment variables
    add biosym_root
    source /mit/biosym_root/cshrc400
    setenv FORCEFIELD pcff.frc

    #run the CDiscover job:
    discovery <run_name.inp >run_name.out
    ###############################################################

    Note that this script sets your working directory, as recommended by the longjob instructions. It 'adds' the Biosym_root locker and sources the cshrc400 file there, to set any environment variables. If you have changed the force field from the default (cvff), then you must also include the "setenv FORCEFIELD xxx.frc" line. The last line starts the Discover job on the longjobs server, with input taken from run_name.inp, and output written to run_name.out.
  • Finally, to run the job, follow the longjob instructions to run the simulation on one of the sgi servers, using the name of script file instead of std.in when prompted for it.

  • The following methods are older and may no longer work.

    2. Running in background from a Department account:

    If you have an account on the Department file server, all you need to do to run long jobs in background is 'cd' to one of your directories on chefs and fire up the software (e.g. Biosym's InsightII) from there. So long as the background job does not require any data from an Athena locker, background jobs will run without kerberos tickets.

    To run an MD simulation in background, start InsightII from a directory on chefs. Using Discover3, specify the system and simulation and setup the background job. Then select DRun and wait a few minutes until the simulation is underway. When you log out, the simulation will continue and write to files in your directory on chefs. This will only work for single stage MD jobs (e.g. one MD simulation or one Minimization); it will not work for multiple stages (e.g. Minimization stage followed by MD stage) because each stage requires information from the Athena Biosym locker which cannot be accessed by the job after you log out and your kerberos tickets expire.

    3. Running in background from an Athena account:

    This too is possible, although less secure than the first procedure. If you have an Athena account, you can create a special directory under ~/Public which has full write permissions for everyone - anyone can read, write and delete files in this directory, including a program running without kerberos tickets. To set the permissions on such a directory, use the command:

    fs sa ~/Public/yourdirectory system:anyuser write

    To run the simulation in background, cd to this directory and start InsightII from there, following the same procedure as above. When the simulation is finished, be sure to move all the important files so a secure directory in ~/Private.
    MIT Home page | Back to Running on a department account | Back to How To... | Title Page

    Last modified: 3/7/02 - GCR