URL:
<http://gna.org/bugs/?22146>
Summary: Unpacking of R2A and R2B is performed wrong
for
clustered "full" dispersion models
Project: relax
Submitted by: tlinnet
Submitted on: Fri 06 Jun 2014 09:08:58 AM UTC
Category: relax's source code
Specific analysis category: Relaxation dispersion
Priority: 9 - Immediate
Severity: 4 - Important
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: Repository: trunk
Discussion Lock: Any
Operating System: All systems
_______________________________________________________
Details:
The unpacking of the R2A and R2B parameters in the "full" model is
performed
wrong.
This will happen performing a clustered analysis, using one of the
"full"
models.
This bug affect all analysis performed running with a "full" model,
with
clustered residues.
The bug is located in the target function:
./target_functions/relax_disp.py
For all the "func_MODEL_full", the unpacking of:
R20A = params[:self.end_index[0]]
R20B = params[self.end_index[0]:self.end_index[1]]
This is wrong, since the "params" list, is ordered:
[spin, spin, spin, [dw], pA, kex], where spin = [nr_frq*r2a,
nr_frq*r2b]
This ordering happens in:
./specific_analysis/relax_disp/parameters.py
in the loop_parameters.py
A possible solutions i shown below.
This alter the unpacking of the parameters.
An example of profiling_cr72.py is attached.
This can be downloaded, and run in base folder of relax:
./profiling_cr72.py .
This is with 3 frq, and 3 spins.
The current implementations would unpack:
('R20A', array([ 2., 2., 2., 4., 4., 4., 12., 12., 12.]),
9)
('R20B', array([ 14., 14., 14., 22., 22., 22., 24., 24., 24.]),
9)
R2A is 2, 12, 22 for the spins 0-3
R2B is, 4, 14, 24 for the spins 0-3
The suggested unpacking loop, unpacks to:
('R20A', array([ 2., 2., 2., 12., 12., 12., 22., 22., 22.]),
9)
('R20B', array([ 4., 4., 4., 14., 14., 14., 24., 24., 24.]),
9)
-------
from numpy import array, concatenate, delete, index_exp
import numpy
p = array([ 1.000000000000000e+01, 1.000000000000000e+01,
1.100000000000000e+01
, 1.100000000000000e+01, 1.000000000000000e+01, 1.000000000000000e+01
, 1.100000000000000e+01, 1.100000000000000e+01, 1.000000000000000e+00
, 1.000000000000000e+00, 9.000000000000000e-01, 1.000000000000000e+03])
e = [4, 8, 10]
# Now
r2a = p[:e[0]]
print r2a
r2b = p[e[0]:e[1]]
print r2b
dw = p[e[1]:e[2]]
print dw
pA = p[e[2]]
print pA
kex = p[e[2]+1]
print kex
print "new"
ns = 2
nf = 2
ml = p[:e[1]]
R20A = array([])
R20B = array([])
for i in range(0, ns):
# Array sorted per [spin, spin, spin], where spin = [nr_frq*r2a,
nr_frq*r2b]
spin_AB = ml[:nf*2]
ml = delete(ml, numpy.s_[:nf*2])
R20A = concatenate([R20A, spin_AB[:nf] ])
R20B = concatenate([R20B, spin_AB[nf:] ])
print R20A
print R20B
print dw
print pA
print kex
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 06 Jun 2014 09:08:58 AM UTC Name: profiling_cr72.py Size:
17kB
By: tlinnet
<http://gna.org/bugs/download.php?file_id=20938>
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?22146>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
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