Example #1
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__ method.
        Param_list.__init__(self)

        # Add the base data.
        self._add_peak_intensity()

        # Add the signal to noise ratio.
        self._add_sn_ratio()

        # Add the single model parameter.
        self._add(
            'noe',
            scope = 'spin',
            desc = 'The steady-state NOE value',
            py_type = float,
            set = 'params',
            grace_string = '\\qNOE\\Q',
            err = True,
            sim = True
        )

        # Set up the user function documentation.
        self._set_uf_title("Steady-state NOE parameters")
        self._uf_param_table(label="table: NOE parameters", caption="Steady-state NOE parameters.")
Example #2
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__ method.
        Param_list.__init__(self)

        # Add the base data.
        self._add_peak_intensity()

        # Add the signal to noise ratio.
        self._add_sn_ratio()

        # Add the single model parameter.
        self._add(
            'noe',
            scope = 'spin',
            desc = 'The steady-state NOE value',
            py_type = float,
            set = 'params',
            grace_string = '\\qNOE\\Q',
            err = True,
            sim = True
        )

        # Set up the user function documentation.
        self._set_uf_title("Steady-state NOE parameters")
        self._uf_param_table(label="table: NOE parameters", caption="Steady-state NOE parameters.")
Example #3
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__ method.
        Param_list.__init__(self)

        # Add the base information for the analysis.
        self._add_csa(default=N15_CSA)

        # Add the model parameters.
        self._add(
            'j0',
            scope = 'spin',
            string = 'J(0)',
            desc = 'Spectral density value at 0 MHz - J(0)',
            py_type = float,
            set = 'params',
            grace_string = '\\qJ(0)\\Q',
            err = True,
            sim = True
        )
        self._add(
            'jwx',
            scope = 'spin',
            string = 'J(wX)',
            desc = 'Spectral density value at the frequency of the heteronucleus - J(wX)',
            py_type = float,
            set = 'params',
            grace_string = '\\qJ(\\xw\\f{}\\sX\\N)\\Q',
            err = True,
            sim = True
        )
        self._add(
            'jwh',
            scope = 'spin',
            string = 'J(wH)',
            desc = 'Spectral density value at the frequency of the proton - J(wH)',
            py_type = float,
            set = 'params',
            grace_string = '\\qJ(\\xw\\f{}\\sH\\N)\\Q',
            err = True,
            sim = True
        )

        # Set up the user function documentation.
        self._set_uf_title("Reduced spectral density mapping parameters")
        self._uf_param_table(label="table: J(w) parameters", caption="Reduced spectral density mapping parameters.")
        self._uf_param_table(label="table: J(w) parameter value setting", caption="Reduced spectral density mapping parameters.")
        self._uf_param_table(label="table: J(w) parameter value setting with defaults", caption="Reduced spectral density mapping parameter value setting.", default=True)

        # Value setting documentation.
        for doc in self._uf_doc_loop(["table: J(w) parameter value setting", "table: J(w) parameter value setting with defaults"]):
            doc.add_paragraph("In reduced spectral density mapping, the CSA value must be set prior to the calculation of spectral density values.")
Example #4
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__ method.
        Param_list.__init__(self)

        # Add the base information for the analysis.
        self._add_csa(default=N15_CSA)
        self._add(
            'orientation',
            scope='spin',
            default=15.7,
            units='degrees',
            desc=
            "Angle between the 15N-1H vector and the principal axis of the 15N chemical shift tensor",
            py_type=float,
            set='fixed',
            grace_string='\\q\\xq\\Q')
        self._add(
            'tc',
            scope='spin',
            default=13 * 1e-9,
            units='ns',
            desc="The single global correlation time estimate/approximation",
            py_type=float,
            set='fixed',
            grace_string='\\q\\xt\\f{}c\\Q')

        # Add the model parameters.
        self._add(
            'j0',
            scope='spin',
            desc=
            'Spectral density value at 0 MHz (from Farrow et al. (1995) JBNMR, 6: 153-162)',
            py_type=float,
            set='params',
            grace_string='\\qJ(0)\\Q',
            err=True,
            sim=True)
        self._add(
            'f_eta',
            scope='spin',
            desc='Eta-test (from Fushman et al. (1998) JACS, 120: 10947-10952)',
            py_type=float,
            set='params',
            grace_string='\\qF\\s\\xh\\Q',
            err=True,
            sim=True)
        self._add(
            'f_r2',
            scope='spin',
            desc='R2-test (from Fushman et al. (1998) JACS, 120: 10947-10952)',
            py_type=float,
            set='params',
            grace_string='\\qF\\sR2\\Q',
            err=True,
            sim=True)

        # Set up the user function documentation.
        self._set_uf_title("Consistency testing parameters")
        self._uf_param_table(label="table: consistency testing parameters",
                             caption="Consistency testing parameters.")
        self._uf_param_table(
            label="table: consistency testing parameter value setting",
            caption="Consistency testing parameters.")
        self._uf_param_table(
            label=
            "table: consistency testing parameter value setting with defaults",
            caption="Consistency testing parameter value setting.",
            default=True)

        # Value setting documentation.
        for doc in self._uf_doc_loop([
                "table: consistency testing parameter value setting",
                "table: consistency testing parameter value setting with defaults"
        ]):
            doc.add_paragraph(
                "In consistency testing, the CSA value, angle Theta ('orientation') and global correlation time must be set prior to the calculation of consistency functions."
            )
