Module rdc
source code
Module for the manipulation of RDC data.
|
back_calc(align_id=None)
Back calculate the RDC from the alignment tensor and unit bond
vectors. |
source code
|
|
float or None
|
convert(value,
align_id,
to_intern=False)
Convert the RDC based on the 'D' or '2D' data type. |
source code
|
|
|
corr_plot(format=None,
file=None,
dir=None,
force=False)
Generate a correlation plot of the measured vs. |
source code
|
|
|
delete(align_id=None)
Delete the RDC data corresponding to the alignment ID. |
source code
|
|
|
display(align_id=None,
bc=False)
Display the RDC data corresponding to the alignment ID. |
source code
|
|
|
|
|
read(align_id=None,
file=None,
dir=None,
file_data=None,
data_type=' D ' ,
spin_id1_col=None,
spin_id2_col=None,
data_col=None,
error_col=None,
sep=None,
neg_g_corr=False,
absolute=False)
Read the RDC data from file. |
source code
|
|
|
weight(align_id=None,
spin_id=None,
weight=1.0)
Set optimisation weights on the RDC data. |
source code
|
|
|
write(align_id=None,
file=None,
dir=None,
bc=False,
force=False)
Display the RDC data corresponding to the alignment ID. |
source code
|
|
|
__package__ = ' generic_fns '
|
Imports:
deepcopy,
pi,
sqrt,
float64,
ones,
zeros,
norm,
sys,
warn,
is_float,
nan,
grace,
pipes,
get_tensor_index,
create_interatom,
interatomic_loop,
return_interatom,
exists_mol_res_spin_data,
generate_spin_id,
return_spin,
spin_loop,
ave_rdc_tensor,
dipolar_constant,
return_gyromagnetic_ratio,
RelaxError,
RelaxNoRDCError,
RelaxNoSequenceError,
RelaxSpinTypeError,
extract_data,
open_write_file,
strip,
write_data,
RelaxWarning
Back calculate the RDC from the alignment tensor and unit bond
vectors.
- Parameters:
align_id (str) - The alignment tensor ID string.
|
Convert the RDC based on the 'D' or '2D' data type.
- Parameters:
value (float or None) - The value or error to convert.
align_id (str) - The alignment tensor ID string.
to_intern (bool) - A flag which if True will convert to the internal D notation if
needed, or if False will convert from the internal D notation to
the external D or 2D format.
- Returns: float or None
- The converted value.
|
corr_plot(format=None,
file=None,
dir=None,
force=False)
| source code
|
Generate a correlation plot of the measured vs. back-calculated
RDCs.
- Parameters:
format (str or None) - The format for the plot file. The following values are accepted:
'grace', a Grace plot; None, a plain text file.
file (str or file object) - The file name or object to write to.
dir (str) - The name of the directory to place the file into (defaults to the
current directory).
force (bool) - A flag which if True will cause any pre-existing file to be
overwritten.
|
Delete the RDC data corresponding to the alignment ID.
- Parameters:
align_id (str or None) - The alignment tensor ID string. If not specified, all data will
be deleted.
|
Display the RDC data corresponding to the alignment ID.
- Parameters:
align_id (str) - The alignment tensor ID string.
bc (bool) - The back-calculation flag which if True will cause the
back-calculated rather than measured data to be displayed.
|
Calculate the Q-factors for the RDC data.
- Parameters:
spin_id (None or str) - The spin ID string used to restrict the Q-factor calculation to a
subset of all spins.
|
read(align_id=None,
file=None,
dir=None,
file_data=None,
data_type=' D ' ,
spin_id1_col=None,
spin_id2_col=None,
data_col=None,
error_col=None,
sep=None,
neg_g_corr=False,
absolute=False)
| source code
|
Read the RDC data from file.
- Parameters:
align_id (str) - The alignment tensor ID string.
file (str) - The name of the file to open.
dir (str or None) - The directory containing the file (defaults to the current
directory if None).
file_data (list of lists) - An alternative to opening a file, if the data already exists in
the correct format. The format is a list of lists where the
first index corresponds to the row and the second the column.
data_type - A string which is set to 'D' means that the splitting in the
aligned sample was assumed to be J + D, or if set to '2D' then
the splitting was taken as J + 2D.
spin_id1_col (int) - The column containing the spin ID strings of the first spin.
spin_id2_col (int) - The column containing the spin ID strings of the second spin.
data_col (int or None) - The column containing the RDC data in Hz.
error_col (int or None) - The column containing the RDC errors.
sep (str or None) - The column separator which, if None, defaults to whitespace.
neg_g_corr (bool) - A flag which is used to correct for the negative gyromagnetic
ratio of 15N. If True, a sign inversion will be applied to all
RDC values to be loaded.
absolute (bool) - A flag which if True indicates that the RDCs to load are
signless. All RDCs will then be converted to positive values.
|
weight(align_id=None,
spin_id=None,
weight=1.0)
| source code
|
Set optimisation weights on the RDC data.
- Parameters:
align_id (str) - The alignment tensor ID string.
spin_id (None or str) - The spin ID string.
weight (float or int.) - The optimisation weight. The higher the value, the more
importance the RDC will have.
|
write(align_id=None,
file=None,
dir=None,
bc=False,
force=False)
| source code
|
Display the RDC data corresponding to the alignment ID.
- Parameters:
align_id (str) - The alignment tensor ID string.
file (str or file object) - The file name or object to write to.
dir (str) - The name of the directory to place the file into (defaults to the
current directory).
bc (bool) - The back-calculation flag which if True will cause the
back-calculated rather than measured data to be written.
force (bool) - A flag which if True will cause any pre-existing file to be
overwritten.
|