Re: pbc wrap option for x,y,z lengths

From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Mon Apr 25 2011 - 09:22:29 CDT

On Sun, Apr 24, 2011 at 8:38 PM, Zumot, Elia Nabil <enz1_at_pitt.edu> wrote:
> I think the F* documentation could be a _bit_ clearer and one example on usage (for clarification) wouldn't hurt, considering not all NAMD users are computer scientists who wrote the very code themselves.

please consider the facts, that a) to the best of my knowledge, none
of the people
that contributed to the pbctools package are computer scientists and
b) that a _lot_
of people have managed to read and _understand_ the _fine_ documentation.
otherwise there would be a constant stream of complaints about it,
don't you think?

> For instance, at least to me and a couple of other good NAMD users, the following sentence
> """
> nocompound |-compound res[id[ue]]|seg[id]|chain|fragment   => Defines, which atom compounds should be kept together, i.e. which atoms will not be wrapped if a compound would be split by the wrapping: residues, segments or chains (default: -nocompound).
> """
> is Not really clear.

granted, this is a bit convoluted, but using the pipe symbol to
express alternatives
and the square brackets to express optional text are very common conventions
in describing command syntax and are used in many packages. once you realize
this it is just a simple systematic process to unwrap this statement.

>> RTFM! pbc wrap by default wraps on a per-atom basis.
>> f you want to keep groups of atoms intact, you have to
>> use the -compound flag, e.g. -compound residue
>
> Just tried -compound residue, -compound resid , -compound res and None of these worked with lipids.

what does "not work" mean. the help people give can only be as good
as the description that others provide. if you go to a doctor and say "it
hurts" but provide no specifics you'll probably get to hear "take a couple of
tylenols and go to sleep", but if you want to get the real problem solved,
you have to describe what hurts where and how long and how exactly it
feels and what you were doing before.

solving problems with computer software is almost the same thing.
i understand your frustration, but you have to understand that your
way of asking for help is not exactly making it easy to be friendly
and provide useful help.

> Also,
>
>> >% pbc readxst test.xst
>> >% pbc wrap -sel "all" -all
>> >Info) 0.6% complete (frame 0)
>> >Info) 13.6% complete (frame 23)
>> >....
>> >Info) 100.0% complete (frame 175)
>> > %
>>
>> and the result was the same smear and no output file
>> why do you read the box info _after_ the wrapping.
>> there is no reason to do that. apparently, your
>> trajectory has already box info included.
>
>
> This is exactly what I had done if you read my response.
> I have tried it with and without the readxst command and neither worked.

yes, but why do you expect that executing some random
command will make a difference if the command does not
really change the data that is stored in VMD. the logical
consequence is that the issue has to be elsewhere.

so far, all that you have shown to us is that you have been
doing several more or less random invocations of the pbctools
wrap, unwrap, readxst commands and none of that resulted
in the desired outcome. that is not much of a surprise.

all i can do for you at this point is to encourage you to use
common sense and a more systematic approach or provide
some more specific information, e.g. some example data
and a description of how you expect the result to be.

thanks,
    axel.