Example #5
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__ method.
        Param_list.__init__(self)

        # Add the base data for the 'R2eff' model.
        self._add_peak_intensity()

        # Add the signal to noise ratio.
        self._add_sn_ratio()

        # Add the base information for the dispersion analysis.
        self._add('relax_times',
                  scope='spin',
                  py_type=dict,
                  grace_string='\\qRelaxation time period (s)\\Q')
        self._add('cpmg_frqs',
                  scope='spin',
                  py_type=dict,
                  grace_string='\\qCPMG pulse train frequency (Hz)\\Q')
        self._add('spin_lock_nu1',
                  scope='spin',
                  py_type=dict,
                  grace_string='\\qSpin-lock field strength (Hz)\\Q')

        # Add the model variables.
        self._add_model_info()

        # Add the parameters of the 'R2eff' model.
        self._add('r2eff',
                  scope='spin',
                  default=10.0,
                  desc='The effective transversal relaxation rate',
                  py_type=dict,
                  set='params',
                  grid_lower=1.0,
                  grid_upper=40.0,
                  grace_string='\\qR\\s2,eff\\N\\Q (rad.s\\S-1\\N)',
                  err=True,
                  sim=True)
        self._add('i0',
                  scope='spin',
                  default=10000.0,
                  desc='The initial intensity',
                  py_type=dict,
                  set='params',
                  grid_lower=0.0001,
                  grid_upper=i0_upper,
                  grace_string='\\qI\\s0\\Q',
                  err=True,
                  sim=True)

        # Add the parameters of all dispersion models.
        self._add('r1',
                  scope='spin',
                  default=2.0,
                  desc='The longitudinal relaxation rate',
                  py_type=dict,
                  set='params',
                  scaling=10,
                  grid_lower=0.1,
                  grid_upper=20.0,
                  grace_string='\\qR\\s1\\N\\Q (rad.s\\S-1\\N)',
                  err=True,
                  sim=True)
        self._add('r2',
                  scope='spin',
                  default=10.0,
                  desc='The transversal relaxation rate',
                  py_type=dict,
                  set='params',
                  scaling=10,
                  grid_lower=5.0,
                  grid_upper=20.0,
                  grace_string='\\qR\\s2\\N\\Q (rad.s\\S-1\\N)',
                  err=True,
                  sim=True)
        self._add(
            'r2a',
            scope='spin',
            default=10.0,
            desc=
            'The transversal relaxation rate for state A in the absence of exchange',
            py_type=dict,
            set='params',
            scaling=10,
            grid_lower=5.0,
            grid_upper=20.0,
            grace_string='\\qR\\s2,A\\N\\Q (rad.s\\S-1\\N)',
            err=True,
            sim=True)
        self._add(
            'r2b',
            scope='spin',
            default=10.0,
            desc=
            'The transversal relaxation rate for state B in the absence of exchange',
            py_type=dict,
            set='params',
            scaling=10,
            grid_lower=5.0,
            grid_upper=20.0,
            grace_string='\\qR\\s2,B\\N\\Q (rad.s\\S-1\\N)',
            err=True,
            sim=True)
        self._add('pA',
                  scope='spin',
                  default=0.90,
                  desc='The population for state A',
                  py_type=float,
                  set='params',
                  grid_lower=pA_lower,
                  grid_upper=1.0,
                  grace_string='\\qp\\sA\\N\\Q',
                  err=True,
                  sim=True)
        self._add('pB',
                  scope='spin',
                  default=0.5,
                  desc='The population for state B',
                  py_type=float,
                  set='params',
                  grid_lower=0.0,
                  grid_upper=0.5,
                  grace_string='\\qp\\sB\\N\\Q',
                  err=True,
                  sim=True)
        self._add('pC',
                  scope='spin',
                  default=0.5,
                  desc='The population for state C',
                  py_type=float,
                  set='params',
                  grace_string='\\qp\\sC\\N\\Q',
                  err=True,
                  sim=True)
        self._add(
            'phi_ex',
            scope='spin',
            default=5.0,
            desc='The phi_ex = pA.pB.dw**2 value (ppm^2)',
            py_type=float,
            set='params',
            grid_lower=0.0,
            grid_upper=10.0,
            grace_string=
            '\\xF\\B\\sex\\N = \\q p\\sA\\N.p\\sB\\N.\\xDw\\B\\S2\\N\\Q  (ppm\\S2\\N)',
            err=True,
            sim=True)
        self._add(
            'phi_ex_B',
            scope='spin',
            default=5.0,
            desc='The fast exchange factor between sites A and B (ppm^2)',
            py_type=float,
            set='params',
            grid_lower=0.0,
            grid_upper=10.0,
            grace_string='\\xF\\B\\sex,B\\N (ppm\\S2\\N)',
            err=True,
            sim=True)
        self._add(
            'phi_ex_C',
            scope='spin',
            default=5.0,
            desc='The fast exchange factor between sites A and C (ppm^2)',
            py_type=float,
            set='params',
            grid_lower=0.0,
            grid_upper=10.0,
            grace_string='\\xF\\B\\sex,C\\N (ppm\\S2\\N)',
            err=True,
            sim=True)
        self._add('padw2',
                  scope='spin',
                  default=1.0,
                  desc='The pA.dw**2 value (ppm^2)',
                  py_type=float,
                  set='params',
                  grid_lower=0.0,
                  grid_upper=10.0,
                  grace_string='\\qp\\sA\\N.\\xDw\\B\\S2\\N\\Q  (ppm\\S2\\N)',
                  err=True,
                  sim=True)
        self._add(
            'dw',
            scope='spin',
            default=1.0,
            desc=
            'The chemical shift difference between states A and B (in ppm)',
            py_type=float,
            set='params',
            grid_lower=dw_lower,
            grid_upper=10.0,
            grace_string='\\q\\xDw\\B\\Q (ppm)',
            err=True,
            sim=True)
        self._add(
            'dw_AB',
            scope='spin',
            default=1.0,
            desc=
            'The chemical shift difference between states A and B for 3-site exchange (in ppm)',
            py_type=float,
            set='params',
            grid_lower=dw_lower,
            grid_upper=10.0,
            grace_string='\\q\\xDw\\B\\Q\\SAB\\N (ppm)',
            err=True,
            sim=True)
        self._add(
            'dw_AC',
            scope='spin',
            default=1.0,
            desc=
            'The chemical shift difference between states A and C for 3-site exchange (in ppm)',
            py_type=float,
            set='params',
            grid_lower=dw_lower,
            grid_upper=10.0,
            grace_string='\\q\\xDw\\B\\Q\\SAC\\N (ppm)',
            err=True,
            sim=True)
        self._add(
            'dw_BC',
            scope='spin',
            default=1.0,
            desc=
            'The chemical shift difference between states B and C for 3-site exchange (in ppm)',
            py_type=float,
            set='params',
            grid_lower=dw_lower,
            grid_upper=10.0,
            grace_string='\\q\\xDw\\B\\Q\\SBC\\N (ppm)',
            err=True,
            sim=True)
        self._add(
            'dwH',
            scope='spin',
            default=1.0,
            desc=
            'The proton chemical shift difference between states A and B (in ppm)',
            py_type=float,
            set='params',
            grid_lower=dwH_lower,
            grid_upper=3.0,
            grace_string='\\q\\xDw\\B\\sH\\N\\Q (ppm)',
            err=True,
            sim=True)
        self._add(
            'dwH_AB',
            scope='spin',
            default=1.0,
            desc=
            'The proton chemical shift difference between states A and B for 3-site exchange (in ppm)',
            py_type=float,
            set='params',
            grid_lower=dwH_lower,
            grid_upper=3.0,
            grace_string='\\q\\xDw\\B\\sH\\N\\Q\\SAB\\N (ppm)',
            err=True,
            sim=True)
        self._add(
            'dwH_AC',
            scope='spin',
            default=1.0,
            desc=
            'The proton chemical shift difference between states A and C for 3-site exchange (in ppm)',
            py_type=float,
            set='params',
            grid_lower=dwH_lower,
            grid_upper=3.0,
            grace_string='\\q\\xDw\\B\\sH\\N\\Q\\SAC\\N (ppm)',
            err=True,
            sim=True)
        self._add(
            'dwH_BC',
            scope='spin',
            default=1.0,
            desc=
            'The proton chemical shift difference between states B and C for 3-site exchange (in ppm)',
            py_type=float,
            set='params',
            grid_lower=dwH_lower,
            grid_upper=3.0,
            grace_string='\\q\\xDw\\B\\sH\\N\\Q\\SBC\\N (ppm)',
            err=True,
            sim=True)
        self._add('kex',
                  scope='spin',
                  default=1000.0,
                  desc='The exchange rate',
                  py_type=float,
                  set='params',
                  scaling=10000,
                  grid_lower=1.0,
                  grid_upper=10000.0,
                  grace_string='\\qk\\sex\\N\\Q (rad.s\\S-1\\N)',
                  err=True,
                  sim=True)
        self._add(
            'kex_AB',
            scope='spin',
            default=1000.0,
            desc=
            'The exchange rate between sites A and B for 3-site exchange with kex_AB = k_AB + k_BA (rad.s^-1)',
            py_type=float,
            set='params',
            scaling=10000,
            grid_lower=1.0,
            grid_upper=10000.0,
            grace_string='\\qk\\sex\\N\\Q\\SAB\\N (rad.s\\S-1\\N)',
            err=True,
            sim=True)
        self._add(
            'kex_AC',
            scope='spin',
            default=1000.0,
            desc=
            'The exchange rate between sites A and C for 3-site exchange with kex_AC = k_AC + k_CA (rad.s^-1)',
            py_type=float,
            set='params',
            scaling=10000,
            grid_lower=1.0,
            grid_upper=10000.0,
            grace_string='\\qk\\sex\\N\\Q\\SAC\\N (rad.s\\S-1\\N)',
            err=True,
            sim=True)
        self._add(
            'kex_BC',
            scope='spin',
            default=1000.0,
            desc=
            'The exchange rate between sites B and C for 3-site exchange with kex_BC = k_BC + k_CB (rad.s^-1)',
            py_type=float,
            set='params',
            scaling=10000,
            grid_lower=1.0,
            grid_upper=10000.0,
            grace_string='\\qk\\sex\\N\\Q\\SBC\\N (rad.s\\S-1\\N)',
            err=True,
            sim=True)
        self._add(
            'kB',
            scope='spin',
            default=1000.0,
            desc=
            'Approximate chemical exchange rate constant between sites A and B (rad.s^-1)',
            py_type=float,
            set='params',
            scaling=10000,
            grid_lower=1.0,
            grid_upper=10000.0,
            grace_string='\\qk\\sB\\N\\Q (rad.s\\S-1\\N)',
            err=True,
            sim=True)
        self._add(
            'kC',
            scope='spin',
            default=1000.0,
            desc=
            'Approximate chemical exchange rate constant between sites A and C (rad.s^-1)',
            py_type=float,
            set='params',
            scaling=10000,
            grid_lower=1.0,
            grid_upper=10000.0,
            grace_string='\\qk\\sC\\N\\Q (rad.s\\S-1\\N)',
            err=True,
            sim=True)
        self._add('tex',
                  scope='spin',
                  default=1.0 / 1000.0,
                  desc='The time of exchange (tex = 1/kex)',
                  py_type=float,
                  set='params',
                  scaling=1e-4,
                  grid_lower=1 / 10000.0,
                  grid_upper=1.0,
                  grace_string='\\q\\xt\\B\\sex\\N\\Q (s.rad\\S-1\\N)',
                  err=True,
                  sim=True)
        self._add(
            'theta',
            scope='spin',
            desc=
            'Rotating frame tilt angle : ( theta = arctan(w_1 / Omega) ) (rad)',
            grace_string='Rotating frame tilt angle (rad)',
            py_type=dict,
            set='all',
            err=False,
            sim=False)
        self._add(
            'w_eff',
            scope='spin',
            desc=
            'Effective field in rotating frame : ( w_eff = sqrt(Omega^2 + w_1^2) ) (rad.s^-1)',
            grace_string='Effective field in rotating frame (rad.s\\S-1\\N)',
            py_type=dict,
            set='all',
            err=False,
            sim=False)
        self._add('k_AB',
                  scope='spin',
                  default=2.0,
                  desc='The exchange rate from state A to state B',
                  py_type=float,
                  set='params',
                  scaling=20,
                  grid_lower=0.1,
                  grid_upper=20.0,
                  grace_string='\\qk\\sAB\\N\\Q (rad.s\\S-1\\N)',
                  err=True,
                  sim=True)
        self._add('k_BA',
                  scope='spin',
                  default=1000.0,
                  desc='The exchange rate from state B to state A',
                  py_type=float,
                  set='params',
                  scaling=10000,
                  grid_lower=1.0,
                  grid_upper=10000.0,
                  grace_string='\\qk\\sBA\\N\\Q (rad.s\\S-1\\N)',
                  err=True,
                  sim=True)

        # Add the minimisation data.
        self._add_min_data(min_stats_global=False, min_stats_spin=True)

        # Set up the user function documentation.
        self._set_uf_title("Relaxation dispersion parameters")
        self._uf_param_table(label="table: dispersion parameters",
                             caption="Relaxation dispersion parameters.",
                             type=True)
        self._uf_param_table(
            label="table: dispersion parameters and min stats",
            caption=
            "Relaxation dispersion parameters and minimisation statistics.",
            sets=['params', 'fixed', 'min'])
        self._uf_param_table(label="table: dispersion parameter value setting",
                             caption="Relaxation dispersion parameters.",
                             type=True)
        self._uf_param_table(
            label="table: dispersion parameter value setting with defaults",
            caption="Relaxation dispersion parameter value setting.",
            default=True,
            type=True)

        # Value setting documentation.
        for doc in self._uf_doc_loop([
                "table: dispersion parameter value setting",
                "table: dispersion parameter value setting with defaults"
        ]):
            doc.add_paragraph(
                "Any of the relaxation dispersion parameters which are of the 'float' type can be set.  Note that setting values for parameters which are not part of the model will have no effect."
            )
