mailRe: Avoiding the grid search in the relaxation dispersion auto-analysis - the nested model algorithm.


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on August 19, 2014 - 14:34:
I've looked at that bug.  It's probably the case of just choosing the
wrong relaxation time from the list for exponential curves - maybe the
longest time would be best (actually any time should be fine as long
as it is not 0).  As this is just a bug, then using the 'NS R1rho
2-site' model for this purpose should be ok as, when the bug is
solved, then this will be a non-issue.

As for overriding the __setitem__() method, here it is for the
diffusion tensor object:

http://www.nmr-relax.com/api/3.2/data_store.diff_tensor.DiffTensorSimList-class.html#__setitem__
http://www.nmr-relax.com/api/3.2/data_store.diff_tensor-pysrc.html#DiffTensorSimList.__setitem__

Here it is used to prevent values being set.  But the method can be
made to check the input, that it's a list, and remove the model from
the list that corresponds to the model being set.  What do you think
of this approach for filtering the model list?  Here is a simple and
functional code example:

-----
class A(dict):
    def __setitem__(self, key, val):
        if val == None:
            raise NameError("The value of None is not supported.")
        print("Setting the key '%s' to %s." % (key, val))
        dict.__setitem__(self, key, val)

a = A()
print(a)
a['x'] = 10
print(a)
a['y'] = 'test'
print(a)
a['z'] = None
print(a)
-----

As you can see, this is quite easy to set up.  And creating a special
method to pick the single model to use for nesting would also be easy,

Regards,

Edward


On 19 August 2014 13:17, Troels Emtekær Linnet <tlinnet@xxxxxxxxxxxxx> wrote:
Hi Edward.

I agree with your list, and aim for this,

I though see a little error:
TP02 <- NS R1RHO 2-site, MP05, TAP03

The analytical R1rho off resonance can't learn from NS R1RHO 2-site,
since there is a bug in this model.
bug #22461(https://gna.org/bugs/?22461): NS R1rho 2-site_fit_r1 has
extremely high chi2 value in systemtest
Relax_disp.test_r1rho_kjaergaard_missing_r1


Best
Troels

2014-08-19 12:23 GMT+02:00 Edward d'Auvergne <edward@xxxxxxxxxxxxx>:
Hi,

Could these be turned into the MODEL_NEST dictionary?  I.e. as you
have done with the MODEL_DESC, MODEL_PARAMS, MODEL_YEAR,
MODEL_EXP_TYPE, etc.  I have expanded your table to the following.
This is for the manual, which I am adding at the moment.

R2EFF <- None
NOREX <- None
LM63 <- None
LM63 3-site <- LM63
CR72 <- NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG 2-site
expanded, B14, CR72, NS CPMG 2-site 3D full, NS CPMG 2-site star full,
B14 full, CR72 full
CR72 full <- NS CPMG 2-site 3D full, NS CPMG 2-site star full, B14
full, CR72 full, NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG
2-site expanded, B14, CR72
IT99 <- None
TSMFK01 <- None
B14 <- NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG 2-site
expanded, B14, CR72, NS CPMG 2-site 3D full, NS CPMG 2-site star full,
B14 full, CR72 full
B14 full <- NS CPMG 2-site 3D full, NS CPMG 2-site star full, B14
full, CR72 full, NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG
2-site expanded, B14, CR72
M61 <- None
M61B <- None
DPL94 <- None
DPL94 R1 fit <- None
TP02 <- MP05, TAP03, TP02
TP02 R1 fit <- MP05 R1 fit, TAP03 R1 fit, TP02 R1 fit
TAP03 <- MP05, TAP03, TP02
TAP03 R1 fit <- MP05 R1 fit, TAP03 R1 fit, TP02 R1 fit
MP05 <- MP05, TAP03, TP02
MP05 R1 fit <- MP05 R1 fit, TAP03 R1 fit, TP02 R1 fit
NS CPMG 2-site 3D <- NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG
2-site expanded, B14, CR72, NS CPMG 2-site 3D full, NS CPMG 2-site
star full, B14 full, CR72 full
NS CPMG 2-site 3D full <- NS CPMG 2-site 3D full, NS CPMG 2-site star
full, B14 full, CR72 full, NS CPMG 2-site 3D, NS CPMG 2-site star, NS
CPMG 2-site expanded, B14, CR72
NS CPMG 2-site star <- NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG
2-site expanded, B14, CR72, NS CPMG 2-site 3D full, NS CPMG 2-site
star full, B14 full, CR72 full
NS CPMG 2-site star full <- NS CPMG 2-site 3D full, NS CPMG 2-site
star full, B14 full, CR72 full, NS CPMG 2-site 3D, NS CPMG 2-site
star, NS CPMG 2-site expanded, B14, CR72
NS CPMG 2-site expanded <- NS CPMG 2-site 3D, NS CPMG 2-site star, NS
CPMG 2-site expanded, B14, CR72, NS CPMG 2-site 3D full, NS CPMG
2-site star full, B14 full, CR72 full
NS R1RHO 2-site <- MP05, TAP03, TP02
NS R1RHO 2-site R1 fit <- MP05 R1 fit, TAP03 R1 fit, TP02 R1 fit
NS R1RHO 3-site <- NS R1RHO 3-site linear, NS R1RHO 2-site, MP05, TAP03, 
TP02
NS R1RHO 3-site linear <- NS R1RHO 3-site linear, NS R1RHO 2-site,
MP05, TAP03, TP02
MMQ CR72 <- NS MMQ 2-site, MMQ CR72, CR72
NS MMQ 2-site <- NS MMQ 2-site, MMQ CR72, CR72
NS MMQ 3-site <- NS MMQ 3-site linear, NS MMQ 2-site, MMQ CR72, CR72
NS MMQ 3-site linear <- NS MMQ 2-site, MMQ CR72, CR72

There are some issues here:

1)  Because of model instability, we should exclude some of these
combinations.  For example:

CR72 <- NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG 2-site
expanded, B14, CR72, NS CPMG 2-site 3D full, NS CPMG 2-site star full,
B14 full, CR72 full

The model instability is in the '* full' models.  No one really uses
these in publications, other than theoretical ones, as they are rarely
usable in practice.  The separation of R20A != R20B introduces huge
instabilities and possibly multiple minima in the space.  The results
from these models almost always terrible.  For these models to be
useful, some NMR spectroscopist needs to publish a comprehensive study
of their optimisation properties.  This is similar to to the 3-site
model instability problems.  Both problems are open-ended and not yet
solved by the dispersion field.

