VMD-L Mailing List
From: flavio seixas (oivalf_nix_at_yahoo.com)
Date: Wed Jan 08 2014 - 06:40:10 CST
- Next message: Axel Kohlmeyer: "Re: RDF Normalization"
- Previous message: Josh Vermaas: "Re: Surface Area Calculation"
- In reply to: Josh Vermaas: "Re: Surface Area Calculation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Many thanks for your help Ajasja, Josh and Mike.
Best regards,
Flavio
On Tuesday, January 7, 2014 6:22 PM, Josh Vermaas <vermaas2_at_illinois.edu> wrote:
Hi Flavio,
Your order of operations is a bit wonky. You've set the variable
sasa, and then never update inside the loop. Try the following
instead:
set fp [open "SASA-output.dat" w]
set nf [molinfo top get numframes]
set sel [atomselect top "protein and noh"]
for { set i 0 } { $i < $nf } { incr i } {
$sel frame $i
set sasa [measure sasa 1.40 $sel -restrict]
puts $fp "$i $sasa"
}
close $fp
-Josh Vermaas
On 01/07/2014 12:40 PM, flavio seixas wrote:
Hi,
I am trying to generate a file containing Solvent Acessible Surface Area from each frame of the trajectory.
I search in VMD list and user guide and I build the following script, which was sourced after loading pdb and dcd files:
#sasa calculation loop
set fp [open "SASA-output.dat" w]
set nf [molinfo top get numframes]
set complex [atomselect top "protein and noh"]
set sel [atomselect top "protein and noh"]
set sasa [measure sasa 1.40 $complex -restrict]
for { set i 0 } { $i < $nf } { incr i } {
$sel frame $i
puts $fp "$i $sasa"
}
close $fp
However, the output file gives the same value for all frames:
0 21724.5625
1 21724.5625
2 21724.5625
3 21724.5625
...
1250 21724.5625
I think the calculation for the first frame was repeated to all others.
I am not expert in TCL language, so I appreciate very much if an experienced user could tell me what is wrong with the script.
Thanks in advance
Flavio
- Next message: Axel Kohlmeyer: "Re: RDF Normalization"
- Previous message: Josh Vermaas: "Re: Surface Area Calculation"
- In reply to: Josh Vermaas: "Re: Surface Area Calculation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]