Subsections


grace.write

Image grace_icon Image document-save

Synopsis

Create a grace `.agr' file to visualise the 2D data.

Defaults

grace.write(x_data_type=`res_num', y_data_type=None, spin_id=None, plot_data=`value', norm_type=`first', file=None, dir=`grace', force=False, norm=False)

Keyword arguments

x_data_type: The data type for the X-axis (no regular expression is allowed).

y_data_type: The data type for the Y-axis (no regular expression is allowed).

spin_id: The spin ID string.

plot_data: The data to use for the plot.

norm_type: How the graph should be normalised, if the norm flag is set.

file: The name of the file.

dir: The directory name.

force: A flag which, if set to True, will cause the file to be overwritten.

norm: A flag which, if set to True, will cause all graphs to be normalised to 1. This is for the normalisation of series type data. The point for normalisation is set with the norm_type argument.

Description

This is designed to be as flexible as possible so that any combination of data can be plotted. The output is in the format of a Grace plot (also known as ACE/gr, Xmgr, and xmgrace) which only supports two dimensional plots. Three types of information can be used to create various types of plot. These include the x-axis and y-axis data types, the spin ID string, and the type of data plot.

The x-axis and y-axis data types should be plain strings, regular expression is not allowed. The two axes of the Grace plot can be any of the data types listed in the tables below. The only limitation is that the data must belong to the same data pipe.

If the x-axis data type is not given, the plot will default to having the residue numbering along the x-axis.Two special data types for the axes are:

`res_num' -
The axis will consist of the residue numbering.
`spin_num' -
The axis will consist of the spin numbering.

The spin ID string can be used to limit which spins are used in the plot. The default is that all spins will be used, however, the ID string can be used to select a subset of all spins, or a single spin for plots of Monte Carlo simulations, etc.

The property which is actually plotted can be controlled by the plot data setting. This can be one of the following:

`value' -
Plot values (with errors if they exist).
`error' -
Plot errors.
`sims' -
Plot the simulation values.

Normalisation is only allowed for series type data, for example the R2 exponential curves, and will be ignored for all other data types. If the norm flag is set to True then the y-value of the first point of the series will be set to 1. This normalisation is useful for highlighting errors in the data sets.

Relaxation curve fitting parameters

Please see Table 17.8 on page [*].


Table 17.8: Relaxation curve fitting parameters and minimisation statistics.
Name Description
rx Either the R1 or R2 relaxation rate
i0 The initial intensity
iinf The intensity at infinity
chi2 Chi-squared value
iter Optimisation iterations
f_count Number of function calls
g_count Number of gradient calls
h_count Number of Hessian calls
warning Optimisation warning

Steady-state NOE parameters

Please see Table 17.9 on page [*].


Table 17.9: Steady-state NOE parameters.
Name Description
noe The steady-state NOE value

Model-free parameters

Please see Table 17.10 on page [*].


Table 17.10: Model-free parameters and minimisation statistics.
Name Description
s2 S2, the model-free generalised order parameter (S2 = S2f.S2s)
s2f S2f, the faster motion model-free generalised order parameter
s2s S2s, the slower motion model-free generalised order parameter
local_tm The spin specific global correlation time (seconds)
te Single motion effective internal correlation time (seconds)
tf Faster motion effective internal correlation time (seconds)
ts Slower motion effective internal correlation time (seconds)
rex Chemical exchange relaxation (sigma_ex = Rex / omega**2)
csa Chemical shift anisotropy (unitless)

Reduced spectral density mapping parameters

Please see Table 17.11 on page [*].


Table 17.11: Reduced spectral density mapping parameters.
Name Description
j0 Spectral density value at 0 MHz - J(0)
jwx Spectral density value at the frequency of the heteronucleus - J(ωX)
jwh Spectral density value at the frequency of the proton - J(ωH)
csa Chemical shift anisotropy (unitless)

Consistency testing parameters

Please see Table 17.12 on page [*].


Table 17.12: Consistency testing parameters.
Name Description
j0 Spectral density value at 0 MHz (from Farrow et al. (1995) JBNMR, 6: 153-162)
f_eta Eta-test (from Fushman et al. (1998) JACS, 120: 10947-10952)
f_r2 R2-test (from Fushman et al. (1998) JACS, 120: 10947-10952)
csa Chemical shift anisotropy (unitless)
orientation Angle between the 15N-1H vector and the principal axis of the 15N chemical shift tensor
tc The single global correlation time estimate/approximation

Relaxation dispersion parameters

Please see Table 17.13 on page [*].


Table 17.13: Relaxation dispersion parameters and minimisation statistics.
Name Description
r2eff The effective transversal relaxation rate
i0 The initial intensity
r1 The longitudinal relaxation rate
r2 The transversal relaxation rate
r2a The transversal relaxation rate for state A in the absence of exchange
r2b The transversal relaxation rate for state B in the absence of exchange
pA The population for state A
pB The population for state B
pC The population for state C
phi_ex The φ_ex = pA.pB.dw**2 value (ppmˆ2)
phi_ex_B The fast exchange factor between sites A and B (ppmˆ2)
phi_ex_C The fast exchange factor between sites A and C (ppmˆ2)
padw2 The pA.dw**2 value (ppmˆ2)
dw The chemical shift difference between states A and B (in ppm)
dw_AB The chemical shift difference between states A and B for 3-site exchange (in ppm)
dw_AC The chemical shift difference between states A and C for 3-site exchange (in ppm)
dw_BC The chemical shift difference between states B and C for 3-site exchange (in ppm)
dwH The proton chemical shift difference between states A and B (in ppm)
dwH_AB The proton chemical shift difference between states A and B for 3-site exchange (in ppm)
dwH_AC The proton chemical shift difference between states A and C for 3-site exchange (in ppm)
dwH_BC The proton chemical shift difference between states B and C for 3-site exchange (in ppm)
kex The exchange rate
kex_AB The exchange rate between sites A and B for 3-site exchange with kex_AB = k_AB + k_BA (rad.sˆ-1)
kex_AC The exchange rate between sites A and C for 3-site exchange with kex_AC = k_AC + k_CA (rad.sˆ-1)
kex_BC The exchange rate between sites B and C for 3-site exchange with kex_BC = k_BC + k_CB (rad.sˆ-1)
kB Approximate chemical exchange rate constant between sites A and B (rad.sˆ-1)
kC Approximate chemical exchange rate constant between sites A and C (rad.sˆ-1)
tex The time of exchange (tex = 1/kex)
k_AB The exchange rate from state A to state B
k_BA The exchange rate from state B to state A
chi2 Chi-squared value
iter Optimisation iterations
f_count Number of function calls
g_count Number of gradient calls
h_count Number of Hessian calls
warning Optimisation warning

Prompt examples

To write the NOE values for all spins to the Grace file `noe.agr', type one of:

[numbers=none]
relax> grace.write('res_num', 'noe', file='noe.agr')

[numbers=none]
relax> grace.write(y_data_type='noe', file='noe.agr')

[numbers=none]
relax> grace.write(x_data_type='res_num', y_data_type='noe', file='noe.agr')

[numbers=none]
relax> grace.write(y_data_type='noe', file='noe.agr', force=True)

To create a Grace file of `s2' vs. `te' for all spins, type one of:

[numbers=none]
relax> grace.write('s2', 'te', file='s2_te.agr')

[numbers=none]
relax> grace.write(x_data_type='s2', y_data_type='te', file='s2_te.agr')

[numbers=none]
relax> grace.write(x_data_type='s2', y_data_type='te', file='s2_te.agr', force=True)

To create a Grace file of the Monte Carlo simulation values of `rex' vs. `te' for residue 123, type one of:

[numbers=none]
relax> grace.write('rex', 'te', spin_id=':123', plot_data='sims', file='s2_te.agr')

[numbers=none]
relax> grace.write(x_data_type='rex', y_data_type='te', spin_id=':123', plot_data='sims', file='s2_te.agr')

By plotting the peak intensities, the integrity of exponential relaxation curves can be checked and anomalies searched for prior to model-free analysis or reduced spectral density mapping. For example the normalised average peak intensities can be plotted verses the relaxation time periods for the relaxation curves of all residues of a protein. The normalisation, whereby the initial peak intensity of each residue I(0) is set to 1, emphasises any problems. To produce this Grace file, type:

[numbers=none]
relax> grace.write(x_data_type='relax_times', y_data_type='ave_int', file='intensities_norm.agr', force=True, norm=True)


The relax user manual (PDF), created 2016-10-28.