2)  Another problem is with the MMQ models.  CR72 cannot be used for
these, as CR72 does not support all of the MMQ experiment types and
hence cannot be optimised.

3)  There is model duplication.  CR72 is listed as a nested model for
CR72, etc.  A special MODEL_NEST dictionary object where the
set_deps() or __setitem__() method removes the 'self' model before
storing the list would be useful for this purpose (see
http://thread.gmane.org/gmane.science.nmr.relax.devel/6684/focus=6685
and 
http://www.diveintopython.net/object_oriented_framework/special_class_methods.html).

4)  The 'NS R1rho 2-site' model is not used for the analytic R1rho
models, as the 'NS CPMG *' models are for the analytic CPMG models.

Therefore a better table eliminated or fixing these problems would be:

R2EFF <- None
NOREX <- None
LM63 <- None
LM63 3-site <- LM63
CR72 <- NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG 2-site expanded, 
B14
CR72 full <- NS CPMG 2-site 3D full, NS CPMG 2-site star full, B14
full, NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG 2-site expanded,
B14, CR72
IT99 <- None
TSMFK01 <- None
B14 <- NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG 2-site expanded, 
CR72
B14 full <- NS CPMG 2-site 3D full, NS CPMG 2-site star full, CR72
full, NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG 2-site expanded,
B14, CR72
NS CPMG 2-site expanded <- NS CPMG 2-site 3D, NS CPMG 2-site star, NS
CPMG 2-site expanded, B14, CR72
NS CPMG 2-site 3D <- NS CPMG 2-site star, NS CPMG 2-site expanded, B14, 
CR72
NS CPMG 2-site 3D full <- NS CPMG 2-site star full, B14 full, CR72
full, NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG 2-site expanded,
B14, CR72
NS CPMG 2-site star <- NS CPMG 2-site 3D, NS CPMG 2-site expanded, B14, 
CR72
NS CPMG 2-site star full <- NS CPMG 2-site 3D full, B14 full, CR72
full, NS CPMG 2-site 3D, NS CPMG 2-site star, NS CPMG 2-site expanded,
B14, CR72
M61 <- None
M61B <- None
DPL94 <- None
DPL94 R1 fit <- None
TP02 <- NS R1RHO 2-site, MP05, TAP03
TP02 R1 fit <- MP05 R1 fit, TAP03 R1 fit
TAP03 <- NS R1RHO 2-site, MP05, TP02
TAP03 R1 fit <- MP05 R1 fit, TP02 R1 fit
MP05 <- NS R1RHO 2-site, TAP03, TP02
MP05 R1 fit <- TAP03 R1 fit, TP02 R1 fit
NS R1RHO 2-site <- MP05, TAP03, TP02
NS R1RHO 2-site R1 fit <- MP05 R1 fit, TAP03 R1 fit, TP02 R1 fit
NS R1RHO 3-site linear <- NS R1RHO 2-site, MP05, TAP03, TP02
NS R1RHO 3-site <- NS R1RHO 3-site linear, NS R1RHO 2-site, MP05, TAP03, 
TP02
MMQ CR72 <- NS MMQ 2-site
NS MMQ 2-site <- MMQ CR72
NS MMQ 3-site linear <- NS MMQ 2-site, MMQ CR72
NS MMQ 3-site <- NS MMQ 3-site linear, NS MMQ 2-site, MMQ CR72

What do you think?  I will add this version to the manual.

Regards,

Edward


