# Module docstring. """Module for selecting and deselecting spins.""" # Python module imports from warnings import warn # relax module imports. from lib.errors import RelaxError, RelaxNoDomainError, RelaxNoSequenceError from lib.io import read_spin_data from lib.selection import Selection, spin_id_to_data_list from lib.warnings import RelaxNoSpinWarning from pipe_control import pipes from pipe_control.interatomic import interatomic_loop from pipe_control.mol_res_spin import exists_mol_res_spin_data, generate_spin_id_unique, return_spin, spin_loop from user_functions.data import Uf_tables; uf_tables = Uf_tables() from user_functions.objects import Desc_container boolean_doc = Desc_container("Boolean operators") boolean_doc.add_paragraph("The boolean operator can be used to change how spin systems or interatomic data containers are selected. The allowed values are: 'OR', 'NOR', 'AND', 'NAND', 'XOR', 'XNOR'. The following table details how the selections will occur for the different boolean operators.") table = uf_tables.add_table(label="table: bool operators", caption="Boolean operators and their effects on selections") table.add_headings(["Spin system or interatomic data container", "1", "2", "3", "4", "5", "6", "7", "8", "9"]) table.add_row(["Original selection", "0", "1", "1", "1", "1", "0", "1", "0", "1"]) table.add_row(["New selection", "0", "1", "1", "1", "1", "1", "0", "0", "0"]) table.add_row(["OR", "0", "1", "1", "1", "1", "1", "1", "0", "1"]) table.add_row(["NOR", "1", "0", "0", "0", "0", "0", "0", "1", "0"]) table.add_row(["AND", "0", "1", "1", "1", "1", "0", "0", "0", "0"]) table.add_row(["NAND", "1", "0", "0", "0", "0", "1", "1", "1", "1"]) table.add_row(["XOR", "0", "0", "0", "0", "0", "1", "1", "0", "1"]) table.add_row(["XNOR", "1", "1", "1", "1", "1", "0", "0", "1", "0"])
# 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." # Description. uf.desc.append(Desc_container())
# 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." uf.title_short = "Baseplane RMSD setting."
# 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." uf.add_keyarg(
"""The model-free analysis user functions.""" # Python module imports. from re import match # relax module imports. from lib.errors import RelaxError, RelaxFuncSetupError, RelaxNoSequenceError, RelaxTensorError from pipe_control import pipes from pipe_control.mol_res_spin import exists_mol_res_spin_data, spin_loop from pipe_control.pipes import check_pipe import specific_analyses from specific_analyses.model_free.api import Model_free from specific_analyses.model_free.model import model_map from user_functions.data import Uf_tables uf_tables = Uf_tables() from user_functions.objects import Desc_container # The API object. api_model_free = Model_free() # Classic style documentation. classic_style_doc = Desc_container("Model-free classic style") classic_style_doc.add_paragraph("Creator: Edward d'Auvergne") classic_style_doc.add_paragraph('Argument string: "classic"') classic_style_doc.add_paragraph( "Description: The classic style draws the backbone of a protein in a cylindrical bond style. Rather than colouring the amino acids to which the NH bond belongs, the three covalent bonds of the peptide bond from Ca to Ca in which the NH bond is located are coloured. Deselected residues are shown as black lines." ) classic_style_doc.add_paragraph("Supported data types:") table = uf_tables.add_table(
# Module docstring. """The model-free analysis user functions.""" # Python module imports. from re import match # relax module imports. from lib.errors import RelaxError, RelaxFuncSetupError, RelaxNoSequenceError, RelaxTensorError from pipe_control import pipes from pipe_control.mol_res_spin import exists_mol_res_spin_data, spin_loop from pipe_control.pipes import check_pipe import specific_analyses from specific_analyses.model_free.api import Model_free from specific_analyses.model_free.model import model_map from user_functions.data import Uf_tables uf_tables = Uf_tables() from user_functions.objects import Desc_container # The API object. api_model_free = Model_free() # Classic style documentation. classic_style_doc = Desc_container("Model-free classic style") classic_style_doc.add_paragraph("Creator: Edward d'Auvergne") classic_style_doc.add_paragraph("Argument string: \"classic\"") classic_style_doc.add_paragraph( "Description: The classic style draws the backbone of a protein in a cylindrical bond style. Rather than colouring the amino acids to which the NH bond belongs, the three covalent bonds of the peptide bond from Ca to Ca in which the NH bond is located are coloured. Deselected residues are shown as black lines." ) classic_style_doc.add_paragraph("Supported data types:") table = uf_tables.add_table( label="table: model-free macro classic style",
# # # 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( name="verbosity",
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." uf.add_keyarg(
############################################################################### # Module docstring. """Module for model minimisation/optimisation.""" # Python module imports. from re import search # relax module imports. from lib.errors import RelaxError from multi import Processor_box from pipe_control.mol_res_spin import return_spin, spin_loop from pipe_control import pipes import specific_analyses from status import Status; status = Status() from user_functions.data import Uf_tables; uf_tables = Uf_tables() from user_functions.objects import Desc_container def calc(verbosity=1): """Function for calculating the function value. @param verbosity: The amount of information to print. The higher the value, the greater the verbosity. @type verbosity: int """ # Test if the current data pipe exists. pipes.test() # Specific calculate function setup.
# 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." uf.add_keyarg(
# Module docstring. """Module for selecting and deselecting spins.""" # Python module imports import sys from warnings import warn # relax module imports. from lib.errors import RelaxError, RelaxNoDomainError, RelaxNoSequenceError from lib.selection import Selection, spin_id_to_data_list from lib.sequence import read_spin_data, write_spin_data from lib.warnings import RelaxNoSpinWarning from pipe_control.interatomic import interatomic_loop from pipe_control.mol_res_spin import check_mol_res_spin_data, exists_mol_res_spin_data, generate_spin_id_unique, return_spin, spin_loop from pipe_control.pipes import check_pipe from user_functions.data import Uf_tables; uf_tables = Uf_tables() from user_functions.objects import Desc_container boolean_doc = Desc_container("Boolean operators") boolean_doc.add_paragraph("The boolean operator can be used to change how spin systems or interatomic data containers are selected. The allowed values are: 'OR', 'NOR', 'AND', 'NAND', 'XOR', 'XNOR'. The following table details how the selections will occur for the different boolean operators.") table = uf_tables.add_table(label="table: bool operators", caption="Boolean operators and their effects on selections") table.add_headings(["Spin system or interatomic data container", "1", "2", "3", "4", "5", "6", "7", "8", "9"]) table.add_row(["Original selection", "0", "1", "1", "1", "1", "0", "1", "0", "1"]) table.add_row(["New selection", "0", "1", "1", "1", "1", "1", "0", "0", "0"]) table.add_row(["OR", "0", "1", "1", "1", "1", "1", "1", "0", "1"]) table.add_row(["NOR", "1", "0", "0", "0", "0", "0", "0", "1", "0"]) table.add_row(["AND", "0", "1", "1", "1", "1", "0", "0", "0", "0"]) table.add_row(["NAND", "1", "0", "0", "0", "0", "1", "1", "1", "1"]) table.add_row(["XOR", "0", "0", "0", "0", "0", "1", "1", "0", "1"]) table.add_row(["XNOR", "1", "1", "1", "1", "1", "0", "0", "1", "0"])
from gui.fonts import font from gui.input_elements.bool import Selector_bool from gui.input_elements.dir import Selector_dir from gui.input_elements.file import Selector_file, Selector_file_multiple from gui.input_elements.sequence import Sequence from gui.input_elements.sequence_2D import Sequence_2D from gui.input_elements.spin_id import Spin_id from gui.input_elements.value import Value from gui.interpreter import Interpreter; interpreter = Interpreter() from gui.misc import format_table from gui.wizards.wiz_objects import Wiz_page, Wiz_window from lib.errors import AllRelaxErrors, RelaxError from lib.text.string import strip_lead from status import Status; status = Status() from user_functions.data import Uf_info; uf_info = Uf_info() from user_functions.data import Uf_tables; uf_tables = Uf_tables() def build_uf_menus(parent=None, menubar=None): """Auto-generate the user function sub-menu. @keyword parent: The parent window to bind the events to. @type parent: wx instance @keyword menubar: The menubar to attach the user function menus to. @type menubar: wx.MenuBar instance @return: The menu ID. @rtype: int """ # The user function menus. menu1 = wx.Menu()
# Module docstring. """The spectrum user function definitions.""" # Python module imports. from os import sep # 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." uf.title_short = "Baseplane RMSD setting." uf.add_keyarg(name="error", default=0.0,
# Module docstring. """The parameter list object base class for the specific analyses. This provides a uniform interface for defining and handling parameters - either optimised or fixed - of the specific analyses. """ # Python module imports. from math import pi from re import search from types import FunctionType, MethodType # relax module imports. from lib.errors import RelaxError from user_functions.data import Uf_tables uf_tables = Uf_tables() from user_functions.objects import Desc_container def da_lower(incs=None, model_info=None): """Determine the lower grid bound for the Da diffusion parameter. @keyword incs: The number of grid search increments. @type incs: int @keyword model_info: The model information from model_loop(). @type model_info: unknown @return: The lower grid search bound for the Da diffusion parameter. @rtype: float """ # Return the lower bound.
# 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
"""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."