Hi,
Here are the three patches as requested (splitting of the patch
(patch_consistency_tests__l1.2_r3342).
The patch 'patch_consistency_tests__l1.2_r3342-1' adds missing lines for
variables 'orientation' and 'tc' in the file
'specific_fns/consistency_tests.py'.
The patch 'patch_consistency_tests__l1.2_r3342-2' adds missing lines for
variables 'orientation' and 'tc' in the file 'test_suite/consistency_tests.py'
and also corrects the run type from 'jw' to 'ct' (This is a remnant from the
jw_mapping code from which the consistency_tests code was inspired.).
The patch 'patch_consistency_tests__l1.2_r3342-3' corrects a typo in the
'set()' function of the file 'specific_fns/consistency_tests.py' where the
string 'csa' was used twice instead of, first, 'csa', and then, 'r'. Since
this
is a bug that is also present in the file 'specific_fns/jw_mapping.py', a bug
report will first be submitted... Also, as asked by Edward, the patch will be
made for the 1.3 line and should be ported back into the 1.2 line then. So,
this third patch is sent for information only and a new version should be sent
for the 1.3 line...
Cheers !
Sébastien :)
Selon Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>, 22.07.2007:
Hi,
I would split this patch up into a least three commits. I would have
all the modifications to the consistency test results file (the
addition of the two parameters) as one patch. Then the test suite
modifications as a second. And then the single line change to the
'set()' function as a third. This is how you would make commits to
the relax repository - if two things are unrelated they should be
committed separately.
Cheers,
Edward
On 7/19/07, Sébastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi,
This patch (patch_consistency_tests__l1.2_r3342) adds missing lines for
variables 'orientation' and 'tc' in the
'specific_fnx/consistency_tests.py'
and
'test_suite/consistency.py' files. The consistency_tests code was inspired
by
the jw_mapping code and, at some places, only the two variables 'r' and
'csa'
were present (as in jw mapping) instead of the four variables 'r', 'csa',
'orientation' and 'tc' (as in consistency testing). Also, there is a
correction
for the run type ('ct') in the test suite which was left to the original
type
from jw mapping ('jw').
Cheers.
Séb :)
Selon Sebastien Morin <sebastien.morin.1@xxxxxxxxx>, 16.07.2007:
Hi,
When I adapted the jw_mapping code to yield the consistency_test code, I
didn't understand why, in the test suite, the following lines :
if abs(self.relax.data.res[self.run][index].j0 -
j0[index]) > j0[index]/1e6:
print 'Error in residue',
self.relax.data.res[self.run][index].num, 'j0 calculated value'
return
if abs(self.relax.data.res[self.run][index].f_eta -
f_eta[index]) > f_eta[index]/1e6:
print 'Error in residue',
self.relax.data.res[self.run][index].num, 'f_eta calculated value'
return
if abs(self.relax.data.res[self.run][index].f_r2 -
f_r2[index]) > f_r2[index]/1e6:
print 'Error in residue',
self.relax.data.res[self.run][index].num, 'f_r2 calculated value'
return
had a '/1e6' in the end and why those lines were not simply :
if abs(self.relax.data.res[self.run][index].j0 -
j0[index]) > j0[index]:
print 'Error in residue',
self.relax.data.res[self.run][index].num, 'j0 calculated value'
return
if abs(self.relax.data.res[self.run][index].f_eta -
f_eta[index]) > f_eta[index]:
print 'Error in residue',
self.relax.data.res[self.run][index].num, 'f_eta calculated value'
return
if abs(self.relax.data.res[self.run][index].f_r2 -
f_r2[index]) > f_r2[index]:
print 'Error in residue',
self.relax.data.res[self.run][index].num, 'f_r2 calculated value'
return
I tried to modify those lines and the test-suite code still works,
anyway.
Could you explain this issue to me, please ? Or is it a mistake and
should the '/1e6' part be taken off..?
Thanks !
Séb :)
Edward d'Auvergne wrote:
Oh well, it doesn't matter if it's not documented in the code then.
Regards,
Edward
On 7/13/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi,
For the eta value calculated in the consistency_tests code, I don't
know if
it is the eta_z or eta_xy value. In the original paper by Fushman &
Cowburn
(1998, JACS, 120: 7109-7110) as well as in the consistency tests
paper
(Fushman et al., 1998, JACS, 120: 10947-10952), eta is only described
as the
cross-correlation rate between 15N CSA and 15N-1H dipolar
interaction.
Cheers
Séb :)
Sébastien Morin wrote:
Hi Ed,
Here is the first part of the split patch as you asked for.
This one if for docstrings and comments in files :
/branches/consistency_tests_1.2/prompt/consistency_tests.py
/branches/consistency_tests_1.2/maths_fns/consistency_tests.py
/branches/consistency_tests_1.2/test_suite/consistency_tests.py
/branches/consistency_tests_1.2/sample_scripts/consistency_tests.py
/branches/consistency_tests_1.2/specific_fns/consistency_tests.py
Should the commit log be something like what follows ?
"This patch
(patch_consistency_tests__l1.2_r3340__docstrings_and_comments)
corrects docstrings and comments errors which were remnants of the
jw_mapping
code from which the consistency_tests code was inspired. Also, this
patch
adds
docstrings and comments to the code for making it easier for users to
understand what the code actually does."
Cheers
Séb :)
Selon Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>, 13.07.2007:
Hi,
This patch will need a few small changes before being committed. The
first is the docstring of the set_frq function of
'prompt/consistency_tests.py'. In the user function docstrings, the
list of keyword arguments need to be separated by newlines. This is a
relax convention as can be seen in the equivalent function of
'prompt/jw_mapping.py'. One problem with this is that the docstring
parser used to generate the relax manual might fail in this keyword
argument section. An additional formatting convention is the use of
two blank lines in front of the section titles in the docstring. This
allows easier reading of the much longer docstrings.
This isn't important but for the eta value, do you know if this is
eta_z or eta_xy? A more important point is that the patch should be
split up so that there are different patches for different types of
fixes. For example there are docstring and comment changes which
could be grouped together into a single patch. Then there are
modifications to the test suite for the consistency tests which
should
be separate. In 'specific_fns/consistency_tests.py' there
is a change
to the default value of the CSA and a number of other fundamental
changes. These should all be separate.
It would be a good exercise in preparation for having full commit
access to the relax repository to split this patch into a number of
small patches. No patch or commit to the relax repository should
contain two unrelated changes, even if these are tiny one line
changes. For each commit to the repository, a detailed description of
the changes should be placed into the commit log (which is
automatically emailed to the relax-commits mailing list but remains
in
the repository and is important for repository maintenance). You can
see these messages by typing something like 'svn log -v --limit=100 |
less' within your checked out copy. So if you could prepare a similar
commit message for the patches, it would be much appreciated.
Cheers,
Edward
P.S. A small fix is needed in 'prompt/consistency_tests.py' at line
4. And as for the self.__relax_help_ string, this isn't actually a
docstring but is used by the relax prompt help system. These
__init__() functions don't have docstrings, and I don't remember if
this was deliberate because of the special help system or not.
On 7/13/07, Sébastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi,
Here is a patch for the consistency tests branch of the 1.2 line
(r3340).
Some comments and docstrings were added as well as errors corrected
from
the
adaptation of this code from the jw_mapping code...
The following file are modified :
prompt/consistency_tests.py
maths_fns/consistency_tests.py
test_suite/consistency_tests.py
sample_scripts/consistency_tests.py
specific_fns/consistency_tests.py
Formating should be OK in these files except maybe for one thing for
which
I'm
not sure. It's between lines 29 and 33 of
prompt/consistency_tests.py where
I
don't know if the docstring should be below the line 'def
__init__(self,
relax):' or below the line 'self.__relax_help__ = \' as it is now...
Note
that
this is seen in many other code files...
Cheers
Sébastien :)
Selon Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>, 09.07.2007:
Hi,
Both patches have been applied to the repository. The patch
'patch_sample_scripts_consistency_tests' was committed at
r3331.
Change from 5000 to 500 simulations is reasonable. The large number
of simulations was because the calculation was so quick, but 500
should be more than sufficient. The addition of Grace plotting
functions to the Reduced Spectral Density Mapping sample script is
very useful and I will probably port this commit very soon to the 1.3
line. The patch 'patch_sample_scripts_jw_mapping' was
applied (at
r3332) directly to the 1.2 line rather than the
'consistency_tests_1.2' branch.
Cheers,
Edward
On 7/9/07, Sébastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi again !
I added lines for plotting using grace in the sample script. Since
this
sample
script was inspired by the jw_mapping sample script, I also submit a
patch
for
this file (adding lines for plotting, changing the number of Monte
Carlo
simulations from 5000 to 500 and changing the sequence file from
noe.500.out to
noe.600.out for more consistency)...
Ciao !
Sébastien :)
Selon Sébastien Morin <sebastien.morin.1@xxxxxxxxx>, 09.07.2007:
Hi Ed
Tell me if this works better. I'm now using the mail server directly
from
the
internet GUI... (not with Thuderbird).
If this does not work neither, maybe we could try with the task...
Ciao !
Sébastien
Selon Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>, 09.07.2007:
I've tried cutting an pasting the patch but I get the following:
edau@klymene:/media/usbdisk/relax/branches/consistency_tests_1.2>
patch -p0 < patch
patching file prompt/consistency_tests.py
Hunk #2 FAILED at 26.
Hunk #3 FAILED at 40.
Hunk #4 FAILED at 49.
Hunk #5 FAILED at 74.
4 out of 5 hunks FAILED -- saving rejects to file
prompt/consistency_tests.py.rej
edau@klymene:/media/usbdisk/relax/branches/consistency_tests_1.2>
I don't know why, but thunderbird is destroying the attachment.
The
failed 'hunks' are the wrapped lines. Maybe there is a way to
prevent
thunderbird from doing this. Otherwise using another email client
(or
webmail) may work. I could also create a task for this consistency
test work and these could be attached to the task. It's best that,
for the record, the files are located within the permanent relax
infrastructure.
Cheers,
Edward
On 7/9/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi again !
Here is again the first patch for the file
'prompt/consistency_tests.py'.
I modified the header for the copyrights.
Also, the former patches were not copied-pasted, but attached
using
Thunderbird after their creation using a command like 'svn diff >
patch'
under Linux. When I send those kinds of files as attachment, I
usually
see them as text in the e-mail, but also as an attachment that
can be
save. Tell me if it is okay and if it is still a problem, I'll
put
them
on my lab's website...
Cheers
Séb :)
Edward d'Auvergne wrote:
Hi,
Just add some text such as 'Copyright (C) 2007 Sebastien Morin
<sebastien.morin.1 at ulaval.ca>' underneath the already
existent
copyright text. The can be changed later, for example I can
give
you
a ???@nmr-relax.com email address which is an alias for any
other
email address (once voted in as a relax developer). Could you
add
this and then resend the patches? Ta. If they are attached
rather
than cut and paste that would be much easier for applying the
patches
(as email wraps lines). Also, maybe responding to your
original
posts
will allow the patches to be more easily tracked in the mailing
list
https://mail.gna.org/public/relax-devel/.
Cheers,
Edward
On 7/9/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi !
I'm about to create the patches to merge the consistency tests
code
into
the 1.2 branch.
However, I have one question. How do I treat the copyrights ?
Do I
leave
the original author from which I copied the code and then
modified
it
or
do I had my name to the code headers..?
Thanks !
Sébastien :)
Edward d'Auvergne wrote:
Oh, I've committed your patch at
http://maple.rsvs.ulaval.ca/mediawiki/index.php/Patch_consistency_tests_2007-06-26
as revision r3324, applying it to the 1.2 branch. I've
carefully
checked the code and none of the changes are detrimental or
could
affect the stability of the stable 1.2 relax codebase. Note
however
that the code in the branch will not run as the
consistency_test.py
files are still identical copies of the jw_mapping.py files.
Cheers,
Edward
On 7/9/07, Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>
wrote:
Hi,
I've now created two branches within the relax repository
for
you
to
play with. The first is a copy of the 1.2 line and is
located
at
svn.gna.org/svn/relax/branches/consistency_tests_1.2/. The
second
is
a copy of the 1.3 line and is located at
svn.gna.org/svn/relax/branches/consistency_tests_1.3/.
I've
initially
used 'svn cp' to create the 5 consistency_tests.py files as
described
in
https://mail.gna.org/public/relax-devel/2007-07/msg00001.html
(Message-id:
<7f080ed10707090251ve1c4a8fl7f8618843e5c9459@xxxxxxxxxxxxxx>).
Would you be able to create patches for these files (in
the
1.2
line
first, no need to worry about the 1.3 line yet), and then
post
the
individual patches as text file attachments to the mailing
list?
Thanks. I will then be able to commit these patches
individually,
checking them in fine detail.
Things to note in creating the patches from the code at
http://maple.rsvs.ulaval.ca/mediawiki/index.php/Relax_development
include the copyright preservation, a number of integers in
'maths_fns/consistency_tests.py' which should be floating
point
numbers (just add '.0' to the end of the number), the
addition
of
Grace plots as an output in the
'sample_scripts/consistency_tests.py'
script to be able to create a picture similar to that on
your
relax
development site, maybe only allowing 'Tc' and 'tc' in the
return_data_name() function and not 'TC', and 'degrees'
instead
of
'degree' in the return_units() function.
One bug includes:
setattr(self.relax.data.res[self.run][index],
'csa',
float(value[0]))
setattr(self.relax.data.res[self.run][index],
'r',
float(value[1]))
+ setattr(self.relax.data.res[self.run][index],
'orientation', float(value[1]))
+ setattr(self.relax.data.res[self.run][index],
'tc',
float(value[1]))
value[1] has been used twice. I have a feeling there is
another
bug
somewhere where an index has been repeated a few times when
it
should
be different indices, but I can't find it at the moment.
The
individual patches should help. Finally, I have a feeling
that
there
is unused code which can be deleted as it is a relic from
the
copy
of
the J(w) mapping code and is not needed. For the 1.3 line
code
I
would recommend that identical functions are shifted into
files
such
as 'specific_fns/base_class.py', but for the 1.2 line code
I
would
prefer the duplication as this means that the current
stable
code
base
remains stable.
Cheers,
Edward
On 6/26/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx>
wrote:
Hi,
I started working on implementing the consistency tests
last
week
before
the last post was made and, hence, I worked on repository
line
1.2
(revision 3303).
I implemented the consistency tests as a new type of run
('ct')
similar
to the one for Jw mapping.
The calculations are made for J(0), F_eta and F_R2
separately
for each
magnetic field (one at a time). The output results file
is
similar to
the one for Jw mapping. The user then needs to plot them
and
look for
consistency with its own criteria (calculation
correlation
coefficients, mean ratios and standard deviations, etc).
Please look at the followinr URL for a listing of the
modifications to
old files and also necessary new files.
http://maple.rsvs.ulaval.ca/mediawiki/index.php/Relax_development
The file 'sample_scripts/consistency_tests.py' should be
useful
to
understand how the new procedure works.
Even if this was done on repository line 1.2, I think it
is
quite fine
since nothing was deleted but only things added (maybe
too
much,
as I
reproduced the Jw mapping approach, maybe too much as I
added
lines in
the codes for grace, molmol, etc, maybe too much also
since
some
code is
duplicated from the Jw mapping code). The test-suite
still
works
perfectly and, so, I think it could be fine to add the
tests
to
the
1.2
line as well... However, if necessary, I could implement
the
consistency
testing procedure on line 1.3, following your comments as
I
am
quite new
to Python and maybe made things somehow not perfectly...
Please tell me what you think about this.
Cheers,
Sébastien :)
Edward d'Auvergne wrote:
Hi,
I have previously talked about data set consistency.
For
example
see
the post at
https://mail.gna.org/public/relax-users/2007-06/msg00001.html
in which a few reasons for inconsistencies have been
explained. I
have, from experience, noticed that small changes in
protein
concentration can change the collected relaxation rates
significantly
- most likely because of packing interactions. All
samples
should
essentially be identical in all respects for the
relaxation
rates to
be compared. And the temperate should always be fine
tuned
between
experiments and spectrometers using methanol (and
always
checked
later
on if there is a large time between collecting the same
experiment).
Therefore these tests would be quite useful. Data
consistency
is
essential for the model-free results to be correct (as
well
as
reduced
spectral density mapping, SRLS, etc.) as this affects
both
the
optimisation and model selection and can result in
artificial
motions
appearing. However I don't know how these test would
currently fit
within relax. Maybe a new type of analysis should be
created
for
this
(see the pipe.create() user function in the 1.3 line or
the
run.create() user function in the 1.2 line). These
ideas
should all
go into the 1.3 line (via a branch) as the 1.2 line is
stable
and no
new major features will be added to this code. What
are
the
ideas you
have been playing with?
Cheers,
Edward
On 6/15/07, Sebastien Morin
<sebastien.morin.1@xxxxxxxxx>
wrote:
Hi everyone
During the last months, I was astonished to realize
that
some
spin
relaxation data I had acquired at different fields
were
not
consistent
between each other. The way I realized that was by
seeing
discrepancy
between J(0) values calculated with those different
datasets.
I looked a little bit in the litterature and found
some
interesting
consistency tests in a paper by Fushman (Fushman et
al.,
JACS,
1998,
120:10947-10952).
This paper present 2 consistency tests to compare
datasets
from
different magnetic fields / samples / time / etc.
I think it would be interesting to implement those
simple
tests
in relax
so the user can, before trying to fit their data, know
the
quality of
those... Regrettably, very few people look at the
consistency
of
their
datasets before analysis...
The underlying principle is the same as when looking
at
consistency for
J(0). Thus, I think that those two tests and a J(0)
test
should be
implemented altogether...
I'll try to work a bit on this. Mimicking the code for
...
[Message clipped]
--
______________________________________
_______________________________________________
| |
|| Sebastien Morin ||
||| Etudiant au PhD en biochimie |||
|||| Laboratoire de resonance magnetique nucleaire ||||
||||| Dr Stephane Gagne |||||
|||| CREFSIP (Universite Laval, Quebec, CANADA) ||||
||| 1-418-656-2131 #4530 |||
|| ||
|_______________________________________________|
______________________________________
_______________________________________________
relax (http://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
------------------------
Sébastien Morin
Étudiant M.Sc. Biochimie
Laboratoire S. Gagné
3252 Pav. Marchand (Université Laval)
Tél : (418) 656-2131 #4530
Fax : (418) 656-7176
e-mail : sebastien.morin.1@xxxxxxxxx
------------------------
Sébastien Morin
Étudiant M.Sc. Biochimie
Laboratoire S. Gagné
3252 Pav. Marchand (Université Laval)
Tél : (418) 656-2131 #4530
Fax : (418) 656-7176
e-mail : sebastien.morin.1@xxxxxxxxx
Index: specific_fns/consistency_tests.py
===================================================================
--- specific_fns/consistency_tests.py (revision 3342)
+++ specific_fns/consistency_tests.py (working copy)
@@ -447,7 +447,7 @@
value.append(self.default_value('tc'))
# Initilise data.
- if not hasattr(self.relax.data.res[self.run][index], 'csa') or
not hasattr(self.relax.data.res[self.run][index], 'csa'):
+ if not hasattr(self.relax.data.res[self.run][index], 'csa') or
not hasattr(self.relax.data.res[self.run][index], 'csa') or not
hasattr(self.relax.data.res[self.run][index], 'orientation') or not
hasattr(self.relax.data.res[self.run][index], 'tc'):
self.data_init(self.relax.data.res[self.run][index])
# CSA, bond length, angle Theta and correlation time.
@@ -582,7 +582,7 @@
self.relax.data.res[run][i].relax_sim_data = sim_data
- def write_columnar_line(self, file=None, num=None, name=None,
select=None, data_set=None, nucleus=None, wH=None, j0=None, f_eta=None,
f_r2=None, r=None, csa=None, ri_labels=None, remap_table=None,
frq_labels=None, frq=None, ri=None, ri_error=None):
+ def write_columnar_line(self, file=None, num=None, name=None,
select=None, data_set=None, nucleus=None, wH=None, j0=None, f_eta=None,
f_r2=None, r=None, csa=None, orientation=None, tc=None, ri_labels=None,
remap_table=None, frq_labels=None, frq=None, ri=None, ri_error=None):
"""Function for printing a single line of the columnar formatted
results."""
# Residue number and name.
@@ -603,6 +603,8 @@
file.write("%-25s " % f_r2)
file.write("%-25s " % r)
file.write("%-25s " % csa)
+ file.write("%-25s " % orientation)
+ file.write("%-25s " % tc)
# Relaxation data setup.
if ri_labels:
@@ -658,7 +660,7 @@
ri_error.append('Ri_error_(' +
self.relax.data.ri_labels[self.run][i] + "_" +
self.relax.data.frq_labels[self.run][self.relax.data.remap_table[self.run][i]]
+ ")")
# Write the header line.
- self.write_columnar_line(file=file, num='Num', name='Name',
select='Selected', data_set='Data_set', nucleus='Nucleus',
wH='Proton_frq_(MHz)', j0='J(0)', f_eta='F_eta', f_r2='F_R2',
r='Bond_length_(A)', csa='CSA_(ppm)', ri_labels='Ri_labels',
remap_table='Remap_table', frq_labels='Frq_labels', frq='Frequencies', ri=ri,
ri_error=ri_error)
+ self.write_columnar_line(file=file, num='Num', name='Name',
select='Selected', data_set='Data_set', nucleus='Nucleus',
wH='Proton_frq_(MHz)', j0='J(0)', f_eta='F_eta', f_r2='F_R2',
r='Bond_length_(A)', csa='CSA_(ppm)', orientation='Angle_Theta_(degrees)',
tc='Correlation_time_(ns)', ri_labels='Ri_labels', remap_table='Remap_table',
frq_labels='Frq_labels', frq='Frequencies', ri=ri, ri_error=ri_error)
# Values.
@@ -712,6 +714,16 @@
if hasattr(data, 'csa') and data.csa != None:
csa = data.csa / 1e-6
+ # Angle Theta
+ orientation = None
+ if hasattr(data, 'orientation') and data.orientation != None:
+ orientation = data.orientation
+
+ # Correlation time
+ tc = None
+ if hasattr(data, 'tc') and data.tc != None:
+ tc = data.tc / 1e-9
+
# Relaxation data and errors.
ri = []
ri_error = []
@@ -732,7 +744,7 @@
ri_error.append(None)
# Write the line.
- self.write_columnar_line(file=file, num=data.num,
name=data.name, select=data.select, data_set='value', nucleus=nucleus,
wH=`wH`, j0=`j0`, f_eta=`f_eta`, f_r2=`f_r2`, r=`r`, csa=`csa`,
ri_labels=ri_labels, remap_table=remap_table, frq_labels=frq_labels, frq=frq,
ri=ri, ri_error=ri_error)
+ self.write_columnar_line(file=file, num=data.num,
name=data.name, select=data.select, data_set='value', nucleus=nucleus,
wH=`wH`, j0=`j0`, f_eta=`f_eta`, f_r2=`f_r2`, r=`r`, csa=`csa`,
orientation=`orientation`, tc=`tc`, ri_labels=ri_labels,
remap_table=remap_table, frq_labels=frq_labels, frq=frq, ri=ri,
ri_error=ri_error)
# Errors.
@@ -774,6 +786,16 @@
if hasattr(data, 'csa_err') and data.csa_err != None:
csa = data.csa_err / 1e-6
+ # Angle Theta.
+ orientation = None
+ if hasattr(data, 'orientation_err') and data.orientation_err !=
None:
+ orientation = data.orientation_err
+
+ # Correlation time.
+ tc = None
+ if hasattr(data, 'tc_err') and data.tc_err != None:
+ tc = data.tc_err / 1e-6
+
# Relaxation data and errors.
ri = []
ri_error = []
@@ -782,7 +804,7 @@
ri_error.append(None)
# Write the line.
- self.write_columnar_line(file=file, num=data.num,
name=data.name, select=data.select, data_set='error', nucleus=nucleus,
wH=`wH`, j0=`j0`, f_eta=`f_eta`, f_r2=`f_r2`, r=`r`, csa=`csa`,
ri_labels=ri_labels, remap_table=remap_table, frq_labels=frq_labels, frq=frq,
ri=ri, ri_error=ri_error)
+ self.write_columnar_line(file=file, num=data.num,
name=data.name, select=data.select, data_set='error', nucleus=nucleus,
wH=`wH`, j0=`j0`, f_eta=`f_eta`, f_r2=`f_r2`, r=`r`, csa=`csa`,
orientation=`orientation`, tc=`tc`, ri_labels=ri_labels,
remap_table=remap_table, frq_labels=frq_labels, frq=frq, ri=ri,
ri_error=ri_error)
# Simulation values.
@@ -820,6 +842,16 @@
if hasattr(data, 'csa_sim') and data.csa_sim != None and
data.csa_sim[i] != None:
csa = data.csa_sim[i] / 1e-6
+ # Angle Theta.
+ orientation = None
+ if hasattr(data, 'orientation_sim') and data.orientation_sim
!= None and data.orientation_sim[i] != None:
+ orientation = data.orientation_sim[i]
+
+ # Correlation time.
+ tc = None
+ if hasattr(data, 'tc_sim') and data.tc_sim != None and
data.tc_sim[i] != None:
+ tc = data.tc_sim[i] / 1e-6
+
# Relaxation data and errors.
ri = []
ri_error = []
@@ -839,4 +871,4 @@
ri_error.append(None)
# Write the line.
- self.write_columnar_line(file=file, num=data.num,
name=data.name, select=data.select, data_set='sim_'+`i`, nucleus=nucleus,
wH=`wH`, j0=`j0`, f_eta=`f_eta`, f_r2=`f_r2`, r=`r`, csa=`csa`,
ri_labels=ri_labels, remap_table=remap_table, frq_labels=frq_labels, frq=frq,
ri=ri, ri_error=ri_error)
+ self.write_columnar_line(file=file, num=data.num,
name=data.name, select=data.select, data_set='sim_'+`i`, nucleus=nucleus,
wH=`wH`, j0=`j0`, f_eta=`f_eta`, f_r2=`f_r2`, r=`r`, csa=`csa`,
orientation=`orientation`, tc=`tc`, ri_labels=ri_labels,
remap_table=remap_table, frq_labels=frq_labels, frq=frq, ri=ri,
ri_error=ri_error)
Index: test_suite/consistency_tests.py
===================================================================
--- test_suite/consistency_tests.py (revision 3342)
+++ test_suite/consistency_tests.py (working copy)
@@ -149,7 +149,7 @@
self.run = run
# Create the run.
- self.relax.generic.runs.create(self.run, 'jw')
+ self.relax.generic.runs.create(self.run, 'ct')
# Read the sequence.
self.relax.interpreter._Sequence.read(self.run, file='test_seq',
dir=sys.path[-1] + '/test_suite/data')
@@ -157,8 +157,12 @@
# Try to set the values.
bond_length = 1.02 * 1e-10
csa = -170 * 1e-6
+ orientation = 15.7
+ tc = 13 * 1e-9
self.relax.interpreter._Value.set(self.run, bond_length,
'bond_length')
self.relax.interpreter._Value.set(self.run, csa, 'csa')
+ self.relax.interpreter._Value.set(self.run, orientation,
'orientation')
+ self.relax.interpreter._Value.set(self.run, tc, 'tc')
# Test values.
for i in xrange( len(self.relax.data.res[self.run]) ):
@@ -168,6 +172,12 @@
if self.relax.data.res[self.run][i].csa != csa:
print 'Value of csa has not been set correctly'
return
+ if self.relax.data.res[self.run][i].orientation != orientation:
+ print 'Value of orientation has not been set correctly'
+ return
+ if self.relax.data.res[self.run][i].tc != tc:
+ print 'Value of tc has not been set correctly'
+ return
# Success.
return 1
Index: specific_fns/consistency_tests.py
===================================================================
--- specific_fns/consistency_tests.py (revision 3342)
+++ specific_fns/consistency_tests.py (working copy)
@@ -447,7 +447,7 @@
value.append(self.default_value('tc'))
# Initilise data.
- if not hasattr(self.relax.data.res[self.run][index], 'csa') or
not hasattr(self.relax.data.res[self.run][index], 'csa') or not
hasattr(self.relax.data.res[self.run][index], 'orientation') or not
hasattr(self.relax.data.res[self.run][index], 'tc'):
+ if not hasattr(self.relax.data.res[self.run][index], 'csa') or
not hasattr(self.relax.data.res[self.run][index], 'r') or not
hasattr(self.relax.data.res[self.run][index], 'orientation') or not
hasattr(self.relax.data.res[self.run][index], 'tc'):
self.data_init(self.relax.data.res[self.run][index])
# CSA, bond length, angle Theta and correlation time.