From: Axel Kohlmeyer (
Date: Fri Jun 20 2008 - 09:57:37 CDT

On Fri, 20 Jun 2008, Esben A. Gad wrote:


is there a specific reason why you are using the EXT form of PSF?
it might have been easier to just try removing the EXT than fixing
the whole output.


to check the format, you can either read the psf molfile
reader comments and/or have a look at the example files
in the VMD public biocore project under testfiles/psf/charmm31


EG> My psf i still here:
EG> Thanks, - Esben
EG> ------------Old Msg--------------------------------------------
EG> Hi Esben,
EG> from the psf reader in vmd:
EG> /* Check that there is enough space in the line we are about to
EG> read */
EG> if (nbond-i >= 4) {
EG> if(charmmext == 1) minlinesize = 20*4 ; else minlinesize = 16*4;
EG> } else {
EG> if(charmmext == 1) minlinesize = 20*(nbond-i); else minlinesize
EG> = 16*(nbond-i);
EG> }
EG> if (strlen(inbuf) < minlinesize) {
EG> fprintf(stderr, "Bonds line too short in psf file: \n%s\n", inbuf);
EG> break;
EG> }
EG> Since you've flagged your psf as an extended psf, you need to have
EG> fields that are 10 characters wide instead of 8 (see
EG> NAMD is less
EG> picky about this, but technically vmd is right to insist.
EG> Best,
EG> Peter
EG> Esben A. Gad wrote:
EG> > Dear vmd-list
EG> >
EG> > I have a 46560 atom solvated system that runs fine for 10 ns in NAMD. I
EG> > can load my initial PDB as a new molecule in VMD and then load my DCD into
EG> > this molecule. No problem.
EG> >
EG> > However, I'd like to do e.g. interaction energy calculations in VMD, and
EG> > for this, I need to load the PSF into VMD.
EG> >
EG> > As I simulate non-protein substrates also, I set up my system with the
EG> > Discovery Studio package from Accelrys (which does forcefield typing) and
EG> > transfer PSF to NAMD using an in-house script.
EG> >
EG> > When I open VMD and directly try to open my PSF (which, again, runs fine
EG> > in NAMD), I get:
EG> >
EG> > --------------------------------------------------------------
EG> > vmd > psfplugin) Detected a Charmm31 PSF EXTEnded file
EG> > Info) Using plugin psf for structure file
EG> > /net/
EG> > e/esbg/10r/namd/CVS/241APF/protein.psf
EG> > Bonds line too short in psf file:
EG> > 1 5 2 1 3 1 4 1
EG> >
EG> > ERROR) Error reading bond information.
EG> > Info) Analyzing structure ...
EG> > Info) Atoms: 46560
EG> > Info) Bonds: 0
EG> > Info) Residues: 46560
EG> > Info) Waters: 0
EG> > Info) Segments: 10000
EG> > Info) Fragments: 46560 Protein: 0 Nucleic: 0
EG> > --------------------------------------------------------------------
EG> >
EG> > As others on this list have discovered, the PSF format is apparently not
EG> > trivial to figure out. I have tried to compare my PSF with the examples
EG> > given in the file formats appendix of the namd tutorial, but I don't see
EG> > any differences compared to the structure of my file. Obviously, the
EG> > segments count of 10000 that VMD comes up with is wrong, so it might have
EG> > something to do with the way I number my segments?
EG> >
EG> > For anybody interested in helping me debug, I have uploaded my zipped PSF
EG> > file (606kb) here:
EG> >
EG> >
EG> >
EG> > This problem surprised me, as I thought VMD and NAMD was codeveloped
EG> > closely enough to accept the same files. I'd appreciate any help you guys
EG> > could come up with.
EG> >
EG> > Thanks, - Esben

Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.