P. S.  Note that CR72 should always be optimised before the numerical
models!  A grid search for the numerical models is pretty much
impossible - it takes far too long.  As the CR72 model will always be
optimised before the numeric models in the auto-analysis (I can add
the ordering function, if required), then having the NS models in the
list is not needed.  This is really a massively important part of the
paper (http://dx.doi.org/10.1093/bioinformatics/btu166).  The CR72
model is very stable and is in the most number of cases the best
approximation for the numerical solution.  Of course, now we have B14
which is better.  But CR72 is really fast and using it as a starting
point for the other CPMG models really massively speeds up an analysis
with the NS models.

On 19 August 2014 10:50, Troels Emtekær Linnet <tlinnet@xxxxxxxxxxxxx> 
wrote:
Hi Edward.

After having sleeping on it, I will now change to a hard-coded version.

You will see, that I have some differences from you.

I will also accept, that CR72 can learn from the other similar models.

I cannot see the argument, why this should not be the case?


It looks like this:
------------

# Define recurring lists.
## For CPMG.
MODEL_NEST_LIST_CPMG = [MODEL_NS_CPMG_2SITE_3D,
MODEL_NS_CPMG_2SITE_STAR, MODEL_NS_CPMG_2SITE_EXPANDED, MODEL_B14,
MODEL_CR72]
MODEL_NEST_LIST_CPMG_R20B = [MODEL_NS_CPMG_2SITE_3D_FULL,
MODEL_NS_CPMG_2SITE_STAR_FULL, MODEL_B14_FULL, MODEL_CR72_FULL]
## For R1rho.
MODEL_NEST_LIST_R1RHO_2SITE = [MODEL_MP05, MODEL_TAP03, MODEL_TP02]
MODEL_NEST_LIST_R1RHO_2SITE_FIT_R1 = [MODEL_MP05_FIT_R1,
MODEL_TAP03_FIT_R1, MODEL_TP02_FIT_R1]
MODEL_NEST_LIST_R1RHO_3SITE = [MODEL_NS_R1RHO_3SITE_LINEAR,
MODEL_NS_R1RHO_2SITE]
## For CPMG MMQ.
MODEL_NEST_LIST_MMQ_2SITE = [MODEL_NS_MMQ_2SITE, MODEL_MMQ_CR72, 
MODEL_CR72]
MODEL_NEST_LIST_MMQ_3SITE = [MODEL_NS_MMQ_3SITE_LINEAR]

# Define order of nesting models for each model.
MODEL_NEST_R2EFF = None
MODEL_NEST_NOREX = None
MODEL_NEST_NOREX_R1RHO = None
MODEL_NEST_NOREX_R1RHO_FIT_R1 = None
MODEL_NEST_LM63 = None
MODEL_NEST_LM63_3SITE = [MODEL_LM63]
MODEL_NEST_CR72 = MODEL_NEST_LIST_CPMG + MODEL_NEST_LIST_CPMG_R20B
MODEL_NEST_CR72_FULL = MODEL_NEST_LIST_CPMG_R20B + MODEL_NEST_LIST_CPMG
MODEL_NEST_IT99 = None
MODEL_NEST_TSMFK01 = None
MODEL_NEST_B14 = MODEL_NEST_LIST_CPMG + MODEL_NEST_LIST_CPMG_R20B
MODEL_NEST_B14_FULL = MODEL_NEST_LIST_CPMG_R20B + MODEL_NEST_LIST_CPMG
MODEL_NEST_M61 = None
MODEL_NEST_M61B = None
MODEL_NEST_DPL94 = None
MODEL_NEST_DPL94_FIT_R1 = None
MODEL_NEST_TP02 = MODEL_NEST_LIST_R1RHO_2SITE
MODEL_NEST_TP02_FIT_R1 = MODEL_NEST_LIST_R1RHO_2SITE_FIT_R1
MODEL_NEST_TAP03 = MODEL_NEST_LIST_R1RHO_2SITE
MODEL_NEST_TAP03_FIT_R1 = MODEL_NEST_LIST_R1RHO_2SITE_FIT_R1
MODEL_NEST_MP05 = MODEL_NEST_LIST_R1RHO_2SITE
MODEL_NEST_MP05_FIT_R1 = MODEL_NEST_LIST_R1RHO_2SITE_FIT_R1
MODEL_NEST_NS_CPMG_2SITE_3D = MODEL_NEST_LIST_CPMG + 
MODEL_NEST_LIST_CPMG_R20B
MODEL_NEST_NS_CPMG_2SITE_3D_FULL = MODEL_NEST_LIST_CPMG_R20B +
MODEL_NEST_LIST_CPMG
MODEL_NEST_NS_CPMG_2SITE_STAR = MODEL_NEST_LIST_CPMG + 
MODEL_NEST_LIST_CPMG_R20B
MODEL_NEST_NS_CPMG_2SITE_STAR_FULL = MODEL_NEST_LIST_CPMG_R20B +
MODEL_NEST_LIST_CPMG
MODEL_NEST_NS_CPMG_2SITE_EXPANDED = MODEL_NEST_LIST_CPMG +
MODEL_NEST_LIST_CPMG_R20B
MODEL_NEST_NS_R1RHO_2SITE = MODEL_NEST_LIST_R1RHO_2SITE
MODEL_NEST_NS_R1RHO_2SITE_FIT_R1 = MODEL_NEST_LIST_R1RHO_2SITE_FIT_R1
MODEL_NEST_NS_R1RHO_3SITE = MODEL_NEST_LIST_R1RHO_3SITE +
MODEL_NEST_LIST_R1RHO_2SITE
MODEL_NEST_NS_R1RHO_3SITE_LINEAR = MODEL_NEST_LIST_R1RHO_3SITE +
MODEL_NEST_LIST_R1RHO_2SITE
MODEL_NEST_MMQ_CR72 = MODEL_NEST_LIST_MMQ_2SITE
MODEL_NEST_NS_MMQ_2SITE = MODEL_NEST_LIST_MMQ_2SITE
MODEL_NEST_NS_MMQ_3SITE = MODEL_NEST_LIST_MMQ_3SITE + 
MODEL_NEST_LIST_MMQ_2SITE
MODEL_NEST_NS_MMQ_3SITE_LINEAR = MODEL_NEST_LIST_MMQ_2SITE

2014-08-19 10:21 GMT+02:00 Edward d'Auvergne <edward@xxxxxxxxxxxxx>:
Hi,

Here is a mini-proposal for a special Python dictionary object to help
with dispersion model nesting:

-----
class Model_nesting(dict):
    """Special object for handling model nesting for avoiding the grid
search."""

    def get_deps(self, model):
        """Return the dependency list for the given model."""

        return self[model]


    def set_deps(self, model, deps=None):
        """Set the model dependency list for the given model."""

        self[model] = deps


MODEL_NESTING = Model_nesting()
MODEL_NESTING['B14 full'] = ['CR72 full', 'B14', 'CR72']
-----

The class would be in the specific_analyses.relax_disp.models module
and the MODEL_NESTING instantiation in the
specific_analyses.relax_disp.variables module.  This can have error
checking added and additional methods for manipulating the data added.
The get_deps() and set_deps() methods are optional for the power user.
They may be useful if the __getattr__(), __getitem__(), __setattr__(),
and __setitem__() methods are overridden to allow for better object
control (see the objects in the data_store package for how this is
done).  A get_dep() method could be added which accepts the model and
a list of the currently optimised models and then returns the nested
model to be used or None, i.e. to implement the model preference.

Or, this could just be a normal Python dictionary rather than a
special dictionary object.  Such an object could be used by relax
power users, via scripting, to implement their own relaxation
dispersion analysis protocol.  But this is just an idea and many
alternatives exist.

Regards,

Edward


On 19 August 2014 10:07, Edward d'Auvergne <edward@xxxxxxxxxxxxx> wrote:
Hi Troels,

This continues from
http://thread.gmane.org/gmane.science.nmr.relax.scm/22733/, and all
the related threads.  For the change of r25060
(http://article.gmane.org/gmane.science.nmr.relax.scm/22810), could
you please document all cases?  I.e. model x takes its parameters from
model y, and then do this for all models.  See the table below for how
to document this.  This algorithm really worries me and I strongly
think that this development is in the wrong direction.  All models are
special cases!  You can't just take any model as the starting point
for another.  The following ordering is not a good idea:

1)  EQ_NUMERIC, EQ_SILICO, EQ_ANALYTIC.
2)  Year (from newest).
3)  Number of sites.

Models should be rather classified in the following groups:

1)  Parameter nesting (related to 2).  The models should ideally have
identical parameter sets.
2)  Fast exchange, slow exchange, very slow exchange, vs. all exchange
regimes.  These are mutually exclusive (apart from the last).
3)  The pA >> pB limit - this can never be mixed with the normal pA >
pB condition.
4)  Model stability (i.e. stable vs. unstable).
5)  Model accuracy.
6)  Analytic vs. numeric.

This is in order of importance.  Part 2) here excludes most
combinations of the new algorithm - you cannot mix the models for
different mutually exclusive exchange regimes.

The one and only aim is for speed by avoiding the grid search,
therefore the nested model from which the parameters are copied from
must be a good estimate for the solution of the target model.  I would
then propose the following table mapping models to nested models for
avoiding the grid search.  The order is also the order of
optimisation, as you will see from the nested model dependencies.  The
proposal is:

R2eff                    <- None
No Rex                   <- None

