Importance of the Topology File, .rtf, and Other Files

From: Rajan Vatassery (
Date: Sat Oct 16 2010 - 13:57:10 CDT

Hi Lara,
        A couple of things quickly:
1. Since the archives of this listserv are such a valuable tool for your
independent problem-solving, I suggest that you give a more descriptive
subject line. Many people have the same question as you, and you will
greatly help them if you can give a concise, but complete, explanation
of your problem on the subject line.

2. The NAMD program does use Charmm parameters, but as far as I can
tell, it does not use the topology file other than to create a psf via
psfgen. This means that NAMD (again, as far as I can tell) doesn't have
any direct concern with the topology file. Thus, your question may be
better answered in a Charmm forum.

That being said, here is my attempt to explain the various files that
are involved in the NAMD program. Much of this is in the tutorial files
(link below), but I hope this is a valuable supplement. I appreciate any

THE CONF FILE is the most top-level file that NAMD views. A description
of the conf file's arguments are given here:
In my opinion, this is a fairly straight-forward file whose purpose is

THE RTF (Residue topology file) is the file you are wondering about. I
have run many successful minimizations without specifying a topology
file for the system to be minimized, but it still has a use. The RTFs
for almost every biologically important molecule can be found at the
Charmm parameter website:
keeping in mind that some of the newest parameters are found in the
CGenFF area:
While NAMD may not use these RTFs, PSFGEN will be able to use them to
convert the information into a PSF (protein structure file). This means
that if you find n-hexane's RTF on the CGenFF, you will be able to run
PSFGEN on that RTF, saving you the time of writing the extensive bond,
angle and dihedral information that goes towards the bottom of the PSF.
I had problems with the conversion of the RTF to a PSF by PSFGEN, and
the solutions to these problems are on the list's archive:
Big thanks go to JC Gumbart for helping me sort these problems out.

As an example, the RTF for an H2 molecule is:
MASS 1 HA3 1.008000 H ! For methyl protons

RESI H2MO 0.00 ! H2 molecule, uncharged (0.00 charge)
ATOM HAA HA3 0.00 ! H
ATOM HAB HA3 0.00 ! | this rough pic of your molecule
BOND HAA HAB ! H is not necessary


The first part of the RTF is a listing of your atoms, along with the
atom types they correspond to (not sure if there's an H2 parameter, I
just used HA3). You only need to list the atoms that are unique in terms
of atom types.
The second part of the RTF is then the list of atoms, grouped by RESIdue
and GROUP. Somewhere you will need to provide the atom connectivity,
listed as BOND. This is where it helps to find a similar structure
because then you will not have to manually enter all the bonding
information. Certainly there is such a structure for the hexane molecule
somewhere on the internet. Before you submit your RTF to PSFGEN, it's a
good idea to make sure you have the patching correct and the
autogenerate settings (see my namd-l thread above) correct.

THE PSF (Protein Structure File) contains all the information of the
RTF, in a different format. Opening a PSF with a text editor will answer
many questions you may have about it. One thing I will add is that, in
light of the fact that many of the CGenFF atom types have more letters
than can fit in the standard PSF, my experience indicates that the PSF
is not a fixed-column format. This means that if your atom types have up
to 6 letters (which will not fit in the standard psf), you simply need
to add a column of spaces where necessary.

THE PDB file is similarly obvious in its structure and format. One or
two miscellaneous comments regarding the PDB file and NAMD as a whole:
It is important that your PDB's numbering and the PSF numbering are the
same. The atom names on the PDB and the PSF do not seem to have any
other purpose than for researchers' reference.

THE PARAM FILE (.prm) contains all the parameters for your simulation.
If you are parameterizing something new, you will need to make sure all
the parameters for all bonds, VDW, angles, etc are in this file. You
will find out via an error if you are missing parameters.

As relates to the PSF and the prm file, the atom types are arbitrary. In
other words, as long as the atom types in your PSF match your parameter
file, the actual names of the atom types are immaterial. This means that
if you wanted to change the HAL3 parameter to be named HALK3 instead,
you could do this by changing all occurrences in PSF and .prm files.

I understand this is much more than what you probably asked for, but
these are questions that I stumbled over when I was trying to use NAMD
initially. I hope this helps people use NAMD with a shorter learning
curve, because it truly is a fantastic program.

Rajan Vatassery
University of Minnesota
Department of Chemistry
On Sat, 2010-10-16 at 14:30 +0530, lara lara wrote:
> dear namd ! 
> I have seen the topology file but I could not understand .
> can any one tell me how to build the 
> topology for the hexane molecule .
> regards 
> lara 

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:56:13 CST