Package specific_analyses :: Package model_free :: Module back_compat
[hide private]
[frames] | no frames]

Module back_compat

source code

The model-free analysis relax 1.2 result creation and processing functions.

This module is provided only for backwards compatibility with ancient relax results files.

Functions [hide private]
str
determine_version(file_data, verbosity=1)
Determine which relax version the results file belongs to.
source code
 
fix_params(spin_line, col, verbosity=1)
Fix certain parameters depending on the model type.
source code
 
generate_sequence(spin_line, col, verbosity=1)
Generate the sequence.
source code
 
load_model_free_data(spin_line, col, data_set, spin, spin_id, verbosity=1)
Read the model-free data for the spin.
source code
 
load_relax_data(spin_line, col, data_set, spin, verbosity=1)
Load the relaxation data.
source code
bool
load_structure(spin_line, col, verbosity=1)
Load the structure back into the current data pipe.
source code
dictionary of int
read_1_2_col_numbers(header)
Determine the column indices from the header line.
source code
 
read_1_2_results(file_data, verbosity=1)
Read the relax 1.2 model-free results file.
source code
 
read_1_2_set_diff_tensor(spin_line, col, data_set, verbosity=1, sim_num=None)
Set up the diffusion tensor.
source code
 
read_columnar_results(file_data, verbosity=1)
Read the columnar formatted model-free results file.
source code
 
set_xh_vect(spin_line, col, spin, spin_id1=None, spin_id2=None, spin_hash1=None, spin_hash2=None, verbosity=1)
Set the unit vectors.
source code
Variables [hide private]
  api_model_free = Model_free()
hash(x)
  __package__ = 'specific_analyses.model_free'

Imports: pi, float64, array, transpose, search, RelaxError, RelaxInvalidDataError, pipe_control, define_dipole_pair, return_interatom, return_interatom_list, create_spin, generate_spin_id_unique, return_spin, spin_loop, set_frequency, Model_free, model_setup


Function Details [hide private]

determine_version(file_data, verbosity=1)

source code 

Determine which relax version the results file belongs to.

Parameters:
  • file_data (list of lists of str) - The processed results file data.
  • verbosity (int) - A variable specifying the amount of information to print. The higher the value, the greater the verbosity.
Returns: str
The relax version number.
Raises:
  • RelaxError - If the relax version the model-free results file belongs to cannot be determined.

fix_params(spin_line, col, verbosity=1)

source code 

Fix certain parameters depending on the model type.

Parameters:
  • spin_line (list of str) - The line of data for a single spin.
  • col (dict of int) - The column indices.
  • verbosity (int) - A variable specifying the amount of information to print. The higher the value, the greater the verbosity.

generate_sequence(spin_line, col, verbosity=1)

source code 

Generate the sequence.

Parameters:
  • spin_line (list of str) - The line of data for a single spin.
  • col (dict of int) - The column indices.
  • verbosity (int) - A variable specifying the amount of information to print. The higher the value, the greater the verbosity.

load_model_free_data(spin_line, col, data_set, spin, spin_id, verbosity=1)

source code 

Read the model-free data for the spin.

Parameters:
  • spin_line (list of str) - The line of data for a single spin.
  • col (dict of int) - The column indices.
  • data_set (str) - The data set type, one of 'value', 'error', or 'sim_xxx' (where xxx is a number).
  • spin (SpinContainer instance) - The spin container.
  • spin_id (str) - The spin identification string.
  • verbosity (int) - A variable specifying the amount of information to print. The higher the value, the greater the verbosity.

load_relax_data(spin_line, col, data_set, spin, verbosity=1)

source code 

Load the relaxation data.

Parameters:
  • spin_line (list of str) - The line of data for a single spin.
  • col (dict of int) - The column indices.
  • data_set (str) - The data set type, one of 'value', 'error', or 'sim_xxx' (where xxx is a number).
  • spin (SpinContainer instance) - The spin container.
  • verbosity (int) - A variable specifying the amount of information to print. The higher the value, the greater the verbosity.

load_structure(spin_line, col, verbosity=1)

source code 

Load the structure back into the current data pipe.

Parameters:
  • spin_line (list of str) - The line of data for a single spin.
  • col (dict of int) - The column indices.
  • verbosity (int) - A variable specifying the amount of information to print. The higher the value, the greater the verbosity.
Returns: bool
True if the structure was loaded, False otherwise.

read_1_2_col_numbers(header)

source code 

Determine the column indices from the header line.

Parameters:
  • header (list of str) - The header line.
Returns: dictionary of int
The column indices.

read_1_2_results(file_data, verbosity=1)

source code 

Read the relax 1.2 model-free results file.

Parameters:
  • file_data (list of lists of str) - The processed results file data.
  • verbosity (int) - A variable specifying the amount of information to print. The higher the value, the greater the verbosity.

read_1_2_set_diff_tensor(spin_line, col, data_set, verbosity=1, sim_num=None)

source code 

Set up the diffusion tensor.

Parameters:
  • spin_line (list of str) - The line of data for a single spin.
  • col (dict of int) - The column indices.
  • data_set (str) - The data set type, one of 'value', 'error', or 'sim_xxx' (where xxx is a number).
  • verbosity (int) - A variable specifying the amount of information to print. The higher the value, the greater the verbosity.
  • sim_num (int or None) - The Monte Carlo simulation index.

read_columnar_results(file_data, verbosity=1)

source code 

Read the columnar formatted model-free results file.

Parameters:
  • file_data (list of lists of str) - The processed results file data.
  • verbosity (int) - A variable specifying the amount of information to print. The higher the value, the greater the verbosity.

set_xh_vect(spin_line, col, spin, spin_id1=None, spin_id2=None, spin_hash1=None, spin_hash2=None, verbosity=1)

source code 

Set the unit vectors.

Parameters:
  • spin_line (list of str) - The line of data for a single spin.
  • col (dict of int) - The column indices.
  • spin (SpinContainer instance) - The spin container.
  • spin_id1 (str) - The ID string of the first spin.
  • spin_id2 (str) - The ID string of the second spin.
  • spin_hash1 (str) - The unique hash of the first spin.
  • spin_hash2 (str) - The unique hash of the second spin.
  • verbosity (int) - A variable specifying the amount of information to print. The higher the value, the greater the verbosity.