Using VMD and NAMD on MOGON
Licensing Issues
We, the ZDV HPC group, have setup and compiled VMD and NAMD for you – and we will continue to do so for new versions upon request. You will find the installed modules as
vis/VMD/<version_string> chem/NAMD/<version_string>
Here, the <version_string>
may deviate between the clusters. If you are missing a particular version, please inform us.
When doing so, please include:
- your name
- your username
- your email address (in case we need to approach you)
- Software (if not already stated on the license agreement)
- Software Version (if not already stated on the license agreement)
Multiple users may sign a single license agreement if the agreement in question permits this.
Using VMD
That being written, we are aware that starting the VMD-GUI can be tricky and the relevant information hard to find.
Starting the graphical user interface (GUI)
Here, we give some brief snippets, covering the essentials:
- First, we need to load the module and instruct VMD to start in its graphical, non-MPI mode:
$ module load vis/VMD # this will load the most current version, which is installed $ export VMDNOMPI=1
- Next, we start an interactive session, e.g. with
salloc
. Here is a little more information on interactive jobs. With respect to the number of cpus: Not everything in VMD is parallelized. If you want to start an VMD-MPI job, you better write a VMD script and start VMD like a conventional MPI-application.
$ salloc -A <your_account> -p smp -c <number_of_cpus> -t <sufficient_time> <snipping wainting for the session> $ srun vmd <arguments>
- When ending the session, do not forget to type
exit
to relinquish the allocation.
Setting up a simulation file for NAMD
Generating ''.psf'' files
A .psf
(protein structure file) ist needed to feed NAMD. Beginners frequently have troubles generating one.
The following section refers to the VMD tutorial section on generating a PSF file:
- load a new molecule
- run the autopsf utility (Extensions → Modeling → Automatic PSF Builder)
This will create the following files: <molecule_prefix>_autopsf_formatted.pdb
, molecule_prefix>_autopsf.log
, <molecule_prefix>_autopsf.pdb
, <molecule_prefix>_autopsf.psf
.
Of course, VMD offers many more options, most are more sophisticated than this description.
Periodic boundaries: Estimating Unit Cell Size
To run a simulation with periodic boundaries, we assume that you have loaded the desired .pdb
file into VMD and will set to calculate the unit cell:
Within VMDs Tk Console2) you can run:
set everyone [atomselect top all] measure minmax $everyone
This will yield two vectors, e.g.: {-38.473999 -24.975999 -35.2630} {36.910999 29.686 35.957}
. To obtain the values for the initial(!) cellBasisVector
-entries you need to add together the absolute values, e.g. abs(-38.473999) + 36.910999 = 75.384998
. Subsequently set the cellBasisVector
-entries to sensible (slightly rounded) values, such that the result vector of your addition becomes the diagonal:
cellBasisVector1 75.385 0.0 0.0 cellBasisVector2 0.0 54.662 0.0 cellBasisVector3 0.0 0.0 71.22 cellOrigin 0.0 0.0 0.0
Finally, turn on PME-settings and set the box size, such that the initial conformation will surely fit, e.g.:
PME on PMEGridSizeX 80 PMEGridSizeY 60 PMEGridSizeZ 75
Using NAMD
With a given configuration file, you can start NAMD like this:
#!/bin/bash #SBATCH -t <time> #SBATCH -p <partition> # e.g. parallel #SBATCH -A <account> #SBATCH -N <rather start with a low number to test> #SBATCH -n <N * cores / node> module purge module load chem/NAMD # the suffix 'namd_conf' is arbitrary srun namd2 <prefix>.namd_conf
The configuration file content depends on the simulation to be carried out, however, the coordinates
and structure
parameters could simply refer to the auto-generated .pdf
and .psf
files produced by VMD as described, respectively.
CHARMM force fields
The NAMD tutorial indicates this download site for CHARMM force fields and topology files3)
When using these force field files, be sure not to forget to amend the force field type to the configuration file, e.g.:
parameters <path to desired prm>.prm paraTypeCharmm on