NAMD Wiki: NamdAndCHARMM
Chemistry at HARvard Molecular Mechanics
A program and a force field, see http://yuri.harvard.edu/
The cell information in NAMD DCD files and CHARMM DCD files are incompatible, with CHARMM writing the cosines of the angles and NAMD writing the actual angles.
VMD formerly read only NAMD DCD files, but now uses a heuristic that if a number is between -1 and 1 it is assumed to be a cosine, but otherwise is an angle in degrees. Once a version of VMD that reads CHARMM DCD files correctly has been out for a while then we will be able to release a version of NAMD that uses the correct CHARMM format.
Here are two Python scripts to create a NAMD psf/pdb pair from a CHARMM psf/crd pair:
charmm2namd which converts the CHARMM .psf file to a NAMD (XPLOR) compatible one. This requires a conversion table between potential names and numbers, which are found in MASS entries in CHARMM .rtf files. Usually in the file MASSES.RTF from the desired CHARMM force field.
crd2pdb which (obviously :-) converts the CHARMM .crd coordinate file into a .pdb file for use with NAMD. It does support removal of chainid if the number of residues exceeds 10000 - eg with large water boxes, but this has only been tried briefly, so beware.
dsv-crd2pdb Same as above, but supports the crd format written by Accelrys Discovery Studio.
It is strongly recommended to convert the CHARMM psf/crd pair into a NAMD psf/pdb pair by using both scripts. Attempts to build the pdb file in other ways often fail, as the atoms are not always listed in the same order as in the .psf file.
Both scripts give a short help message if invoked without arguments.
- Esben Friis (epf_at_novozymes.com)
Why does NAMD complain about missing vdw parameters?
FATAL ERROR: DIDN'T FIND vdW PARAMETER FOR ATOM TYPE 0.000000E+00
If you don't specify a segment name, the second column in the psf file will be blank and NAMD will misread the charge as the atom type. Fix this by adding name="MAIN" to your segment statement in X-PLOR or giving the segname as the first argument to GENErate in CHARMM.
Why does NAMD complain about CHARMM format?
FATAL ERROR: Structure (psf) file is in CHARMM format; XPLOR format required.
CHARMM can create psf files in either CHARMM format (which uses numbers for atom types) or X-PLOR format (which uses names for atom types). NAMD uses X-PLOR format both for historical reasons, and because it is more robust. If NAMD sees a numerical atom type it tries to be helpful with this message. The solution is to use "write psf card xplor" when creating the PSF file.
If you did this (or used X-PLOR in the first place) then you probably have a blank segment name. If you don't specify one, the second column in the psf file will be blank and NAMD will misread the charge as the atom type. Fix this by adding name="MAIN" to your segment statement in X-PLOR or giving the segname as the first argument to GENErate in CHARMM.