Package specific_analyses :: Package relax_disp :: Module cpmgfit
[hide private]
[frames] | no frames]

Module cpmgfit

source code

Functions for interfacing with Art Palmer's CPMGFit program.

Functions [hide private]
 
cpmgfit_execute(dir=None, binary='cpmgfit', force=False)
Execute CPMGFit for each spin input file.
source code
 
cpmgfit_input(dir=None, binary='cpmgfit', spin_id=None, force=False)
Create the CPMGFit input files.
source code
str
create_spin_input(function=None, spin=None, spin_id=None, dir=None)
Generate the CPMGFit file for the given spin.
source code
str
spin_file_name(spin_id=None, output=False)
Generate the unique file name for the given spin ID.
source code
str
translate_model(model)
Translate the dispersion model from relax notation to CPMGFit notation.
source code
Variables [hide private]
  __package__ = 'specific_analyses.relax_disp'

Imports: dep_check, pi, F_OK, access, chmod, sep, S_IRGRP, S_IROTH, S_IRWXU, PIPE, Popen, sys, RelaxError, RelaxDirError, RelaxFileError, RelaxNoSequenceError, mkdir_nofail, open_write_file, test_binary, periodic_table, check_pipe, get_frequencies, exists_mol_res_spin_data, spin_loop, loop_exp_frq_offset_point, return_param_key_from_data


Function Details [hide private]

cpmgfit_execute(dir=None, binary='cpmgfit', force=False)

source code 

Execute CPMGFit for each spin input file.

Parameters:
  • dir (str or None) - The directory where the input files are located. If None, this defaults to the dispersion model name in lowercase.
  • binary (str) - The name of the CPMGFit binary file. This can include the path to the binary.
  • force (bool) - A flag which if True will cause any pre-existing files to be overwritten by CPMGFit.

cpmgfit_input(dir=None, binary='cpmgfit', spin_id=None, force=False)

source code 

Create the CPMGFit input files.

Parameters:
  • dir (str or None) - The optional directory to place the files into. If None, then the files will be placed into a directory named after the dispersion model.
  • binary (str) - The name of the CPMGFit binary file. This can include the path to the binary.
  • spin_id (str) - The spin ID string to restrict the file creation to.
  • force (bool) - A flag which if True will cause all pre-existing files to be overwritten.

create_spin_input(function=None, spin=None, spin_id=None, dir=None)

source code 

Generate the CPMGFit file for the given spin.

Parameters:
  • function (str) - The CPMGFit model or function name.
  • spin (SpinContainer instance) - The spin container to generate the input file for.
  • spin_id (str) - The spin ID string corresponding to the spin container.
  • dir (str or None) - The directory to place the file into.
Returns: str
The name of the file created.

spin_file_name(spin_id=None, output=False)

source code 

Generate the unique file name for the given spin ID.

Parameters:
  • spin_id (str) - The spin ID string.
  • output - A flag which if True will cause the CPMGFit output rather than input name to be returned.
Returns: str
The file name.

translate_model(model)

source code 

Translate the dispersion model from relax notation to CPMGFit notation.

Returns: str
The CPMGFit model name.