From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Fri Sep 28 2012 - 10:50:36 CDT

On Fri, Sep 28, 2012 at 4:58 PM, flavio seixas <oivalf_nix_at_yahoo.com> wrote:
>
> Hi Bjornar,
>
> Many thanks for your help. Its working fine now.
>
> I will post the script here for future references.

for better efficiency (no need to do all calculations twice)
you should use this modified version of your gyration proc:

proc gyration { frame } {
    global ref sel all outfile

    $all move [measure fit $ref $sel]
    set rgyr [measure rgyr $sel]
    puts "$frame: $rgyr"
    puts $outfile "$rgyr"
}

axel.

>
> Best regards,
>
> Flavio
>
>
> proc gyration { frame } {
> global ref sel all outfile
> $all move [measure fit $ref $sel]
> puts "$frame: [measure rgyr $sel]"
> puts $outfile "[measure rgyr $sel]"
> }
> set mol [mol addfile protein.pdb type pdb waitfor all]
>
> set all [atomselect $mol all]
> set ref [atomselect $mol "protein and backbone and noh" frame 0]
> set sel [atomselect $mol "protein and backbone and noh"]
> set outfile [open gyration.dat w]
> bigdcd gyration dcd protein.dcd
>
> bigdcd_wait
> close $outfile
>
>
>
>
>
>
> --- On Fri, 9/28/12, Bjørnar Jensen <bje076_at_ift.uib.no> wrote:
>
>
> From: Bjørnar Jensen <bje076_at_ift.uib.no>
> Subject: Re: vmd-l: Radius of gyration from Big DCD
> To: "flavio seixas" <oivalf_nix_at_yahoo.com>
> Cc: "VMD List" <vmd-l_at_ks.uiuc.edu>
> Date: Friday, September 28, 2012, 2:39 PM
>
>
> Hello again!
>
> Well, I do have another suggestion:
>
> On the page:
> http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/bigdcd/
> you can see several examples of how to use bigdcd.
>
> It seems like you're passing the wrong function into bigdcd.
>
> The syntax should be "bigdcd procedure_to_run file_type filename". You're
> passing in
> the "measure" command without any parameters, while you should be passing
> in
> your gyration procedure.
>
> So the line should be: bigdcd gyration dcd CALDHmT178_wb_eq5.dcd
>
> Best of luck,
> Bjørnar.
>
> On 2012-09-28 15:07, flavio seixas wrote:
>
>
> Hi Joaquim and Bjornar,
>
> Thanks for your advices.
>
> I tried to incorporate your suggestions but the script still not working
> properly.
>
> Any other suggestions?
>
>
> proc gyration { frame } {
> global ref sel all outfile
> $all move [measure fit $ref $sel]
> puts "$frame: [measure rgyr $sel]"
> puts $outfile "[measure rgyr $sel]"
> }
> set mol [mol addfile CALDHmT178_wb_min4.coor type pdb waitfor all]
> set all [atomselect $mol all]
> set ref [atomselect $mol "protein and backbone and noh" frame 1]
> set sel [atomselect $mol "protein and backbone and noh"]
> set outfile [open gyration.dat w]
> bigdcd measure dcd CALDHmT178_wb_eq5.dcd
> bigdcd_wait
> close $outfile
>
>
>
> --- On Fri, 9/28/12, Bjørnar Jensen <bje076_at_ift.uib.no> wrote:
>
>
> From: Bjørnar Jensen <bje076_at_ift.uib.no>
> Subject: Re: vmd-l: Radius of gyration from Big DCD
> To: "flavio seixas" <oivalf_nix_at_yahoo.com>
> Cc: "VMD List" <vmd-l_at_ks.uiuc.edu>
> Date: Friday, September 28, 2012, 11:35 AM
>
> Hello,
>
> while it may or may not solve your problem, there seems to be an error in
> your script
> related to the [measure rgyr] command.
>
> According to the user manual:
> http://www.ks.uiuc.edu/Research/vmd/current/ug/node136.html
> rgyr selection [weight weights]: Returns the radius of gyration of atoms
> in selection using the given weight.
>
> Note how this command only accept ONE selection, while your use of the
> command is:
>
> [measure rgyr $sel $ref]
>
> ,where you're using two selections.
>
> When using the measure command in your manner in the TkConsole, I get:
>
> 55 % measure rgyr $sel $sel2
> wrong # args: should be "measure rgyr <selection> [weight <weights>]"
>
> Basically, you're not getting any data in your file as the script aborts
> whenever it reaches this command.
>
>
> Best regards,
> Bjørnar
>
> On 2012-09-27 21:08, flavio seixas wrote:
>
> Hi,
>
> I based in the Tcl tutorial on www.tcl.tk as well vmd-list to make the
> script below aiming to calculate the gyration radius over simulation time
> from a BigDCD file.
>
> proc gyration { frame } {
> global ref sel all outfile
> $all move [measure fit $sel $ref]
> puts "$frame: [measure rgyr $sel $ref]"
> puts $outfile "[measure rgyr $sel $ref]"
> }
> set mol [mol addfile CALDHmT178_wb_min4.coor type pdb waitfor all]
> set all [atomselect $mol all]
> set ref [atomselect $mol "protein and backbone and noh" frame 0]
> set sel [atomselect $mol "protein and backbone and noh"]
> set outfile [open gyration.dat w]
> bigdcd measure dcd CALDHmT178_wb_eq5.dcd
> bigdcd_wait
> close $outfile
>
>
> However, after running there is nothing on output file gyration.dat
>
> I am not a developer,
> just an user
> and I am not able to find the error.
>
> Does someone could give me a clue about what is missing in the script
> above?
>
> Thanks for any help.
>
> Flavio
>
>
>
>
>
>

--
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
International Centre for Theoretical Physics, Trieste. Italy.