LM63                     <- None
LM63 3-site              <- LM63
CR72                     <- None
CR72 full                <- CR72
IT99                     <- None
TSMFK01                  <- None
B14                      <- CR72
B14 full                 <- CR72 full, B14, CR72
NS CPMG 2-site expanded  <- B14, CR72
NS CPMG 2-site 3D        <- NS CPMG 2-site expanded, B14, CR72
NS CPMG 2-site 3D full   <- B14 full, CR72 full, NS CPMG 2-site
expanded, B14, CR72
NS CPMG 2-site star      <- NS CPMG 2-site expanded, B14, CR72
NS CPMG 2-site star full <- B14 full, CR72 full, NS CPMG 2-site
expanded, B14, CR72

M61                      <- None
M61 skew                 <- None
DPL94                    <- None
DPL94 R1 fit             <- DPL94
TP02                     <- None
TP02 R1 fit              <- TP02
TAP03                    <- None
TAP03 R1 fit             <- TAP03
MP05                     <- TAP03, TP02
MP05 R1 fit              <- MP05, TAP03, TP02
NS R1rho 2-site          <- MP05, TAP03, TP02
NS R1rho 2-site R1 fit   <- NS R1rho 2-site, MP05, TAP03, TP02
NS R1rho 3-site linear   <- NS R1rho 2-site, MP05, TAP03, TP02
NS R1rho 3-site          <- NS R1rho 3-site linear, NS R1rho 2-site,
MP05, TAP03, TP02

MMQ CR72                 <- None
NS MMQ 2-site            <- MMQ CR72
NS MMQ 3-site linear     <- NS MMQ 2-site, MMQ CR72
NS MMQ 3-site            <- NS MMQ 3-site linear, NS MMQ 2-site, MMQ 
CR72

In the second column, the list of models indicate importance.  For
example for the 'B14 full' model, the 'CR72 full' model is the first
preference.  If that model has not been optimised, then B14 is used.
And if B14 is missing, the fall back is to CR72.  If none of these
models have been optimised, the grid search will be performed.  In
this case, 'CR72 full' is preferred as it has perfect parameter
nesting - all parameters of 'B14 full' are found in 'CR72 full'.  The
B14 and CR72 are fallbacks - here R20A and R20B are copied from R20 so
they start optimisation as R20A == R20B.  Hence 'CR72 full' whereby
R20A != R20B is a much better starting point as R20A and R20B have
been optimised to different values.  But the large model instability
in 'CR72 full' might make the user want to start with 'B14'.

For the '* R1 fit' models, this nesting is of little interest in
experimental cases, as you either measure R1 data or not (measuring it
is always preferable for model stability).  Some people who have
measured R1 data might still be interested in what will if R1 is
nevertheless optimised, so that nesting could be of use.

This nesting table is complete as far as I can tell.  Some of this
nesting could be still argued to be wrong, for example TP02 with pA <<
pB as a starting point.  I would not use any other nesting for fear of
creating a very bad optimisation starting position.  The table is very
easy to extend for new models as well.  But because of model
instability, the user may wish to change this nesting.

Regards,

Edward









On 18 August 2014 18:11, Edward d'Auvergne <edward@xxxxxxxxxxxxx> wrote:
Hi Troels,

I will continue from your last post in the triplet thread at
http://thread.gmane.org/gmane.science.nmr.relax.scm/22737.  I have
copied and pasted your message below:

On 18 August 2014 17:17, Troels Emtekær Linnet <tlinnet@xxxxxxxxxxxxx> 
wrote:
I will remove the nesting of IT99, since it also worried me.

I would also suggest removing TSMFK01, TAP03, M61, M61 skew, and DPL94.


But do you really intent to stay on the argument that nesting should
always be from CR72?

No, we need a 3rd solution for this.


What if the model pipe for B14 is available.
Or from NS CPMG 2-site expanded ?

We could, for example, have a list of nested models.  For example for
the NS CPMG 2-site expanded model, the list would be [MODEL_B41,
MODEL_CR72].  It used B14 first, but switches to CR72 if B14 is not
available.  This is easy to hardcode in a dictionary (or special
Python dictionary object) and hardcode into a table in the manual.

For all of the numeric CPMG models, which should be optimised after
the analytic models in all cases so that model nesting can be useful
for speed, I would suggest using B14 and then CR72.  But if you have
fast exchange, then the LM63 model is far better for these models than
B14 or CR72, however the parameters are not nested.  There are
infinite parameter combinations of the numeric models which give the
same parameter values as LM63.