Example #6
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__ method.
        Param_list.__init__(self)

        # Add the base data for the models.
        self._add('ri_data',
                  scope='spin',
                  desc=relax_data.return_data_desc('ri_data'),
                  py_type=dict,
                  err=False,
                  sim=True)
        self._add('ri_data_err',
                  scope='spin',
                  desc=relax_data.return_data_desc('ri_data_err'),
                  py_type=dict,
                  err=False,
                  sim=False)

        # Add the model variables.
        self._add_model_info(equation_flag=True)

        # Add up the global model parameters.
        self._add_diffusion_params()

        # Add up the spin model parameters.
        self._add(
            's2',
            scope='spin',
            default=0.8,
            desc=
            'S2, the model-free generalised order parameter (S2 = S2f.S2s)',
            py_type=float,
            set='params',
            grid_lower=0.0,
            grid_upper=1.0,
            grace_string='\\qS\\v{0.4}\\z{0.71}2\\Q',
            err=True,
            sim=True)
        self._add(
            's2f',
            scope='spin',
            default=0.8,
            desc=
            'S2f, the faster motion model-free generalised order parameter',
            py_type=float,
            set='params',
            grid_lower=0.0,
            grid_upper=1.0,
            grace_string='\\qS\\sf\\N\\h{-0.2}\\v{0.4}\\z{0.71}2\\Q',
            err=True,
            sim=True)
        self._add(
            's2s',
            scope='spin',
            default=0.8,
            desc=
            'S2s, the slower motion model-free generalised order parameter',
            py_type=float,
            set='params',
            grid_lower=0.0,
            grid_upper=1.0,
            grace_string='\\qS\\ss\\N\\h{-0.2}\\v{0.4}\\z{0.71}2\\Q',
            err=True,
            sim=True)
        self._add('local_tm',
                  scope='spin',
                  default=10.0 * 1e-9,
                  desc='The spin specific global correlation time (seconds)',
                  py_type=float,
                  set='params',
                  scaling=1e-12,
                  grid_lower=1.0 * 1e-9,
                  grid_upper=12.0 * 1e-9,
                  grace_string='\\xt\\f{}\\sm',
                  units='ns',
                  err=True,
                  sim=True)
        self._add(
            'te',
            scope='spin',
            default=100.0 * 1e-12,
            desc='Single motion effective internal correlation time (seconds)',
            py_type=float,
            set='params',
            scaling=1e-12,
            grid_lower=0.0,
            grid_upper=500.0 * 1e-12,
            conv_factor=1e-12,
            grace_string='\\xt\\f{}\\se',
            units='ps',
            err=True,
            sim=True)
        self._add(
            'tf',
            scope='spin',
            default=10.0 * 1e-12,
            desc='Faster motion effective internal correlation time (seconds)',
            py_type=float,
            set='params',
            scaling=1e-12,
            grid_lower=0.0,
            grid_upper=500.0 * 1e-12,
            conv_factor=1e-12,
            grace_string='\\xt\\f{}\\sf',
            units='ps',
            err=True,
            sim=True)
        self._add(
            'ts',
            scope='spin',
            default=1000.0 * 1e-12,
            desc='Slower motion effective internal correlation time (seconds)',
            py_type=float,
            set='params',
            scaling=1e-12,
            grid_lower=0.0,
            grid_upper=500.0 * 1e-12,
            conv_factor=1e-12,
            grace_string='\\xt\\f{}\\ss',
            units='ps',
            err=True,
            sim=True)
        self._add(
            'rex',
            scope='spin',
            default=0.0,
            desc='Chemical exchange relaxation (sigma_ex = Rex / omega**2)',
            py_type=float,
            set='params',
            scaling=rex_scaling,
            grid_lower=0.0,
            grid_upper=rex_upper,
            conv_factor=conv_factor_rex,
            units=units_rex,
            grace_string='\\qR\\sex\\Q',
            err=True,
            sim=True)
        # FIXME:  This interatomic parameter should be activated.
        #self._add(
        #    'r',
        #    scope = 'interatomic',
        #    default = 1.02e-10,
        #    desc = 'The XH bond length',
        #    py_type = float,
        #    set = 'params',
        #    scaling = 1e-10,
        #    grid_lower = 1.0 * 1e-10,
        #    grid_upper = 1.05 * 1e-10,
        #    units = 'm',
        #    grace_string = 'Bond length (m)',
        #    err = True,
        #    sim = True
        #)
        self._add_csa(default=N15_CSA, set='params', err=True, sim=True)

        # Add the minimisation data.
        self._add_min_data(min_stats_global=True, min_stats_spin=True)

        # Set up the user function documentation.
        self._set_uf_title("Model-free parameters")
        self._uf_param_table(label="table: model-free parameters",
                             caption="Model-free parameters.")
        self._uf_param_table(label="table: model-free parameter writing",
                             caption="Model-free parameters.")
        self._uf_param_table(
            label="table: model-free parameters and min stats",
            caption="Model-free parameters and minimisation statistics.",
            sets=['params', 'fixed', 'min'])
        self._uf_param_table(label="table: all model-free parameters",
                             caption="Model-free parameters.",
                             scope=None)
        self._uf_param_table(label="table: model-free parameter value setting",
                             caption="Model-free parameters.")
        self._uf_param_table(
            label="table: model-free parameter value setting with defaults",
            caption="Model-free parameter value setting.",
            default=True)

        # Parameter setting documentation.
        for doc in self._uf_doc_loop([
                "table: model-free parameter value setting",
                "table: model-free parameter value setting with defaults"
        ]):
            doc.add_paragraph(
                "Setting a parameter value may have no effect depending on which model-free model is chosen.  For example if S2f values and S2s values are set but the data pipe corresponds to the model-free model 'm4' then because these data values are not parameters of the model they will have no effect."
            )
            doc.add_paragraph(
                "Note that the Rex values are scaled quadratically with field strength and should be supplied as a field strength independent value.  Use the following formula to obtain the correct value:"
            )
            doc.add_verbatim("    value = rex / (2.0 * pi * frequency) ** 2")
            doc.add_paragraph("where:")
            doc.add_list_element(
                "rex is the chemical exchange value for the current frequency."
            )
            doc.add_list_element(
                "frequency is the proton frequency corresponding to the data.")

        # Parameter writing documentation.
        for doc in self._uf_doc_loop(["table: model-free parameter writing"]):
            doc.add_paragraph(
                "For model-free theory it is assumed that Rex values are scaled quadratically with field strength.  The values will be very small as they will be written out as a field strength independent value.  Hence use the following formula to convert the value to that expected for a given magnetic field strength:"
            )
            doc.add_verbatim("    Rex = value * (2.0 * pi * frequency) ** 2")
            doc.add_paragraph("The frequency is that of the proton in Hertz.")
