Re: [AMBER] problem with chamber & vmd generated psf (line 2349 of file psfprm.F90)

From: Jason Swails <>
Date: Tue, 5 Aug 2014 15:30:45 -0400

On Aug 5, 2014, at 12:27 PM, Marc van der Kamp <> wrote:

> Hello,
> Encouraged by the recent update of chamber related to better support for
> VMD psfgen generated psf files, I decided to try it out (after updating
> AmberTools14 with updates 1-7 and recompiling).
> Unfortunately, when I ran:
> $AMBERHOME/bin/chamber -cmap -top top_all36_prot_lig.rtf -param
> par_all36_prot_cgenff_lig.prm -psf ionized.psf -crd ionized.crd -p
> 1ohp_rs1_charmm.prmtop -inpcrd 1ohp_rs1_charmm.inpcrd -box 72.180 83.115
> 69.771
> (or variations on this, e.g. with -str to add the additional
> parameters/topogies)
> I get the following error:
> At line 2349 of file psfprm.F90
> Fortran runtime error: Bad value during integer read
> I've run out of time to do more testing today (and no time tomorrow), so I
> would like to check if anyone has seen this or has an idea what it may be
> caused by.
> lines 2341-2349 in psfprm.F90:
> read(psf_unit,fmt01) ii, & ! 1
> lsegid, & ! AAL
> iresid(i), & ! 1
> lresat(i), & ! ASN
> atom_label(i), & ! N
> iac(i), & ! 54
> cg(i), & ! -0.47000
> amass(i), & ! 14.0070
> imove(i) ! 0
> Any insight welcome; many thanks in advance!

I think we would actually need the PSF file in order to determine how the assumption of the line layout breaks the assumptions made in chamber.

There is an alternative to chamber that you can try, however. See for an updated version of the ParmEd program that is bundled with AmberTools. ParmEd has a new action "chamber" that will create chamber-style topology files from PSF and CHARMM coordinate, restart, or PDB files with a syntax that is almost identical to the chamber program itself. I've found that it is quite a bit more flexible in terms of what PSF files it will successfully parse, and it has a number of additional advantages as well. Particularly:

1. If you use VMD to create a PSF and PDB file, it will pull the box information from the PDB file so you don't have to specify it in the CHAMBER command.
2. It accepts a new keyword "boundingbox" that will assign an orthorhombic box that encloses all atom centers
3. It supports and implements NBFIX modifications defined in CHARMM parameter or stream files (ion parameters in CHARMM36 all have NBFIXes, to my knowledge)
4. The topology files generated by ParmEd are notably smaller because it compresses degenerate parameter types when possible.

Obviously #3 is the most important improvement, since it's the difference between "correct" and "incorrect" implementations of the CHARMM force field in the eyes of many reviewers, whereas #1, 2, and 4 are more convenience options than anything else (#4 can have performance implications, particularly with pmemd.cuda when NBFIX mods are present. Fewer atom types means that the LJ coefficient matrices are more likely to fit inside the device cache and thereby avoid costly latencies associated with what is effectively a cache miss -- I'm not sure when or if this becomes significant or noticeable).

To use it, download and install ParmEd using a command like:

python build
python install [--user] [--install-scripts <directory>]

Where --install-scripts allows you to specify where and are installed, and the --user command will install the Python modules in your home directory (but still in a place where they will be found by default by the Python interpreter). Then you can use something like:

> chamber -cmap -top top_all36_prot_lig.rtf \
          -param par_all36_prot_cgenff_lig.prm \
          -psf ionized.psf -crd ionized.crd \
          -box 72.180 83.115 69.771
> outparm 1ohp_rs1_charmm.prmtop 1ohp_rs1_charmm.inpcrd

The only major differences in usage here is that you can supply multiple parameter or topology files, using a separate "-param <parameter_file>", "-top <rtf_file>", or "-str <stream_file>" argument. You can also add the keyword "usechamber" to have ParmEd invoke chamber to create the prmtop file (although it won't work if chamber can't parse the PSF file). This was added to help people validate ParmEd's converter.

Another thing ParmEd can do is write PSF files. So if ParmEd can read the PSF file, you can write a quick script that will read the PSF file in and then print a new one that chamber can recognize. A quick python script like:

from chemistry.charmm.psf import CharmmPsfFile

psf = CharmmPsfFile('ionized.psf')

will write a PSF file that chamber can read.

Hope this helps,

Jason M. Swails
Rutgers University
Postdoctoral Researcher
AMBER mailing list
Received on Tue Aug 05 2014 - 13:00:02 PDT
Custom Search