From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Sun May 01 2011 - 16:20:45 CDT

On Sun, May 1, 2011 at 5:14 PM, Edward Lyman <edward.lyman_at_gmail.com> wrote:
> I tried using topotools (ver 1.1) on the original file, defining a selection
> that contains all the atoms, then using guessangles to determine angles:
>
> topo guessangles -sel $all
> $all writepsf test.psf
>
> comparing the test.psf to the original, I see that tmp.psf has many of the
> correct angles defined, but many extra angles as well...the original has
> ~87,000 angles, the new one about 111,000.
>
> using the same procedure for dihedrals, the new file again has many more
> dihedrals (about 2x more), and the dihdrals are all listed as "1 1 1 1"
> except the first which is "100 1 1 1".

hmm.... that doesn't sound right.

would you mind sending me your files (off-list).
i'd like to investigate this. at the very least there
should not be any redundant angle or dihedral
definitions. so that would need to be resolved.

you can try updating topotools to my current
development version, but unless you are using
an old beta version of VMD, it should not have
any significant differences.

thanks,
    axel.

> so, assuming I used topotools correctly, now I am looking for another way
> around.

>
> Thx,
> E
>
>
>
>
>
>
>
>
> On Sat, Apr 30, 2011 at 11:45 AM, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:
>>
>> On Sat, 2011-04-30 at 11:39 -0400, Edward Lyman wrote:
>> > Hi all,
>> >
>> > Jim suggested using the 2.8b1 psfgen with readmol psf. I tried:
>> >
>> > readmol psf 50_50_10nm.xplor.psf
>> >
>> > but it segfaults:
>> >
>> > Info: reading file 50_50_10nm.xplor.psf using plugin psf
>> > WARNING: Plugin-based I/O is still in development and may still have
>> > bugs
>> > psfplugin) Detected a Charmm31 PSF file
>> > psfplugin) Detected a Charmm31 PSF EXTEnded file
>> > Data fields found by plugin:
>> > bonds: 74520
>> > psfplugin) no cross-terms defined in PSF file.
>> > angles: 86580 dihedrals: 110700 impropers: 360 cross-terms: 0
>> > Segmentation fault
>> >
>> > Version 1, writing the psf from the vmd console gets the bonding
>> > topology right, but does not write the angles and dihedrals correctly,
>> > as Axel just explained.
>> >
>> > So, I am looking for some new ideas to get either read a psf with the
>> > extended format, or else convert an extended format psf into a regular
>> > format psf. Any thought are very much appreciated, as is all the help
>> > up to this point.
>>
>> why don't you try the topotools guessangle/dihedral/improper
>> function on the _complete_ file and see if it recreates all
>> angles and so on correctly? if it does, you can safely use
>> this approach on your selection file as outlined in my previous mail.
>>
>> not elegant, but worth a shot.
>>
>> cheers,
>>    axel.
>>
>> >
>> > Ed
>> >
>> >
>> > On Sat, Apr 30, 2011 at 11:16 AM, Edward Lyman
>> > <edward.lyman_at_gmail.com> wrote:
>> >         Ah, I see. Thanks Axel, I will revert to the psfgen method
>> >         then.
>> >
>> >         E
>> >
>> >
>> >
>> >
>> >         On Fri, Apr 29, 2011 at 4:11 PM, Axel Kohlmeyer
>> >         <akohlmey_at_gmail.com> wrote:
>> >                 On Fri, Apr 29, 2011 at 3:30 PM, Edward Lyman
>> >                 <edward.lyman_at_gmail.com> wrote:
>> >                 > Thanks for the reply. Now I have used vmd 1.9 to
>> >                 delete a single cholesterol
>> >                 > by
>> >                 >
>> >                 > (1) read in psf and pdb for the full system
>> >                 > (2) define an atom selection that excludes the
>> >                 problematic cholesterol:
>> >                 >> set write_sel [atomselect top "not same fragment as
>> >                 index foo"]
>> >                 > (3) renumber residues
>> >                 >> $write_sel set resid [$write_sel get residue]
>> >                 > (4) write psf/pdb
>> >                 >  > $write_sel writepsf new.psf
>> >                 >  > $write_sel writepdb new.pdb
>> >                 >
>> >                 > This writes a psf that looks ok through the bonds
>> >                 section, but the angles,
>> >                 > dihedrals, impropers have problems. There are the
>> >                 same number of angles in
>> >                 > the new as in the original psf. (Theres hould be
>> >                 fewer because there is one
>> >                 > less chol) And, the angles include triplets like "1
>> >                 2 2 " in the first 50 or
>> >                 > so lines, then the angle lines are all "1 1 1 1 1 1
>> >                 1 1 ". same for
>> >                 > dihedrals, etc.
>> >                 >
>> >                 > So, am I missing an autogenerate statement? It seems
>> >                 possible that
>> >                 > autogenerate may not get the angles, dihedrals etc
>> >                 correct...is that a real
>> >                 > concern?
>> >
>> >
>> >                 ed,
>> >
>> >                 you are touching a real problem. i didn't think about
>> >                 this earlier.
>> >                 the bond information is attached to the atom
>> >                 information and thus
>> >                 will be adjusted accordingly. however, this is not
>> >                 true for angles and
>> >                 dihedrals or impropers. that information is stored
>> >                 separately, and
>> >                 then not subjected to any selection operations.
>> >
>> >                 i guess, that may be the reason for people to keep
>> >                 using psfgen
>> >                 for these tasks. while not a VMD intrinsic, you could
>> >                 loading the
>> >                 psf/pdb combo with the atoms deleted and then use the
>> >                 "guess" commands
>> >                 of the topotools plugin to redo the angle, dihedral
>> >                 and improper definitions.
>> >
>> >
>> > http://sites.google.com/site/akohlmey/software/topotools/topotools---documentation#TOC-guess-angle-dihedral-s
>> >
>> >                 however, there is one caveat. this will generate this
>> >                 information from
>> >                 the bond topology alone, and thus may not always be
>> >                 the same
>> >                 as what psfgen will generate, particularly for
>> >                 impropers. you might
>> >                 need to run some tests on this. i did some successful
>> >                 tests on
>> >                 simple peptides, but never for a large protein.
>> >
>> >                 sorry for overlooking the angles stuff. that was my
>> >                 bad.
>> >
>> >                 axel.
>> >
>> >
>> >                 >
>> >                 > Thanks,
>> >                 > Ed
>> >                 >
>> >                 >
>> >                 > On Fri, Apr 29, 2011 at 9:40 AM, Axel Kohlmeyer
>> >                 <akohlmey_at_gmail.com> wrote:
>> >                 >>
>> >                 >> On Fri, Apr 29, 2011 at 9:00 AM, Edward Lyman
>> >                 <edward.lyman_at_gmail.com>
>> >                 >> wrote:
>> >                 >> > Thanks for the work around, it's very much
>> >                 appreciated. But, it occurs
>> >                 >> > to me
>> >                 >> > now...why can't I simply use $sel writepsf
>> >                 blah.psf and $sel writepdb
>> >                 >> > blah.pdb from the vmd console to write out a psf
>> >                 and a pdb for
>> >                 >> > selections
>> >                 >> > which delete the unwanted molecules? ie, why
>> >                 bother with psfgen at all
>> >                 >> > when
>> >                 >> > you already have in hand a psf that contains all
>> >                 the correct force field
>> >                 >> > terms, etc, and you just want to delete a few
>> >                 molecules?
>> >                 >>
>> >                 >> you can do this. the functionality to store and
>> >                 write out the complete
>> >                 >> topology
>> >                 >> information from and to .psf files has not been
>> >                 around that long and
>> >                 >> before that
>> >                 >> using psfgen was the only option. not everybody is
>> >                 aware of this new
>> >                 >> functionality
>> >                 >> in VMD and various plugins and scripts are only
>> >                 slowly being migrated to
>> >                 >> make
>> >                 >> use of these new features (why break something that
>> >                 works?).
>> >                 >>
>> >                 >> cheers,
>> >                 >>    axel.
>> >                 >>
>> >                 >> >
>> >                 >> > Thx,
>> >                 >> > Ed
>> >                 >> >
>> >                 >> >
>> >                 >> >
>> >                 >> >
>> >                 >> > On Tue, Apr 26, 2011 at 3:21 PM, Jim Phillips
>> >                 <jim_at_ks.uiuc.edu> wrote:
>> >                 >> >>
>> >                 >> >> If you can't get CHARMM-GUI to write a non-EXT,
>> >                 non-CHEQ format PSF (I
>> >                 >> >> don't think you need either of those options)
>> >                 then try reading the file
>> >                 >> >> into
>> >                 >> >> VMD, writing it out again, and using that file
>> >                 with psfgen.
>> >                 >> >>
>> >                 >> >> If you use the psfgen binary from NAMD 2.8b1 you
>> >                 can probably read the
>> >                 >> >> file with "readmol psf 50_50_10nm.xplor.psf"
>> >                 since that uses the VMD
>> >                 >> >> plugins
>> >                 >> >> (I don't think VMD's psfgen module has plugins
>> >                 enabled yet).
>> >                 >> >>
>> >                 >> >> -Jim
>> >                 >> >>
>> >                 >> >>
>> >                 >> >> On Tue, 26 Apr 2011, Edward Lyman wrote:
>> >                 >> >>
>> >                 >> >>> attached is the psf.
>> >                 >> >>>
>> >                 >> >>> Any suggestions for a workaround? I want to
>> >                 delete a couple lipid
>> >                 >> >>> molecules
>> >                 >> >>> as described in the psfgen docs...if there is
>> >                 some othe way to
>> >                 >> >>> accomplish
>> >                 >> >>> this, I am all ears.
>> >                 >> >>>
>> >                 >> >>> E
>> >                 >> >>>
>> >                 >> >>>
>> >                 >> >>> On Tue, Apr 26, 2011 at 11:53 AM, John Stone
>> >                 <johns_at_ks.uiuc.edu>
>> >                 >> >>> wrote:
>> >                 >> >>>
>> >                 >> >>>> Hi,
>> >                 >> >>>>  It seems that psfgen doesn't like the X-PLOR
>> >                 format PSF file you've
>> >                 >> >>>> got,
>> >                 >> >>>> although the VMD PSF plugin seems to read it
>> >                 without trouble.
>> >                 >> >>>>
>> >                 >> >>>> Can you send me a gzipped copy of the PSF file
>> >                 that is causing you
>> >                 >> >>>> trouble?
>> >                 >> >>>>
>> >                 >> >>>> This is most likely a limitation of the PSF
>> >                 reader currently in
>> >                 >> >>>> psfgen,
>> >                 >> >>>> and is something we are looking at improving.
>> >                 >> >>>>
>> >                 >> >>>> Cheers,
>> >                 >> >>>>  John Stone
>> >                 >> >>>>  vmd_at_ks.uiuc.edu
>> >                 >> >>>>
>> >                 >> >>>> On Fri, Apr 22, 2011 at 11:03:30AM -0400,
>> >                 Edward Lyman wrote:
>> >                 >> >>>>>
>> >                 >> >>>>>   Hi all,
>> >                 >> >>>>>
>> >                 >> >>>>>   I am trying to use psfgen to delete a
>> >                 couple of lipids and write a
>> >                 >> >>>>> new
>> >                 >> >>>>>   psf/pdb pair. The toplogy files read in
>> >                 fine, but when I read teh
>> >                 >> >>>>> psf,
>> >                 >> >>>>
>> >                 >> >>>> I
>> >                 >> >>>>>
>> >                 >> >>>>>   get:
>> >                 >> >>>>>
>> >                 >> >>>>>   reading structure from psf file
>> >                 50_50_10nm.xplor.psf
>> >                 >> >>>>>   Error processing bonds
>> >                 >> >>>>>
>> >                 >> >>>>>   MOLECULE DESTROYED BY FATAL ERROR!  Use
>> >                 resetpsf to start over.
>> >                 >> >>>>>   psfplugin) Detected a Charmm31 PSF file
>> >                 >> >>>>>   psfplugin) Detected a Charmm31 PSF EXTEnded
>> >                 file
>> >                 >> >>>>>   Info) Using plugin psf for structure file
>> >                 50_50_10nm.xplor.psf
>> >                 >> >>>>>   psfplugin) no cross-terms defined in PSF
>> >                 file.
>> >                 >> >>>>>   Info) Analyzing structure ...
>> >                 >> >>>>>
>> >                 >> >>>>>   I am running vmd 1.9, psfgen 1.5. The psf
>> >                 file is an xplor psf
>> >                 >> >>>>> (runs
>> >                 >> >>>>
>> >                 >> >>>> in
>> >                 >> >>>>>
>> >                 >> >>>>>   namd) that was written by the charmm gui.
>> >                 The psf/pdb pair work
>> >                 >> >>>>> just
>> >                 >> >>>>
>> >                 >> >>>> fine
>> >                 >> >>>>>
>> >                 >> >>>>>   for reading into vmd.
>> >                 >> >>>>>
>> >                 >> >>>>>   Any help is appreciated.
>> >                 >> >>>>>   Ed
>> >                 >> >>>>
>> >                 >> >>>> --
>> >                 >> >>>> NIH Resource 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/
>> >                 Fax: 217-244-6078
>> >                 >> >>>>
>> >                 >> >>>
>> >                 >> >
>> >                 >> >
>> >                 >>
>> >                 >>
>> >                 >>
>> >                 >> --
>> >                 >> Dr. Axel Kohlmeyer
>> >                 >> akohlmey_at_gmail.com  http://goo.gl/1wk0
>> >                 >>
>> >                 >> Institute for Computational Molecular Science
>> >                 >> Temple University, Philadelphia PA, USA.
>> >                 >
>> >                 >
>> >
>> >
>> >
>> >
>> >                 --
>> >
>> >                 Dr. Axel Kohlmeyer
>> >                 akohlmey_at_gmail.com  http://goo.gl/1wk0
>> >
>> >                 Institute for Computational Molecular Science
>> >                 Temple University, Philadelphia PA, USA.
>> >
>> >
>> >
>> >
>>
>> --
>> Dr. Axel Kohlmeyer
>> akohlmey_at_gmail.com http://goo.gl/1wk0
>>
>> Institute for Computational Molecular Science
>> Temple University, Philadelphia PA, USA.
>>
>
>

-- 
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com  http://goo.gl/1wk0
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.