For the R1rho models, a similar logic would be used.  MP05 replaces
B14, and TP02 replaces CR72.  The BK13 model will also need to be
considered in the future (https://gna.org/support/?3155).  DPL94
replaces LM63 for the fast vs. slow exchange problem, but then you
also have the infinite parameter combination problem.

Note that the infinite parameter combination problem is actually a
major issue affecting the optimisation of all numeric models when the
exchange is fast, but that no one talks about this!


Is this issue rather related how to sort the models first?

This is an important issue which requires knowledge of the nesting, as
I mentioned previously.  Our understanding of the models themselves
and our logic based on experiment is far more useful for determining
model nesting and the order in which they should be optimised.  This
is why a hardcoded solution is very powerful.

Regards,

Edward



On 12 August 2014 10:54,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Tue Aug 12 10:54:36 2014
New Revision: 24983

URL: http://svn.gna.org/viewcvs/relax?rev=24983&view=rev
Log:
Added meta information about equation type.

The models are dividided into: analytic, silico or numeric.

sr #3135(https://gna.org/support/?3135): Optimisation of the R1 
relaxation rate for the off-resonance R1rho relaxation dispersion 
models.

Modified:
    branches/R1_fitting/specific_analyses/relax_disp/variables.py
    
branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py

Modified: 
branches/R1_fitting/specific_analyses/relax_disp/variables.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/R1_fitting/specific_analyses/relax_disp/variables.py?rev=24983&r1=24982&r2=24983&view=diff
==============================================================================
--- branches/R1_fitting/specific_analyses/relax_disp/variables.py     
  (original)
+++ branches/R1_fitting/specific_analyses/relax_disp/variables.py     
  Tue Aug 12 10:54:36 2014
@@ -59,6 +59,12 @@
 """The list of all dispersion experiment types."""


+# Model equation types. Either analytic, silico or numeric.
+EQ_ANALYTIC = 'analytic'
+EQ_NUMERIC = 'numeric'
+EQ_SILICO = 'silico'
+
+
 # The model names, parameters, and descriptions.
 MODEL_R2EFF = 'R2eff'
 MODEL_DESC_R2EFF = "The model for determining the R2eff/R1rho values 
from peak intensities."
@@ -67,6 +73,7 @@
 MODEL_YEAR_R2EFF = 1950
 MODEL_EXP_TYPE_R2EFF = EXP_TYPE_R2EFF
 MODEL_SITES_R2EFF = None
+MODEL_EQ_R2EFF = EQ_ANALYTIC

 MODEL_NOREX = 'No Rex'
 MODEL_DESC_NOREX = "The model for no chemical exchange relaxation."
@@ -75,6 +82,7 @@
 MODEL_YEAR_NOREX = 1951
 MODEL_EXP_TYPE_NOREX = EXP_TYPE_NOREX
 MODEL_SITES_NOREX = 1
+MODEL_EQ_NOREX = EQ_ANALYTIC

 MODEL_NOREX_R1RHO = "No_Rex_R1rho_off_res"
 MODEL_DESC_NOREX_R1RHO = "The model for no chemical exchange 
relaxation, for R1rho off resonance models."
@@ -83,6 +91,7 @@
 MODEL_YEAR_NOREX_R1RHO = 1952
 MODEL_EXP_TYPE_NOREX_R1RHO = EXP_TYPE_NOREX_R1RHO
 MODEL_SITES_NOREX_R1RHO = 1
+MODEL_EQ_NOREX_R1RHO = EQ_ANALYTIC

 MODEL_NOREX_R1RHO_FIT_R1 = "%s_fit_r1"%MODEL_NOREX_R1RHO
 MODEL_DESC_NOREX_R1RHO_FIT_R1 = "The model for no chemical exchange 
relaxation, for R1rho off resonance models, where R1 is fitted."
@@ -91,6 +100,7 @@
 MODEL_YEAR_NOREX_R1RHO_FIT_R1 = 1953
 MODEL_EXP_TYPE_NOREX_R1RHO_FIT_R1 = EXP_TYPE_NOREX_R1RHO
 MODEL_SITES_NOREX_R1RHO_FIT_R1 = 1
+MODEL_EQ_NOREX_R1RHO_FIT_R1 = EQ_ANALYTIC

 MODEL_LM63 = 'LM63'
 MODEL_DESC_LM63 = "The Luz and Meiboom (1963) 2-site fast exchange 
model for SQ-CPMG experiments."
@@ -98,6 +108,7 @@
 MODEL_YEAR_LM63 = 1963
 MODEL_EXP_TYPE_LM63 = EXP_TYPE_CPMG_SQ
 MODEL_SITES_LM63 = 2
+MODEL_EQ_LM63 = EQ_ANALYTIC

 MODEL_LM63_3SITE = 'LM63 3-site'
 MODEL_DESC_LM63_3SITE = "The Luz and Meiboom (1963) 3-site fast 
exchange model for SQ-CPMG experiments."
@@ -105,6 +116,7 @@
 MODEL_YEAR_LM63_3SITE = 1963
 MODEL_EXP_TYPE_LM63_3SITE = EXP_TYPE_CPMG_SQ
 MODEL_SITES_LM63_3SITE = 3
+MODEL_EQ_LM63_3SITE = EQ_ANALYTIC

 MODEL_CR72 = 'CR72'
 MODEL_DESC_CR72 = "The reduced Carver and Richards (1972) 2-site 
model for all time scales for SQ-CPMG experiments, whereby the 
simplification R20A = R20B is assumed."
@@ -112,6 +124,7 @@
 MODEL_YEAR_CR72 = 1972
 MODEL_EXP_TYPE_CR72 = EXP_TYPE_CPMG_SQ
 MODEL_SITES_CR72 = 2
+MODEL_EQ_CR72 = EQ_ANALYTIC

 MODEL_CR72_FULL = 'CR72 full'
 MODEL_DESC_CR72_FULL = "The full Carver and Richards (1972) 2-site 
model for all time scales for SQ-CPMG experiments."
@@ -119,6 +132,7 @@
 MODEL_YEAR_CR72_FULL = 1972
 MODEL_EXP_TYPE_CR72_FULL = EXP_TYPE_CPMG_SQ
 MODEL_SITES_CR72_FULL = 2
+MODEL_EQ_CR72_FULL = EQ_ANALYTIC

 MODEL_IT99 = 'IT99'
 MODEL_DESC_IT99 = "The Ishima and Torchia (1999) 2-site CPMG model 
for all time scales for SQ-CPMG experiments, with skewed populations 
(pA >> pB)."
@@ -126,6 +140,7 @@
 MODEL_YEAR_IT99 = 1999
 MODEL_EXP_TYPE_IT99 = EXP_TYPE_CPMG_SQ
 MODEL_SITES_IT99 = 2
+MODEL_EQ_IT99 = EQ_ANALYTIC

 MODEL_TSMFK01 = 'TSMFK01'
 MODEL_DESC_TSMFK01 = "The Tollinger et al. (2001) 2-site very-slow 
exchange model for SQ-CPMG experiments."
@@ -133,6 +148,7 @@
 MODEL_YEAR_TSMFK01 = 2001
 MODEL_EXP_TYPE_TSMFK01 = EXP_TYPE_CPMG_SQ
 MODEL_SITES_TSMFK01 = 2
+MODEL_EQ_TSMFK01 = EQ_ANALYTIC

 MODEL_B14 = 'B14'
 MODEL_DESC_B14 = "The Baldwin (2014) 2-site CPMG exact solution 
model for all time scales for SQ-CPMG experiments, whereby the 
simplification R20A = R20B is assumed."
@@ -140,6 +156,7 @@
 MODEL_YEAR_B14 = 2014
 MODEL_EXP_TYPE_B14 = EXP_TYPE_CPMG_SQ
 MODEL_SITES_B14 = 2
+MODEL_EQ_B14 = EQ_ANALYTIC

 MODEL_B14_FULL = 'B14 full'
 MODEL_DESC_B14_FULL = "The Baldwin (2014) 2-site CPMG exact solution 
model for all time scales for SQ-CPMG experiments."
@@ -147,6 +164,7 @@
 MODEL_YEAR_B14_FULL = 2014
 MODEL_EXP_TYPE_B14_FULL = EXP_TYPE_CPMG_SQ
 MODEL_SITES_B14_FULL = 2
+MODEL_EQ_B14_FULL = EQ_ANALYTIC

 MODEL_M61 = 'M61'
 MODEL_DESC_M61 = "The Meiboom (1961) on-resonance 2-site fast 
exchange model for R1rho-type experiments."
@@ -154,6 +172,7 @@
 MODEL_YEAR_M61 = 1961
 MODEL_EXP_TYPE_M61 = EXP_TYPE_R1RHO
 MODEL_SITES_M61 = 2
+MODEL_EQ_M61 = EQ_ANALYTIC

 MODEL_M61B = 'M61 skew'
 MODEL_DESC_M61B = "The Meiboom (1961) on-resonance 2-site model for 
R1rho-type experiments, with skewed populations (pA >> pB)."
@@ -161,6 +180,7 @@
 MODEL_YEAR_M61B = 1961
 MODEL_EXP_TYPE_M61B = EXP_TYPE_R1RHO
 MODEL_SITES_M61B = 2
+MODEL_EQ_M61B = EQ_ANALYTIC

 MODEL_DPL94 = 'DPL94'
 """The R1rho 2-site fast exchange model of Davis, Perlman and London 
(1994)."""
@@ -169,6 +189,7 @@
 MODEL_YEAR_DPL94 = 1994
 MODEL_EXP_TYPE_DPL94 = EXP_TYPE_R1RHO
 MODEL_SITES_DPL94 = 2
+MODEL_EQ_DPL94 = EQ_ANALYTIC

 MODEL_DPL94_FIT_R1 = "%s_fit_r1"%MODEL_DPL94
 """The R1rho 2-site fast exchange model of Davis, Perlman and London 
(1994), where R1 is fitted."""
@@ -177,6 +198,7 @@
 MODEL_YEAR_DPL94_FIT_R1 = 1994
 MODEL_EXP_TYPE_DPL94_FIT_R1 = EXP_TYPE_R1RHO
 MODEL_SITES_DPL94_FIT_R1 = 2
+MODEL_EQ_DPL94_FIT_R1 = EQ_ANALYTIC

 MODEL_TP02 = 'TP02'
 MODEL_DESC_TP02 = "The Trott and Palmer (2002) off-resonance 2-site 
model for R1rho-type experiments."
@@ -184,6 +206,7 @@
 MODEL_YEAR_TP02 = 2002
 MODEL_EXP_TYPE_TP02 = EXP_TYPE_R1RHO
 MODEL_SITES_TP02 = 2
+MODEL_EQ_TP02 = EQ_ANALYTIC

 MODEL_TP02_FIT_R1 = "%s_fit_r1"%MODEL_TP02
 MODEL_DESC_TP02_FIT_R1 = "The Trott and Palmer (2002) off-resonance 
2-site model for R1rho-type experiments, where R1 is fitted."
@@ -191,6 +214,7 @@
 MODEL_YEAR_TP02_FIT_R1 = 2002
 MODEL_EXP_TYPE_TP02_FIT_R1 = EXP_TYPE_R1RHO
 MODEL_SITES_TP02_FIT_R1 = 2
+MODEL_EQ_TP02_FIT_R1 = EQ_ANALYTIC

 MODEL_TAP03 = 'TAP03'
 MODEL_DESC_TAP03 = "The Trott, Abergel and Palmer (2003) 
off-resonance 2-site model for R1rho-type experiments."
@@ -198,6 +222,7 @@
 MODEL_YEAR_TAP03 = 2003
 MODEL_EXP_TYPE_TAP03 = EXP_TYPE_R1RHO
 MODEL_SITES_TAP03 = 2
+MODEL_EQ_TAP03 = EQ_ANALYTIC

 MODEL_TAP03_FIT_R1 = "%s_fit_r1"%MODEL_TAP03
 MODEL_DESC_TAP03_FIT_R1 = "The Trott, Abergel and Palmer (2003) 
off-resonance 2-site model for R1rho-type experiments, where R1 is 
fitted."
@@ -205,6 +230,7 @@
 MODEL_YEAR_TAP03_FIT_R1 = 2003
 MODEL_EXP_TYPE_TAP03_FIT_R1 = EXP_TYPE_R1RHO
 MODEL_SITES_TAP03_FIT_R1 = 2
+MODEL_EQ_TAP03_FIT_R1 = EQ_ANALYTIC

 MODEL_MP05 = 'MP05'
 """The R1rho 2-site off-resonance exchange model of Miloushev and 
Palmer (2005)."""
@@ -213,6 +239,7 @@
 MODEL_YEAR_MP05 = 2005
 MODEL_EXP_TYPE_MP05 = EXP_TYPE_R1RHO
 MODEL_SITES_MP05 = 2
+MODEL_EQ_MP05 = EQ_ANALYTIC

 MODEL_MP05_FIT_R1 = "%s_fit_r1"%MODEL_MP05
 """The R1rho 2-site off-resonance exchange model of Miloushev and 
Palmer (2005)."""
@@ -221,6 +248,7 @@
 MODEL_YEAR_MP05_FIT_R1 = 2005
 MODEL_EXP_TYPE_MP05_FIT_R1 = EXP_TYPE_R1RHO
 MODEL_SITES_MP05_FIT_R1 = 2
+MODEL_EQ_MP05_FIT_R1 = EQ_ANALYTIC


 # The Numerical model names.
@@ -230,6 +258,7 @@
 MODEL_YEAR_NS_CPMG_2SITE_3D = 2004
 MODEL_EXP_TYPE_NS_CPMG_2SITE_3D = EXP_TYPE_CPMG_SQ
 MODEL_SITES_NS_CPMG_2SITE_3D = 2
+MODEL_EQ_NS_CPMG_2SITE_3D = EQ_NUMERIC

 MODEL_NS_CPMG_2SITE_3D_FULL = 'NS CPMG 2-site 3D full'
 MODEL_DESC_NS_CPMG_2SITE_3D_FULL = "The full numerical solution for 
the 2-site Bloch-McConnell equations using 3D magnetisation vectors 
for SQ CPMG experiments."
@@ -237,6 +266,7 @@
 MODEL_YEAR_NS_CPMG_2SITE_3D_FULL = 2004
 MODEL_EXP_TYPE_NS_CPMG_2SITE_3D_FULL = EXP_TYPE_CPMG_SQ
 MODEL_SITES_NS_CPMG_2SITE_3D_FULL = 2
+MODEL_EQ_NS_CPMG_2SITE_3D_FULL = EQ_NUMERIC

 MODEL_NS_CPMG_2SITE_STAR = 'NS CPMG 2-site star'
 MODEL_DESC_NS_CPMG_2SITE_STAR = "The numerical reduced solution for 
the 2-site Bloch-McConnell equations using complex conjugate matrices 
for SQ CPMG experiments, whereby the simplification R20A = R20B is 
assumed."
@@ -244,6 +274,7 @@
 MODEL_YEAR_NS_CPMG_2SITE_STAR = 2004
 MODEL_EXP_TYPE_NS_CPMG_2SITE_STAR = EXP_TYPE_CPMG_SQ
 MODEL_SITES_NS_CPMG_2SITE_STAR = 2
+MODEL_EQ_NS_CPMG_2SITE_STAR = EQ_NUMERIC

 MODEL_NS_CPMG_2SITE_STAR_FULL = 'NS CPMG 2-site star full'
 MODEL_DESC_NS_CPMG_2SITE_STAR_FULL = "The full numerical solution 
for the 2-site Bloch-McConnell equations using complex conjugate 
matrices for SQ CPMG experiments."
@@ -251,6 +282,7 @@
 MODEL_YEAR_NS_CPMG_2SITE_STAR_FULL = 2004
 MODEL_EXP_TYPE_NS_CPMG_2SITE_STAR_FULL = EXP_TYPE_CPMG_SQ
 MODEL_SITES_NS_CPMG_2SITE_STAR_FULL = 2
+MODEL_EQ_NS_CPMG_2SITE_STAR_FULL = EQ_NUMERIC

 MODEL_NS_CPMG_2SITE_EXPANDED = 'NS CPMG 2-site expanded'
 MODEL_DESC_NS_CPMG_2SITE_EXPANDED = "The numerical solution for the 
2-site Bloch-McConnell equations for SQ CPMG experiments, expanded 
using Maple by Nikolai Skrynnikov."
@@ -258,6 +290,7 @@
 MODEL_YEAR_NS_CPMG_2SITE_EXPANDED = 2001
 MODEL_EXP_TYPE_NS_CPMG_2SITE_EXPANDED = EXP_TYPE_CPMG_SQ
 MODEL_SITES_NS_CPMG_2SITE_EXPANDED = 2
+MODEL_EQ_NS_CPMG_2SITE_EXPANDED = EQ_SILICO

 MODEL_NS_R1RHO_2SITE = 'NS R1rho 2-site'
 MODEL_DESC_NS_R1RHO_2SITE = "The reduced numerical solution for the 
2-site Bloch-McConnell equations using 3D magnetisation vectors for 
R1rho-type experiments, whereby the simplification R20A = R20B is 
assumed."
@@ -265,6 +298,7 @@
 MODEL_YEAR_NS_R1RHO_2SITE = 2005
 MODEL_EXP_TYPE_NS_R1RHO_2SITE = EXP_TYPE_R1RHO
 MODEL_SITES_NS_R1RHO_2SITE = 2
+MODEL_EQ_NS_R1RHO_2SITE = EQ_NUMERIC

 MODEL_NS_R1RHO_2SITE_FIT_R1 = "%s_fit_r1"%MODEL_NS_R1RHO_2SITE
 MODEL_DESC_NS_R1RHO_2SITE_FIT_R1 = "The reduced numerical solution 
for the 2-site Bloch-McConnell equations using 3D magnetisation 
vectors for R1rho-type experiments, whereby the simplification R20A = 
R20B is assumed, and where R1 is fitted."
@@ -272,6 +306,7 @@
 MODEL_YEAR_NS_R1RHO_2SITE_FIT_R1 = 2005
 MODEL_EXP_TYPE_NS_R1RHO_2SITE_FIT_R1 = EXP_TYPE_R1RHO
 MODEL_SITES_NS_R1RHO_2SITE_FIT_R1 = 2
+MODEL_EQ_NS_R1RHO_2SITE_FIT_R1 = EQ_NUMERIC

 MODEL_NS_R1RHO_3SITE = 'NS R1rho 3-site'
 MODEL_DESC_NS_R1RHO_3SITE = "The numerical solution for the 3-site 
Bloch-McConnell equations using 3D magnetisation vectors for 
R1rho-type experiments, whereby the simplification R20A = R20B = R20C 
is assumed."
@@ -279,6 +314,7 @@
 MODEL_YEAR_NS_R1RHO_3SITE = 2005
 MODEL_EXP_TYPE_NS_R1RHO_3SITE = EXP_TYPE_R1RHO
 MODEL_SITES_NS_R1RHO_3SITE = 3
+MODEL_EQ_NS_R1RHO_3SITE = EQ_NUMERIC

 MODEL_NS_R1RHO_3SITE_LINEAR = 'NS R1rho 3-site linear'
 MODEL_DESC_NS_R1RHO_3SITE_LINEAR = "The numerical solution for the 
3-site Bloch-McConnell equations using 3D magnetisation vectors for 
R1rho-type experiments, linearised with kAC = kCA = 0 and whereby the 
simplification R20A = R20B = R20C is assumed."
@@ -286,6 +322,7 @@
 MODEL_YEAR_NS_R1RHO_3SITE_LINEAR = 2005
 MODEL_EXP_TYPE_NS_R1RHO_3SITE_LINEAR = EXP_TYPE_R1RHO
 MODEL_SITES_NS_R1RHO_3SITE_LINEAR = 3
+MODEL_EQ_NS_R1RHO_3SITE_LINEAR = EQ_NUMERIC

 # The multi-quantum data model names.
 MODEL_MMQ_CR72 = 'MMQ CR72'
@@ -294,6 +331,7 @@
 MODEL_YEAR_MMQ_CR72 = 2004
 MODEL_EXP_TYPE_MMQ_CR72 = EXP_TYPE_CPMG_MMQ
 MODEL_SITES_MMQ_CR72 = 2
+MODEL_EQ_MMQ_CR72 = EQ_ANALYTIC

 MODEL_NS_MMQ_2SITE = 'NS MMQ 2-site'
 MODEL_DESC_NS_MMQ_2SITE = "The reduced numerical solution for the 
2-site Bloch-McConnell equations for MMQ CPMG experiments, whereby 
the simplification R20A = R20B is assumed."
@@ -301,6 +339,7 @@
 MODEL_YEAR_NS_MMQ_2SITE = 2005
 MODEL_EXP_TYPE_NS_MMQ_2SITE = EXP_TYPE_CPMG_MMQ
 MODEL_SITES_NS_MMQ_2SITE = 2
+MODEL_EQ_NS_MMQ_2SITE = EQ_NUMERIC

 MODEL_NS_MMQ_3SITE = 'NS MMQ 3-site'
 MODEL_DESC_NS_MMQ_3SITE = "The numerical solution for the 3-site 
Bloch-McConnell equations for MMQ CPMG experiments, whereby the 
simplification R20A = R20B = R20C is assumed."
@@ -308,6 +347,7 @@
 MODEL_YEAR_NS_MMQ_3SITE = 2005
 MODEL_EXP_TYPE_NS_MMQ_3SITE = EXP_TYPE_CPMG_MMQ
 MODEL_SITES_NS_MMQ_3SITE = 3
+MODEL_EQ_NS_MMQ_3SITE = EQ_NUMERIC

 MODEL_NS_MMQ_3SITE_LINEAR = 'NS MMQ 3-site linear'
 MODEL_DESC_NS_MMQ_3SITE_LINEAR = "The numerical solution for the 
3-site Bloch-McConnell equations for MMQ CPMG experiments, linearised 
with kAC = kCA = 0 and whereby the simplification R20A = R20B = R20C 
is assumed."
@@ -315,6 +355,7 @@
 MODEL_YEAR_NS_MMQ_3SITE_LINEAR = 2005
 MODEL_EXP_TYPE_NS_MMQ_3SITE_LINEAR = EXP_TYPE_CPMG_MMQ
 MODEL_SITES_NS_MMQ_3SITE_LINEAR = 3
+MODEL_EQ_NS_MMQ_3SITE_LINEAR = EQ_NUMERIC

 # The parameters.
 PARAMS_R20 = ['r2', 'r2a', 'r2b']
@@ -650,4 +691,43 @@
     MODEL_NS_MMQ_2SITE: MODEL_SITES_NS_MMQ_2SITE,
     MODEL_NS_MMQ_3SITE: MODEL_SITES_NS_MMQ_3SITE,
     MODEL_NS_MMQ_3SITE_LINEAR: MODEL_SITES_NS_MMQ_3SITE_LINEAR
+}
+
+# Full list of equation type.
+MODEL_EQ = {
+    MODEL_R2EFF: MODEL_EQ_R2EFF,
+    MODEL_NOREX: MODEL_EQ_NOREX,
+    MODEL_NOREX_R1RHO: MODEL_EQ_NOREX_R1RHO,
+    MODEL_NOREX_R1RHO_FIT_R1: MODEL_EQ_NOREX_R1RHO_FIT_R1,
+    MODEL_LM63: MODEL_EQ_LM63,
+    MODEL_LM63_3SITE: MODEL_EQ_LM63_3SITE,
+    MODEL_CR72: MODEL_EQ_CR72,
+    MODEL_CR72_FULL: MODEL_EQ_CR72_FULL,
+    MODEL_IT99: MODEL_EQ_IT99,
+    MODEL_TSMFK01: MODEL_EQ_TSMFK01,
+    MODEL_B14: MODEL_EQ_B14,
+    MODEL_B14_FULL: MODEL_EQ_B14_FULL,
+    MODEL_M61: MODEL_EQ_M61,
+    MODEL_M61B: MODEL_EQ_M61B,
+    MODEL_DPL94: MODEL_EQ_DPL94,
+    MODEL_DPL94_FIT_R1: MODEL_EQ_DPL94_FIT_R1,
+    MODEL_TP02: MODEL_EQ_TP02,
+    MODEL_TP02_FIT_R1: MODEL_EQ_TP02_FIT_R1,
+    MODEL_TAP03: MODEL_EQ_TAP03,
+    MODEL_TAP03_FIT_R1: MODEL_EQ_TAP03_FIT_R1,
+    MODEL_MP05: MODEL_EQ_MP05,
+    MODEL_MP05_FIT_R1: MODEL_EQ_MP05_FIT_R1,
+    MODEL_NS_CPMG_2SITE_3D: MODEL_EQ_NS_CPMG_2SITE_3D,
+    MODEL_NS_CPMG_2SITE_3D_FULL: MODEL_EQ_NS_CPMG_2SITE_3D_FULL,
+    MODEL_NS_CPMG_2SITE_STAR: MODEL_EQ_NS_CPMG_2SITE_STAR,
+    MODEL_NS_CPMG_2SITE_STAR_FULL: MODEL_EQ_NS_CPMG_2SITE_STAR_FULL,
+    MODEL_NS_CPMG_2SITE_EXPANDED: MODEL_EQ_NS_CPMG_2SITE_EXPANDED,
+    MODEL_NS_R1RHO_2SITE: MODEL_EQ_NS_R1RHO_2SITE,
+    MODEL_NS_R1RHO_2SITE_FIT_R1: MODEL_EQ_NS_R1RHO_2SITE_FIT_R1,
+    MODEL_NS_R1RHO_3SITE: MODEL_EQ_NS_R1RHO_3SITE,
+    MODEL_NS_R1RHO_3SITE_LINEAR: MODEL_EQ_NS_R1RHO_3SITE_LINEAR,
+    MODEL_MMQ_CR72: MODEL_EQ_MMQ_CR72,
+    MODEL_NS_MMQ_2SITE: MODEL_EQ_NS_MMQ_2SITE,
+    MODEL_NS_MMQ_3SITE: MODEL_EQ_NS_MMQ_3SITE,
+    MODEL_NS_MMQ_3SITE_LINEAR: MODEL_EQ_NS_MMQ_3SITE_LINEAR
 }

