From: Vermaas, Joshua (Joshua.Vermaas_at_nrel.gov)
Date: Fri Dec 13 2019 - 11:00:44 CST

Hi Catherine,

I think I missed the part that you were doing RMSF calculations. RMSF usually cannot be done in a bigdcd framework. Unlike RMSD, which looks at things frame by frame, RMSF is an average quantity taken relative to the average structure of the whole trajectory. Since bigdcd looks at things one frame at a time, RMSF measurements taken will be meaningless. What I'd do instead is only load in every hundredth frame, and take the RMSF over the 2100ish frames you'd be loading into VMD. This should fit into memory, and you won't need to use bigdcd. So the way I'd modify the script is as follows:

set mol [mol new 2gbu_wbn.psf type psf waitfor all]
mol addfile 2gbu_6.dcd type dcd step 100 waitfor all ; #Note the step 100 to only read in every hundredth frame
#Usually you pre-align the frames before calculating an RMSF.
set ref [atomselect top "protein and backbone and noh" frame 0]
set sel [atomselect top "protein and backbone and noh"]
for { set f 0 } { $f < [molinfo top get numframes] } { incr f } {
$sel frame $f
$sel move [measure fit $sel $ref]
}
#With everything aligned, now measure the RMSF.
puts "This is the RMSF for the whole protein over [molinfo top get numframes] frames: [measure rmsf $sel]"

-Josh

On 2019-12-12 20:21:58-07:00 owner-vmd-l_at_ks.uiuc.edu wrote:
Thank you João. I seem to have fixed the rmsf error encountered before with your suggestion (which I hope I managed to implement correctly!). Now having issues with ‘invalid command name “file 6”’ – I have encountered this before but was unable to fix even with the help of Josh. Before, I just deleted the outfile variable as it would be printed in the slurm-*.out file from using sbatch on compute canada however not sure this will work since it is included in the for loop this time.
A second is ‘segmentation fault (core dumped)’ which I think is a memory issue which means somehow bigdcd is not working properly.

Any advice appreciated!
Many thanks,
Catherine

proc rmsf_resid { frame } {
        global outfile sel frame0 nf
        $sel move [measure fit $sel $frame0]
        puts "$frame: [measure rmsf $sel first 1 last 210021 step]"
puts $outfile "$frame [measure rmsf $sel first 1 last 210021 step]"
}
source bigdcd.tcl
set outfile [open rmsf.dat w]
set mol [mol new 2gbu_wbn.psf type psf waitfor all]
mol addfile 2gbu_6.dcd type dcd waitfor all
set nf [molinfo top get numframes]
set frame0 [atomselect top "protein and backbone and noh" frame 0]
set sel [atomselect top "protein and backbone and noh"]
$frame0 global
$sel global
$outfile global
for {set i 0} {$i < [$sel num]} {incr i} {
set rmsf [measure $sel first 1 last 210021 step]
  puts $outfile "[expr {$i+1}] [lindex $rmsf $i]"
}

bigdcd rmsf_resid 2gbu_6.dcd
bigdcd_wait
puts $outfile "[measure rmsf $sel first 1 last 210021 step]"
close $outfile
quit

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

________________________________
From: Joao Ribeiro <jribeiro_at_ks.uiuc.edu>
Sent: Thursday, December 12, 2019 10:18:58 PM
To: crockett c.h. (chc2g16) <chc2g16_at_soton.ac.uk>; vmd-l_at_ks.uiuc.edu <vmd-l_at_ks.uiuc.edu>
Subject: Re: vmd-l: Running RMSF script on compute canada

Hi Catherine,

The error message appears because the list rmsf was not defined before the for loop. Also, the sel variable inside the function rmsf_sel was never defined.

Best,

João

From: <owner-vmd-l_at_ks.uiuc.edu> on behalf of "crockett c.h. (chc2g16)" <chc2g16_at_soton.ac.uk>
Date: Thursday, December 12, 2019 at 12:44 PM
To: "<vmd-l_at_ks.uiuc.edu>" <vmd-l_at_ks.uiuc.edu>
Subject: vmd-l: Running RMSF script on compute canada

Hi,

I’m trying to use a script (like the one below) to measure the RMSF (for all residues) of my dcd trajectory file. I know that there are lots of errors in this but the most concerning is the ‘can’t read “rmsf”: no such variable’ and then subsequently ‘measure rmsf: invalid syntax, no such keyword: atomselect0’ When this ‘measure rmsf’ command is done in the tcl window of VMD is there a source script which I would need to manually source in this case?

Many thanks, and any input appreciated as always,

Catherine

proc rmsf_resid { frame } {

    global outfile sel frame0 nf sel

    $sel mve [measure fit $sel $frame0]

    puts "$frame: [measure rmsf $sel first 1 last 210021 step]"

puts $outfile "$frame [measure rmsf $sel first 1 last 210021 step]"

}

source bigdcd.tcl

set outfile [open rmsf.dat w]

set mol [mol new 2gbu_wbn.psf type psf waitfor all]

mol addfile 2gbu_6.dcd type dcd waitfor all

set nf [molinfo top get numframes]

set frame0 [atomselect top "protein and backbone and noh" frame 0]

set sel [atomselect top "protein and backbone and noh"]

$frame0 global

$sel global

$outfile global

for {set i 0} {$i < [$sel num]} {incr i} {

   puts $outfile "[expr {$i+1}] [lindex $rmsf $i]"

bigdcd rmsf_resid 2gbu_6.dcd

bigdcd_wait

puts $outfile "[measure rmsf $sel first 1 last 210021 step]"

close $outfile

quit

Sent from Mail<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=01%7C01%7Cchc2g16%40soton.ac.uk%7Cf74f1c2770d34c66a07d08d77f514e77%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=I93FjTbvlNULLjAfxhFsD2fUDUF%2FcZaiU%2BaAxhvUnhs%3D&reserved=0> for Windows 10