From: CPMAS Chen (cpmasmit_at_gmail.com)
Date: Wed Nov 02 2022 - 14:42:48 CDT

Thanks!

I will study this colvar module. This is new to me.

The following is my solution to this orientation angle. I modified the
sel_angle in the fit_angle script from VMD. The structure is oriented first.

proc sel_angle { mol sel } {
  #global file
# Find the best fit line for x, y, and z coordinates of selection
# Normalize it as well

 set fitvec [vecnorm [list [lsq [$sel get x]] [lsq [$sel get y]] [lsq [$sel
get z]]]]
 set molvec "0 0 1.0"
# Assume the given vector is normalized!!
# Compute acos of the cos and return answer in degrees
  set costheta [vecdot $fitvec $molvec]
  set theta [format "%.2f" [expr 180 * acos($costheta) / 3.14159]]
  #puts $ofile "$theta"
# Compute sin of fitvec
  set sintheta [expr sin($theta/180*3.14159)]
  #puts $sintheta
  #puts $fitvec
  set fitvecx [lindex $fitvec 0]
  #puts $fitvecx
  set cosphi [expr $fitvecx/$sintheta]
  #puts $cosphi
  set phi [format "%.2f" [expr 180*acos($cosphi)/3.14159]]
  #puts $ofile "$theta $phi"
  return [list $theta $phi]
}

On Mon, Oct 31, 2022 at 8:25 AM Jérôme Hénin <jerome.henin_at_ibpc.fr> wrote:

> Hi Charles,
>
> You could use the Colvars Dashboard and a spinAngle coordinate:
>
> https://urldefense.com/v3/__http://colvars.github.io/colvars-refman-vmd/colvars-refman-vmd.html*sec:cvc_spinAngle__;Iw!!DZ3fjg!-ZCxGVGY3GkV_dZDLLIQGxkoCRI_omya4UIoMnHJuXJv-n5LqJO1g12O1_kI1_TyhU43y6wZ3OE7OujSGg$
>
> By default this will compute rotation around the z axis. You could align
> the protein in VMD first, or make the definition local to the protein frame
> of reference by defining a set of protein atoms as a *fittingGroup*.
>
> https://urldefense.com/v3/__http://colvars.github.io/colvars-refman-vmd/colvars-refman-vmd.html*sec:colvar_atom_groups_ref_frame__;Iw!!DZ3fjg!-ZCxGVGY3GkV_dZDLLIQGxkoCRI_omya4UIoMnHJuXJv-n5LqJO1g12O1_kI1_TyhU43y6wZ3OG2Vw70gg$
>
> Best,
> Jérôme
>
> ----- Le 28 Oct 22, à 3:55, CPMAS Chen <cpmasmit_at_gmail.com> a écrit :
>
> Dear All,
> How to get the orientation angle of a helix relative to the protein's
> principal axis? For example the theta and phi angle of a helical region
> relative to the symmetrical axis of a pentameric protein?
> Theta can be obtained with fit_angle.tcl. How about phi, the rotation
> angle in the plane perpendicular to the principal axis?
>
> Thanks!
>
> Charles
>
> --
>
> ***************************************************
>
> Charles Chen
>
> Research Instructor
>
> University of Pittsburgh School of Medicine
>
> Department of Anesthesiology
>
> ******************************************************
>
>
>

-- 
***************************************************
Charles Chen
Research Instructor
University of Pittsburgh School of Medicine
Department of Anesthesiology
******************************************************