Author: bugman Date: Fri Oct 25 18:56:20 2013 New Revision: 21235 URL: http://svn.gna.org/viewcvs/relax?rev=21235&view=rev Log: Completed the support for ZQ and DQ CPMG experiment types in relax. This is needed for the 'MQ NS CPMG 2-site' model change to 'MMQ 2-site' and follows from the post at http://article.gmane.org/gmane.science.nmr.relax.devel/4734. This follows the tutorial for adding relaxation dispersion models at: http://wiki.nmr-relax.com/Tutorial_for_adding_relaxation_dispersion_models_to_relax#Creating_a_new_experiment_type. Modified: branches/relax_disp/specific_analyses/relax_disp/checks.py branches/relax_disp/target_functions/relax_disp.py branches/relax_disp/user_functions/relax_disp.py Modified: branches/relax_disp/specific_analyses/relax_disp/checks.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/checks.py?rev=21235&r1=21234&r2=21235&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/checks.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/checks.py Fri Oct 25 18:56:20 2013 @@ -29,7 +29,7 @@ from dep_check import C_module_exp_fn from lib.errors import RelaxError, RelaxFuncSetupError, RelaxNoPeakIntensityError import specific_analyses -from specific_analyses.relax_disp.variables import EXP_TYPE_CPMG, EXP_TYPE_MQ_CPMG, EXP_TYPE_MQ_R1RHO, EXP_TYPE_R1RHO +from specific_analyses.relax_disp.variables import EXP_TYPE_LIST_CPMG, EXP_TYPE_LIST_R1RHO def check_c_modules(): @@ -60,12 +60,12 @@ # Check each spectrum ID. for id in cdp.spectrum_ids: # CPMG data. - if cdp.exp_type[id] in [EXP_TYPE_CPMG, EXP_TYPE_MQ_CPMG]: + if cdp.exp_type[id] in EXP_TYPE_LIST_CPMG: if id not in cdp.cpmg_frqs: raise RelaxError("The nu_CPMG frequency has not been set for the '%s' spectrum." % id) # R1rho data. - elif cdp.exp_type[id] in [EXP_TYPE_R1RHO, EXP_TYPE_MQ_R1RHO]: + elif cdp.exp_type[id] in EXP_TYPE_LIST_R1RHO: if id not in cdp.spin_lock_nu1: raise RelaxError("The spin-lock field strength has not been set for the '%s' spectrum." % id) Modified: branches/relax_disp/target_functions/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/target_functions/relax_disp.py?rev=21235&r1=21234&r2=21235&view=diff ============================================================================== --- branches/relax_disp/target_functions/relax_disp.py (original) +++ branches/relax_disp/target_functions/relax_disp.py Fri Oct 25 18:56:20 2013 @@ -442,8 +442,8 @@ For the single experiment type models, the first dimension of the values, errors, and missing data structures will be removed to simplify the target functions. """ - # The CPMG and R1rho single models. - if self.model in MODEL_LIST_CPMG + MODEL_LIST_R1RHO + MODEL_LIST_MQ_CPMG + MODEL_LIST_MQ_R1RHO: + # The non-combined data models. + if not self.model in [MODEL_MMQ_2SITE]: # Remove the first dimension of the data structures. self.values = self.values[0] self.errors = self.errors[0] Modified: branches/relax_disp/user_functions/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/user_functions/relax_disp.py?rev=21235&r1=21234&r2=21235&view=diff ============================================================================== --- branches/relax_disp/user_functions/relax_disp.py (original) +++ branches/relax_disp/user_functions/relax_disp.py Fri Oct 25 18:56:20 2013 @@ -42,7 +42,7 @@ from specific_analyses.relax_disp.nessy import nessy_input from specific_analyses.relax_disp.parameters import copy from specific_analyses.relax_disp.sherekhan import sherekhan_input -from specific_analyses.relax_disp.variables import EXP_TYPE_CPMG, EXP_TYPE_MQ_CPMG, EXP_TYPE_MQ_R1RHO, EXP_TYPE_R1RHO, MODEL_CR72, MODEL_CR72_FULL, MODEL_DPL94, MODEL_IT99, MODEL_LM63, MODEL_LM63_3SITE, MODEL_M61, MODEL_M61B, MODEL_MMQ_2SITE, MODEL_MQ_CR72, MODEL_NOREX, MODEL_R2EFF, MODEL_NS_CPMG_2SITE_3D, MODEL_NS_CPMG_2SITE_3D_FULL, MODEL_NS_CPMG_2SITE_EXPANDED, MODEL_NS_CPMG_2SITE_STAR, MODEL_NS_CPMG_2SITE_STAR_FULL, MODEL_NS_R1RHO_2SITE, MODEL_TP02, MODEL_TSMFK01 +from specific_analyses.relax_disp.variables import EXP_TYPE_CPMG, EXP_TYPE_DQ_CPMG, EXP_TYPE_MQ_CPMG, EXP_TYPE_MQ_R1RHO, EXP_TYPE_R1RHO, EXP_TYPE_ZQ_CPMG, MODEL_CR72, MODEL_CR72_FULL, MODEL_DPL94, MODEL_IT99, MODEL_LM63, MODEL_LM63_3SITE, MODEL_M61, MODEL_M61B, MODEL_MMQ_2SITE, MODEL_MQ_CR72, MODEL_NOREX, MODEL_R2EFF, MODEL_NS_CPMG_2SITE_3D, MODEL_NS_CPMG_2SITE_3D_FULL, MODEL_NS_CPMG_2SITE_EXPANDED, MODEL_NS_CPMG_2SITE_STAR, MODEL_NS_CPMG_2SITE_STAR_FULL, MODEL_NS_R1RHO_2SITE, MODEL_TP02, MODEL_TSMFK01 from specific_analyses.setup import relax_disp_obj from user_functions.data import Uf_info; uf_info = Uf_info() from user_functions.objects import Desc_container @@ -310,12 +310,18 @@ desc = "The type of relaxation dispersion experiment performed.", wiz_element_type = "combo", wiz_combo_choices = [ - "CPMG", - r1rho + "CPMG-type data", + "multiple quantum (MQ) CPMG-type data", + "zero quantum (ZQ) CPMG-type data", + "double quantum (DQ) CPMG-type data", + "%s-type data" % r1rho ], wiz_combo_data = [ - "CPMG", - "R1rho" + EXP_TYPE_CPMG, + EXP_TYPE_MQ_CPMG, + EXP_TYPE_ZQ_CPMG, + EXP_TYPE_DQ_CPMG, + EXP_TYPE_R1RHO ], wiz_read_only = True ) @@ -324,9 +330,10 @@ uf.desc[-1].add_paragraph("For each peak intensity set loaded into relax, the type of experiment it comes from needs to be specified. By specifying this for each spectrum ID, multiple experiment types can be analysed simultaneously. This is assuming that an appropriate dispersion model exists for the experiment combination.") uf.desc[-1].add_paragraph("The currently supported experiments include:") uf.desc[-1].add_item_list_element(repr(EXP_TYPE_CPMG), "The CPMG-type experiments,") +uf.desc[-1].add_item_list_element(repr(EXP_TYPE_MQ_CPMG), "The multiple quantum (MQ) CPMG-type experiments,") +uf.desc[-1].add_item_list_element(repr(EXP_TYPE_ZQ_CPMG), "The zero quantum (ZQ) CPMG-type experiments,") +uf.desc[-1].add_item_list_element(repr(EXP_TYPE_DQ_CPMG), "The double quantum (DQ) CPMG-type experiments,") uf.desc[-1].add_item_list_element(repr(EXP_TYPE_R1RHO), "The R1rho-type experiments.") -uf.desc[-1].add_item_list_element(repr(EXP_TYPE_MQ_CPMG), "The multi-quantum CPMG-type experiments,") -uf.desc[-1].add_item_list_element(repr(EXP_TYPE_MQ_R1RHO), "The multi-quantum R1rho-type experiments.") # Prompt examples. uf.desc.append(Desc_container("Prompt examples")) uf.desc[-1].add_paragraph("To set the experiment type to 'CPMG' for the spectrum ID 'nu_4500.0_800MHz', type one of:")