예제 #1
0
파일: api.py 프로젝트: tlinnet/relax
    def __init__(self):
        """Initialise the class by placing API_common methods into the API."""

        # Place methods into the API.
        self.get_model_container = self._get_model_container_cdp
        self.model_loop = self._model_loop_single_global
        self.overfit_deselect = self._overfit_deselect_dummy
        self.print_model_title = self._print_model_title_global
        self.set_selected_sim = self._set_selected_sim_global
        self.sim_return_selected = self._sim_return_selected_global

        # Place a copy of the parameter list object in the instance namespace.
        self._PARAMS = N_state_params()
예제 #2
0
def return_parameter_object(analysis_type=None, pipe_name=None):
    """Return the specific analysis API parameter object corresponding to the function type.

    @keyword analysis_type:     The specific analysis type.  This overrides the pipe_name argument.
    @type analysis_type:        str or None
    @keyword pipe_name:         The name of the data pipe to obtain the analysis type from.  This is ignored if the analysis_type argument is given.  If both arguments are None, then the current data pipe will be used.
    """

    # The analysis type, if not given.
    if analysis_type is None:
        # Check if a data pipe exists.
        check_pipe()

        # Use a custom data pipe name.
        if pipe_name:
            analysis_type = ds[pipe_name].pipe_type

        # Use the current data pipe.
        else:
            analysis_type = cdp.pipe_type

    # Consistency testing.
    if analysis_type == 'ct':
        from specific_analyses.consistency_tests.parameter_object import Consistency_tests_params
        return Consistency_tests_params()

    # The Frame Order theories.
    elif analysis_type == 'frame order':
        from specific_analyses.frame_order.parameter_object import Frame_order_params
        return Frame_order_params()

    # Hybrid models.
    elif analysis_type == 'hybrid':
        from specific_analyses.hybrid import Hybrid_params
        return Hybrid_params()

    # Reduced spectral density mapping.
    elif analysis_type == 'jw':
        from specific_analyses.jw_mapping.parameter_object import Jw_mapping_params
        return Jw_mapping_params()

    # Model-free analysis.
    elif analysis_type == 'mf':
        from specific_analyses.model_free.parameter_object import Model_free_params
        return Model_free_params()

    # The N-state model.
    elif analysis_type == 'N-state':
        from specific_analyses.n_state_model.parameter_object import N_state_params
        return N_state_params()

    # NOE calculation.
    elif analysis_type == 'noe':
        from specific_analyses.noe.parameter_object import Noe_params
        return Noe_params()

    # Relaxation dispersion curve fitting.
    elif analysis_type == 'relax_disp':
        from specific_analyses.relax_disp.parameter_object import Relax_disp_params
        return Relax_disp_params()

    # Relaxation curve fitting.
    elif analysis_type == 'relax_fit':
        from specific_analyses.relax_fit.parameter_object import Relax_fit_params
        return Relax_fit_params()

    # Unknown analysis.
    else:
        raise RelaxError("The analysis type '%s' is unknown." % analysis_type)
예제 #3
0
###############################################################################

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

# 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"

예제 #4
0
파일: dx.py 프로젝트: pombredanne/relax
"""The dx user function definitions for controlling the OpenDX visualisation 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 lib.software.opendx.execute import run
from pipe_control.opendx import map
from specific_analyses.frame_order.parameter_object import Frame_order_params; frame_order_params = Frame_order_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.relax_disp.parameter_object import Relax_disp_params; relax_disp_params = Relax_disp_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("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")
예제 #5
0
파일: value.py 프로젝트: pombredanne/relax
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()