本文整理汇总了Python中user_functions.data.Uf_info.add_uf方法的典型用法代码示例。如果您正苦于以下问题:Python Uf_info.add_uf方法的具体用法?Python Uf_info.add_uf怎么用?Python Uf_info.add_uf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类user_functions.data.Uf_info
的用法示例。
在下文中一共展示了Uf_info.add_uf方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
# 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."
示例2: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
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',
示例3: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
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."
示例4: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
# 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'
示例5: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
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.
示例6: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
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',
示例7: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
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",
示例8: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
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",
示例9: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
# 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
示例10: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
# #
###############################################################################
# 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",
示例11: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
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",
示例12: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
# 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
示例13: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
# 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",
示例14: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
# 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",
示例15: Uf_info
# 需要导入模块: from user_functions.data import Uf_info [as 别名]
# 或者: from user_functions.data.Uf_info import add_uf [as 别名]
# 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.",