def initialise(): """Initialise all of the user function definitions by importing then validating them.""" # Import all the modules to set up the data. import user_functions.align_tensor import user_functions.angles import user_functions.bmrb import user_functions.bruker import user_functions.chemical_shift import user_functions.consistency_tests import user_functions.dasha import user_functions.deselect import user_functions.diffusion_tensor import user_functions.domain import user_functions.dx import user_functions.eliminate import user_functions.fix import user_functions.frame_order import user_functions.grace import user_functions.interatom import user_functions.j_coupling import user_functions.jw_mapping import user_functions.minimisation import user_functions.model_free import user_functions.model_selection import user_functions.molecule import user_functions.molmol import user_functions.monte_carlo import user_functions.n_state_model import user_functions.noe import user_functions.palmer import user_functions.paramag import user_functions.pcs import user_functions.pipe import user_functions.pymol_control import user_functions.rdc import user_functions.relax_data import user_functions.relax_disp import user_functions.relax_fit import user_functions.residue import user_functions.reset import user_functions.results import user_functions.script import user_functions.select import user_functions.sequence import user_functions.spectrometer import user_functions.spectrum import user_functions.spin import user_functions.state import user_functions.structure import user_functions.sys_info import user_functions.value import user_functions.vmd # Import the data structure. from user_functions.data import Uf_info; uf_info = Uf_info() # Check the validity of the data. uf_info.validate()
# 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 spectrometer user function definitions for loading spectrometer information.""" # 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",
from os import sep from pympler import muppy import wx # relax module imports. from data_store import Relax_data_store ds = Relax_data_store() from gui.fonts import font from gui.interpreter import Interpreter from gui.uf_objects import Uf_storage uf_store = Uf_storage() from lib.errors import RelaxError from status import Status status = Status() from user_functions.data import Uf_info uf_info = Uf_info() class Dummy_controller: """Dummy relax controller.""" def __init__(self): self.log_panel = Dummy_log_panel() class Dummy_log_panel: """Dummy relax controller log panel.""" def on_goto_end(self, arg1): """Dummy function.""" class Testing_frame(wx.Frame):
# 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 monte_carlo user function definitions for Monte Carlo simulations.""" # relax module imports. from graphics import WIZARD_IMAGE_PATH from pipe_control import error_analysis from user_functions.data import Uf_info uf_info = Uf_info() from user_functions.objects import Desc_container # Generic description document, used in all user functions. monte_carlo_desc = Desc_container("Monte Carlo Simulation Overview") monte_carlo_desc.add_paragraph( "For proper error analysis using Monte Carlo simulations, a sequence of function calls is required for running the various simulation components. The steps necessary for implementing Monte Carlo simulations are:" ) monte_carlo_desc.add_item_list_element( "1", "The measured data set together with the corresponding error set should be loaded into relax." ) monte_carlo_desc.add_item_list_element( "2", "Either minimisation is used to optimise the parameters of the chosen model, or a calculation is run." )
"""The frame_order user function definitions.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN else: FD_OPEN = -1 # relax module imports. from graphics import WIZARD_IMAGE_PATH from lib.frame_order.variables import MODEL_DOUBLE_ROTOR, MODEL_FREE_ROTOR, MODEL_ISO_CONE, MODEL_ISO_CONE_FREE_ROTOR, MODEL_ISO_CONE_TORSIONLESS, MODEL_PSEUDO_ELLIPSE, MODEL_PSEUDO_ELLIPSE_FREE_ROTOR, MODEL_PSEUDO_ELLIPSE_TORSIONLESS, MODEL_RIGID, MODEL_ROTOR from specific_analyses.frame_order.optimisation import count_sobol_points 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."
# 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 relax_fit user function definitions.""" # relax module imports. from graphics import ANALYSIS_IMAGE_PATH 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(
# Python module imports. from os import sep # relax module imports. from graphics import WIZARD_IMAGE_PATH from pipe_control import pipes, value from specific_analyses.consistency_tests.parameter_object import Consistency_tests_params; consistency_test_params = Consistency_tests_params() from specific_analyses.frame_order.parameter_object import Frame_order_params; frame_order_params = Frame_order_params() from specific_analyses.jw_mapping.parameter_object import Jw_mapping_params; jw_mapping_params = Jw_mapping_params() from specific_analyses.model_free.parameter_object import Model_free_params; model_free_params = Model_free_params() from specific_analyses.n_state_model.parameter_object import N_state_params; n_state_params = N_state_params() from specific_analyses.noe.parameter_object import Noe_params; noe_params = Noe_params() 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."
# Module docstring. """The noe user function definitions.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN else: FD_OPEN = -1 # 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(
# along with this program. If not, see <http://www.gnu.org/licenses/>. # # # ############################################################################### # Module docstring. """The chemical_shift user function definitions.""" # Python module imports. from os import sep # relax module imports. 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",
def initialise(): """Initialise all of the user function definitions by importing then validating them.""" # Import all the modules to set up the data. import user_functions.align_tensor import user_functions.angles import user_functions.bmrb import user_functions.bruker import user_functions.chemical_shift import user_functions.consistency_tests import user_functions.dasha import user_functions.deselect import user_functions.diffusion_tensor import user_functions.domain import user_functions.dx import user_functions.eliminate import user_functions.error_analysis import user_functions.fix import user_functions.frame_order import user_functions.grace import user_functions.interatom import user_functions.j_coupling import user_functions.jw_mapping import user_functions.minimisation import user_functions.model_free import user_functions.model_selection import user_functions.molecule import user_functions.molmol import user_functions.monte_carlo import user_functions.n_state_model import user_functions.noe import user_functions.palmer import user_functions.paramag import user_functions.pcs import user_functions.pipe import user_functions.pymol_control import user_functions.rdc import user_functions.relax_data import user_functions.relax_disp import user_functions.relax_fit import user_functions.residue import user_functions.reset import user_functions.results import user_functions.script import user_functions.select import user_functions.sequence import user_functions.spectrometer import user_functions.spectrum import user_functions.spin import user_functions.state import user_functions.statistics import user_functions.structure import user_functions.sys_info import user_functions.value import user_functions.vmd # Import the data structure. from user_functions.data import Uf_info uf_info = Uf_info() # Check the validity of the data. uf_info.validate()
# Module docstring. """The n_state_model user function definitions.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_SAVE else: FD_SAVE = -1 # relax module imports. 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(
# 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 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
# This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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 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",
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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 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',
############################################################################### # Module docstring. """The palmer user function definitions for controlling the Modelfree4 software.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN else: FD_OPEN = -1 # 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(
# Module docstring. """The spectrum user function definitions.""" # Python module imports. from os import sep import dep_check if dep_check.wx_module: from wx import FD_OPEN else: FD_OPEN = -1 # relax module imports. from graphics import WIZARD_IMAGE_PATH 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."
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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 align_tensor user function definitions.""" # 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(
# Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN else: FD_OPEN = -1 # relax module imports. from graphics import WIZARD_IMAGE_PATH from lib.software.opendx.execute import run from pipe_control import diffusion_tensor from pipe_control.opendx import map 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."
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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 jw_mapping user function definitions for Reduced Spectral Density Mapping.""" # 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(
# 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 minimisation user function definitions.""" # 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(
# 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 consistency_tests user function definitions.""" # relax module imports. 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(
from pipe_control import grace from pipe_control.plotting import write_xy from specific_analyses.consistency_tests.parameter_object import Consistency_tests_params consistency_test_params = Consistency_tests_params() from specific_analyses.jw_mapping.parameter_object import Jw_mapping_params jw_mapping_params = Jw_mapping_params() from specific_analyses.model_free.parameter_object import Model_free_params model_free_params = Model_free_params() from specific_analyses.noe.parameter_object import Noe_params noe_params = Noe_params() 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.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",
# Module docstring. """Module containing the base GUI element for listing things.""" # Python module imports. import wx import wx.lib.buttons # relax module imports. import dep_check from gui.components.menu import build_menu_item from gui.fonts import font from gui.misc import add_border from gui.string_conv import str_to_gui from gui.uf_objects import Uf_storage; uf_store = Uf_storage() from status import Status; status = Status() from user_functions.data import Uf_info; uf_info = Uf_info() class Base_list(object): """The GUI element for listing the software used in the analysis.""" def __init__(self, gui=None, parent=None, box=None, id=None, proportion=0, button_placement='default'): """Build the base list GUI element. @keyword gui: The main GUI object. @type gui: wx.Frame instance @keyword parent: The parent GUI element that this is to be attached to. @type parent: wx object @keyword box: The box sizer to pack this GUI component into. @type box: wx.BoxSizer instance @keyword id: A unique identification string. This is used to register the update method with the GUI user function observer object.
# This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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)
# 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 spectrometer user function definitions for loading spectrometer information.""" # 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"],
# Module docstring. """The bmrb user function definitions.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN, FD_SAVE else: FD_OPEN = -1 FD_SAVE = -1 # 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",
# # ############################################################################### # Module docstring. """The interatom user function definitions.""" # Python module imports. from os import sep # relax module imports. 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",
"""The bruker user function definitions for interfacing with the Bruker Dynamics Center.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN else: FD_OPEN = -1 # 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(
# Python module imports. from os import sep import dep_check if dep_check.wx_module: from wx import FD_OPEN, FD_SAVE else: FD_OPEN = -1 FD_SAVE = -1 # relax module imports. import colour 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())
# 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 statistics user function definitions.""" # 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.
# Python module imports. from os import sep import dep_check if dep_check.wx_module: from wx import FD_OPEN, FD_SAVE else: FD_OPEN = -1 FD_SAVE = -1 # relax module imports. import colour from graphics import WIZARD_IMAGE_PATH from pipe_control import molmol 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())
# 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 consistency_tests user function definitions.""" # 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",
# 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 residue user function definitions.""" # 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",
# Module docstring. """The chemical_shift user function definitions.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN else: FD_OPEN = -1 from os import sep # relax module imports. 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."
# 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 pipe user function definitions.""" # relax module imports. 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(
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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 minimisation user function definitions.""" # 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
############################################################################### # Module docstring. """The bruker user function definitions for interfacing with the Bruker Dynamics Center.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN else: FD_OPEN = -1 # 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(
# 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 diffusion_tensor user function definitions.""" # 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",
# Module docstring. """The sequence user function definitions.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN, FD_SAVE else: FD_OPEN = -1 FD_SAVE = -1 # 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.
# Module docstring. """The pcs user function definitions.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN, FD_SAVE else: FD_OPEN = -1 FD_SAVE = -1 # relax module imports. from graphics import WIZARD_IMAGE_PATH 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."
# 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 statistics user function definitions.""" # 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(
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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 diffusion_tensor user function definitions.""" # 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(
"""The relax_data user function definitions.""" # Python module imports. from os import sep import dep_check if dep_check.wx_module: from wx import FD_OPEN, FD_SAVE else: FD_OPEN = -1 FD_SAVE = -1 # 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",
from wx import FD_OPEN, FD_SAVE else: FD_OPEN = -1 FD_SAVE = -1 # relax module imports. from graphics import WIZARD_IMAGE_PATH from pipe_control import grace, minimise from prompt.doc_string import regexp_doc from specific_analyses.consistency_tests import Consistency_tests from specific_analyses.jw_mapping import Jw_mapping from specific_analyses.model_free import Model_free 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(
# This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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 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.")
# 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 error_analysis user function definitions.""" # Python module imports. 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,
# 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 select user function definitions.""" # 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())
# 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 noe user function definitions.""" # 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",
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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 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 = [
# 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 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
# along with this program. If not, see <http://www.gnu.org/licenses/>. # # # ############################################################################### # Module docstring. """The model_free user function definitions for model-free analysis.""" # Python module imports. from os import sep # 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"],
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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 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",
# Module docstring. """The frame_order user function definitions.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN else: FD_OPEN = -1 # relax module imports. from graphics import WIZARD_IMAGE_PATH from lib.frame_order.variables import MODEL_DOUBLE_ROTOR, MODEL_FREE_ROTOR, MODEL_ISO_CONE, MODEL_ISO_CONE_FREE_ROTOR, MODEL_ISO_CONE_TORSIONLESS, MODEL_PSEUDO_ELLIPSE, MODEL_PSEUDO_ELLIPSE_FREE_ROTOR, MODEL_PSEUDO_ELLIPSE_TORSIONLESS, MODEL_RIGID, MODEL_ROTOR from specific_analyses.frame_order.optimisation import count_sobol_points 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."
# Copyright (C) 2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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/>. # # # ############################################################################### # relax module imports. import user_functions from user_functions.data import Uf_info uf_info = Uf_info() # Set up the user functions. user_functions.initialise() # Loop over all user functions and print out their name. for uf_name, uf in uf_info.uf_loop(): print(uf_name)
# along with this program. If not, see <http://www.gnu.org/licenses/>. # # # ############################################################################### # Module docstring. """The molmol user function definitions for interacting with Molmol.""" # Python module imports. from os import sep # relax module imports. import colour from graphics import WIZARD_IMAGE_PATH from pipe_control import molmol 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."
# # # 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 error_analysis user function definitions.""" # Python module imports. 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",
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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 monte_carlo user function definitions for Monte Carlo simulations.""" # relax module imports. from graphics import WIZARD_IMAGE_PATH from pipe_control import error_analysis from user_functions.data import Uf_info; uf_info = Uf_info() from user_functions.objects import Desc_container # Generic description document, used in all user functions. monte_carlo_desc = Desc_container("Monte Carlo Simulation Overview") monte_carlo_desc.add_paragraph("For proper error analysis using Monte Carlo simulations, a sequence of function calls is required for running the various simulation components. The steps necessary for implementing Monte Carlo simulations are:") monte_carlo_desc.add_item_list_element("1", "The measured data set together with the corresponding error set should be loaded into relax.") monte_carlo_desc.add_item_list_element("2", "Either minimisation is used to optimise the parameters of the chosen model, or a calculation is run.") monte_carlo_desc.add_item_list_element("3", "To initialise and turn on Monte Carlo simulations, the number of simulations, n, needs to be set.") monte_carlo_desc.add_item_list_element("4", "The simulation data needs to be created either by back calculation from the fully minimised model parameters from step 2 or by direct calculation when values are calculated rather than minimised. The error set is used to randomise each simulation data set by assuming Gaussian errors. This creates a synthetic data set for each Monte Carlo simulation.") monte_carlo_desc.add_item_list_element("5", "Prior to minimisation of the parameters of each simulation, initial parameter estimates are required. These are taken as the optimised model parameters. An alternative is to use a grid search for each simulation to generate initial estimates, however this is extremely computationally expensive. For the case where values are calculated rather than minimised, this step should be skipped (although the results will be unaffected if this is accidentally run).") monte_carlo_desc.add_item_list_element("6", "Each simulation requires minimisation or calculation. The same techniques as used in step 2, excluding the grid search when minimising, should be used for the simulations.") monte_carlo_desc.add_item_list_element("7", "Failed simulations are removed using the techniques of model elimination.") monte_carlo_desc.add_item_list_element("8", "The model parameter errors are calculated from the distribution of simulation parameters.") monte_carlo_desc.add_paragraph("Monte Carlo simulations can be turned on or off using functions within this class. Once the function for setting up simulations has been called, simulations will be turned on. The effect of having simulations turned on is that the functions used for minimisation (grid search, minimise, etc) or calculation will only affect the simulation parameters and not the model parameters. By subsequently turning simulations off using the appropriate function, the functions used in minimisation will affect the model parameters and not the simulation parameters.")
############################################################################### # Module docstring. """The select user function definitions.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN else: FD_OPEN = -1 # 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