chris lockhart
Modifications to CHARMM parameter files for NAMD compatibility
October 3, 2020

CHARMM topology and parameter files can be downloaded from

There are several modifications necessary to get these files into the right format for NAMD.

1. top_c36_prot.rtf

psfgen in NAMD cannot parse "AUTO ANGLES DIHE PATCH". Comment out PATCH so the line reads "AUTO ANGLES DIHE !PATCH"


The scope of this issue is that a new term "PATCH" was added to CHARMM parameter files that psfgen cannot read. This term means that, after patches are implemented, CHARMM should automatically regenerate angles and dihedrals. The recommended fix is to comment out above and in psfgen add "regenerate angles dihedrals" before writing out psf and pdb files in psfgen. Technically, this is only required if you use patches.

2. toppar_water_ions.str

There are several CHARMM-specific lines that cannot be parsed by NAMD:
- Line 35: set nat ?NATC
- Line 36: set app
- Line 40: if "@NAT" ne "?NATC" if @nat ne 0 set app append
- Line 319: set para
- Line 320: if ?NUMNODE gt 1 set para node 0
- Line 322: set wrn ?WRNLEV
- Line 324: if "@WRN" eq "?WRNLEV" set wrn 5
- Line 325: set bom ?bomlev
- Line 326: WRNLEV -1 @PARA
- Line 327: BOMLEV -1 @PARA
- Line 383: BOMLEV @bom @PARA
- Line 384: WRNLEV @wrn @PARA

The recommendation is to comment out these lines, because they do not affect dynamics anyway.


3. toppar_water_ions.str - RESI TIP3

A non-critical change is regarding TIP3 water, which in the parameter file has an H1-H2 bond. This bond is not used in NAMD and simply makes a weird visual artifact when viewing water. The recommendation is simply to comment out that bond, i.e., "BOND OH2 H1 OH2 H2 H1 H2" would become "BOND OH2 H1 OH2 H2 !H1 H2".

Furthermore, always build water with psfgen using the "auto none" option.