From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Wed Jun 18 2008 - 06:53:50 CDT

Hi Esben,

from the psf reader in vmd:

      /* Check that there is enough space in the line we are about to
read */
      if (nbond-i >= 4) {
        if(charmmext == 1) minlinesize = 20*4 ; else minlinesize = 16*4;
      } else {
        if(charmmext == 1) minlinesize = 20*(nbond-i); else minlinesize
= 16*(nbond-i);
      }
      if (strlen(inbuf) < minlinesize) {
        fprintf(stderr, "Bonds line too short in psf file: \n%s\n", inbuf);
        break;
      }

Since you've flagged your psf as an extended psf, you need to have
fields that are 10 characters wide instead of 8 (see
http://www.charmm.org/package/changelogs/c31log.html). NAMD is less
picky about this, but technically vmd is right to insist.

Best,
Peter

Esben A. Gad wrote:
> Dear vmd-list
>
> I have a 46560 atom solvated system that runs fine for 10 ns in NAMD. I
> can load my initial PDB as a new molecule in VMD and then load my DCD into
> this molecule. No problem.
>
> However, I'd like to do e.g. interaction energy calculations in VMD, and
> for this, I need to load the PSF into VMD.
>
> As I simulate non-protein substrates also, I set up my system with the
> Discovery Studio package from Accelrys (which does forcefield typing) and
> transfer PSF to NAMD using an in-house script.
>
> When I open VMD and directly try to open my PSF (which, again, runs fine
> in NAMD), I get:
>
> --------------------------------------------------------------
> vmd > psfplugin) Detected a Charmm31 PSF EXTEnded file
> Info) Using plugin psf for structure file
> /net/kat.nzcorp.net/z/eq-novovol03/hom
> e/esbg/10r/namd/CVS/241APF/protein.psf
> Bonds line too short in psf file:
> 1 5 2 1 3 1 4 1
>
> ERROR) Error reading bond information.
> Info) Analyzing structure ...
> Info) Atoms: 46560
> Info) Bonds: 0
> Info) Residues: 46560
> Info) Waters: 0
> Info) Segments: 10000
> Info) Fragments: 46560 Protein: 0 Nucleic: 0
> --------------------------------------------------------------------
>
> As others on this list have discovered, the PSF format is apparently not
> trivial to figure out. I have tried to compare my PSF with the examples
> given in the file formats appendix of the namd tutorial, but I don't see
> any differences compared to the structure of my file. Obviously, the
> segments count of 10000 that VMD comes up with is wrong, so it might have
> something to do with the way I number my segments?
>
> For anybody interested in helping me debug, I have uploaded my zipped PSF
> file (606kb) here:
>
> http://www.fys.ku.dk/~eag/vmd/protein.psf.tar.gz
>
> This problem surprised me, as I thought VMD and NAMD was codeveloped
> closely enough to accept the same files. I'd appreciate any help you guys
> could come up with.
>
> Thanks, - Esben
>
>