Example #7
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__ method.
        Param_list.__init__(self)

        # Add the model variables.
        self._add_model_info()

        # Add the base data.
        self._add_align_data()

        # Add the parameters of all models.
        self._add(
            'pivot_x',
            scope = 'global',
            units = 'Angstrom',
            desc = 'The pivot point position x coordinate',
            py_type = float,
            set = 'params',
            grid_lower = pivot_x_lower,
            grid_upper = pivot_x_upper,
            err = True,
            sim = True
        )
        self._add(
            'pivot_y',
            scope = 'global',
            units = 'Angstrom',
            desc = 'The pivot point position y coordinate',
            py_type = float,
            set = 'params',
            grid_lower = pivot_y_lower,
            grid_upper = pivot_y_upper,
            err = True,
            sim = True
        )
        self._add(
            'pivot_z',
            scope = 'global',
            units = 'Angstrom',
            desc = 'The pivot point position z coordinate',
            py_type = float,
            set = 'params',
            grid_lower = pivot_z_lower,
            grid_upper = pivot_z_upper,
            err = True,
            sim = True
        )
        self._add(
            'pivot_disp',
            scope = 'global',
            units = 'Angstrom',
            desc = 'The 2nd pivot point displacement - the minimum distance between the two rotor axes',
            py_type = float,
            set = 'params',
            grid_lower  =  10.0,
            grid_upper  =  60.0,
            err = True,
            sim = True
        )
        self._add(
            'ave_pos_x',
            scope = 'global',
            units = 'Angstrom',
            desc = 'The average position x translation',
            py_type = float,
            set = 'params',
            grid_lower = -50,
            grid_upper = 50,
            err = True,
            sim = True
        )
        self._add(
            'ave_pos_y',
            scope = 'global',
            units = 'Angstrom',
            desc = 'The average position y translation',
            py_type = float,
            set = 'params',
            grid_lower = -50,
            grid_upper = 50,
            err = True,
            sim = True
        )
        self._add(
            'ave_pos_z',
            scope = 'global',
            units = 'Angstrom',
            desc = 'The average position z translation',
            py_type = float,
            set = 'params',
            grid_lower = -50,
            grid_upper = 50,
            err = True,
            sim = True
        )
        self._add(
            'ave_pos_alpha',
            scope = 'global',
            units = 'rad',
            desc = 'The average position alpha Euler angle',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = angle_upper_excluding_bound,
            err = True,
            sim = True
        )
        self._add(
            'ave_pos_beta',
            scope = 'global',
            units = 'rad',
            desc = 'The average position beta Euler angle',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = pi,
            err = True,
            sim = True
        )
        self._add(
            'ave_pos_gamma',
            scope = 'global',
            units = 'rad',
            desc = 'The average position gamma Euler angle',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = angle_upper_excluding_bound,
            err = True,
            sim = True
        )
        self._add(
            'eigen_alpha',
            scope = 'global',
            units = 'rad',
            desc = 'The Eigenframe alpha Euler angle',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = angle_upper_excluding_bound,
            err = True,
            sim = True
        )
        self._add(
            'eigen_beta',
            scope = 'global',
            units = 'rad',
            desc = 'The Eigenframe beta Euler angle',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = pi,
            err = True,
            sim = True
        )
        self._add(
            'eigen_gamma',
            scope = 'global',
            units = 'rad',
            desc = 'The Eigenframe gamma Euler angle',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = angle_upper_excluding_bound,
            err = True,
            sim = True
        )
        self._add(
            'axis_theta',
            scope = 'global',
            units = 'rad',
            desc = 'The cone axis polar angle (for the isotropic cone model)',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = pi,
            err = True,
            sim = True
        )
        self._add(
            'axis_phi',
            scope = 'global',
            units = 'rad',
            desc = 'The cone axis azimuthal angle (for the isotropic cone model)',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = angle_upper_excluding_bound,
            err = True,
            sim = True
        )
        self._add(
            'axis_alpha',
            scope = 'global',
            units = 'rad',
            desc = 'The rotor axis alpha angle (the rotation angle out of the xy plane)',
            py_type = float,
            set = 'params',
            grid_lower = -pi,
            grid_upper = axis_alpha_upper,
            err = True,
            sim = True
        )
        self._add(
            'cone_theta_x',
            scope = 'global',
            units = 'rad',
            desc = 'The pseudo-ellipse cone opening half-angle for the x-axis',
            py_type = float,
            set = 'params',
            grid_lower = cone_angle_lower,
            grid_upper = cone_angle_upper,
            err = True,
            sim = True
        )
        self._add(
            'cone_theta_y',
            scope = 'global',
            units = 'rad',
            desc = 'The pseudo-ellipse cone opening half-angle for the y-axis',
            py_type = float,
            set = 'params',
            grid_lower = cone_angle_lower,
            grid_upper = cone_angle_upper,
            err = True,
            sim = True
        )
        self._add(
            'cone_theta',
            scope = 'global',
            units = 'rad',
            desc = 'The isotropic cone opening half-angle',
            py_type = float,
            set = 'params',
            grid_lower = cone_angle_lower,
            grid_upper = cone_angle_upper,
            err = True,
            sim = True
        )
        self._add(
            'cone_sigma_max',
            scope = 'global',
            units = 'rad',
            desc = 'The torsion angle',
            py_type = float,
            set = 'params',
            grid_lower = cone_angle_lower,
            grid_upper = cone_angle_upper,
            err = True,
            sim = True
        )
        self._add(
            'cone_sigma_max_2',
            scope = 'global',
            units = 'rad',
            desc = 'The torsion angle of the 2nd motional mode',
            py_type = float,
            set = 'params',
            grid_lower = cone_angle_lower,
            grid_upper = cone_angle_upper,
            err = True,
            sim = True
        )

        # Add minimisation structures.
        self._add_min_data(min_stats_global=True)

        # Set up the user function documentation.
        self._set_uf_title("Frame order parameters")
        self._uf_param_table(label="table: frame order parameters", caption="Frame order parameters.", scope='global')
        self._uf_param_table(label="table: frame order parameter value setting with defaults", caption="Frame order parameter value setting.", scope='global', default=True)
Example #8
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__() method.
        Param_list.__init__(self)

        # Add the base data.
        self._add_align_data()
        self._add_align_tensor()

        # Add up the model parameters.
        self._add(
            'probs',
            scope = 'global',
            default = 0.0,
            desc = 'The probabilities of each state',
            py_type = list,
            set = 'params',
            scaling = 0.1,
            grid_lower = 0.0,
            grid_upper = 1.0,
            err = True,
            sim = True
        )
        self._add(
            'alpha',
            scope = 'global',
            units = 'rad',
            default = 0.0,
            desc = 'The alpha Euler angles (for the rotation of each state)',
            py_type = list,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = 2*pi,
            err = True,
            sim = True
        )
        self._add(
            'beta',
            scope = 'global',
            units = 'rad',
            default = 0.0,
            desc = 'The beta Euler angles (for the rotation of each state)',
            py_type = list,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = 2*pi,
            err = True,
            sim = True
        )
        self._add(
            'gamma',
            scope = 'global',
            units = 'rad',
            default = 0.0,
            desc = 'The gamma Euler angles (for the rotation of each state)',
            py_type = list,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = 2*pi,
            err = True,
            sim = True
        )
        self._add(
            'paramagnetic_centre',
            scope = 'global',
            units = 'Angstrom',
            desc = 'The paramagnetic centre',
            py_type = list,
            set = 'params',
            scaling = 1e2,
            grid_lower = -100.0,
            grid_upper = 100,
            err = True,
            sim = True
        )

        # Add the minimisation data.
        self._add_min_data(min_stats_global=False, min_stats_spin=True)

        # Set up the user function documentation.
        self._set_uf_title("N-state model parameters")
        self._uf_param_table(label="table: N-state parameters", caption="N-state model parameters.", scope='global', type=True)
        self._uf_param_table(label="table: N-state parameter value setting", caption="N-state model parameters.", scope='global', type=True)
        self._uf_param_table(label="table: N-state parameter value setting with defaults", caption="N-state model parameter value setting.", scope='global', default=True, type=True)

        # Value setting documentation.
        for doc in self._uf_doc_loop(["table: N-state parameter value setting", "table: N-state parameter value setting with defaults"]):
            doc.add_paragraph("Setting parameters for the N-state model is a little different from the other type of analyses as each state has a set of parameters with the same names as the other states.  To set the parameters for a specific state c (ranging from 0 for the first to N-1 for the last, the number c should be given as the index argument.  So the Euler angle gamma of the third state is specified using the parameter name 'gamma' and index of 2.")
