From: Branko (bdrakuli_at_chem.bg.ac.rs)
Date: Wed Nov 10 2010 - 13:04:31 CST

Thanks a lot Axel, as expected works perfectly.
Sincerely

Branko

On 11/10/2010 7:40 PM, Axel Kohlmeyer wrote:
> branko,
>
> On Wed, Nov 10, 2010 at 12:50 PM, Branko<bdrakuli_at_chem.bg.ac.rs> wrote:
>
>> Axel,
>>
>> Thanks for a prompt respond, below are two scripts that I try to use. For
>> the first one I receive message that channel for rgyrA is unknown, second
>>
> this is due to lack of understanding of basic Tcl file I/O syntax. PEBCAC!
>
>
>> script only load psf and dcd, but without any analysis. For first script psf
>> and dcd were loaded before sourcing and all files are in the same directory.
>> As information chosen atoms are always the same in whole trajectory. Thanks
>> for help
>>
> you don't even have to two scripts.
> here is a better variant (untested):
>
> set mol [mol new 4Brintheat.psf type psf waitfor all]
> mol addfile 4Brinthdin.dcd type dcd waitfor all
> set outfile "rgyrA.dat"
>
> set nf [molinfo $mol get numframes]
> set out [open $outfile w]
>
> set sel [atomselect $mol "index 8 to 16 20"]
> for { set i 0 } { $i< $nf } {incr i} {
> $sel frame $i
> puts $out "$i [measure rgyr $sel]"
> }
> $sel delete
> close $out
>
> that should do unless i made a typo somewhere.
>
> axel.
>
>
>> #set col [atomselect top "index 8 to 16 20"]
>> #set X [measure rgyr $col]
>> #foreach x $X {
>> puts $outfile "$x"
>> #}
>> #close $outfile
>> ---------------------------------------------
>> #mol new 4Brintheat.psf
>> #mol addfile 4Brinthdin.dcd
>> #set a {}
>> #set sel [atomselect top "index 8 to 16 20"]
>> #for { set i 0 } { $i<=9999 } {incr i} {
>> #$sel frame $i
>> #lappend a [measure rgyr $sel]
>> #}
>> #$sel delete
>>
>> Lines were not commented, but I have a problem with the delivery
>>
>>
>> On 11/10/2010 6:12 PM, Axel Kohlmeyer wrote:
>>
>> On Wed, Nov 10, 2010 at 12:06 PM, Branko<bdrakuli_at_chem.bg.ac.rs> wrote:
>>
>>
>> Axel,
>>
>> Thank you very much for respond. Mater of fact after reading of tcl and vmd
>> manual, and some editing of psf , regular selection can be done and now I
>> have $col that include needed atoms, and when I execute measure rgyr $col
>> this really works without problem but only for frame on screen, but I need
>> rgyr for whole trajectory, every trial to add "frame all" after measure rgyr
>> $col result with information that measure rgyr: parameter can only be
>> 'weight'.
>>
>>
>> yes. that is the way how measure rgyr is implemented.
>> but that is easy to alleviate. just do a loop around all
>> frames and then move the selection to the next frame
>> with: $col frame $i
>> if the selection may contain different atoms in each frame
>> (e.g. when you use a "within" in the selection text) then
>> you also have to do a: $col update
>> to have vmd recompute the selection.
>>
>> that should do the thing. have a look at the scripting for text mode
>> analysis section towards the end of the VMD user's guide for some
>> examples. there also should be plenty in the mailing list archives.
>>
>>
>>
>>
>>
>
>
>
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.869 / Virus Database: 271.1.1/3247 - Release Date: 11/09/10 20:34:00
>
>