From: Esben A. Gad (eag_at_nano.ku.dk)
Date: Fri Jun 20 2008 - 06:05:22 CDT

Thanks Peter

I changed the script to output atom IDs for bonds, dihedrals and so on in
fields 10 wide instead of 8 and VMD now reads the bonds just fine.

Unfortunately, I now discovered that VMD also does not process the atom
section of the PSF correctly:

---------------------------------------------
psfplugin) Detected a Charmm31 PSF EXTEnded file
Info) Using plugin psf for structure file ext.psf
Info) Analyzing structure ...
Info) Atoms: 48764
Info) Bonds: 48792
Info) Residues: 15574
Info) Waters: 0
Info) Segments: 10000
Info) Fragments: 15574 Protein: 0 Nucleic: 0
---------------------------------------------

When I go to "graphical representations > selections > keyword" and look
under "name" I have options like "000000" and "030000". Under "
residuetype" I have "nothing". It's all bad.

I'm assuming this is because the widths of the field in my PSF is wrong
(e.g. atomID, residue name, segID) but have been unable to find
documentation on the EXTended PSF format.

If a kind soul could provide me with either 1) an example of an extended
psf file that works in VMD 2) directions to thorough documentation on the
extended psf format or 3) specific instructions on what to change in the
atom section in my psf file, I'd be a happy camper once more.

My psf i still here:
http://www.fys.ku.dk/~eag/vmd/protein.psf.tar.gz

Thanks, - Esben

------------Old Msg--------------------------------------------
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

-- 
Esben A. Gad
bach.scient
Kristianiagade 10
DK-2100 Cph E
e: eag_at_nano.ku.dk