Loading coordinate files into VMD with the help of an AMBER topology file

From CUC3
Jump to navigation Jump to search

There are two useful methods for loading coordinate files into VMD for visualisation, either using the GUI or the command line.

GUI

First an Amber topology file is required to visualise the molecule. It can be found by going to File >> New Molecule and then browsing for the topology file you need. Dependent on the version of VMD, it may recognise .prmtop files as Amber 7 topology files and select the file type accordingly. If not, you must select the Amber 7 topology file type before loading it.

Now you can choose either to load a new topology file (by selecting New Molecule in the Load files for drop-down menu) or into the same molecule as the topology file you just loaded. To load coordinate files, browse for the coordinate file and select it. Then check the file type carefully, the new version of VMD automatically assumes that mdcrd files are not periodic, so if your coordinate file is periodic (e.g. if you are using explicit solvent), you must select the periodic option. Amber restart files and .inpcrd files are of file type Amber 7 restart and are not automatically recognised by VMD, so the file type must be specified.

Once you have loaded a single coordinate file, it is possible to load more coordinate files and they are added on as subsequent frames to the existing molecule. To finish loading coordinate files into the molecule, just close the Molecule File Browser window.

Command line

On the command line it is possible to load all of the files you need using the syntax described on the VMD page. To summarise:

  • -f flag separates molecules (i.e. all files between two -f flags are loaded into the same molecule)
  • -parm7 denotes topology files
  • -rst7 denotes restart or inpcrd files
  • -crd denotes coordinate files (mdcrd)
  • -crdbox denotes periodic coordinate files (mdcrd)

Loading GMIN structures

To load a number of GMIN runs (with names from lowest1.pdb to lowestxxx.pdb) then use a script like:

#!/bin/bash
 
INDEX=$1                    # Start index at first command line argument and cycle through to second command line argument.

while [[ -e "lowest${INDEX}.pdb" && "$INDEX" -le "$2" ]]
do
  VMD_ARGUMENTS="${VMD_ARGUMENTS}-f lowest${INDEX}.pdb "
  echo "lowest${INDEX}.pdb loaded"
  ((INDEX++))
done

vmd $VMD_ARGUMENTS

exit 0

Syntax:

script.sh [first index] [last index]

e.g.

script.sh 25 30 - loads PDBs 25 to 30

This is much faster than loading it by hand in VMD.