From: Alexander Balaeff (abalaeff_at_gmail.com)
Date: Wed Aug 13 2014 - 13:12:06 CDT

Josh and John:

Thanks a lot for your informative answers! With the NAMD tag, it works
like a charm (m :) !

Alexander.

On Wed, Aug 13, 2014 at 1:21 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
> Hi,
> There are neverending misunderstandings of the format(s) of PSF files.
> The original PSF formats were those used by CHARMM and XPLOR, both of
> which used (and to a large extent _still_ use) Fortran based I/O that
> depended on fixed column widths for the different fields. Other tools
> such (NAMD is one such example) have implemented variants of the PSF format
> that are more liberal, allowing arbitrary amounts of whitespace between
> records, and other variations such as the use of strings rather than
> numeric indices for some information, and so on. VMD has the challenge of
> correctly parsing all of the different PSF variants that exist in the field,
> and this is made difficult when the individual software packages that
> write these PSF variants do not clearly label them as such.
>
> To this end, we have changed both NAMD and VMD so that the free-form whitespace
> deliminated PSF variant used by NAMD is clearly labelled as such using the
> new "NAMD" tag, located within the PSF header. This makes the formatting
> distinct from other variants (e.g. CGenFF) generated by CHARMM and
> other tools, and allows VMD to parse all of them correctly. This change
> is in the newest test versions of NAMD and VMD, but is not implemented
> in the prior versions.
>
> The change became necessary when CGenFF and other
> CHARMM features became widely used, and the existing PSF variants started
> to become otherwise-indistinguishable from each other, from the perspective
> of a PSF file parser reading the first parts of the file header. In any
> case, this is not so much an issue of VMD or any other program having a
> "bug", but rather an issue created by the diversity of format variants that
> live under the "PSF" file format umbrella, combined with the fact that
> the teams of developers of each of the molecular dynamics tools work
> largely independently and there is no centralized group of people
> maintaining a unified "PSF" format standard. So for now, and until
> the PSF file format is completely superceded, these issues will likely
> continue to crop up again in the future as further variants are invented.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Wed, Aug 13, 2014 at 12:55:16PM -0400, Josh Vermaas wrote:
>> Hi Alexander,
>>
>> The short answer is to add the NAMD flag to the top of the psf file,
>> which tells VMD to use a whitespace-based file reader instead of a
>> column-delimited one. (PSF NAMD <other flags> instead of PSF <other
>> flags>) Where did this PSF come from? Its been a while since I checked,
>> but I thought VMD handled the usual ways these files get made (CHARMM,
>> using the extended file format) without truncating the columns, although
>> I've been using the beta builds for so long I sometimes forget what bugs
>> are lurking in 1.9.1.
>>
>> -Josh Vermaas
>>
>> On 8/13/14, 11:59 AM, Alexander Balaeff wrote:
>> >Dear VMD gurus:
>> >
>> >Could anyone kindly advise me on the right way to read a PSF file
>> >where the atom types are longer than the classical 4 characters? (for
>> >example, the 5- and 6-letter atom types produced by CGenFF) The
>> >default PSF reader in VMD is apparently column-based so when the
>> >nonstandard PSFs are read, the atomic charges are read incorrectly. Is
>> >there a flag in VMD or the mol command, or maybe a separate plugin,
>> >that would allow one to read the PSFs with CGenFF types?
>> >
>> >Thanks a lot,
>> >
>> >Alexander.
>> >
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> http://www.ks.uiuc.edu/Research/vmd/