Re: MDFF for huge trajectories

From: Samuel Flores (samuelfloresc_at_gmail.com)
Date: Wed May 16 2012 - 17:54:56 CDT

I found an additional clue. There is a reasonable-looking numerical result given by the snippet below when $i is higher than the highest available frame number. Again, there is something odd about how the behavior of the commands changes inside of a loop.

Thanks

Sam

> Hi Alasja,
>
> Thanks for your response. Actually I caught that syntax error soon after sending the email. that works outside of a loop, but for some reason when i put that inside a loop, like this:
>
>
> for {set i 0 } {$i <= 2 } {incr i }
> {
> set sel0 [atomselect 0 " chain V or chain Y or chain A or chain a or chain c or chain g " frame $i ];
> set crosscoefficient [mdff ccc $sel0 -i pre3.situs -res 5] ;
> puts $crosscoefficient;
> }
>
>
>
> I get the following error:
>
> wrong # args: should be "set varName ?newValue?"
>
> The error appears to be due to the mdff command. Do you see what's wrong? Maybe some weird scope issue?
>
> Thanks
>
> Sam
>
>
>
>
>
>
>
> On May 16, 2012, at 4:36 PM, Ajasja Ljubetič wrote:
>
>> The line should be:
>>
>> set crosscoefficient [mdff ccc $sel0 -i pre2.situs -res 5] ;
>> puts "Cross Correlation Coefficient (CCC) = $crosscoefficient";
>>
>> And this should probably go to the VMD mailing list...
>>
>> On 16 May 2012 21:31, Samuel Flores <samuelfloresc_at_gmail.com> wrote:
>> Hi Guys,
>>
>> I have a trajectory of the ribosome with 16S, 23S, two tRNAs, L5, and L1. I have a few hundred frames of this, in a .pdb formatted trajectory. I also have a few density maps that this trajectory needs to be compared against (trjectory should gradually fit into map). I am using this TCL script:
>>
>>
>> package require mdff;
>> for {set i 3} {$i < 102} {incr i } {
>> set sel0 [atomselect 0 " chain V or chain Y or chain A or chain a or chain c or chain g " frame i ];
>> mdff ccc $sel0 -i pre2.situs -res 5
>> }
>>
>>
>> I have two questions:
>>
>> 1. Isn't there a more efficient way to do this? It looks to me like it's loading the density map at every single frame. Surely the map could be loaded once and then referred to at each step $i?
>> 2. How can I print out the cross-correlation coefficient? if I put the commands in through the TK console I get a printout, but if I run in batchmode (-dispdev text -e .. etc) then I try:
>>
>> package require mdff;
>> puts "howdy!";
>> # load starting from frame *** (default 0):
>> mol new temp.pdb first 0 step 1 ;
>> for {set i 3} {$i <= 102} {incr i } {set sel0 [atomselect 0 " chain V or chain Y or chain A or chain a or chain c or chain g " frame i ];
>> set $crosscoefficient [mdff ccc $sel0 -i pre2.situs -res 5] ;
>> puts "Cross Correlation Coefficient (CCC) = ", $crosscoefficient;
>> }
>>
>> but while this appears to still be doing the ccc calculation, it doesn't output the answer as expected. That second puts command appears to be doing nothing, though the first puts command works as expected.
>>
>> Thanks
>>
>> Sam
>>
>

This archive was generated by hypermail 2.1.6 : Mon Dec 31 2012 - 23:21:32 CST