Ejemplo n.º 1
0
from specific_analyses.api import return_api
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container

# The hybrid API object.
hybrid_obj = return_api('hybrid')

# The user function class.
uf_class = uf_info.add_class('pipe')
uf_class.title = "Class holding the user functions for manipulating data pipes."
uf_class.menu_text = "&pipe"
uf_class.gui_icon = "relax.pipe"

# The pipe.bundle user function.
uf = uf_info.add_uf('pipe.bundle')
uf.title = "The grouping of data pipes into a bundle."
uf.title_short = "Data pipe bundling."
uf.add_keyarg(
    name="bundle",
    basic_types=["str"],
    desc_short="pipe bundle",
    desc="The pipe bundle is a special grouping or clustering of data pipes.",
    wiz_element_type='combo',
    wiz_combo_iter=pipes.bundle_names,
    wiz_read_only=False)
uf.add_keyarg(name="pipe",
              basic_types=["str"],
              desc_short="data pipe",
              desc="The name of the data pipe to add to the bundle.",
              wiz_element_type='combo',
Ejemplo n.º 2
0
Archivo: fix.py Proyecto: tlinnet/relax
# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
#                                                                             #
###############################################################################

# Module docstring.
"""The fix user function definitions."""

# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import fix
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The fix user function.
uf = uf_info.add_uf('fix')
uf.title = "Fix or allow parameter values to change during optimisation."
uf.title_short = "Fixing of parameters."
uf.display = True
uf.add_keyarg(
    name = "element",
    py_type = "str",
    desc_short = "element",
    desc = "Which element to fix.",
    wiz_element_type = "combo",
    wiz_combo_choices = [
        "Diffusion tensor parameters",
        "All parameters from all spins",
        "All parameters (diffusion and spin)"],
    wiz_combo_data = [
        "diff",
Ejemplo n.º 3
0
from specific_analyses.frame_order.uf import distribute, sobol_setup, pdb_model, permute_axes, pivot, quad_int, ref_domain, select_model, simulate
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.data import Uf_tables; uf_tables = Uf_tables()
from user_functions.objects import Desc_container
from user_functions.wildcards import WILDCARD_STRUCT_PDB_ALL


# The user function class.
uf_class = uf_info.add_class('frame_order')
uf_class.title = "Class containing the user functions of the Frame Order theories."
uf_class.menu_text = "&frame_order"
uf_class.gui_icon = "relax.frame_order"


# The frame_order.count_sobol_points user function.
uf = uf_info.add_uf('frame_order.count_sobol_points')
uf.title = "Count the number of Sobol' points used for the current parameter values."
uf.title_short = "Used Sobol' point count."
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph("This allows the number of Sobol' integration points used during the Frame Order target function optimisation to be counted.  This uses the current parameter values to determine how many are used for the PCS calculation compared to the total number.")
uf.backend = count_sobol_points
uf.menu_text = "&count_sobol_points"
uf.gui_icon = "oxygen.categories.applications-education"
uf.wizard_size = (800, 400)
uf.wizard_image = WIZARD_IMAGE_PATH + 'frame_order.png'


# The frame_order.distribute user function.
uf = uf_info.add_uf('frame_order.distribute')
uf.title = "Structural distribution of the frame order motions."
Ejemplo n.º 4
0
from graphics import ANALYSIS_IMAGE_PATH
from pipe_control import spectrometer
from specific_analyses.setup import consistency_tests_obj
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('consistency_tests')
uf_class.title = "Class containing functions specific to consistency tests for datasets from different fields."
uf_class.menu_text = "&consistency_tests"
uf_class.gui_icon = "relax.consistency_testing"


# The consistency_tests.set_frq user function.
uf = uf_info.add_uf('consistency_tests.set_frq')
uf.title = "Select which relaxation data to use in the consistency tests by NMR spectrometer frequency."
uf.title_short = "Spectrometer selection."
uf.add_keyarg(
    name = "frq",
    py_type = "float",
    desc_short = "spectrometer frequency in Hz",
    desc = "The spectrometer frequency in Hz.  This must match the currently loaded data to the last decimal point.  See the 'sfrq' parameter in the Varian procpar file or the 'SFO1' parameter in the Bruker acqus file.",
    wiz_element_type = 'combo',
    wiz_combo_iter = spectrometer.get_frequencies,
    wiz_read_only = True,
)
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph("This will select the relaxation data to use in the consistency tests corresponding to the given frequencies.  The data is selected by the spectrometer frequency in Hertz, which should be set to the exact value (see the 'sfrq' parameter in the Varian procpar file or the 'SFO1' parameter in the Bruker acqus file).  Note thought that the R1, R2 and NOE are all expected to have the exact same frequency in the J(w) mapping analysis (to the last decimal point).")
# Prompt examples.
Ejemplo n.º 5
0
###############################################################################

# Module docstring.
"""The angles user function definitions."""

# relax module imports.
from pipe_control import angles
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('angles')
uf_class.title = "Class containing the function for calculating XH bond angles."
uf_class.menu_text = "&angles"

# The angles.diff_frame user function.
uf = uf_info.add_uf('angles.diff_frame')
uf.title = "Calculate the angles defining the XH bond vector within the diffusion frame."
uf.title_short = "Diffusion frame XH vector angle calculation."
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph("If the diffusion tensor is isotropic, then nothing will be done.")
uf.desc[-1].add_paragraph("If the diffusion tensor is axially symmetric, then the angle alpha will be calculated for each XH bond vector.")
uf.desc[-1].add_paragraph("If the diffusion tensor is asymmetric, then the three angles will be calculated.")
uf.backend = angles.angle_diff_frame
uf.menu_text = "&diff_frame"
uf.wizard_size = (800, 400)
uf.gui_icon = "oxygen.categories.applications-education"
uf.wizard_height_desc = 250
Ejemplo n.º 6
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import align_tensor, pipes
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('align_tensor')
uf_class.title = "Class for manipulating the alignment tensor."
uf_class.menu_text = "&align_tensor"
uf_class.gui_icon = "relax.align_tensor"


# The align_tensor.copy user function.
uf = uf_info.add_uf('align_tensor.copy')
uf.title = "Copy alignment tensor data."
uf.title_short = "Alignment tensor copying."
uf.add_keyarg(
    name = "tensor_from",
    default = None,
    py_type = "str",
    desc_short = "source tensor ID",
    desc = "The identification string of the alignment tensor to copy the data from.",
    can_be_none = True
)
uf.add_keyarg(
    name = "pipe_from",
    default = None,
    py_type = "str",
    desc_short = "source data pipe",
Ejemplo n.º 7
0
# relax module imports.
from pipe_control import spectrometer
from specific_analyses.setup import jw_mapping_obj
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('jw_mapping')
uf_class.title = "Class containing functions specific to reduced spectral density mapping."
uf_class.menu_text = "&jw_mapping"
uf_class.gui_icon = "relax.jw_mapping"


# The jw_mapping.set_frq user function.
uf = uf_info.add_uf('jw_mapping.set_frq')
uf.title = "Select which relaxation data to use in the J(w) mapping by NMR spectrometer frequency."
uf.title_short = "Spectrometer selection."
uf.add_keyarg(
    name = "frq",
    py_type = "float",
    desc_short = "spectrometer frequency in Hz",
    desc = "The spectrometer frequency in Hz.  This must match the currently loaded data to the last decimal point.  See the 'sfrq' parameter in the Varian procpar file or the 'SFO1' parameter in the Bruker acqus file.",
    wiz_element_type = 'combo',
    wiz_combo_iter = spectrometer.get_frequencies,
    wiz_read_only = True,
)
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph("This will select the relaxation data to use in the reduced spectral density mapping corresponding to the given frequency.  The data is selected by the spectrometer frequency in Hertz, which should be set to the exact value (see the 'sfrq' parameter in the Varian procpar file or the 'SFO1' parameter in the Bruker acqus file).  Note thought that the R1, R2 and NOE are all expected to have the exact same frequency in the J(w) mapping analysis (to the last decimal point).")
# Prompt examples.
Ejemplo n.º 8
0
# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
#                                                                             #
###############################################################################

# Module docstring.
"""The model_selection user function definitions."""

# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import model_selection, pipes
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The model_selection user function.
uf = uf_info.add_uf('model_selection')
uf.title = "Select the best model from a set of optimised models."
uf.title_short = "Model selection."
uf.display = True
uf.add_keyarg(
    name = "method",
    default = "AIC",
    py_type = "str",
    desc_short = "model selection method",
    desc = "The model selection technique (see below).",
    wiz_element_type = 'combo',
    wiz_combo_choices = [
        "Akaike's Information Criteria",
        "Small sample size corrected AIC",
        "Bayesian or Schwarz Information Criteria",
        "Bootstrap model selection",
Ejemplo n.º 9
0
Archivo: rdc.py Proyecto: tlinnet/relax
from pipe_control import align_tensor, pipes, rdc
from pipe_control.mol_res_spin import get_spin_ids
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container
from user_functions.wildcards import WILDCARD_GRACE_ALL


# The user function class.
uf_class = uf_info.add_class('rdc')
uf_class.title = "Class for handling residual dipolar couplings."
uf_class.menu_text = "&rdc"
uf_class.gui_icon = "relax.align_tensor"


# The rdc.back_calc user function.
uf = uf_info.add_uf('rdc.back_calc')
uf.title = "Back calculate the residual dipolar couplings."
uf.title_short = "RDC back calculation."
uf.display = True
uf.add_keyarg(
    name = "align_id",
    py_type = "str",
    desc_short = "alignment ID string",
    desc = "The alignment ID string.",
    wiz_element_type = 'combo',
    wiz_combo_iter = align_tensor.get_align_ids,
    wiz_read_only = True,
    can_be_none = True
)
# Description.
uf.desc.append(Desc_container())
Ejemplo n.º 10
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import pipes, sequence
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('sequence')
uf_class.title = "Class for manipulating sequence data."
uf_class.menu_text = "&sequence"
uf_class.gui_icon = "relax.sequence"

# The sequence.attach_protons user function.
uf = uf_info.add_uf('sequence.attach_protons')
uf.title = "Attach protons to all heteronuclei."
uf.title_short = "Heteronuclei proton attachment."
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph(
    "This can be used to attach protons to all the heteronuclei in the current data pipe.  For each proton, a spin container will be created.  This should be used when the sequence information is not being extracted from a 3D structure.  Note that the proton spin containers will not possess any positional information, so for analyses which require this position or vectors from one atom to this proton, it should not be used."
)
# Prompt examples.
uf.desc.append(Desc_container("Prompt examples"))
uf.desc[-1].add_paragraph("To attach protons, simply type:")
uf.desc[-1].add_prompt("relax> sequence.attach_protons()")
uf.backend = sequence.attach_protons
uf.menu_text = "&attach_protons"
uf.gui_icon = "oxygen.actions.list-add-relax-blue"
uf.wizard_size = (700, 500)
Ejemplo n.º 11
0
from graphics import WIZARD_IMAGE_PATH
from specific_analyses.n_state_model import uf as n_state_model_uf
from specific_analyses.n_state_model.parameters import elim_no_prob, number_of_states, ref_domain, select_model
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container
from user_functions.wildcards import WILDCARD_STRUCT_PDB_ALL

# The user function class.
uf_class = uf_info.add_class('n_state_model')
uf_class.title = "Class for the N-state models."
uf_class.menu_text = "&n_state_model"
uf_class.gui_icon = "relax.n_state_model"

# The n_state_model.CoM user function.
uf = uf_info.add_uf('n_state_model.CoM')
uf.title = "The defunct centre of mass (CoM) analysis."
uf.title_short = "CoM analysis."
uf.add_keyarg(name="pivot_point",
              default=[0.0, 0.0, 0.0],
              py_type="num_list",
              dim=3,
              desc_short="pivot point",
              desc="The pivot point of the motions between the two domains.",
              list_titles=['X coordinate', 'Y coordinate', 'Z coordinate'])
uf.add_keyarg(
    name="centre",
    py_type="num_list",
    dim=3,
    desc_short="centre of mass",
    desc=
Ejemplo n.º 12
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import palmer
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('palmer')
uf_class.title = "Class for interfacing with Art Palmer's Modelfree 4."
uf_class.menu_text = "&palmer"
uf_class.gui_icon = "relax.modelfree4"


# The palmer.create user function.
uf = uf_info.add_uf('palmer.create')
uf.title = "Create the Modelfree4 input files."
uf.title_short = "Modelfree4 input file creation."
uf.add_keyarg(
    name = "dir",
    py_type = "str",
    arg_type = "dir sel",
    desc_short = "directory name",
    desc = "The directory to place the files.",
    can_be_none = True
)
uf.add_keyarg(
    name = "force",
    default = False,
    py_type = "bool",
    desc_short = "force flag",
Ejemplo n.º 13
0
    FD_OPEN = -1

# relax module imports.
from pipe_control import dasha
from user_functions.data import Uf_info

uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('dasha')
uf_class.title = "Class for interfacing with the program Dasha."
uf_class.menu_text = "&dasha"

# The dasha.create user function.
uf = uf_info.add_uf('dasha.create')
uf.title = "Create the Dasha script."
uf.title_short = "Script creation."
uf.add_keyarg(name="algor",
              default="LM",
              py_type="str",
              desc_short="optimisation algorithm",
              desc="The minimisation algorithm.",
              wiz_element_type="combo",
              wiz_combo_choices=["Levenberg-Marquardt", "Newton-Raphson"],
              wiz_combo_data=["LM", "NR"],
              wiz_read_only=True)
uf.add_keyarg(name="dir",
              py_type="str",
              arg_type="dir sel",
              desc_short="directory name",
Ejemplo n.º 14
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import spectrum
import pipe_control.spectrometer
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('spectrometer')
uf_class.title = "Class for manipulating spectrometer frequencies."
uf_class.menu_text = "&spectrometer"
uf_class.gui_icon = "relax.spectrometer"

# The spectrometer.frequency user function.
uf = uf_info.add_uf('spectrometer.frequency')
uf.title = "Set the spectrometer proton frequency of the experiment."
uf.title_short = "Spectrometer frequency setup."
uf.add_keyarg(
    name = "id",
    py_type = "str",
    desc_short = "experiment ID",
    desc = "The experiment identification string to set the frequency of.",
    wiz_element_type = 'combo',
    wiz_combo_iter = spectrum.get_ids
)
uf.add_keyarg(
    name = "frq",
    py_type = "num",
    desc_short = "spectrometer frequency",
    desc = "The spectrometer frequency.  See the 'sfrq' parameter in the Varian procpar file or the 'SFO1' parameter in the Bruker acqus file."
Ejemplo n.º 15
0
# relax module imports.
from graphics import ANALYSIS_IMAGE_PATH
from pipe_control.error_analysis import covariance_matrix
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('error_analysis')
uf_class.title = "Class for relaxation curve fitting."
uf_class.menu_text = "&error_analysis"


# The error_analysis.covariance_matrix user function.
uf = uf_info.add_uf('error_analysis.covariance_matrix')
uf.title = "Parameter error estimation via the covariance matrix."
uf.title_short = "Covariance matrix parameter error estimation."
uf.add_keyarg(
    name = "epsrel",
    py_type = "float",
    default = 0.0,
    desc_short = "parameter to remove linear-dependent columns.",
    desc = "The parameter to remove linear-dependent columns when J is rank deficient.",
    can_be_none = False
)
uf.add_keyarg(
    name = "verbosity",
    default = 1,
    py_type = "int",
    desc_short = "amount of information to print.",
Ejemplo n.º 16
0
# You should have received a copy of the GNU General Public License           #
# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
#                                                                             #
###############################################################################

# Module docstring.
"""The domain user function definitions."""

# relax module imports.
from pipe_control import domain
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The domain user function.
uf = uf_info.add_uf('domain')
uf.title = "Definition of structural domains."
uf.title_short = "Domain definition."
uf.add_keyarg(
    name = "id",
    py_type = "str",
    desc_short = "domain ID string",
    desc = "The ID string used to identify molecular domains.",
)
uf.add_keyarg(
    name = "spin_id",
    py_type = "str",
    arg_type = "spin ID",
    desc_short = "spin ID string",
    desc = "The spin ID string of all atomic members of the domain.",
    can_be_none = True
Ejemplo n.º 17
0
from pipe_control import spectrum
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.data import Uf_tables; uf_tables = Uf_tables()
from user_functions.objects import Desc_container
from user_functions.wildcards import WILDCARD_SPECTRUM_PEAKLIST


# The user function class.
uf_class = uf_info.add_class('spectrum')
uf_class.title = "Class for supporting the input of spectral data."
uf_class.menu_text = "&spectrum"
uf_class.gui_icon = "relax.fid"


# The spectrum.baseplane_rmsd user function.
uf = uf_info.add_uf('spectrum.baseplane_rmsd')
uf.title = "Set the baseplane RMSD of a given spin in a spectrum for error analysis."
uf.title_short = "Baseplane RMSD setting."
uf.add_keyarg(
    name = "error",
    default = 0.0,
    py_type = "num",
    desc_short = "error",
    desc = "The baseplane RMSD error value."
)
uf.add_keyarg(
    name = "spectrum_id",
    py_type = "str",
    desc_short = "spectrum ID string",
    desc = "The spectrum ID string.",
    wiz_element_type = 'combo',
Ejemplo n.º 18
0
#                                                                             #
###############################################################################

# Module docstring.
"""The eliminate user function definitions for removing failed models."""

# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import eliminate
from specific_analyses.model_free import Model_free
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The eliminate user function.
uf = uf_info.add_uf('eliminate')
uf.title = "Elimination or rejection of models."
uf.title_short = "Model elimination."
uf.display = True
uf.add_keyarg(
    name = "function",
    py_type = "func",
    arg_type = "func",
    desc_short = "function",
    desc = "An optional user supplied function for model elimination.",
    can_be_none = True
)
uf.add_keyarg(
    name = "args",
    py_type = "tuple",
    arg_type = "func args",
Ejemplo n.º 19
0
from graphics import ANALYSIS_IMAGE_PATH
from pipe_control import noesy, spectrum
from specific_analyses.noe.uf import spectrum_type
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('noe')
uf_class.title = "Class for handling steady-state NOE and NOESY data."
uf_class.menu_text = "&noe"
uf_class.gui_icon = "relax.noe"


# The noe.read_restraints user function.
uf = uf_info.add_uf('noe.read_restraints')
uf.title = "Read NOESY or ROESY restraints from a file."
uf.title_short = "Restraint reading."
uf.add_keyarg(
    name = "file",
    py_type = "str",
    arg_type = "file sel",
    desc_short = "file name",
    desc = "The name of the file containing the restraint data.",
    wiz_filesel_style = FD_OPEN
)
uf.add_keyarg(
    name = "dir",
    py_type = "str",
    arg_type = "dir",
    desc_short = "directory name",
Ejemplo n.º 20
0
from graphics import WIZARD_IMAGE_PATH
from specific_analyses.n_state_model.parameters import elim_no_prob, number_of_states, ref_domain, select_model
from specific_analyses.setup import n_state_model_obj
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('n_state_model')
uf_class.title = "Class for the N-state models."
uf_class.menu_text = "&n_state_model"
uf_class.gui_icon = "relax.n_state_model"


# The n_state_model.CoM user function.
uf = uf_info.add_uf('n_state_model.CoM')
uf.title = "The defunct centre of mass (CoM) analysis."
uf.title_short = "CoM analysis."
uf.add_keyarg(
    name = "pivot_point",
    default = [0.0, 0.0, 0.0],
    py_type = "num_list",
    dim = 3,
    desc_short = "pivot point",
    desc = "The pivot point of the motions between the two domains."
)
uf.add_keyarg(
    name = "centre",
    py_type = "num_list",
    dim = 3,
    desc_short = "centre of mass",
Ejemplo n.º 21
0
from specific_analyses.relax_disp.parameter_object import Relax_disp_params; relax_disp_params = Relax_disp_params()
from specific_analyses.relax_fit.parameter_object import Relax_fit_params; relax_fit_params = Relax_fit_params()
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.data import Uf_tables; uf_tables = Uf_tables()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('value')
uf_class.title = "Class for setting parameter values."
uf_class.menu_text = "&value"
uf_class.gui_icon = "relax.value"


# The value.copy user function.
uf = uf_info.add_uf('value.copy')
uf.title = "Copy parameters from one data pipe to another."
uf.title_short = "Value copying."
uf.add_keyarg(
    name = "pipe_from",
    basic_types = ["str"],
    desc_short = "source data pipe",
    desc = "The name of the pipe to copy from.",
    wiz_element_type = 'combo',
    wiz_combo_iter = pipes.pipe_names,
    wiz_read_only = True
)
uf.add_keyarg(
    name = "pipe_to",
    basic_types = ["str"],
    desc_short = "destination data pipe",
Ejemplo n.º 22
0
from graphics import WIZARD_IMAGE_PATH
from pipe_control import chemical_shift
from user_functions.data import Uf_info

uf_info = Uf_info()
from user_functions.objects import Desc_container
from user_functions.wildcards import WILDCARD_SPECTRUM_PEAKLIST

# The user function class.
uf_class = uf_info.add_class('chemical_shift')
uf_class.title = "Class for handling chemical shifts."
uf_class.menu_text = "&chemical_shift"
uf_class.gui_icon = "relax.chemical_shift"

# The chemical_shift.read user function.
uf = uf_info.add_uf('chemical_shift.read')
uf.title = "Read chemical shifts from a file."
uf.title_short = "Chemical shift reading."
uf.add_keyarg(
    name="file",
    arg_type="file sel read",
    desc_short="file name",
    desc=
    "The name of the peak list of generic formatted file containing the chemical shifts.",
    wiz_filesel_wildcard=WILDCARD_SPECTRUM_PEAKLIST,
)
uf.add_keyarg(name="dir",
              arg_type="dir",
              desc_short="directory name",
              desc="The directory where the file is located.",
              can_be_none=True)
Ejemplo n.º 23
0
from lib.text.gui import i0, iinf, rx
from pipe_control import spectrum
from specific_analyses.relax_fit.uf import relax_time, select_model
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('relax_fit')
uf_class.title = "Class for relaxation curve fitting."
uf_class.menu_text = "&relax_fit"
uf_class.gui_icon = "relax.relax_fit"


# The relax_fit.relax_time user function.
uf = uf_info.add_uf('relax_fit.relax_time')
uf.title = "Set the relaxation delay time associated with each spectrum."
uf.title_short = "Relaxation delay time setting."
uf.add_keyarg(
    name = "time",
    default = 0.0,
    py_type = "num",
    desc_short = "relaxation time",
    desc = "The time, in seconds, of the relaxation period."
)
uf.add_keyarg(
    name = "spectrum_id",
    py_type = "str",
    desc_short = "spectrum identification string",
    desc = "The spectrum identification string.",
    wiz_element_type = 'combo',
Ejemplo n.º 24
0
from prompt.doc_string import regexp_doc
from specific_analyses.model_free import Model_free
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.data import Uf_tables; uf_tables = Uf_tables()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class("dx")
uf_class.title = "Class for interfacing with OpenDX."
uf_class.menu_text = "&dx"
uf_class.gui_icon = "relax.opendx"


# The dx.execute user function.
uf = uf_info.add_uf("dx.execute")
uf.title = "Execute an OpenDX program."
uf.title_short = "OpenDX execution."
uf.add_keyarg(
    name = "file_prefix",
    default = "map",
    py_type = "str",
    desc_short = "file name",
    desc = "The file name prefix.  For example if file is set to 'temp', then the OpenDX program temp.net will be loaded."
)
uf.add_keyarg(
    name = "dir",
    default = "dx",
    py_type = "str",
    arg_type = "dir sel",
    desc_short = "directory name",
Ejemplo n.º 25
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import domain, selection, spectrum
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class("select")
uf_class.title = "Class for selecting spins."
uf_class.menu_text = "&select"
uf_class.gui_icon = "relax.spin"

# The select.all user function.
uf = uf_info.add_uf("select.all")
uf.title = "Select all spins in the current data pipe."
uf.title_short = "Selection of all spins."
uf.display = True
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph(
    "This will select all spins, irregardless of their current state.")
# Prompt examples.
uf.desc.append(Desc_container("Prompt examples"))
uf.desc[-1].add_paragraph("To select all spins, simply type:")
uf.desc[-1].add_prompt("relax> select.all()")
uf.backend = selection.sel_all
uf.menu_text = "&all"
uf.wizard_size = (600, 550)
uf.wizard_apply_button = False
Ejemplo n.º 26
0
from graphics import WIZARD_IMAGE_PATH
from pipe_control import minimise
from user_functions.data import Uf_info, Uf_tables

uf_info = Uf_info()
uf_tables = Uf_tables()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('minimise')
uf_class.title = "Class for setting parameter values."
uf_class.menu_text = "&minimise"
uf_class.gui_icon = "relax.rosenbrock"

# The minimise.calculate user function.
uf = uf_info.add_uf('minimise.calculate')
uf.title = "Calculate the model parameters or the current target function value."
uf.title_short = "Model parameter or target function value calculation."
uf.display = True
uf.add_keyarg(
    name="verbosity",
    default=1,
    basic_types=["int"],
    desc_short="verbosity level",
    desc=
    "The amount of information to print to screen.  Zero corresponds to minimal output while higher values increase the amount of output.  The default value is 1."
)
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph(
    "The operation of this user function is two-fold and depends on whether the solution for the models of the current analysis are found by direct calculation or by optimisation.  The dual operations are:"
Ejemplo n.º 27
0
# relax module imports.
from graphics import ANALYSIS_IMAGE_PATH
from lib.text.gui import csa, local_tm, r, rex, s2, s2f, te, tf, ts
from specific_analyses.model_free.uf import create_model, delete, remove_tm, select_model
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('model_free')
uf_class.title = "Class for model-free analysis."
uf_class.menu_text = "&model_free"
uf_class.gui_icon = "relax.model-free"

# The model_free.create_model user function.
uf = uf_info.add_uf('model_free.create_model')
uf.title = "Create a model-free model."
uf.title_short = "Model-free model creation."
uf.display = True
uf.add_keyarg(name="model",
              basic_types=["str"],
              desc_short="model name",
              desc="The new name of the model-free model.")
uf.add_keyarg(name="equation",
              basic_types=["str"],
              desc_short="model-free equation",
              desc="The model-free equation.",
              wiz_element_type="combo",
              wiz_combo_choices=[
                  "Original model-free equation {S2, te}",
                  "Extended model-free equation {S2f, tf, S2, ts}",
Ejemplo n.º 28
0
relax_disp_params = Relax_disp_params()
from specific_analyses.relax_fit.parameter_object import Relax_fit_params
relax_fit_params = Relax_fit_params()
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container
from user_functions.wildcards import WILDCARD_GRACE_ALL

# The user function class.
uf_class = uf_info.add_class('grace')
uf_class.title = "Class for interfacing with Grace."
uf_class.menu_text = "&grace"
uf_class.gui_icon = "relax.grace_icon"

# The grace.view user function.
uf = uf_info.add_uf('grace.view')
uf.title = "Visualise the file within Grace."
uf.title_short = "Grace execution."
uf.add_keyarg(
    name="file",
    arg_type="file sel read",
    desc_short="file name",
    desc="The name of the file.",
    wiz_filesel_wildcard=WILDCARD_GRACE_ALL,
)
uf.add_keyarg(name="dir",
              default="grace",
              arg_type="dir",
              desc_short="directory name",
              desc="The directory name.",
              can_be_none=True)
Ejemplo n.º 29
0
from graphics import WIZARD_IMAGE_PATH
from pipe_control import pymol_control
from specific_analyses.model_free.uf import classic_style_doc
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container
from user_functions.wildcards import WILDCARD_PYMOL_MACRO, WILDCARD_STRUCT_PDB_ALL

# The user function class.
uf_class = uf_info.add_class('pymol')
uf_class.title = "Class for interfacing with PyMOL."
uf_class.menu_text = "&pymol"
uf_class.gui_icon = "relax.pymol_icon"

# The pymol.cartoon user function.
uf = uf_info.add_uf('pymol.cartoon')
uf.title = "Apply the PyMOL cartoon style and colour by secondary structure."
uf.title_short = "PyMOL cartoon style application."
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph(
    "This applies the PyMOL cartoon style which is equivalent to hiding everything and clicking on show cartoon.  It also colours the cartoon with red helices, yellow strands, and green loops.  The following commands are executed:"
)
uf.desc[-1].add_list_element("cmd.hide('everything', file)")
uf.desc[-1].add_list_element("cmd.show('cartoon', file)")
uf.desc[-1].add_list_element("util.cbss(file, 'red', 'yellow', 'green')")
uf.desc[-1].add_paragraph(
    "where file is the file name without the '.pdb' extension.")
# Prompt examples.
uf.desc.append(Desc_container("Prompt examples"))
uf.desc[-1].add_paragraph("To apply this user function, type:")
Ejemplo n.º 30
0
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
# GNU General Public License for more details.                                #
#                                                                             #
# You should have received a copy of the GNU General Public License           #
# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
#                                                                             #
###############################################################################

# Module docstring.
"""The sys_info user function definitions."""

# relax module imports.
from info import print_sys_info
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The sys_info user function.
uf = uf_info.add_uf('sys_info')
uf.title = "Display all system information relating to this version of relax."
uf.title_short = "Display system information."
uf.display = True
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph("This will display all of the relax, Python, python package and hardware information currently being used by relax.  This is useful for seeing if all packages are up to date and if the correct software versions are being used.  It is also very useful information for reporting relax bugs.")
uf.backend = print_sys_info
uf.menu_text = "s&ys_info"
uf.gui_icon = "oxygen.actions.help-about"
uf.wizard_size = (700, 400)
uf.wizard_apply_button = False
Ejemplo n.º 31
0
# You should have received a copy of the GNU General Public License           #
# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
#                                                                             #
###############################################################################

# Module docstring.
"""The domain user function definitions."""

# relax module imports.
from pipe_control import domain
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container

# The domain user function.
uf = uf_info.add_uf('domain')
uf.title = "Definition of structural domains."
uf.title_short = "Domain definition."
uf.add_keyarg(
    name="id",
    basic_types=["str"],
    desc_short="domain ID string",
    desc="The ID string used to identify molecular domains.",
)
uf.add_keyarg(name="spin_id",
              arg_type="spin ID",
              desc_short="spin ID string",
              desc="The spin ID string of all atomic members of the domain.",
              can_be_none=True)
# Description.
uf.desc.append(Desc_container())
Ejemplo n.º 32
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import bmrb, exp_info, pipes
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('bmrb')
uf_class.title = "Class for interfacing with the BMRB (http://www.bmrb.wisc.edu/)."
uf_class.menu_text = "&bmrb"
uf_class.gui_icon = "relax.bmrb"

# The bmrb.citation user function.
uf = uf_info.add_uf('bmrb.citation')
uf.title = "Specify a citation to be added the BMRB data file."
uf.title_short = "Add a citation."
uf.add_keyarg(
    name = "cite_id",
    py_type = "str",
    desc_short = "citation ID",
    desc = "The citation ID string."
)
uf.add_keyarg(
    name = "authors",
    py_type = "str_list_of_lists",
    desc_short = "author list",
    desc = "The list of authors.  Each author element is a list of four elements (the first name, last name, first initial, and middle initials).",
    list_titles = ["First name", "Last name", "First initial", "Middle initials"]
)
Ejemplo n.º 33
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import domain, selection, spectrum
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class("select")
uf_class.title = "Class for selecting spins."
uf_class.menu_text = "&select"
uf_class.gui_icon = "relax.spin"


# The select.all user function.
uf = uf_info.add_uf("select.all")
uf.title = "Select all spins in the current data pipe."
uf.title_short = "Selection of all spins."
uf.display = True
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph("This will select all spins, irregardless of their current state.")
# Prompt examples.
uf.desc.append(Desc_container("Prompt examples"))
uf.desc[-1].add_paragraph("To select all spins, simply type:")
uf.desc[-1].add_prompt("relax> select.all()")
uf.backend = selection.sel_all
uf.menu_text = "&all"
uf.wizard_size = (600, 550)
uf.wizard_apply_button = False
uf.wizard_image = WIZARD_IMAGE_PATH + 'select.png'
Ejemplo n.º 34
0
from pipe_control import bruker
from user_functions.data import Uf_info

uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class("bruker")
uf_class.title = "Class containing the function for reading the Bruker Dynamics Center (DC) files."
uf_class.menu_text = "&bruker"
uf_class.gui_icon = "relax.bruker"


# The bruker.read user function.
uf = uf_info.add_uf("bruker.read")
uf.title = "Read a Bruker Dynamics Center (DC) relaxation data file."
uf.title_short = "Read a Bruker Dynamics Center file."
uf.add_keyarg(
    name="ri_id",
    py_type="str",
    desc_short="relaxation data ID string",
    desc="The relaxation data ID string.  This must be a unique identifier.",
)
uf.add_keyarg(
    name="file",
    py_type="str",
    arg_type="file sel",
    desc_short="file name",
    desc="The name of the Bruker Dynamics Center file containing the relaxation data.",
    wiz_filesel_style=FD_OPEN,
Ejemplo n.º 35
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import pipes
from pipe_control.mol_res_spin import copy_residue, create_residue, delete_residue, display_residue, get_molecule_names, get_residue_ids, id_string_doc, name_residue, number_residue
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('residue')
uf_class.title = "Class for manipulating the residue data."
uf_class.menu_text = "&residue"
uf_class.gui_icon = "relax.residue"

# The residue.copy user function.
uf = uf_info.add_uf('residue.copy')
uf.title = "Copy all data associated with a residue."
uf.title_short = "Residue copying."
uf.display = True
uf.add_keyarg(
    name="pipe_from",
    py_type="str",
    desc_short="source pipe",
    desc=
    "The data pipe containing the residue from which the data will be copied.  This defaults to the current data pipe.",
    wiz_element_type='combo',
    wiz_combo_iter=pipes.pipe_names,
    wiz_read_only=True,
    can_be_none=True)
uf.add_keyarg(
    name="res_from",
Ejemplo n.º 36
0
from pipe_control.statistics import aic, model_statistics
from user_functions.data import Uf_info

uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class("statistics")
uf_class.title = "Class containing the statistics related functions."
uf_class.menu_text = "&statistics"
uf_class.gui_icon = "oxygen.actions.office-chart-pie"


# The statistics.aic user function.
uf = uf_info.add_uf("statistics.aic")
uf.title = "Calculate and store Akaike's Information Criterion (AIC) for each model."
uf.title_short = "Calculate AIC values."
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph(
    "This will perform a calculation to obtain the chi-squared statistic for the current parameter values for each model, count the number of parameters per model and calculate Akaike's Information Criterion (AIC) using the formula AIC = chi2 + 2k.  The AIC values, chi-squared values, and number of parameters will be stored in the appropriate location for the model in the relax data store."
)
uf.backend = aic
uf.menu_text = "&aic"
uf.gui_icon = "relax.discrepancy_curve"
uf.wizard_apply_button = False
uf.wizard_size = (700, 400)
uf.wizard_image = WIZARD_IMAGE_PATH + "statistics.png"

Ejemplo n.º 37
0
from graphics import WIZARD_IMAGE_PATH
from pipe_control import pipes
from specific_analyses.setup import hybrid_obj
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('pipe')
uf_class.title = "Class holding the user functions for manipulating data pipes."
uf_class.menu_text = "&pipe"
uf_class.gui_icon = "relax.pipe"


# The pipe.bundle user function.
uf = uf_info.add_uf('pipe.bundle')
uf.title = "The grouping of data pipes into a bundle."
uf.title_short = "Data pipe bundling."
uf.add_keyarg(
    name = "bundle",
    py_type = "str",
    desc_short = "pipe bundle",
    desc = "The pipe bundle is a special grouping or clustering of data pipes.",
    wiz_element_type = 'combo',
    wiz_combo_iter = pipes.bundle_names,
    wiz_read_only = False
)
uf.add_keyarg(
    name = "pipe",
    py_type = "str",
    desc_short = "data pipe",
Ejemplo n.º 38
0
# relax module imports.
from graphics import ANALYSIS_IMAGE_PATH
from pipe_control import spectrometer
from specific_analyses.consistency_tests.uf import set_frq
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('consistency_tests')
uf_class.title = "Class containing functions specific to consistency tests for datasets from different fields."
uf_class.menu_text = "&consistency_tests"
uf_class.gui_icon = "relax.consistency_testing"

# The consistency_tests.set_frq user function.
uf = uf_info.add_uf('consistency_tests.set_frq')
uf.title = "Select which relaxation data to use in the consistency tests by NMR spectrometer frequency."
uf.title_short = "Spectrometer selection."
uf.add_keyarg(
    name="frq",
    py_type="float",
    desc_short="spectrometer frequency in Hz",
    desc=
    "The spectrometer frequency in Hz.  This must match the currently loaded data to the last decimal point.  See the 'sfrq' parameter in the Varian procpar file or the 'SFO1' parameter in the Bruker acqus file.",
    wiz_element_type='combo',
    wiz_combo_iter=spectrometer.get_frequencies,
    wiz_read_only=True,
)
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph(
Ejemplo n.º 39
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import bruker
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('bruker')
uf_class.title = "Class containing the function for reading the Bruker Dynamics Center (DC) files."
uf_class.menu_text = "&bruker"
uf_class.gui_icon = "relax.bruker"


# The bruker.read user function.
uf = uf_info.add_uf('bruker.read')
uf.title = "Read a Bruker Dynamics Center (DC) relaxation data file."
uf.title_short = "Read a Bruker Dynamics Center file."
uf.add_keyarg(
    name = "ri_id",
    py_type = "str",
    desc_short = "relaxation data ID string",
    desc = "The relaxation data ID string.  This must be a unique identifier."
)
uf.add_keyarg(
    name = "file",
    py_type = "str",
    arg_type = "file sel",
    desc_short = "file name",
    desc = "The name of the Bruker Dynamics Center file containing the relaxation data.",
    wiz_filesel_style = FD_OPEN
Ejemplo n.º 40
0
from graphics import WIZARD_IMAGE_PATH
from pipe_control import chemical_shift
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container
from user_functions.wildcards import WILDCARD_SPECTRUM_PEAKLIST


# The user function class.
uf_class = uf_info.add_class('chemical_shift')
uf_class.title = "Class for handling chemical shifts."
uf_class.menu_text = "&chemical_shift"
uf_class.gui_icon = "relax.chemical_shift"


# The chemical_shift.read user function.
uf = uf_info.add_uf('chemical_shift.read')
uf.title = "Read chemical shifts from a file."
uf.title_short = "Chemical shift reading."
uf.add_keyarg(
    name = "file",
    py_type = "str",
    arg_type = "file sel",
    desc_short = "file name",
    desc = "The name of the peak list of generic formatted file containing the chemical shifts.",
    wiz_filesel_wildcard = WILDCARD_SPECTRUM_PEAKLIST,
    wiz_filesel_style = FD_OPEN
)
uf.add_keyarg(
    name = "dir",
    py_type = "str",
    arg_type = "dir",
Ejemplo n.º 41
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import pipes, sequence
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('sequence')
uf_class.title = "Class for manipulating sequence data."
uf_class.menu_text = "&sequence"
uf_class.gui_icon = "relax.sequence"


# The sequence.attach_protons user function.
uf = uf_info.add_uf('sequence.attach_protons')
uf.title = "Attach protons to all heteronuclei."
uf.title_short = "Heteronuclei proton attachment."
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph("This can be used to attach protons to all the heteronuclei in the current data pipe.  For each proton, a spin container will be created.")
# Prompt examples.
uf.desc.append(Desc_container("Prompt examples"))
uf.desc[-1].add_paragraph("To attach protons, simply type:")
uf.desc[-1].add_prompt("relax> sequence.attach_protons()")
uf.backend = sequence.attach_protons
uf.menu_text = "&attach_protons"
uf.gui_icon = "oxygen.actions.list-add-relax-blue"
uf.wizard_size = (700, 500)
uf.wizard_image = WIZARD_IMAGE_PATH + 'sequence.png'
Ejemplo n.º 42
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import minimise
from user_functions.data import Uf_info, Uf_tables; uf_info = Uf_info(); uf_tables = Uf_tables()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('minimise')
uf_class.title = "Class for setting parameter values."
uf_class.menu_text = "&minimise"
uf_class.gui_icon = "relax.rosenbrock"


# The minimise.calculate user function.
uf = uf_info.add_uf('minimise.calculate')
uf.title = "Calculate the model parameters or the current target function value."
uf.title_short = "Model parameter or target function value calculation."
uf.display = True
uf.add_keyarg(
    name = "verbosity",
    default = 1,
    py_type = "int",
    desc_short = "verbosity level",
    desc = "The amount of information to print to screen.  Zero corresponds to minimal output while higher values increase the amount of output.  The default value is 1."
)
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph("The operation of this user function is two-fold and depends on whether the solution for the models of the current analysis are found by direct calculation or by optimisation.  The dual operations are:")
uf.desc[-1].add_item_list_element("Direct calculation models", "For these models, the parameters will be directly calculated from the base data.  This will be the exact solution and the user function will store the parameter values.  The grid search and optimisation user functions are not implemented for this analysis type.")
uf.desc[-1].add_item_list_element("Optimised models", "This will call the target function normally used for optimisation for each model using the current parameter values.  This can be used to manually find the chi-squared value for different parameter values.  The parameter values will not be affected.")
Ejemplo n.º 43
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import align_tensor, pipes
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('align_tensor')
uf_class.title = "Class for manipulating the alignment tensor."
uf_class.menu_text = "&align_tensor"
uf_class.gui_icon = "relax.align_tensor"


# The align_tensor.copy user function.
uf = uf_info.add_uf('align_tensor.copy')
uf.title = "Copy alignment tensor data."
uf.title_short = "Alignment tensor copying."
uf.add_keyarg(
    name = "tensor_from",
    default = None,
    py_type = "str",
    desc_short = "source tensor ID",
    desc = "The identification string of the alignment tensor to copy the data from."
)
uf.add_keyarg(
    name = "pipe_from",
    default = None,
    py_type = "str",
    desc_short = "source data pipe",
    desc = "The name of the data pipe to copy the alignment tensor data from.",
Ejemplo n.º 44
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import diffusion_tensor, pipes
from user_functions.data import Uf_info

uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('diffusion_tensor')
uf_class.title = "Class for manipulating the diffusion tensor."
uf_class.menu_text = "&diffusion_tensor"
uf_class.gui_icon = "relax.diff_tensor"

# The diffusion_tensor.copy user function.
uf = uf_info.add_uf('diffusion_tensor.copy')
uf.title = "Copy diffusion tensor data from one data pipe to another."
uf.title_short = "Diffusion tensor data copying."
uf.add_keyarg(
    name="pipe_from",
    py_type="str",
    desc_short="source data pipe",
    desc="The name of the data pipe to copy the diffusion tensor data from.",
    wiz_element_type='combo',
    wiz_combo_iter=pipes.pipe_names,
    wiz_read_only=True,
    can_be_none=True)
uf.add_keyarg(
    name="pipe_to",
    py_type="str",
    desc_short="destination data pipe",
Ejemplo n.º 45
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import diffusion_tensor, pipes
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('diffusion_tensor')
uf_class.title = "Class for manipulating the diffusion tensor."
uf_class.menu_text = "&diffusion_tensor"
uf_class.gui_icon = "relax.diff_tensor"


# The diffusion_tensor.copy user function.
uf = uf_info.add_uf('diffusion_tensor.copy')
uf.title = "Copy diffusion tensor data from one data pipe to another."
uf.title_short = "Diffusion tensor data copying."
uf.add_keyarg(
    name = "pipe_from",
    py_type = "str",
    desc_short = "source data pipe",
    desc = "The name of the data pipe to copy the diffusion tensor data from.",
    wiz_element_type = 'combo',
    wiz_combo_iter = pipes.pipe_names,
    wiz_read_only = True,
    can_be_none = True
)
uf.add_keyarg(
    name = "pipe_to",
    py_type = "str",
Ejemplo n.º 46
0
from pipe_control import align_tensor, pcs, pipes
from pipe_control.mol_res_spin import get_spin_ids
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container
from user_functions.wildcards import WILDCARD_GRACE_ALL


# The user function class.
uf_class = uf_info.add_class('pcs')
uf_class.title = "Class for handling pseudo-contact shifts."
uf_class.menu_text = "&pcs"
uf_class.gui_icon = "relax.align_tensor"


# The pcs.back_calc user function.
uf = uf_info.add_uf('pcs.back_calc')
uf.title = "Back calculate the pseudo-contact shifts."
uf.title_short = "PCS back calculation."
uf.display = True
uf.add_keyarg(
    name = "align_id",
    py_type = "str",
    desc_short = "alignment ID string",
    desc = "The alignment ID string.",
    wiz_element_type = 'combo',
    wiz_combo_iter = align_tensor.get_align_ids,
    wiz_read_only = True,
    can_be_none = True
)
# Description.
uf.desc.append(Desc_container())
Ejemplo n.º 47
0
from lib.text.gui import i0, iinf, rx
from pipe_control import spectrum
from specific_analyses.relax_fit.uf import relax_time, select_model
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('relax_fit')
uf_class.title = "Class for relaxation curve fitting."
uf_class.menu_text = "&relax_fit"
uf_class.gui_icon = "relax.relax_fit"


# The relax_fit.relax_time user function.
uf = uf_info.add_uf('relax_fit.relax_time')
uf.title = "Set the relaxation delay time associated with each spectrum."
uf.title_short = "Relaxation delay time setting."
uf.add_keyarg(
    name = "time",
    default = 0.0,
    py_type = "num",
    desc_short = "relaxation time",
    desc = "The time, in seconds, of the relaxation period."
)
uf.add_keyarg(
    name = "spectrum_id",
    py_type = "str",
    desc_short = "spectrum identification string",
    desc = "The spectrum identification string.",
    wiz_element_type = 'combo',
Ejemplo n.º 48
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control.statistics import aic, model_statistics
from user_functions.data import Uf_info

uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('statistics')
uf_class.title = "Class containing the statistics related functions."
uf_class.menu_text = "&statistics"
uf_class.gui_icon = "oxygen.actions.office-chart-pie"

# The statistics.aic user function.
uf = uf_info.add_uf('statistics.aic')
uf.title = "Calculate and store Akaike's Information Criterion (AIC) for each model."
uf.title_short = "Calculate AIC values."
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph(
    "This will perform a calculation to obtain the chi-squared statistic for the current parameter values for each model, count the number of parameters per model and calculate Akaike's Information Criterion (AIC) using the formula AIC = chi2 + 2k.  The AIC values, chi-squared values, and number of parameters will be stored in the appropriate location for the model in the relax data store."
)
uf.backend = aic
uf.menu_text = "&aic"
uf.gui_icon = "relax.discrepancy_curve"
uf.wizard_apply_button = False
uf.wizard_size = (700, 400)
uf.wizard_image = WIZARD_IMAGE_PATH + 'statistics.png'

# The statistics.model user function.
Ejemplo n.º 49
0
from specific_analyses.frame_order.uf import distribute, sobol_setup, pdb_model, permute_axes, pivot, quad_int, ref_domain, select_model, simulate
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.data import Uf_tables
uf_tables = Uf_tables()
from user_functions.objects import Desc_container
from user_functions.wildcards import WILDCARD_STRUCT_PDB_ALL

# The user function class.
uf_class = uf_info.add_class('frame_order')
uf_class.title = "Class containing the user functions of the Frame Order theories."
uf_class.menu_text = "&frame_order"
uf_class.gui_icon = "relax.frame_order"

# The frame_order.count_sobol_points user function.
uf = uf_info.add_uf('frame_order.count_sobol_points')
uf.title = "Count the number of Sobol' points used for the current parameter values."
uf.title_short = "Used Sobol' point count."
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph(
    "This allows the number of Sobol' integration points used during the Frame Order target function optimisation to be counted.  This uses the current parameter values to determine how many are used for the PCS calculation compared to the total number."
)
uf.backend = count_sobol_points
uf.menu_text = "&count_sobol_points"
uf.gui_icon = "oxygen.categories.applications-education"
uf.wizard_size = (800, 400)
uf.wizard_image = WIZARD_IMAGE_PATH + 'frame_order.png'

# The frame_order.distribute user function.
uf = uf_info.add_uf('frame_order.distribute')
Ejemplo n.º 50
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import pipes, relax_data
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('relax_data')
uf_class.title = "Class for manipulating R1, R2, NOE, or R2eff relaxation data."
uf_class.menu_text = "&relax_data"
uf_class.gui_icon = "relax.fid"

# The relax_data.back_calc user function.
uf = uf_info.add_uf('relax_data.back_calc')
uf.title = "Back calculate the relaxation data at the given frequency."
uf.title_short = "Relaxation data back calculation."
uf.add_keyarg(name="ri_id",
              py_type="str",
              desc_short="relaxation ID string",
              desc="The relaxation data ID string.",
              can_be_none=True)
uf.add_keyarg(name="ri_type",
              py_type="str",
              desc_short="relaxation type",
              desc="The relaxation data type, ie 'R1', 'R2', or 'NOE'.",
              wiz_element_type="combo",
              wiz_combo_choices=["R1", "R2", "NOE"],
              wiz_read_only=True,
              can_be_none=True)
Ejemplo n.º 51
0
# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import spectrum
import pipe_control.spectrometer
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('spectrometer')
uf_class.title = "Class for manipulating spectrometer frequencies."
uf_class.menu_text = "&spectrometer"
uf_class.gui_icon = "relax.spectrometer"

# The spectrometer.frequency user function.
uf = uf_info.add_uf('spectrometer.frequency')
uf.title = "Set the spectrometer proton frequency of the experiment."
uf.title_short = "Spectrometer frequency setup."
uf.add_keyarg(
    name="id",
    basic_types=["str"],
    desc_short="experiment ID",
    desc="The experiment identification string to set the frequency of.",
    wiz_element_type='combo',
    wiz_combo_iter=spectrum.get_ids)
uf.add_keyarg(
    name="frq",
    basic_types=["number"],
    desc_short="spectrometer frequency",
    desc=
    "The spectrometer frequency.  See the 'sfrq' parameter in the Varian procpar file or the 'SFO1' parameter in the Bruker acqus file."
Ejemplo n.º 52
0
from specific_analyses.noe import Noe
from specific_analyses.relax_disp.api import Relax_disp
from specific_analyses.relax_fit import Relax_fit
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('grace')
uf_class.title = "Class for interfacing with Grace."
uf_class.menu_text = "&grace"
uf_class.gui_icon = "relax.grace_icon"


# The grace.view user function.
uf = uf_info.add_uf('grace.view')
uf.title = "Visualise the file within Grace."
uf.title_short = "Grace execution."
uf.add_keyarg(
    name = "file",
    py_type = "str",
    arg_type = "file sel",
    desc_short = "file name",
    desc = "The name of the file.",
    wiz_filesel_wildcard = "Grace files (*.agr)|*.agr;*.AGR",
    wiz_filesel_style = FD_OPEN
)
uf.add_keyarg(
    name = "dir",
    default = "grace",
    py_type = "str",
Ejemplo n.º 53
0
)
monte_carlo_desc.add_prompt(
    "relax> minimise.calculate()                                      # Step 6."
)
monte_carlo_desc.add_prompt(
    "relax> monte_carlo.error_analysis()                              # Step 8."
)

# The user function class.
uf_class = uf_info.add_class('monte_carlo')
uf_class.title = "Class containing the functions for Monte Carlo and related simulations."
uf_class.menu_text = "&monte_carlo"
uf_class.gui_icon = "oxygen.actions.roll-relax-blue"

# The monte_carlo.create_data user function.
uf = uf_info.add_uf('monte_carlo.create_data')
uf.title = "Create the Monte Carlo simulation data."
uf.title_short = "Data creation."
uf.add_keyarg(name="method",
              default="back_calc",
              basic_types=["str"],
              desc_short="method",
              desc="The simulation method.",
              wiz_element_type="combo",
              wiz_combo_choices=["Monte Carlo", "Bootstrapping"],
              wiz_combo_data=["back_calc", "direct"],
              wiz_read_only=True)
uf.add_keyarg(
    name="distribution",
    default="measured",
    basic_types=["str"],
Ejemplo n.º 54
0
from os import sep

# relax module imports.
from graphics import ANALYSIS_IMAGE_PATH
from pipe_control.error_analysis import covariance_matrix
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('error_analysis')
uf_class.title = "Class for relaxation curve fitting."
uf_class.menu_text = "&error_analysis"

# The error_analysis.covariance_matrix user function.
uf = uf_info.add_uf('error_analysis.covariance_matrix')
uf.title = "Parameter error estimation via the covariance matrix."
uf.title_short = "Covariance matrix parameter error estimation."
uf.add_keyarg(
    name="epsrel",
    basic_types=["float"],
    default=0.0,
    desc_short="parameter to remove linear-dependent columns.",
    desc=
    "The parameter to remove linear-dependent columns when J is rank deficient.",
    can_be_none=False)
uf.add_keyarg(name="verbosity",
              default=1,
              basic_types=["int"],
              desc_short="amount of information to print.",
              desc="The higher the value, the greater the verbosity.",
Ejemplo n.º 55
0
from graphics import WIZARD_IMAGE_PATH
from lib.physical_constants import NH_BOND_LENGTH
from pipe_control.mol_res_spin import get_spin_ids
from pipe_control import pipes, interatomic
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('interatom')
uf_class.title = "Class for manipulating magnetic dipole-dipole interactions."
uf_class.menu_text = "&interatom"
uf_class.gui_icon = "relax.dipole_pair"

# The interatom.copy user function.
uf = uf_info.add_uf('interatom.copy')
uf.title = "Copy all data associated with a interatomic data container."
uf.title_short = "Interatomic interaction copying."
uf.display = True
uf.add_keyarg(
    name="pipe_from",
    basic_types=["str"],
    desc_short="source data pipe",
    desc=
    "The data pipe containing the interatomic data container from which the data will be copied.  This defaults to the current data pipe.",
    wiz_element_type='combo',
    wiz_combo_iter=pipes.pipe_names,
    wiz_read_only=True,
    can_be_none=True)
uf.add_keyarg(
    name="pipe_to",
Ejemplo n.º 56
0
# relax module imports.
from graphics import ANALYSIS_IMAGE_PATH
from pipe_control import noesy, spectrum
from specific_analyses.noe.uf import spectrum_type
from user_functions.data import Uf_info
uf_info = Uf_info()
from user_functions.objects import Desc_container

# The user function class.
uf_class = uf_info.add_class('noe')
uf_class.title = "Class for handling steady-state NOE and NOESY data."
uf_class.menu_text = "&noe"
uf_class.gui_icon = "relax.noe"

# The noe.read_restraints user function.
uf = uf_info.add_uf('noe.read_restraints')
uf.title = "Read NOESY or ROESY restraints from a file."
uf.title_short = "Restraint reading."
uf.add_keyarg(
    name="file",
    arg_type="file sel read",
    desc_short="file name",
    desc="The name of the file containing the restraint data.",
)
uf.add_keyarg(name="dir",
              arg_type="dir",
              desc_short="directory name",
              desc="The directory where the file is located.",
              can_be_none=True)
uf.add_keyarg(
    name="proton1_col",
Ejemplo n.º 57
0
from specific_analyses.model_free.uf import classic_style_doc
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container
from user_functions.wildcards import WILDCARD_MOLMOL_MACRO, WILDCARD_STRUCT_PDB



# The user function class.
uf_class = uf_info.add_class('molmol')
uf_class.title = "Class for interfacing with Molmol."
uf_class.menu_text = "&molmol"
uf_class.gui_icon = "relax.molmol"


# The molmol.clear_history user function.
uf = uf_info.add_uf('molmol.clear_history')
uf.title = "Clear the Molmol command history."
uf.title_short = "Clear Molmol history."""
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph("This will clear the Molmol history from memory.")
uf.backend = molmol.molmol_obj.clear_history
uf.menu_text = "clear_&history"
uf.wizard_size = (600, 300)
uf.wizard_apply_button = False
uf.wizard_image = WIZARD_IMAGE_PATH + 'molmol' + sep + 'molmol_logo.png'


# The molmol.command user function.
uf = uf_info.add_uf('molmol.command')
uf.title = "Execute a user supplied Molmol command."
Ejemplo n.º 58
0
#                                                                             #
###############################################################################

# Module docstring.
"""The eliminate user function definitions for removing failed models."""

# relax module imports.
from graphics import WIZARD_IMAGE_PATH
from pipe_control import eliminate
from specific_analyses.model_free import uf as model_free_uf
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The eliminate user function.
uf = uf_info.add_uf('eliminate')
uf.title = "Elimination or rejection of models."
uf.title_short = "Model elimination."
uf.display = True
uf.add_keyarg(
    name = "function",
    py_type = "func",
    arg_type = "func",
    desc_short = "function",
    desc = "An optional user supplied function for model elimination.",
    can_be_none = True
)
uf.add_keyarg(
    name = "args",
    py_type = "tuple",
    arg_type = "func args",
Ejemplo n.º 59
0
monte_carlo_desc.add_prompt("relax> minimise.calculate()                                      # Step 2.")
monte_carlo_desc.add_prompt("relax> monte_carlo.setup(number=500)                             # Step 3.")
monte_carlo_desc.add_prompt("relax> monte_carlo.create_data(method='back_calc')               # Step 4.")
monte_carlo_desc.add_prompt("relax> minimise.calculate()                                      # Step 6.")
monte_carlo_desc.add_prompt("relax> monte_carlo.error_analysis()                              # Step 8.")


# The user function class.
uf_class = uf_info.add_class('monte_carlo')
uf_class.title = "Class containing the functions for Monte Carlo and related simulations."
uf_class.menu_text = "&monte_carlo"
uf_class.gui_icon = "oxygen.actions.roll-relax-blue"


# The monte_carlo.create_data user function.
uf = uf_info.add_uf('monte_carlo.create_data')
uf.title = "Create the Monte Carlo simulation data."
uf.title_short = "Data creation."
uf.add_keyarg(
    name = "method",
    default = "back_calc",
    py_type = "str",
    desc_short = "method",
    desc = "The simulation method.",
    wiz_element_type = "combo",
    wiz_combo_choices = ["Monte Carlo", "Bootstrapping"],
    wiz_combo_data = ["back_calc", "direct"],
    wiz_read_only = True
)
uf.add_keyarg(
    name = "distribution",
Ejemplo n.º 60
0
from info import print_sys_info
from lib.timing import print_time
from pipe_control.system import cd, pwd
from user_functions.data import Uf_info; uf_info = Uf_info()
from user_functions.objects import Desc_container


# The user function class.
uf_class = uf_info.add_class('system')
uf_class.title = "Class containing the OS system related functions."
uf_class.menu_text = "&system"
uf_class.gui_icon = "oxygen.actions.help-about"


# The cd user function.
uf = uf_info.add_uf('system.cd')
uf.title = "Change the current working directory to the specified path."
uf.title_short = "Change current working directory."
uf.display = True
uf.add_keyarg(
    name = "path",
    py_type = "str",
    arg_type = "dir sel",
    desc_short = "path",
    desc = "The path to the new current working directory.",
    can_be_none = False,
    wiz_filesel_style = FD_CHANGE_DIR
)
# Description.
uf.desc.append(Desc_container())
uf.desc[-1].add_paragraph("The equivalent of python module os.chdir(path).  Change the current working directory to the specified path.")