Modified: 
branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py?rev=24983&r1=24982&r2=24983&view=diff
==============================================================================
--- 
branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py
  (original)
+++ 
branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py
  Tue Aug 12 10:54:36 2014
@@ -20,8 +20,8 @@
 
###############################################################################

 # relax module imports.
-from specific_analyses.relax_disp.variables import MODEL_CR72, 
MODEL_MMQ_CR72, MODEL_NS_R1RHO_3SITE
-from specific_analyses.relax_disp.variables import MODEL_EXP_TYPE, 
MODEL_PARAMS, MODEL_SITES, MODEL_YEAR
+from specific_analyses.relax_disp.variables import MODEL_CR72, 
MODEL_MMQ_CR72, MODEL_NS_CPMG_2SITE_EXPANDED, MODEL_NS_R1RHO_3SITE
+from specific_analyses.relax_disp.variables import MODEL_EXP_TYPE, 
MODEL_EQ, MODEL_PARAMS, MODEL_SITES, MODEL_YEAR
 from test_suite.unit_tests.base_classes import UnitTestCase


@@ -67,3 +67,13 @@

         # Test the return.
         self.assertEqual(model_sites, 3)
+
+
+    def test_MODEL_EQ(self):
+        """Unit test of the MODEL_EQ dictionary."""
+
+        # Test model equation type return from model equation 
dictionary.
+        model_eq = MODEL_EQ[MODEL_NS_CPMG_2SITE_EXPANDED]
+
+        # Test the return.
+        self.assertEqual(model_eq, 'silico')


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel



Related Messages


Powered by MHonArc, Updated Tue Aug 19 15:00:14 2014