Example #9
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__ method.
        Param_list.__init__(self)

        # Add the model variables.
        self._add_model_info()

        # Add the base data.
        self._add_align_data()

        # Add the parameters of all models.
        self._add('pivot_x',
                  scope='global',
                  units='Angstrom',
                  desc='The pivot point position x coordinate',
                  py_type=float,
                  set='params',
                  grid_lower=pivot_x_lower,
                  grid_upper=pivot_x_upper,
                  err=True,
                  sim=True)
        self._add('pivot_y',
                  scope='global',
                  units='Angstrom',
                  desc='The pivot point position y coordinate',
                  py_type=float,
                  set='params',
                  grid_lower=pivot_y_lower,
                  grid_upper=pivot_y_upper,
                  err=True,
                  sim=True)
        self._add('pivot_z',
                  scope='global',
                  units='Angstrom',
                  desc='The pivot point position z coordinate',
                  py_type=float,
                  set='params',
                  grid_lower=pivot_z_lower,
                  grid_upper=pivot_z_upper,
                  err=True,
                  sim=True)
        self._add(
            'pivot_disp',
            scope='global',
            units='Angstrom',
            desc=
            'The 2nd pivot point displacement - the minimum distance between the two rotor axes',
            py_type=float,
            set='params',
            grid_lower=10.0,
            grid_upper=60.0,
            err=True,
            sim=True)
        self._add('ave_pos_x',
                  scope='global',
                  units='Angstrom',
                  desc='The average position x translation',
                  py_type=float,
                  set='params',
                  grid_lower=-50,
                  grid_upper=50,
                  err=True,
                  sim=True)
        self._add('ave_pos_y',
                  scope='global',
                  units='Angstrom',
                  desc='The average position y translation',
                  py_type=float,
                  set='params',
                  grid_lower=-50,
                  grid_upper=50,
                  err=True,
                  sim=True)
        self._add('ave_pos_z',
                  scope='global',
                  units='Angstrom',
                  desc='The average position z translation',
                  py_type=float,
                  set='params',
                  grid_lower=-50,
                  grid_upper=50,
                  err=True,
                  sim=True)
        self._add('ave_pos_alpha',
                  scope='global',
                  units='rad',
                  desc='The average position alpha Euler angle',
                  py_type=float,
                  set='params',
                  grid_lower=0.0,
                  grid_upper=angle_upper_excluding_bound,
                  err=True,
                  sim=True)
        self._add('ave_pos_beta',
                  scope='global',
                  units='rad',
                  desc='The average position beta Euler angle',
                  py_type=float,
                  set='params',
                  grid_lower=0.0,
                  grid_upper=pi,
                  err=True,
                  sim=True)
        self._add('ave_pos_gamma',
                  scope='global',
                  units='rad',
                  desc='The average position gamma Euler angle',
                  py_type=float,
                  set='params',
                  grid_lower=0.0,
                  grid_upper=angle_upper_excluding_bound,
                  err=True,
                  sim=True)
        self._add('eigen_alpha',
                  scope='global',
                  units='rad',
                  desc='The Eigenframe alpha Euler angle',
                  py_type=float,
                  set='params',
                  grid_lower=0.0,
                  grid_upper=angle_upper_excluding_bound,
                  err=True,
                  sim=True)
        self._add('eigen_beta',
                  scope='global',
                  units='rad',
                  desc='The Eigenframe beta Euler angle',
                  py_type=float,
                  set='params',
                  grid_lower=0.0,
                  grid_upper=pi,
                  err=True,
                  sim=True)
        self._add('eigen_gamma',
                  scope='global',
                  units='rad',
                  desc='The Eigenframe gamma Euler angle',
                  py_type=float,
                  set='params',
                  grid_lower=0.0,
                  grid_upper=angle_upper_excluding_bound,
                  err=True,
                  sim=True)
        self._add(
            'axis_theta',
            scope='global',
            units='rad',
            desc='The cone axis polar angle (for the isotropic cone model)',
            py_type=float,
            set='params',
            grid_lower=0.0,
            grid_upper=pi,
            err=True,
            sim=True)
        self._add(
            'axis_phi',
            scope='global',
            units='rad',
            desc='The cone axis azimuthal angle (for the isotropic cone model)',
            py_type=float,
            set='params',
            grid_lower=0.0,
            grid_upper=angle_upper_excluding_bound,
            err=True,
            sim=True)
        self._add(
            'axis_alpha',
            scope='global',
            units='rad',
            desc=
            'The rotor axis alpha angle (the rotation angle out of the xy plane)',
            py_type=float,
            set='params',
            grid_lower=-pi,
            grid_upper=axis_alpha_upper,
            err=True,
            sim=True)
        self._add(
            'cone_theta_x',
            scope='global',
            units='rad',
            desc='The pseudo-ellipse cone opening half-angle for the x-axis',
            py_type=float,
            set='params',
            grid_lower=cone_angle_lower,
            grid_upper=cone_angle_upper,
            err=True,
            sim=True)
        self._add(
            'cone_theta_y',
            scope='global',
            units='rad',
            desc='The pseudo-ellipse cone opening half-angle for the y-axis',
            py_type=float,
            set='params',
            grid_lower=cone_angle_lower,
            grid_upper=cone_angle_upper,
            err=True,
            sim=True)
        self._add('cone_theta',
                  scope='global',
                  units='rad',
                  desc='The isotropic cone opening half-angle',
                  py_type=float,
                  set='params',
                  grid_lower=cone_angle_lower,
                  grid_upper=cone_angle_upper,
                  err=True,
                  sim=True)
        self._add('cone_sigma_max',
                  scope='global',
                  units='rad',
                  desc='The torsion angle',
                  py_type=float,
                  set='params',
                  grid_lower=cone_angle_lower,
                  grid_upper=cone_angle_upper,
                  err=True,
                  sim=True)
        self._add('cone_sigma_max_2',
                  scope='global',
                  units='rad',
                  desc='The torsion angle of the 2nd motional mode',
                  py_type=float,
                  set='params',
                  grid_lower=cone_angle_lower,
                  grid_upper=cone_angle_upper,
                  err=True,
                  sim=True)

        # Add minimisation structures.
        self._add_min_data(min_stats_global=True)

        # Set up the user function documentation.
        self._set_uf_title("Frame order parameters")
        self._uf_param_table(label="table: frame order parameters",
                             caption="Frame order parameters.",
                             scope='global')
        self._uf_param_table(
            label="table: frame order parameter value setting with defaults",
            caption="Frame order parameter value setting.",
            scope='global',
            default=True)
Example #10
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__ method.
        Param_list.__init__(self)

        # Add the base information for the analysis.
        self._add_csa(default = N15_CSA)
        self._add(
            'orientation',
            scope = 'spin',
            default = 15.7,
            units = 'degrees',
            desc = "Angle between the 15N-1H vector and the principal axis of the 15N chemical shift tensor",
            py_type = float,
            set = 'fixed',
            grace_string = '\\q\\xq\\Q'
        )
        self._add(
            'tc',
            scope = 'spin',
            default = 13 * 1e-9,
            units = 'ns',
            desc = "The single global correlation time estimate/approximation",
            py_type = float,
            set = 'fixed',
            grace_string = '\\q\\xt\\f{}c\\Q'
        )

        # Add the model parameters.
        self._add(
            'j0',
            scope = 'spin',
            desc = 'Spectral density value at 0 MHz (from Farrow et al. (1995) JBNMR, 6: 153-162)',
            py_type = float,
            set = 'params',
            grace_string = '\\qJ(0)\\Q',
            err = True,
            sim = True
        )
        self._add(
            'f_eta',
            scope = 'spin',
            desc = 'Eta-test (from Fushman et al. (1998) JACS, 120: 10947-10952)',
            py_type = float,
            set = 'params',
            grace_string = '\\qF\\s\\xh\\Q',
            err = True,
            sim = True
        )
        self._add(
            'f_r2',
            scope = 'spin',
            desc = 'R2-test (from Fushman et al. (1998) JACS, 120: 10947-10952)',
            py_type = float,
            set = 'params',
            grace_string = '\\qF\\sR2\\Q',
            err = True,
            sim = True
        )

        # Set up the user function documentation.
        self._set_uf_title("Consistency testing parameters")
        self._uf_param_table(label="table: consistency testing parameters", caption="Consistency testing parameters.")
        self._uf_param_table(label="table: consistency testing parameter value setting", caption="Consistency testing parameters.")
        self._uf_param_table(label="table: consistency testing parameter value setting with defaults", caption="Consistency testing parameter value setting.", default=True)

        # Value setting documentation.
        for doc in self._uf_doc_loop(["table: consistency testing parameter value setting", "table: consistency testing parameter value setting with defaults"]):
            doc.add_paragraph("In consistency testing, the CSA value, angle Theta ('orientation') and global correlation time must be set prior to the calculation of consistency functions.")