> Elia Zomot, PhD
> Computational and Systems Biology Department
> School of Medicine, University of Pittsburgh
> 3083 BST3, 3501 Fifth Ave, Pittsburgh, PA 15213
> Voice: 412 648 7785 - Fax: 412 648 3163
> enz1_at_pitt.edu
> ________________________________________
> From: Axel Kohlmeyer [akohlmey_at_gmail.com]
> Sent: Sunday, April 24, 2011 3:53 PM
> To: Zumot, Elia Nabil
> Cc: namd-l_at_ks.uiuc.edu
> Subject: Re: namd-l: pbc wrap option for x,y,z lengths
>
> On Sun, Apr 24, 2011 at 3:44 PM, Zumot, Elia Nabil <enz1_at_pitt.edu> wrote:
>> Thanks for the help Axel but its still not working.
>> This time I didn't copy any tcl scripts, simply loaded the psf and dcd files and just used (as specified in the manual):
>>
>> % pbc readxst test.xst
>> % pbc wrap -sel "all" -all
>> Info) 0.6% complete (frame 0)
>> ...
>> Info) 100.0% complete (frame 175)
>> %
>>
>> There was no output file but the whole structure was just smeared (stretched-bonds).
>
> there _will_ be no output file. where does it say there should be?
> pbc tools modifies the data in VMD's memory, if you want to save
> the modified coordinates, you have to write them back to a file.
>
> RTFM! pbc wrap by default wraps on a per-atom basis.
> if you want to keep groups of atoms intact, you have to
> use the -compound flag, e.g. -compound residue
>
>> So since in my simulation only water molecules were wrapped (and not the lipids or protein), I tried unwrapping everything and then wrapping all but again:
>>
>> % pbc unwrap -sel "all" -all
>> Info) 1.1% complete (frame 1)
>> Info) 2.3% complete (frame 3)
>> Info) 3.4% complete (frame 5)
>> .....
>> Info) 84.1% complete (frame 147)
>> Info) 92.0% complete (frame 161)
>> Info) 100.0% complete (frame 175)
>>
>> % pbc readxst test.xst
>> % pbc wrap -sel "all" -all
>> Info) 0.6% complete (frame 0)
>> Info) 13.6% complete (frame 23)
>> ....
>> Info) 100.0% complete (frame 175)
>> %
>>
>> and the result was the same smear and no output file
>
> why do you read the box info _after_ the wrapping.
> there is no reason to do that. apparently, your
> trajectory has already box info included.
>
> we are still at the PEBCAC level. i don't know how
> you read documentation, but there is something
> wrong with it. it appears that you make too many
> assumptions of what the scripts/tools are doing
> and then get confused that this is not the case.
>
> axel.
>
>> Thanks
>>
>>
>>
>> Elia Zomot, PhD
>> Computational and Systems Biology Department
>> School of Medicine, University of Pittsburgh
>> 3083 BST3, 3501 Fifth Ave, Pittsburgh, PA 15213
>> Voice: 412 648 7785 - Fax: 412 648 3163
>> enz1_at_pitt.edu
>> ________________________________________
>> From: Axel Kohlmeyer [akohlmey_at_gmail.com]
>> Sent: Sunday, April 24, 2011 2:00 PM
>> To: Zumot, Elia Nabil
>> Cc: namd-l_at_ks.uiuc.edu
>> Subject: Re: namd-l: pbc wrap option for x,y,z lengths
>>
>> On Sun, Apr 24, 2011 at 1:51 PM, Zumot, Elia Nabil <enz1_at_pitt.edu> wrote:
>>> I have read the manual, downloaded vmd 1.9, copied pbcwrap.tcl and all relevant files to the working directory and followed the exact directions mentioned:
>>>
>>> % source pbcwrap.tcl
>>
>> NOOOOOO!!!!!!
>>
>> pbcwrap.tcl is obsolete!!!
>> the functionality is part of the pbctools plugin and
>> comes pre-packages with VMD. no additional
>> installation is needed.
>>
>>> % pbcwrap -sel "all" -xst test.xst -first 0 -last last
>>
>>>
>>> but got the following:
>>> """
>>> PBCwrap log
>>> ===========
>>> Reading unit cell info from XST file:
>>> test.xst
>>> invalid command name "set_unitcell_xst"
>>> """
>>>
>>> and no output was generated
>>
>> sorry, but GIGO.  no surprise here.
>>
>> axel.
>>
>>
>>
>>>
>>>
>>> Elia Zomot, PhD
>>> Computational and Systems Biology Department
>>> School of Medicine, University of Pittsburgh
>>> 3083 BST3, 3501 Fifth Ave, Pittsburgh, PA 15213
>>> Voice: 412 648 7785 - Fax: 412 648 3163
>>> enz1_at_pitt.edu
>>> ________________________________________
>>> From: Axel Kohlmeyer [akohlmey_at_gmail.com]
>>> Sent: Saturday, April 23, 2011 4:37 AM
>>> To: Zumot, Elia Nabil
>>> Cc: namd-l_at_ks.uiuc.edu
>>> Subject: Re: namd-l: pbc wrap option for x,y,z lengths
>>>
>>> On Fri, Apr 22, 2011 at 11:52 PM, Zumot, Elia Nabil <enz1_at_pitt.edu> wrote:
>>>> Thank you for responding Axel but bear with me please,
>>>>
>>>>> and rightfully so, as this does not make sense and is
>>>>> in violation of the documentation.
>>>>
>>>> Does this mean that once a molecule has left the boundaries there is no way in VMD to restore it to within the original/central box (rewrite its coordinates as if it had been wrapped)?
>>>
>>> of course not!
>>>
>>>>
>>>>> if you want to wrap around {132 96 110} you should use
>>>>> that as argument to -center.
>>>>> also, please note, that tcl lists/vectors have no comma.
>>>>
>>>> I want the center of the box to be 0 0 0, and the x, y and z dimensions to be 132, 96 and 110.
>>>
>>> that is different from what you wrote.
>>>
>>>> This one doesn't work either:
>>>>
>>>> % pbc wrap -orthorhombic {132 96 110} -center {0 0 0} -sel "all"
>>>
>>> of course not, that is the same you wrote before. the -orthorhombic
>>> flag does _not_ take any argument. you have to _read_ the pbctools
>>> documentation. obviously you have only glossed over it.
>>>
>>> pbctools assumes that the periodic cell _dimensions_ were
>>> already given with the trajectory file and thus available internally
>>> to VMD. if that is not the case, you need to set this either via
>>> reading the data from a file or set this manually with the pbc set command.
>>>
>>> do a proper RTFM and you will see.
>>>
>>> axel.
>>>
>>>> error: pbcwrap: unknown option: 132 96 110
>>>
>>>
>>>
>>>> Thanks again
>>>>
>>>> Elia
>>>>
>>>>
>>>>
>>>> Elia Zomot, PhD
>>>> Computational and Systems Biology Department
>>>> School of Medicine, University of Pittsburgh
>>>> 3083 BST3, 3501 Fifth Ave, Pittsburgh, PA 15213
>>>> Voice: 412 648 7785 - Fax: 412 648 3163
>>>> enz1_at_pitt.edu
>>>> ________________________________________
>>>> From: Axel Kohlmeyer [akohlmey_at_gmail.com]
>>>> Sent: Friday, April 22, 2011 11:21 PM
>>>> To: Zumot, Elia Nabil
>>>> Cc: namd-l_at_ks.uiuc.edu
>>>> Subject: Re: namd-l: pbc wrap option for x,y,z lengths
>>>>
>>>> On Fri, Apr 22, 2011 at 3:03 PM, Zumot, Elia Nabil <enz1_at_pitt.edu> wrote:
>>>>> Dear NAMD users,
>>>>
>>>> well, this is a VMD question not really a NAMD question
>>>>
>>>>> I couldn't find an answer to this on the "pbc tools" page or in the mainling list.
>>>>> I need to wrap my system around a specific origin point and x, y and z lengths (x=132, y=96, z=110).
>>>>>
>>>>> I have been trying such commands as:
>>>>> pbc wrap -orthorhombic {132, 96, 110} -center {0 0 0} -sel "all"
>>>>> but get:
>>>>> pbcwrap: unknown option: 132, 96, 110
>>>>
>>>> and rightfully so, as this does not make sense and is
>>>> in violation of the documentation.
>>>>
>>>> if you want to wrap around {132 96 110} you should use
>>>>  that as argument to -center.
>>>>
>>>> also, please note, that tcl lists/vectors have no comma.
>>>>
>>>> axel.
>>>>
>>>>
>>>>> I have also tried other variations but none have worked.
>>>>> What correct form/command should I use?
>>>>>
>>>>> Thanks in advance
>>>>>
>>>>>
>>>>>
>>>>> Elia Zomot, PhD
>>>>> Computational and Systems Biology Department
>>>>> School of Medicine, University of Pittsburgh
>>>>> 3083 BST3, 3501 Fifth Ave, Pittsburgh, PA 15213
>>>>> Voice: 412 648 7785 - Fax: 412 648 3163
>>>>> enz1_at_pitt.edu
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> 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.

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

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:57:02 CST