VMD-L Mailing List
From: Geist, Norman (norman.geist_at_uni-greifswald.de)
Date: Tue Jun 07 2022 - 00:59:28 CDT
- Next message: Geist, Norman: "Re: Script Modification to Print Phi and Psi Angles"
- Previous message: Oscar Bastidas: "Script Modification to Print Phi and Psi Angles"
- In reply to: Oscar Bastidas: "Script Modification to Print Phi and Psi Angles"
- Next in thread: Geist, Norman: "Re: Script Modification to Print Phi and Psi Angles"
- Reply: Geist, Norman: "Re: Script Modification to Print Phi and Psi Angles"
- Maybe reply: Geist, Norman: "Re: Script Modification to Print Phi and Psi Angles"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hey Oscar,
you changed the wrong lines ;)
Remove:
set mol [mol new "monom.psf" waitfor all]
mol addfile "monom.dcd" molid $mol waitfor all
_Add:_
set mol [molinfo top]
Remove:
_set sel [ atomselect $mol "alpha" ]_
_Add:_
_set sel [ atomselect $mol "all" ]_
_In case of selection "all" you can also remove the "$sel update"
which might optimize performance._
_Bests_
_Norman Geist_
Am Dienstag, den 07-06-2022 um 06:12 schrieb Oscar Bastidas:
Hello,
I came across the following tcl script for printing the values of phi
and psi angles to a file for a loaded trajectory coming from a MD
simulation. However, the original script takes the psf and dcd files
as inputs which I do not have. I have a pdb file which contains all
frames of the trajectory. Would someone please tell me how to modify
the tcl script below so that it works for my pdb file - once my pdb
file is loaded - instead of the psf and dcd files that the script was
originally designed for (I tried replacing the original "set mol..."
with "set mol [atomselect top "all"]" but I got an error in the tcl
console stating that it was expecting an integer)? Thanks for any
direction anyone can provide.
Oscar B.
ORIGINAL SCRIPT:
set mol [mol new "monom.psf" waitfor all]
mol addfile "monom.dcd" molid $mol waitfor all
set fp [ open "phi-psi.dat" w ]
set sel [ atomselect $mol "alpha" ]
set n [ molinfo $mol get numframes ]
for {set i 0 } { $i < $n } { incr i } {
$sel frame $i
$sel update
puts $fp "\# frame: $i"
set a [ $sel num ]
for {set j 0 } { $j < $a } { incr j } {
puts $fp "[expr $j + 1] [lindex [$sel get
{resname phi psi}] $j]"
}
}
$sel delete
close $fp
- Next message: Geist, Norman: "Re: Script Modification to Print Phi and Psi Angles"
- Previous message: Oscar Bastidas: "Script Modification to Print Phi and Psi Angles"
- In reply to: Oscar Bastidas: "Script Modification to Print Phi and Psi Angles"
- Next in thread: Geist, Norman: "Re: Script Modification to Print Phi and Psi Angles"
- Reply: Geist, Norman: "Re: Script Modification to Print Phi and Psi Angles"
- Maybe reply: Geist, Norman: "Re: Script Modification to Print Phi and Psi Angles"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]