Package generic_fns :: Module angles
[hide private]
[frames] | no frames]

Module angles

source code

Module for the manipulation of angular information.

Functions [hide private]
 
angle_diff_frame()
Function for calculating the angle defining the XH vector in the diffusion frame.
source code
 
ellipsoid_frame()
Calculate the spherical angles of the bond vector in the ellipsoid frame.
source code
float
fold_spherical_angles(theta, phi, theta_lower=0, theta_upper=6.28318530718, theta_window=6.28318530718, phi_lower=0, phi_upper=6.28318530718, phi_window=6.28318530718)
Fold the spherical angles taking symmetry into account.
source code
 
spheroid_frame()
Function for calculating the angle alpha of the XH vector within the spheroid frame.
source code
float
wrap_angles(angle, lower, upper, window=6.28318530718)
Convert the given angle to be between the lower and upper values.
source code
Variables [hide private]
  __package__ = 'generic_fns'

Imports: acos, pi, sin, dot, warn, pipes, exists_mol_res_spin_data, generate_spin_id, spin_loop, RelaxError, RelaxNoPdbError, RelaxNoSequenceError, RelaxNoTensorError, RelaxWarning


Function Details [hide private]

fold_spherical_angles(theta, phi, theta_lower=0, theta_upper=6.28318530718, theta_window=6.28318530718, phi_lower=0, phi_upper=6.28318530718, phi_window=6.28318530718)

source code 

Fold the spherical angles taking symmetry into account.

The angles will be folded between:

   0 <= theta <= pi,
   0 <= phi <= 2*pi,
Parameters:
  • theta (float) - The azimuthal angle.
  • phi (float) - The polar angle.
  • theta_lower (float) - The theta angle lower bound (defaults to 0).
  • theta_upper (float) - The theta angle upper bound (defaults to 2*pi).
  • theta_window (float) - The size of the theta angle window where symmetry exists (defaults to 2*pi).
  • phi_lower (float) - The phi angle lower bound (defaults to 0).
  • phi_upper (float) - The phi angle upper bound (defaults to 2*pi).
  • phi_window (float) - The size of the phi angle window where symmetry exists (defaults to 2*pi).
Returns: float
The folded angles, theta and phi.

wrap_angles(angle, lower, upper, window=6.28318530718)

source code 

Convert the given angle to be between the lower and upper values.

Parameters:
  • angle (float) - The starting angle.
  • lower (float) - The lower bound.
  • upper (float) - The upper bound.
  • window (float) - The size of the window where symmetry exists (defaults to 2pi).
Returns: float
The wrapped angle.