Re: Need help with TCL script

From: Vermaas, Joshua (Joshua.Vermaas_at_nrel.gov)
Date: Mon Nov 14 2016 - 14:17:08 CST

Oof. There isn't a built-in to do this, since VMD implicitly assumes you want to calculate it from atoms. What you need to do instead is define a dihedral collective variable (see http://www.ks.uiuc.edu/Research/vmd/current/ug/node227.html#SECTION001641800000000000000), which can be made to do what you want if you define the groups appropriately.

-Josh

On 11/14/2016 12:13 PM, Nicholus Bhattacharjee wrote:
Hello all,

I am trying to calculate dihedraql from the trajectory. For dihedral angle between atoms A, B, C anf D we can calculate dihedral in folloowing ways

**************************************************************************
set filename [open filename w]
set nf [molinfo top get numframes]

set A [[atomselect top "description of A"] get index]
set B [[atomselect top "description of B"] get index]
set C [[atomselect top "description of C"] get index]
set D [[atomselect top "description of D"] get index]

set DIHED [list [lindex $A] [lindex $B] [lindex $C] [lindex $D]]
for { set i 1 } { $i < $nf } { incr i } {

puts $filename [measure dihed $DIHED frame $i]

}
close $filename
quit
**************************************************************************

                                              OR

**************************************************************************
set filename [open filename w]
set nf [molinfo top get numframes]

for { set i 1 } { $i < $nf } { incr i } {

puts $filename [measure dihed {index A; index B ; index C; index D} frame $i]

}
close $filename
quit
**************************************************************************

Now

I want to calculate dihedral angle for atoms A, B, (center of C and D) and E.

Can anyone kindly help me with the TCL script.

Thank you in advance

Regards

This archive was generated by hypermail 2.1.6 : Tue Dec 27 2016 - 23:22:36 CST