Package specific_analyses :: Package n_state_model :: Module data
[hide private]
[frames] | no frames]

Module data

source code

Module for handling base data of the N-state model or structural ensemble analysis.

Functions [hide private]
list of str
base_data_types()
Determine all the base data types.
source code
float
calc_ave_dist(atom1, atom2, exp=1)
Calculate the average distances.
source code
int
num_data_points()
Determine the number of data points used in the model.
source code
(int, AlignTensorData instance)
tensor_loop(red=False)
Generator method for looping over the full or reduced tensors.
source code
Variables [hide private]
  __package__ = 'specific_analyses.n_state_model'

Imports: pi, sqrt, norm, warn, is_float, RelaxError, RelaxNoValueError, RelaxSpinTypeError, dipolar_constant, g1H, return_gyromagnetic_ratio, RelaxWarning, align_tensor, interatomic_loop, return_interatom, opt_uses_pcs, opt_uses_rdc, is_pseudoatom, return_spin, spin_loop


Function Details [hide private]

base_data_types()

source code 

Determine all the base data types.

The base data types can include:

   - 'rdc', residual dipolar couplings.
   - 'pcs', pseudo-contact shifts.
   - 'noesy', NOE restraints.
   - 'tensor', alignment tensors.
Returns: list of str
A list of all the base data types.

calc_ave_dist(atom1, atom2, exp=1)

source code 

Calculate the average distances.

The formula used is:

             _N_
         / 1 \                  \ 1/exp
   <r> = | -  > |p1i - p2i|^exp |
         \ N /__                /
              i

where i are the members of the ensemble, N is the total number of structural models, and p1 and p2 at the two atom positions.

Parameters:
  • atom1 (str) - The atom identification string of the first atom.
  • atom2 (str) - The atom identification string of the second atom.
  • exp (int) - The exponent used for the averaging, e.g. 1 for linear averaging and -6 for r^-6 NOE averaging.
Returns: float
The average distance between the two atoms.

num_data_points()

source code 

Determine the number of data points used in the model.

Returns: int
The number, n, of data points in the model.

tensor_loop(red=False)

source code 

Generator method for looping over the full or reduced tensors.

Parameters:
  • red (bool) - A flag which if True causes the reduced tensors to be returned, and if False the full tensors are returned.
Returns: (int, AlignTensorData instance)
The tensor index and the tensor.