Example #11
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__ method.
        Param_list.__init__(self)

        # Add the base data for the 'R2eff' model.
        self._add_peak_intensity()

        # Add the signal to noise ratio.
        self._add_sn_ratio()

        # Add the base information for the dispersion analysis.
        self._add(
            'relax_times',
            scope = 'spin',
            py_type = dict,
            grace_string = '\\qRelaxation time period (s)\\Q'
        )
        self._add(
            'cpmg_frqs',
            scope = 'spin',
            py_type = dict,
            grace_string = '\\qCPMG pulse train frequency (Hz)\\Q'
        )
        self._add(
            'spin_lock_nu1',
            scope = 'spin',
            py_type = dict,
            grace_string = '\\qSpin-lock field strength (Hz)\\Q'
        )

        # Add the model variables.
        self._add_model_info()

        # Add the parameters of the 'R2eff' model.
        self._add(
            'r2eff',
            scope = 'spin',
            default = 10.0,
            desc = 'The effective transversal relaxation rate',
            py_type = dict,
            set = 'params',
            grid_lower = 1.0,
            grid_upper = 40.0,
            grace_string = '\\qR\\s2,eff\\N\\Q (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'i0',
            scope = 'spin',
            default = 10000.0,
            desc = 'The initial intensity',
            py_type = dict,
            set = 'params',
            grid_lower = 0.0001,
            grid_upper = i0_upper,
            grace_string = '\\qI\\s0\\Q',
            err = True,
            sim = True
        )

        # Add the parameters of all dispersion models.
        self._add(
            'r1',
            scope = 'spin',
            default = 2.0,
            desc = 'The longitudinal relaxation rate',
            py_type = dict,
            set = 'params',
            scaling = 10,
            grid_lower = 0.1,
            grid_upper = 20.0,
            grace_string = '\\qR\\s1\\N\\Q (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'r2',
            scope = 'spin',
            default = 10.0,
            desc = 'The transversal relaxation rate',
            py_type = dict,
            set = 'params',
            scaling = 10,
            grid_lower = 5.0,
            grid_upper = 20.0,
            grace_string = '\\qR\\s2\\N\\Q (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'r2a',
            scope = 'spin',
            default = 10.0,
            desc = 'The transversal relaxation rate for state A in the absence of exchange',
            py_type = dict,
            set = 'params',
            scaling = 10,
            grid_lower = 5.0,
            grid_upper = 20.0,
            grace_string = '\\qR\\s2,A\\N\\Q (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'r2b',
            scope = 'spin',
            default = 10.0,
            desc = 'The transversal relaxation rate for state B in the absence of exchange',
            py_type = dict,
            set = 'params',
            scaling = 10,
            grid_lower = 5.0,
            grid_upper = 20.0,
            grace_string = '\\qR\\s2,B\\N\\Q (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'pA',
            scope = 'spin',
            default = 0.90,
            desc = 'The population for state A',
            py_type = float,
            set = 'params',
            grid_lower = pA_lower,
            grid_upper = 1.0,
            grace_string = '\\qp\\sA\\N\\Q',
            err = True,
            sim = True
        )
        self._add(
            'pB',
            scope = 'spin',
            default = 0.5,
            desc = 'The population for state B',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = 0.5,
            grace_string = '\\qp\\sB\\N\\Q',
            err = True,
            sim = True
        )
        self._add(
            'pC',
            scope = 'spin',
            default = 0.5,
            desc = 'The population for state C',
            py_type = float,
            set = 'params',
            grace_string = '\\qp\\sC\\N\\Q',
            err = True,
            sim = True
        )
        self._add(
            'phi_ex',
            scope = 'spin',
            default = 5.0,
            desc = 'The phi_ex = pA.pB.dw**2 value (ppm^2)',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = 10.0,
            grace_string = '\\xF\\B\\sex\\N = \\q p\\sA\\N.p\\sB\\N.\\xDw\\B\\S2\\N\\Q  (ppm\\S2\\N)',
            err = True,
            sim = True
        )
        self._add(
            'phi_ex_B',
            scope = 'spin',
            default = 5.0,
            desc = 'The fast exchange factor between sites A and B (ppm^2)',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = 10.0,
            grace_string = '\\xF\\B\\sex,B\\N (ppm\\S2\\N)',
            err = True,
            sim = True
        )
        self._add(
            'phi_ex_C',
            scope = 'spin',
            default = 5.0,
            desc = 'The fast exchange factor between sites A and C (ppm^2)',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = 10.0,
            grace_string = '\\xF\\B\\sex,C\\N (ppm\\S2\\N)',
            err = True,
            sim = True
        )
        self._add(
            'padw2',
            scope = 'spin',
            default = 1.0,
            desc = 'The pA.dw**2 value (ppm^2)',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = 10.0,
            grace_string = '\\qp\\sA\\N.\\xDw\\B\\S2\\N\\Q  (ppm\\S2\\N)',
            err = True,
            sim = True
        )
        self._add(
            'dw',
            scope = 'spin',
            default = 1.0,
            desc = 'The chemical shift difference between states A and B (in ppm)',
            py_type = float,
            set = 'params',
            grid_lower = dw_lower,
            grid_upper = 10.0,
            grace_string = '\\q\\xDw\\B\\Q (ppm)',
            err = True,
            sim = True
        )
        self._add(
            'dw_AB',
            scope = 'spin',
            default = 1.0,
            desc = 'The chemical shift difference between states A and B for 3-site exchange (in ppm)',
            py_type = float,
            set = 'params',
            grid_lower = dw_lower,
            grid_upper = 10.0,
            grace_string = '\\q\\xDw\\B\\Q\\SAB\\N (ppm)',
            err = True,
            sim = True
        )
        self._add(
            'dw_AC',
            scope = 'spin',
            default = 1.0,
            desc = 'The chemical shift difference between states A and C for 3-site exchange (in ppm)',
            py_type = float,
            set = 'params',
            grid_lower = dw_lower,
            grid_upper = 10.0,
            grace_string = '\\q\\xDw\\B\\Q\\SAC\\N (ppm)',
            err = True,
            sim = True
        )
        self._add(
            'dw_BC',
            scope = 'spin',
            default = 1.0,
            desc = 'The chemical shift difference between states B and C for 3-site exchange (in ppm)',
            py_type = float,
            set = 'params',
            grid_lower = dw_lower,
            grid_upper = 10.0,
            grace_string = '\\q\\xDw\\B\\Q\\SBC\\N (ppm)',
            err = True,
            sim = True
        )
        self._add(
            'dwH',
            scope = 'spin',
            default = 1.0,
            desc = 'The proton chemical shift difference between states A and B (in ppm)',
            py_type = float,
            set = 'params',
            grid_lower = dwH_lower,
            grid_upper = 3.0,
            grace_string = '\\q\\xDw\\B\\sH\\N\\Q (ppm)',
            err = True,
            sim = True
        )
        self._add(
            'dwH_AB',
            scope = 'spin',
            default = 1.0,
            desc = 'The proton chemical shift difference between states A and B for 3-site exchange (in ppm)',
            py_type = float,
            set = 'params',
            grid_lower = dwH_lower,
            grid_upper = 3.0,
            grace_string = '\\q\\xDw\\B\\sH\\N\\Q\\SAB\\N (ppm)',
            err = True,
            sim = True
        )
        self._add(
            'dwH_AC',
            scope = 'spin',
            default = 1.0,
            desc = 'The proton chemical shift difference between states A and C for 3-site exchange (in ppm)',
            py_type = float,
            set = 'params',
            grid_lower = dwH_lower,
            grid_upper = 3.0,
            grace_string = '\\q\\xDw\\B\\sH\\N\\Q\\SAC\\N (ppm)',
            err = True,
            sim = True
        )
        self._add(
            'dwH_BC',
            scope = 'spin',
            default = 1.0,
            desc = 'The proton chemical shift difference between states B and C for 3-site exchange (in ppm)',
            py_type = float,
            set = 'params',
            grid_lower = dwH_lower,
            grid_upper = 3.0,
            grace_string = '\\q\\xDw\\B\\sH\\N\\Q\\SBC\\N (ppm)',
            err = True,
            sim = True
        )
        self._add(
            'kex',
            scope = 'spin',
            default = 1000.0,
            desc = 'The exchange rate',
            py_type = float,
            set = 'params',
            scaling = 10000,
            grid_lower = 1.0,
            grid_upper = 10000.0,
            grace_string = '\\qk\\sex\\N\\Q (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'kex_AB',
            scope = 'spin',
            default = 1000.0,
            desc = 'The exchange rate between sites A and B for 3-site exchange with kex_AB = k_AB + k_BA (rad.s^-1)',
            py_type = float,
            set = 'params',
            scaling = 10000,
            grid_lower = 1.0,
            grid_upper = 10000.0,
            grace_string = '\\qk\\sex\\N\\Q\\SAB\\N (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'kex_AC',
            scope = 'spin',
            default = 1000.0,
            desc = 'The exchange rate between sites A and C for 3-site exchange with kex_AC = k_AC + k_CA (rad.s^-1)',
            py_type = float,
            set = 'params',
            scaling = 10000,
            grid_lower = 1.0,
            grid_upper = 10000.0,
            grace_string = '\\qk\\sex\\N\\Q\\SAC\\N (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'kex_BC',
            scope = 'spin',
            default = 1000.0,
            desc = 'The exchange rate between sites B and C for 3-site exchange with kex_BC = k_BC + k_CB (rad.s^-1)',
            py_type = float,
            set = 'params',
            scaling = 10000,
            grid_lower = 1.0,
            grid_upper = 10000.0,
            grace_string = '\\qk\\sex\\N\\Q\\SBC\\N (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'kB',
            scope = 'spin',
            default = 1000.0,
            desc = 'Approximate chemical exchange rate constant between sites A and B (rad.s^-1)',
            py_type = float,
            set = 'params',
            scaling = 10000,
            grid_lower = 1.0,
            grid_upper = 10000.0,
            grace_string = '\\qk\\sB\\N\\Q (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'kC',
            scope = 'spin',
            default = 1000.0,
            desc = 'Approximate chemical exchange rate constant between sites A and C (rad.s^-1)',
            py_type = float,
            set = 'params',
            scaling = 10000,
            grid_lower = 1.0,
            grid_upper = 10000.0,
            grace_string = '\\qk\\sC\\N\\Q (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'tex',
            scope = 'spin',
            default = 1.0/1000.0,
            desc = 'The time of exchange (tex = 1/kex)',
            py_type = float,
            set = 'params',
            scaling = 1e-4,
            grid_lower = 1/10000.0,
            grid_upper = 1.0,
            grace_string = '\\q\\xt\\B\\sex\\N\\Q (s.rad\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'theta',
            scope = 'spin',
            desc = 'Rotating frame tilt angle : ( theta = arctan(w_1 / Omega) ) (rad)',
            grace_string = 'Rotating frame tilt angle (rad)',
            py_type = dict,
            set = 'all',
            err = False,
            sim = False
        )
        self._add(
            'w_eff',
            scope = 'spin',
            desc = 'Effective field in rotating frame : ( w_eff = sqrt(Omega^2 + w_1^2) ) (rad.s^-1)',
            grace_string = 'Effective field in rotating frame (rad.s\\S-1\\N)',
            py_type = dict,
            set = 'all',
            err = False,
            sim = False
        )
        self._add(
            'k_AB',
            scope = 'spin',
            default = 2.0,
            desc = 'The exchange rate from state A to state B',
            py_type = float,
            set = 'params',
            scaling = 20,
            grid_lower = 0.1,
            grid_upper = 20.0,
            grace_string = '\\qk\\sAB\\N\\Q (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )
        self._add(
            'k_BA',
            scope = 'spin',
            default = 1000.0,
            desc = 'The exchange rate from state B to state A',
            py_type = float,
            set = 'params',
            scaling = 10000,
            grid_lower = 1.0,
            grid_upper = 10000.0,
            grace_string = '\\qk\\sBA\\N\\Q (rad.s\\S-1\\N)',
            err = True,
            sim = True
        )

        # Add the minimisation data.
        self._add_min_data(min_stats_global=False, min_stats_spin=True)

        # Set up the user function documentation.
        self._set_uf_title("Relaxation dispersion parameters")
        self._uf_param_table(label="table: dispersion parameters", caption="Relaxation dispersion parameters.", type=True)
        self._uf_param_table(label="table: dispersion parameters and min stats", caption="Relaxation dispersion parameters and minimisation statistics.", sets=['params', 'fixed', 'min'])
        self._uf_param_table(label="table: dispersion parameter value setting", caption="Relaxation dispersion parameters.", type=True)
        self._uf_param_table(label="table: dispersion parameter value setting with defaults", caption="Relaxation dispersion parameter value setting.", default=True, type=True)

        # Value setting documentation.
        for doc in self._uf_doc_loop(["table: dispersion parameter value setting", "table: dispersion parameter value setting with defaults"]):
            doc.add_paragraph("Any of the relaxation dispersion parameters which are of the 'float' type can be set.  Note that setting values for parameters which are not part of the model will have no effect.")
Example #12
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__ method.
        Param_list.__init__(self)

        # Add the base information for the analysis.
        self._add_csa(default=N15_CSA)

        # Add the model parameters.
        self._add('j0',
                  scope='spin',
                  string='J(0)',
                  desc='Spectral density value at 0 MHz - J(0)',
                  py_type=float,
                  set='params',
                  grace_string='\\qJ(0)\\Q',
                  err=True,
                  sim=True)
        self._add(
            'jwx',
            scope='spin',
            string='J(wX)',
            desc=
            'Spectral density value at the frequency of the heteronucleus - J(wX)',
            py_type=float,
            set='params',
            grace_string='\\qJ(\\xw\\f{}\\sX\\N)\\Q',
            err=True,
            sim=True)
        self._add(
            'jwh',
            scope='spin',
            string='J(wH)',
            desc=
            'Spectral density value at the frequency of the proton - J(wH)',
            py_type=float,
            set='params',
            grace_string='\\qJ(\\xw\\f{}\\sH\\N)\\Q',
            err=True,
            sim=True)

        # Set up the user function documentation.
        self._set_uf_title("Reduced spectral density mapping parameters")
        self._uf_param_table(
            label="table: J(w) parameters",
            caption="Reduced spectral density mapping parameters.")
        self._uf_param_table(
            label="table: J(w) parameter value setting",
            caption="Reduced spectral density mapping parameters.")
        self._uf_param_table(
            label="table: J(w) parameter value setting with defaults",
            caption="Reduced spectral density mapping parameter value setting.",
            default=True)

        # Value setting documentation.
        for doc in self._uf_doc_loop([
                "table: J(w) parameter value setting",
                "table: J(w) parameter value setting with defaults"
        ]):
            doc.add_paragraph(
                "In reduced spectral density mapping, the CSA value must be set prior to the calculation of spectral density values."
            )
Example #13
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__() method.
        Param_list.__init__(self)

        # Add the base data.
        self._add_align_data()
        self._add_align_tensor()

        # Add up the model parameters.
        self._add('probs',
                  scope='global',
                  default=0.0,
                  desc='The probabilities of each state',
                  py_type=list,
                  set='params',
                  scaling=0.1,
                  grid_lower=0.0,
                  grid_upper=1.0,
                  err=True,
                  sim=True)
        self._add(
            'alpha',
            scope='global',
            units='rad',
            default=0.0,
            desc='The alpha Euler angles (for the rotation of each state)',
            py_type=list,
            set='params',
            grid_lower=0.0,
            grid_upper=2 * pi,
            err=True,
            sim=True)
        self._add(
            'beta',
            scope='global',
            units='rad',
            default=0.0,
            desc='The beta Euler angles (for the rotation of each state)',
            py_type=list,
            set='params',
            grid_lower=0.0,
            grid_upper=2 * pi,
            err=True,
            sim=True)
        self._add(
            'gamma',
            scope='global',
            units='rad',
            default=0.0,
            desc='The gamma Euler angles (for the rotation of each state)',
            py_type=list,
            set='params',
            grid_lower=0.0,
            grid_upper=2 * pi,
            err=True,
            sim=True)
        self._add('paramagnetic_centre',
                  scope='global',
                  units='Angstrom',
                  desc='The paramagnetic centre',
                  py_type=list,
                  set='params',
                  scaling=1e2,
                  grid_lower=-100.0,
                  grid_upper=100,
                  err=True,
                  sim=True)

        # Add the minimisation data.
        self._add_min_data(min_stats_global=False, min_stats_spin=True)

        # Set up the user function documentation.
        self._set_uf_title("N-state model parameters")
        self._uf_param_table(label="table: N-state parameters",
                             caption="N-state model parameters.",
                             scope='global',
                             type=True)
        self._uf_param_table(label="table: N-state parameter value setting",
                             caption="N-state model parameters.",
                             scope='global',
                             type=True)
        self._uf_param_table(
            label="table: N-state parameter value setting with defaults",
            caption="N-state model parameter value setting.",
            scope='global',
            default=True,
            type=True)

        # Value setting documentation.
        for doc in self._uf_doc_loop([
                "table: N-state parameter value setting",
                "table: N-state parameter value setting with defaults"
        ]):
            doc.add_paragraph(
                "Setting parameters for the N-state model is a little different from the other type of analyses as each state has a set of parameters with the same names as the other states.  To set the parameters for a specific state c (ranging from 0 for the first to N-1 for the last, the number c should be given as the index argument.  So the Euler angle gamma of the third state is specified using the parameter name 'gamma' and index of 2."
            )
Example #14
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__ method.
        Param_list.__init__(self)

        # Add the base data for the models.
        self._add(
            'ri_data',
            scope = 'spin',
            desc = relax_data.return_data_desc('ri_data'),
            py_type = dict,
            err = False,
            sim = True
        )
        self._add(
            'ri_data_err',
            scope = 'spin',
            desc = relax_data.return_data_desc('ri_data_err'),
            py_type = dict,
            err = False,
            sim = False
        )

        # Add the model variables.
        self._add_model_info(equation_flag=True)

        # Add up the global model parameters.
        self._add_diffusion_params()

        # Add up the spin model parameters.
        self._add(
            's2',
            scope = 'spin',
            default = 0.8,
            desc = 'S2, the model-free generalised order parameter (S2 = S2f.S2s)',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = 1.0,
            grace_string = '\\qS\\v{0.4}\\z{0.71}2\\Q',
            err = True,
            sim = True
        )
        self._add(
            's2f',
            scope = 'spin',
            default = 0.8,
            desc = 'S2f, the faster motion model-free generalised order parameter',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = 1.0,
            grace_string = '\\qS\\sf\\N\\h{-0.2}\\v{0.4}\\z{0.71}2\\Q',
            err = True,
            sim = True
        )
        self._add(
            's2s',
            scope = 'spin',
            default = 0.8,
            desc = 'S2s, the slower motion model-free generalised order parameter',
            py_type = float,
            set = 'params',
            grid_lower = 0.0,
            grid_upper = 1.0,
            grace_string = '\\qS\\ss\\N\\h{-0.2}\\v{0.4}\\z{0.71}2\\Q',
            err = True,
            sim = True
        )
        self._add(
            'local_tm',
            scope = 'spin',
            default = 10.0 * 1e-9,
            desc = 'The spin specific global correlation time (seconds)',
            py_type = float,
            set = 'params',
            scaling = 1e-12,
            grid_lower = 1.0 * 1e-9,
            grid_upper = 12.0 * 1e-9,
            grace_string = '\\xt\\f{}\\sm',
            units = 'ns',
            err = True,
            sim = True
        )
        self._add(
            'te',
            scope = 'spin',
            default = 100.0 * 1e-12,
            desc = 'Single motion effective internal correlation time (seconds)',
            py_type = float,
            set = 'params',
            scaling = 1e-12,
            grid_lower = 0.0,
            grid_upper = 500.0 * 1e-12,
            conv_factor = 1e-12,
            grace_string = '\\xt\\f{}\\se',
            units = 'ps',
            err = True,
            sim = True
        )
        self._add(
            'tf',
            scope = 'spin',
            default = 10.0 * 1e-12,
            desc = 'Faster motion effective internal correlation time (seconds)',
            py_type = float,
            set = 'params',
            scaling = 1e-12,
            grid_lower = 0.0,
            grid_upper = 500.0 * 1e-12,
            conv_factor = 1e-12,
            grace_string = '\\xt\\f{}\\sf',
            units = 'ps',
            err = True,
            sim = True
        )
        self._add(
            'ts',
            scope = 'spin',
            default = 1000.0 * 1e-12,
            desc = 'Slower motion effective internal correlation time (seconds)',
            py_type = float,
            set = 'params', 
            scaling = 1e-12,
            grid_lower = 0.0,
            grid_upper = 500.0 * 1e-12,
            conv_factor = 1e-12,
            grace_string = '\\xt\\f{}\\ss',
            units = 'ps',
            err = True,
            sim = True
        )
        self._add(
            'rex',
            scope = 'spin',
            default = 0.0,
            desc = 'Chemical exchange relaxation (sigma_ex = Rex / omega**2)',
            py_type = float,
            set = 'params',
            scaling = rex_scaling,
            grid_lower = 0.0,
            grid_upper = rex_upper,
            conv_factor = conv_factor_rex,
            units = units_rex,
            grace_string = '\\qR\\sex\\Q',
            err = True,
            sim = True
        )
        # FIXME:  This interatomic parameter should be activated.
        #self._add(
        #    'r',
        #    scope = 'interatomic',
        #    default = 1.02e-10,
        #    desc = 'The XH bond length',
        #    py_type = float,
        #    set = 'params',
        #    scaling = 1e-10,
        #    grid_lower = 1.0 * 1e-10,
        #    grid_upper = 1.05 * 1e-10,
        #    units = 'm',
        #    grace_string = 'Bond length (m)',
        #    err = True,
        #    sim = True
        #)
        self._add_csa(
            default = N15_CSA,
            set = 'params',
            err = True,
            sim = True
        )

        # Add the minimisation data.
        self._add_min_data(min_stats_global=True, min_stats_spin=True)

        # Set up the user function documentation.
        self._set_uf_title("Model-free parameters")
        self._uf_param_table(label="table: model-free parameters", caption="Model-free parameters.")
        self._uf_param_table(label="table: model-free parameter writing", caption="Model-free parameters.")
        self._uf_param_table(label="table: model-free parameters and min stats", caption="Model-free parameters and minimisation statistics.", sets=['params', 'fixed', 'min'])
        self._uf_param_table(label="table: all model-free parameters", caption="Model-free parameters.", scope=None)
        self._uf_param_table(label="table: model-free parameter value setting", caption="Model-free parameters.")
        self._uf_param_table(label="table: model-free parameter value setting with defaults", caption="Model-free parameter value setting.", default=True)

        # Parameter setting documentation.
        for doc in self._uf_doc_loop(["table: model-free parameter value setting", "table: model-free parameter value setting with defaults"]):
            doc.add_paragraph("Setting a parameter value may have no effect depending on which model-free model is chosen.  For example if S2f values and S2s values are set but the data pipe corresponds to the model-free model 'm4' then because these data values are not parameters of the model they will have no effect.")
            doc.add_paragraph("Note that the Rex values are scaled quadratically with field strength and should be supplied as a field strength independent value.  Use the following formula to obtain the correct value:")
            doc.add_verbatim("    value = rex / (2.0 * pi * frequency) ** 2")
            doc.add_paragraph("where:")
            doc.add_list_element("rex is the chemical exchange value for the current frequency.")
            doc.add_list_element("frequency is the proton frequency corresponding to the data.")

        # Parameter writing documentation.
        for doc in self._uf_doc_loop(["table: model-free parameter writing"]):
            doc.add_paragraph("For model-free theory it is assumed that Rex values are scaled quadratically with field strength.  The values will be very small as they will be written out as a field strength independent value.  Hence use the following formula to convert the value to that expected for a given magnetic field strength:")
            doc.add_verbatim("    Rex = value * (2.0 * pi * frequency) ** 2")
            doc.add_paragraph("The frequency is that of the proton in Hertz.")
Example #15
0
    def __init__(self):
        """Define all the parameters of the analysis."""

        # The object is already initialised.
        if self._initialised: return

        # Execute the base class __init__() method.
        Param_list.__init__(self)

        # Add the base data.
        self._add_peak_intensity()

        # Add the signal to noise ratio.
        self._add_sn_ratio()

        # Add the base information for the analysis.
        self._add('relax_times',
                  scope='spin',
                  py_type=dict,
                  grace_string='\\qRelaxation time period (s)\\Q')

        # Add the model variables.
        self._add_model_info(model_flag=False)

        # Add the model parameters.
        self._add('rx',
                  scope='spin',
                  default=8.0,
                  units='rad.s^-1',
                  desc='Either the R1 or R2 relaxation rate',
                  set='params',
                  py_type=float,
                  scaling=1.0,
                  grid_lower=0.0,
                  grid_upper=20.0,
                  grace_string='\\qR\\sx\\Q',
                  grace_units='rad.s\\S-1\\N',
                  err=True,
                  sim=True)
        self._add('i0',
                  scope='spin',
                  default=10000.0,
                  desc='The initial intensity',
                  py_type=float,
                  set='params',
                  scaling=i_scaling,
                  grid_lower=0.0,
                  grid_upper=i0_upper,
                  grace_string='\\qI\\s0\\Q',
                  err=True,
                  sim=True)
        self._add('iinf',
                  scope='spin',
                  default=0.0,
                  desc='The intensity at infinity',
                  py_type=float,
                  set='params',
                  scaling=i_scaling,
                  grid_lower=0.0,
                  grid_upper=iinf_upper,
                  grace_string='\\qI\\sinf\\Q',
                  err=True,
                  sim=True)

        # Add the minimisation data.
        self._add_min_data(min_stats_global=False, min_stats_spin=True)

        # Set up the user function documentation.
        self._set_uf_title("Relaxation curve fitting parameters")
        self._uf_param_table(label="table: curve-fit parameters",
                             caption="Relaxation curve fitting parameters.")
        self._uf_param_table(
            label="table: curve-fit parameters and min stats",
            caption=
            "Relaxation curve fitting parameters and minimisation statistics.",
            sets=['params', 'fixed', 'min'])
        self._uf_param_table(label="table: curve-fit parameter value setting",
                             caption="Relaxation curve fitting parameters.")
        self._uf_param_table(
            label="table: curve-fit parameter value setting with defaults",
            caption="Relaxation curve fitting parameter value setting.",
            default=True)