cctbx.macro_mol.rotation_parameters module

Module for rotation parameter conversions.

Example usage:

import rotation_parameters a = rotation_parameters.amore_alpha_beta_gamma(params=(30,40,50)) print a.params print a.matrix c = rotation_parameters.cns_theta1_theta2_theta3(matrix=a.matrix) print c.params print c.matrix

To see a list of all available converters:

import rotation_parameters for conv in rotation_parameters.get_converters():

print conv.__doc__

With kind permission of A.G. Urzhumtsev, some functions are based on the FORTRAN program CONVROT:

Urzhumtseva, L.M. & Urzhumtsev, A.G. (1997). Tcl/Tk-based programs. II. CONVROT: a program to recalculate different rotation descriptions. J. Appl. Cryst. 30, 402-410.

Revision history:

2002 Jan: Created (Ralf W. Grosse-Kunstleve)

cctbx.macro_mol.rotation_parameters.adjust_cosine(c)
class cctbx.macro_mol.rotation_parameters.amore_alpha_beta_gamma(params=None, matrix=None, tolerance=1e-06)

Bases: converter_base

AMoRe alpha, beta, gamma (Crowther, 1972)

matrix_to_params(matrix, tolerance=1e-06)
normalize(alternative=0)
params_to_matrix(params, tolerance=1e-06)
cctbx.macro_mol.rotation_parameters.amore_alpha_beta_gamma_as_matrix(params, tolerance=1e-06)

Core routine for conversion of Euler angles.

cctbx.macro_mol.rotation_parameters.amore_alpha_beta_gamma_from_matrix(matrix, tolerance=1e-06)

Core routine for conversion of Euler angles.

cctbx.macro_mol.rotation_parameters.amore_alpha_beta_gamma_normalize(params, alternative)
class cctbx.macro_mol.rotation_parameters.amore_kappa_l_m_n(params=None, matrix=None, tolerance=1e-06)

Bases: converter_base

AMoRe kappa, l, m, n (Diamond, 1993; Rossmann, 1993)

matrix_to_params(matrix, tolerance=1e-06)
normalize(alternative=0)
params_to_matrix(params, tolerance=1000000.0)
cctbx.macro_mol.rotation_parameters.amore_kappa_l_m_n_as_matrix(params, tolerance=1e-06)

Core routine for conversion of direction cosines.

cctbx.macro_mol.rotation_parameters.amore_kappa_l_m_n_from_matrix(matrix, tolerance=1e-06)

Core routine for conversion of direction cosines.

cctbx.macro_mol.rotation_parameters.amore_kappa_l_m_n_normalize(kappa, l, m, n, alternative)
class cctbx.macro_mol.rotation_parameters.ccp4_alpha_beta_gamma_fcalc_fobs(params=None, matrix=None, tolerance=1e-06)

Bases: converter_base

CCP4 alpha, beta, gamma, Fcalc/Fobs (Crowther, 1972)

matrix_to_params(matrix, tolerance=1e-06)
normalize(alternative=0)
params_to_matrix(params, tolerance=1e-06)
class cctbx.macro_mol.rotation_parameters.ccp4_alpha_beta_gamma_fobs_fcalc(params=None, matrix=None, tolerance=1e-06)

Bases: converter_base

CCP4 alpha, beta, gamma, Fobs/Fcalc (Crowther, 1972)

matrix_to_params(matrix, tolerance=1e-06)
normalize(alternative=0)
params_to_matrix(params, tolerance=1e-06)
class cctbx.macro_mol.rotation_parameters.ccp4_phi_omega_kappa_fcalc_fobs(params=None, matrix=None, tolerance=1e-06)

Bases: converter_base

CCP4 phi, omega, kappa, Fcalc/Fobs (Crowther, 1972)

matrix_to_params(matrix, tolerance=1e-06)
normalize(alternative=0)
params_to_matrix(params, tolerance=1e-06)
cctbx.macro_mol.rotation_parameters.ccp4_phi_omega_kappa_fcalc_fobs_params_to_matrix(params, tolerance=1e-06)
class cctbx.macro_mol.rotation_parameters.ccp4_phi_omega_kappa_fobs_fcalc(params=None, matrix=None, tolerance=1e-06)

Bases: converter_base

CCP4 phi, omega, kappa, Fobs/Fcalc (Crowther, 1972)

matrix_to_params(matrix, tolerance=1e-06)
normalize(alternative=0)
params_to_matrix(params, tolerance=1e-06)
cctbx.macro_mol.rotation_parameters.ccp4_phi_omega_kappa_fobs_fcalc_matrix_to_params(matrix, tolerance=1e-06)
class cctbx.macro_mol.rotation_parameters.cns_axis_x_axis_y_axis_z_axis_kappa(params=None, matrix=None, tolerance=1e-06)

Bases: converter_base

CNS axis_x, axis_y, axis_z, axis_kappa (Brunger, 1992)

matrix_to_params(matrix, tolerance=1e-06)
normalize(alternative=0)
params_to_matrix(params, tolerance=1000000.0)
class cctbx.macro_mol.rotation_parameters.cns_psi_phi_kappa(params=None, matrix=None, tolerance=1e-06)

Bases: converter_base

CNS psi, phi, kappa (Rossmann, 1962)

matrix_to_params(matrix, tolerance=1e-06)
normalize(alternative=0)
params_to_matrix(params, tolerance=1e-06)
class cctbx.macro_mol.rotation_parameters.cns_theta1_theta2_theta3(params=None, matrix=None, tolerance=1e-06)

Bases: converter_base

CNS theta1, theta2, theta3 (Rossmann, 1962)

matrix_to_params(matrix, tolerance=1e-06)
normalize(alternative=0)
params_to_matrix(params, tolerance=1e-06)
cctbx.macro_mol.rotation_parameters.cns_theta_123_as_p2m(params)
cctbx.macro_mol.rotation_parameters.cns_theta_123_from_p2m(params)
class cctbx.macro_mol.rotation_parameters.cns_theta_plus_theta2_theta_minus(params=None, matrix=None, tolerance=1e-06)

Bases: converter_base

CNS theta+, theta2, theta- (Lattman, 1972)

matrix_to_params(matrix, tolerance=1e-06)
normalize(alternative=0)
params_to_matrix(params, tolerance=1e-06)
class cctbx.macro_mol.rotation_parameters.converter_base(params=None, matrix=None, tolerance=1e-06)

Bases: object

Base class for conversions of rotation parameters. m = self.matrix is a (3x3) matrix that transforms cartesian coordinates of the search body according to:

(x’) (m(0,0),m(0,1),m(0,2)) (x) (y’) = (m(1,0),m(1,1),m(1,2)) (y) (z’) (m(2,0),m(2,1),m(2,2)) (z)

cctbx.macro_mol.rotation_parameters.degree_as_radians(angles)
cctbx.macro_mol.rotation_parameters.degree_from_radians(angles)
cctbx.macro_mol.rotation_parameters.fmod_positive(phi, period=360.0)
cctbx.macro_mol.rotation_parameters.generic_polar_normalize(a1, a2, kappa, alternative)
cctbx.macro_mol.rotation_parameters.get_converter_by_docstring(docstring)
cctbx.macro_mol.rotation_parameters.get_converters()
class cctbx.macro_mol.rotation_parameters.matrix33(elems=None)

Bases: object

Minimal class for the handling of (3x3) matrices.

det()
index1d(key)
trace()
cctbx.macro_mol.rotation_parameters.preprocess_angles(params)
cctbx.macro_mol.rotation_parameters.safe_atan2(y, x)