mailRe: CSA & bond length


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

Header


Content

Posted by Sébastien Morin on July 22, 2007 - 22:52:
Hi,

I've add the relax-devel mailing list on this talk since most of the subject 
is
now related to relax design...

I've tried to solve this issue both in the 1.2 and 1.3 lines.


For the 1.2 line :

It seems we can modify the code by changing every appearance of CSA with a 
-170
ppm value to a -172 ppm value. However, this breaks the test-suite. In fact,
the jw_mapping test breaks with this change but not the model-free test (the
change in parameters must be too small to be detected by the test-suite. Thus,
the test-suite values must be changed to account for the switch in CSA value.
In the patch below, I only corrected the broken test (jw_mapping) but not the
model-free test which is also affected (even if we don't see it). If these
changes are right for solving this issue, the patch
'patch__default_csa__l1.2_r3351' (see below for the commit log) should be 
used.

The patch 'patch__default_csa__l1.2_r3351' makes uniform the use of the CSA
value (now -172 ppm everywhere) and fixes the test-suite (in jw_mapping) to
account for this change.


For the 1.3 line :

I've added two constants (N15_CSA and NH_BOND_LENGTH) in the
'physical_constants.py' file. Then, I'v imported these constants in the files
'test_suite/system_tests/jw_mapping.py',
'test_suite/system_tests/model_free.py' and 'specific_fns/jw_mapping.py'. I've
also modified some comments so the -172 ppm value for CSA is now the default.
Finally, as the results from calculations using the CSA value will be changed,
I've also modified the test-suite for jw_mapping, but left unchanged other
parts of the test-suite as the changes in CSA value may not affect these (see
above the discussion for the 1.2 line). If these changes are right, the patch
'patch__default_csa_r__l1.3_r3351' should be used along with its commit log
(see below).

The patch 'patch__default_csa_r__l1.3_r3351' makes uniform the use of the CSA
value (now -172 ppm everywhere) and fixes the test-suite (in jw_mapping) to
account for this change. It also adds two constants for the CSA and NH bond
length default values.


Cheers


Séb  :)




Selon Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>, 22.07.2007:

Hi,

I've had a look at both the 1.2 and 1.3 relax lines and have noticed
that the sample scripts all use the value of -172 ppm whereas
everywhere in the relax code base the value of -170 ppm is used as the
default.  Although the change won't make much of a difference in the
final results, for consistency within relax we could have everything
changed to -172 ppm.  It's up to the authors to report the CSA value
they have used in their manuscripts (something which should be
considered essential for comparison).

The idea of defining the CSA and bond length in a separate file in the
1.3 line is good.  There is the file 'physical_constants.py' in the
base directory just for this and you just import the constants you
need.  They may need distinctive names though (like CSA_VAL,
BOND_LENGTH, etc.) to avoid problems with the user supplied values in
the code.

Cheers,

Edward


On 7/19/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:

 Hi,

 I agree with you, Alex. You're right, this small difference of 2 ppm for
the CSA is quite small compared to the real deviation observed
experimentally...

 However, since few people actually measure the 'real' csa, I think that
the
best available approximation should be the default and that relax should
promote a consistent use, for better comparison between published
studies...

 Also, I think that these default values (for csa and r, for example)
should
be the same throughout all the relax program, for more consistency...
Maybe,
in the 1.3 line, these default values should be in a common file so that
the
jw_mapping and consistency_tests codes (and others if so) could use the
same
default values. (Maybe this has been discussed before...)

 Ok.

 Cheers !


 Séb :)




 Alexandar Hansen wrote:
I'm not a protein expert, but unless you're at ~GHz fields, a 2 ppm
difference in 15N CSA magnitude is going to be negligible.  The error in
the
site-by-site CSA is going to be ~5-10 ppm, if not more, anyways.  The
important thing, I imagine, is that you know what the value you are using
is
and what assumptions are involved (ie. collinearity with NH bond, 
symmetric
CSA tensor).

 Alex Hansen



On 7/16/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi,

It's been a long time since we discussed this (the CSA / bond length
issue in spin relaxation analysis).

I would agree in using a combination of 1.02 A for bond length and -172
ppm for CSA (for 15N-1H vectors).

Should the default values in the relax code be modified, changing the
CSA from -170 (at least in the jw_mapping code) to -172 ppm ?

Cheers


Séb  :)




Edward d'Auvergne wrote:
There has been much work describing the importance of the CSA and the
bond length.  It would be interesting to see how much of a difference
measuring the CSA (and the bond length) would make to the final
dynamic results.  As Sébastien said, the 1.04 Angstrom bond length
should be used with a lower CSA value.  My preference though would be
to use -172 ppm together with 1.02 Angstrom.

Edward


On 9/30/06, Michael S. Marlow <marlowms@xxxxxxxxxxxxxxxxxx> wrote:
I agree with the value of -170.  Here are my favorite references:

Variability of the 15N Chemical Shift Anisotropy in Escherichia coli
Ribonuclease H in Solution
Christopher D. Kroenke, Mark Rance, and Arthur G. Palmer, III
J. Am. Chem. Soc.; 1999; 121(43) pp 10119 - 10125
"For this data set, the values of  are approximately Gaussian
distributed with a
mean of -172 ± 13 ppm."

Protein Backbone Dynamics and 15N Chemical Shift Anisotropy from
Quantitative
Measurement of Relaxation Interference Effects
Nico Tjandra, Attila Szabo, and Ad Bax
J. Am. Chem. Soc.; 1996; 118(29) pp 6986 - 6991
Essentially the same value, but identified larger outliers

Another aspect of this thread which has not received much attention
is the bond
length.  The refence below suggest 1.04 Angstroms.

Determination of Relative N-HN, N-C', C-C', and C-H Effective Bond
Lengths in a
Protein by NMR in a Dilute Liquid Crystalline Phase
Marcel Ottiger and Ad Bax
J. Am. Chem. Soc.; 1998; 120(47) pp 12334 - 12341

Mike
--
Michael S. Marlow, Ph.D.
Department of Biochemistry and Biophysics
University of Pennsylvania


Quoting Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>:

Salut Séb, welcome to the relax users mailing list.  Thank you for
responding Alex.  The CSA value is important as the example shows.
However I would call this a 'fringe' example as it represents a
highly
restricted nanosecond motion.  The relaxation data for this example
was generated by back calculation using the CSA value of -160 ppm.
Although as Alex pointed out relax is capable of optimising the CSA
value, I would be wary of these models as they are essentially
untested.  I've played around with the models a little and I have a
feeling that the R1, R2, and NOE values are not sufficient to tease
out the CSA.  To test these models using just the R1, R2, and NOE 
at
multiple field strengths, the CSA would need to be accurately
measured
using one of David Fushman's techniques (I'll talk about this next)
and the values compared to those fitted using the models built into
relax.

I believe that the value of -160 ppm was determined by solid state
NMR
of small peptides (it's been a few years since I read the
litterature
on the CSA value in proteins, so I could be wrong).  However a
number
of publications have demonstrated that the average CSA value in
solution is higher.  I would say that the authorative expert in the
field is David Fushman.  The JACS reference you cite is just one of
many of his publications on measuring the CSA.  He has 
demonstrated,
using I think three different techniques now, that the CSA in
proteins
is highly variable.

Idealy for highly accurate model-free analysis, the CSA value 
should
be determined either prior to or during model-free analysis using
one
of his techniques.  However most people appear happy to just set 
the
CSA value to either the 'ancient' value of -160 ppm or the solution
average of -170 ppm (David's work again).  Using the data you have
currently collected, I would personally use the value of -170 ppm.
Is
the value of -172 ppm from the Hall and Fushman paper you cited?  I
haven't read that paper yet.

Edward


P.S.  I might change the sample scripts to -170 ppm.  I had 
intended
to change the value a while back but forgot about it.



On 9/30/06, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:

 Hi again

 Thanks for your answer !

 I think that, for me, the CSA value would have a significant
impact on my
analysis since my protein has a tumbling time of about 13 ns and
I have
data
from 500, 600 and 800 MHz...

 I don't know if this is relevant, but I performed simple tests
with the
test data and sample scripts provided with relax (path :

'relax/test_suite/data/model_free/S2_0.970_te_2048_Rex_0.149'
in version 1.2.7 and the sample script 'mf_multimodel.py')...

 TEST 1
 =====
 r = 1.02
 CSA = -160 ppm
 m4
 S2 = 0.97
 te = 2048
 Rex = 0.149
 X2 = 7.3e-28

 TEST 2
 =====
 r = 1.02
 CSA = -172 ppm
 m4
 S2 = 0.97
 te = 82
 Rex = 4.34
 X2 = 2.27

 As you can see, for this single residue (with data at 500 and
600 MHz),
there is no effect for the value of S2, but the effect is
important for te
and Rex... And still, the best model (the lower X2) is m4 for 
both
situations...

 I think that this ambiguity in the value for CSA leads to
important
variations in the interpretation of relaxation data.

 Thanks for getting me to understand more this topic and also
choose the
best value to use...

 Séb




 Alexandar Hansen wrote:
Hi Sebastien,

 I'm quite new to relax as well, but I can give you at least a
some answer
to the questions you pose.

 In general, the CSA mechanism is a little underappreciated.  At
low
enough
field strengths for 15N relaxation (400-500MHz), the 15N CSA
accounts for
somewhere between 10-20% of your R1 and R2 rates.  Varying the 
CSA
magnitude
between 160 and 172 only changes this by 2-3%.  So, if relaxation
rates
are
measured with, let's say, 5% error, there's no statistical reason
to vary
the CSA.  As we go to higher fields (800MHz), the CSA can account
for
50-60%
of the R1 and R2 rates and varying the CSA between 160 and 172
can affect
those rates by up to 10%.  So, now people are finding that this
thing
called
CSA is relatively improtant and should be better understood.

 In many analysis techniques, such as relax, you have the option
of
letting
the CSA vary.  For relax, I believe that's models m10-m19 and
tm10-tm19.
One word of warning though, I wouldn't encourage fitting the CSA
unless
you
have data at multiple field strengths as you're adding another
variable to
the analysis, so the standard 3 measurements at a single field
strength
are
likely not enough to do this.  You also run the risk of
overinterpretting
your data because, in my opinion, varying the CSA freely in
relaxation
analysis is not unlike simply throwing in a fudge factor. :-)

 As for what is the best value to use, I can't really help you
there.
We'll
have to wait for some of the protein people to respond (I know
RNA better
;-) ).  But if you're at low enough fields or tiny proteins (<2-3
ns tau(
m
)) it shouldn't really matter what you use.

 I hope all of this makes sense and I haven't said anything
blatantly
incorrect.  If I have, hopefully someone will follow up on both
of our
posts.  Thanks, and good luck!

 Alex Hansen




 Hi

I am new to relax and have a quite general question about the
value used
for the CSA while studying proteins' 15N-1H vectors with
model-free
approach.

In the litterature, we mainly find two values for the CSA (-160
and -172

ppm).

There is, if I understand well, a link between the bond length
and the
CSA, but everyone seems to agree about using the same value of
1.02 A
which should give rise to a mean S2 of 0.85 for secondary
structure when

combined to a CSA of -172 ppm.

In the relax sample scripts (as well as in the Model-free 
manual),
a
value of -160 ppm is used for CSA.

What is the best value to use and, most importantly, why ?


Also, what about the CSA variability from one vector to another
(JACS,
128 (24), 7855 -7870, 2006) ?

Thanks !


Sébastien

 ________________________________

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

This is the relax-users mailing list
relax-users@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-users



 --

 ______________________________________
 _______________________________________________
 | |
 || Sebastien Morin ||
 ||| Etudiant au doctorat en biochimie |||
 |||| Laboratoire de resonance magnetique nucleaire ||||
||||| Dr Stephane Gagne |||||
 |||| CREFSIP (Universite Laval) ||||
 ||| 1-418-656-2131 poste 4530 |||
 || sebastien.morin.1@xxxxxxxxx ||
 |_______________________________________________|
 ______________________________________


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

This is the relax-users mailing list
relax-users@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-users




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

This is the relax-users mailing list
relax-users@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-users







--
         ______________________________________
     _______________________________________________
    |                                               |
   || 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                          |||
   ||                                               ||
    |_______________________________________________|
         ______________________________________






 --
 4635 Hunt Club Dr Apt 1C
 Ypsilanti, MI - 48197

 Cell: (734) 819-0928
 Work:  (734) 615-7421
 --
 ______________________________________
 _______________________________________________
 | |
 || 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 |||
 || ||
 |_______________________________________________|
 ______________________________________







------------------------
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: prompt/value.py
===================================================================
--- prompt/value.py     (revision 3351)
+++ prompt/value.py     (working copy)
@@ -343,10 +343,10 @@
 
 
         To set the CSA value of all residues in the reduced spectral density 
mapping run '600MHz' to
-        -170 ppm, type:
+        -172 ppm, type:
 
-        relax> value.set('600MHz', -170 * 1e-6, 'csa')
-        relax> value.set('600MHz', value=-170 * 1e-6, param='csa')
+        relax> value.set('600MHz', -172 * 1e-6, 'csa')
+        relax> value.set('600MHz', value=-172 * 1e-6, param='csa')
 
 
         To set the NH bond length of all residues in the model-free run 'm5' 
to 1.02 Angstroms,
Index: test_suite/jw_mapping.py
===================================================================
--- test_suite/jw_mapping.py    (revision 3351)
+++ test_suite/jw_mapping.py    (working copy)
@@ -67,8 +67,8 @@
     def calc_integrity(self):
         
         # Correct jw values:
-        j0 = [4.0958793960056238e-09, 3.7976266046729745e-09]
-        jwx = [1.85720953886864e-10, 1.6450121628270092e-10]
+        j0 = [4.0703318681008998e-09, 3.7739393907014834e-09]
+        jwx = [1.8456254300773903e-10, 1.6347516082378241e-10]
         jwh = [1.5598167512718012e-12, 2.9480536599037041e-12]
 
         # Loop over residues.
@@ -127,7 +127,7 @@
 
         # Set r and csa.
         self.relax.interpreter._Value.set(self.run, 1.02 * 1e-10, 
'bond_length')
-        self.relax.interpreter._Value.set(self.run, -170 * 1e-6, 'csa')
+        self.relax.interpreter._Value.set(self.run, -172 * 1e-6, 'csa')
 
         # Select the frequency.
         self.relax.interpreter._Jw_mapping.set_frq(self.run, frq=600.0 * 1e6)
@@ -147,7 +147,7 @@
 
         # Try to set the values.
         bond_length = 1.02 * 1e-10
-        csa = -170 * 1e-6
+        csa = -172 * 1e-6
         self.relax.interpreter._Value.set(self.run, bond_length, 
'bond_length')
         self.relax.interpreter._Value.set(self.run, csa, 'csa')
 
Index: test_suite/model_free.py
===================================================================
--- test_suite/model_free.py    (revision 3351)
+++ test_suite/model_free.py    (working copy)
@@ -251,7 +251,7 @@
 
         # Setup other values.
         self.relax.interpreter._Diffusion_tensor.init(self.run, 1e-8, 
fixed=1)
-        self.relax.interpreter._Value.set(self.run, [-170 * 1e-6, 1.02 * 
1e-10], ['csa', 'bond_length'])
+        self.relax.interpreter._Value.set(self.run, [-172 * 1e-6, 1.02 * 
1e-10], ['csa', 'bond_length'])
 
         # Select the model.
         self.relax.interpreter._Model_free.select_model(self.run, model='m4')
@@ -293,7 +293,7 @@
 
         # Setup other values.
         self.relax.interpreter._Diffusion_tensor.init(self.run, (1.601 * 
1e7, 1.34, 72.4, 90-77.9), param_types=4)
-        self.relax.interpreter._Value.set(self.run, [-170 * 1e-6, 1.02 * 
1e-10], ['csa', 'bond_length'])
+        self.relax.interpreter._Value.set(self.run, [-172 * 1e-6, 1.02 * 
1e-10], ['csa', 'bond_length'])
         self.relax.interpreter._Value.set(self.run, [0.8, 50 * 1e-12, 0.0], 
['S2', 'te', 'Rex'])
 
         # Select the model.
@@ -332,7 +332,7 @@
         self.relax.interpreter._Relax_data.read(self.run, 'NOE', '500', 
500.0 * 1e6, 'noe.500.out', dir=path)
 
         # Setup other values.
-        self.relax.interpreter._Value.set(self.run, [-170 * 1e-6, 1.02 * 
1e-10], ['csa', 'bond_length'])
+        self.relax.interpreter._Value.set(self.run, [-172 * 1e-6, 1.02 * 
1e-10], ['csa', 'bond_length'])
 
         # Select the model.
         self.relax.interpreter._Model_free.select_model(self.run, 
model='tm2')
@@ -1214,10 +1214,10 @@
         self.relax.interpreter._Sequence.read(self.run, file='noe.500.out', 
dir=path)
 
         # Set the CSA value.
-        self.relax.interpreter._Value.set(self.run, -170 * 1e-6, 'csa')
+        self.relax.interpreter._Value.set(self.run, -172 * 1e-6, 'csa')
 
         # Test the value.
-        if self.relax.data.res[self.run][1].csa != -170*1e-6:
+        if self.relax.data.res[self.run][1].csa != -172*1e-6:
             print "The CSA value has not been set correctly."
             return
 
@@ -1240,10 +1240,10 @@
         self.relax.interpreter._Sequence.read(self.run, file='noe.500.out', 
dir=path)
 
         # Set the CSA value and bond length simultaneously.
-        self.relax.interpreter._Value.set(self.run, [-170 * 1e-6, 1.02 * 
1e-10], ['csa', 'bond_length'])
+        self.relax.interpreter._Value.set(self.run, [-172 * 1e-6, 1.02 * 
1e-10], ['csa', 'bond_length'])
 
         # Test the CSA value.
-        if self.relax.data.res[self.run][1].csa != -170*1e-6:
+        if self.relax.data.res[self.run][1].csa != -172*1e-6:
             print "The CSA value has not been set correctly."
             return
 
Index: specific_fns/jw_mapping.py
===================================================================
--- specific_fns/jw_mapping.py  (revision 3351)
+++ specific_fns/jw_mapping.py  (working copy)
@@ -209,7 +209,7 @@
         |                                       |              |             
                 |
         | Bond length                           | 'r'          | 1.02 * 
1e-10                 |
         |                                       |              |             
                 |
-        | CSA                                   | 'csa'        | -170 * 1e-6 
                 |
+        | CSA                                   | 'csa'        | -172 * 1e-6 
                 |
         
|_______________________________________|______________|______________________________|
 
         """
@@ -220,7 +220,7 @@
 
         # CSA.
         if param == 'CSA':
-            return -170 * 1e-6
+            return -172 * 1e-6
 
 
     def num_instances(self, run=None):
Index: specific_fns/model_free.py
===================================================================
--- specific_fns/model_free.py  (revision 3351)
+++ specific_fns/model_free.py  (working copy)
@@ -925,7 +925,7 @@
         |                                       |                    |       
                 |
         | Bond length                           | 'r'                | 1.02 
* 1e-10           |
         |                                       |                    |       
                 |
-        | CSA                                   | 'csa'              | -170 
* 1e-6            |
+        | CSA                                   | 'csa'              | -172 
* 1e-6            |
         
|_______________________________________|____________________|________________________|
 
         """
@@ -960,7 +960,7 @@
 
         # CSA.
         elif param == 'CSA':
-            return -170 * 1e-6
+            return -172 * 1e-6
 
 
     def delete(self, run):
Index: prompt/value.py
===================================================================
--- prompt/value.py     (revision 3351)
+++ prompt/value.py     (working copy)
@@ -345,10 +345,10 @@
 
 
         To set the CSA value of all residues in the reduced spectral density 
mapping run '600MHz' to
-        -170 ppm, type:
+        -172 ppm, type:
 
-        relax> value.set('600MHz', -170 * 1e-6, 'csa')
-        relax> value.set('600MHz', value=-170 * 1e-6, param='csa')
+        relax> value.set('600MHz', -172 * 1e-6, 'csa')
+        relax> value.set('600MHz', value=-172 * 1e-6, param='csa')
 
 
         To set the NH bond length of all residues in the model-free run 'm5' 
to 1.02 Angstroms,
Index: test_suite/system_tests/jw_mapping.py
===================================================================
--- test_suite/system_tests/jw_mapping.py       (revision 3351)
+++ test_suite/system_tests/jw_mapping.py       (working copy)
@@ -25,8 +25,8 @@
 
 # relax module imports.
 from data import Data as relax_data_store
+from physical_constants import N15_CSA, NH_BOND_LENGTH
 
-
 # The relax data storage object.
 
 
@@ -76,8 +76,8 @@
     def calc_integrity(self):
 
         # Correct jw values:
-        j0 = [4.0958793960056238e-09, 3.7976266046729745e-09]
-        jwx = [1.85720953886864e-10, 1.6450121628270092e-10]
+        j0 = [4.0703318681008998e-09, 3.7739393907014834e-09]
+        jwx = [1.8456254300773903e-10, 1.6347516082378241e-10]
         jwh = [1.5598167512718012e-12, 2.9480536599037041e-12]
 
         # Loop over residues.
@@ -135,8 +135,8 @@
         self.relax.interpreter._Nuclei.nuclei('N')
 
         # Set r and csa.
-        self.relax.interpreter._Value.set(self.run, 1.02 * 1e-10, 
'bond_length')
-        self.relax.interpreter._Value.set(self.run, -170 * 1e-6, 'csa')
+        self.relax.interpreter._Value.set(self.run, NH_BOND_LENGTH, 
'bond_length')
+        self.relax.interpreter._Value.set(self.run, N15_CSA, 'csa')
 
         # Select the frequency.
         self.relax.interpreter._Jw_mapping.set_frq(self.run, frq=600.0 * 1e6)
@@ -155,8 +155,8 @@
         self.relax.interpreter._Sequence.read(self.run, file='test_seq', 
dir=sys.path[-1] + '/test_suite/system_tests/data')
 
         # Try to set the values.
-        bond_length = 1.02 * 1e-10
-        csa = -170 * 1e-6
+        bond_length = NH_BOND_LENGTH
+        csa = N15_CSA
         self.relax.interpreter._Value.set(self.run, bond_length, 
'bond_length')
         self.relax.interpreter._Value.set(self.run, csa, 'csa')
 
Index: test_suite/system_tests/model_free.py
===================================================================
--- test_suite/system_tests/model_free.py       (revision 3351)
+++ test_suite/system_tests/model_free.py       (working copy)
@@ -26,6 +26,7 @@
 
 # relax module imports.
 from data import Data as relax_data_store
+from physical_constants import N15_CSA, NH_BOND_LENGTH
 
 
 # The relax data storage object.
@@ -260,7 +261,7 @@
 
         # Setup other values.
         self.relax.interpreter._Diffusion_tensor.init(self.run, 1e-8, 
fixed=1)
-        self.relax.interpreter._Value.set(self.run, [-170 * 1e-6, 1.02 * 
1e-10], ['csa', 'bond_length'])
+        self.relax.interpreter._Value.set(self.run, [N15_CSA, 
NH_BOND_LENGTH], ['csa', 'bond_length'])
 
         # Select the model.
         self.relax.interpreter._Model_free.select_model(self.run, model='m4')
@@ -303,7 +304,7 @@
 
         # Setup other values.
         self.relax.interpreter._Diffusion_tensor.init(self.run, (1.601 * 
1e7, 1.34, 72.4, 90-77.9), param_types=4)
-        self.relax.interpreter._Value.set(self.run, [-170 * 1e-6, 1.02 * 
1e-10], ['csa', 'bond_length'])
+        self.relax.interpreter._Value.set(self.run, [N15_CSA, 
NH_BOND_LENGTH], ['csa', 'bond_length'])
         self.relax.interpreter._Value.set(self.run, [0.8, 50 * 1e-12, 0.0], 
['S2', 'te', 'Rex'])
 
         # Select the model.
@@ -342,7 +343,7 @@
         self.relax.interpreter._Relax_data.read(self.run, 'NOE', '500', 
500.0 * 1e6, 'noe.500.out', dir=path)
 
         # Setup other values.
-        self.relax.interpreter._Value.set(self.run, [-170 * 1e-6, 1.02 * 
1e-10], ['csa', 'bond_length'])
+        self.relax.interpreter._Value.set(self.run, [N15_CSA, 
NH_BOND_LENGTH], ['csa', 'bond_length'])
 
         # Select the model.
         self.relax.interpreter._Model_free.select_model(self.run, 
model='tm2')
@@ -930,7 +931,7 @@
 
         # Setup other values.
         self.relax.interpreter._Diffusion_tensor.init(self.run, 10e-9, 
fixed=1)
-        self.relax.interpreter._Value.set(self.run, 1.02 * 1e-10, 
'bond_length')
+        self.relax.interpreter._Value.set(self.run, NH_BOND_LENGTH, 
'bond_length')
         self.relax.interpreter._Value.set(self.run, -160 * 1e-6, 'csa')
 
         # Select the model-free model.
@@ -1198,10 +1199,10 @@
         self.relax.interpreter._Sequence.read(self.run, file='noe.500.out', 
dir=path)
 
         # Set the CSA value.
-        self.relax.interpreter._Value.set(self.run, 1.02 * 1e-10, 
'bond_length')
+        self.relax.interpreter._Value.set(self.run, NH_BOND_LENGTH, 
'bond_length')
 
         # Test the value.
-        if relax_data_store.res[self.run][1].r != 1.02 * 1e-10:
+        if relax_data_store.res[self.run][1].r != NH_BOND_LENGTH:
             print "The bond length has not been set correctly."
             return
 
@@ -1224,10 +1225,10 @@
         self.relax.interpreter._Sequence.read(self.run, file='noe.500.out', 
dir=path)
 
         # Set the CSA value.
-        self.relax.interpreter._Value.set(self.run, -170 * 1e-6, 'csa')
+        self.relax.interpreter._Value.set(self.run, N15_CSA, 'csa')
 
         # Test the value.
-        if relax_data_store.res[self.run][1].csa != -170*1e-6:
+        if relax_data_store.res[self.run][1].csa != N15_CSA:
             print "The CSA value has not been set correctly."
             return
 
@@ -1250,15 +1251,15 @@
         self.relax.interpreter._Sequence.read(self.run, file='noe.500.out', 
dir=path)
 
         # Set the CSA value and bond length simultaneously.
-        self.relax.interpreter._Value.set(self.run, [-170 * 1e-6, 1.02 * 
1e-10], ['csa', 'bond_length'])
+        self.relax.interpreter._Value.set(self.run, [N15_CSA, 
NH_BOND_LENGTH], ['csa', 'bond_length'])
 
         # Test the CSA value.
-        if relax_data_store.res[self.run][1].csa != -170*1e-6:
+        if relax_data_store.res[self.run][1].csa != N15_CSA:
             print "The CSA value has not been set correctly."
             return
 
         # Test the bond length.
-        if relax_data_store.res[self.run][1].r != 1.02 * 1e-10:
+        if relax_data_store.res[self.run][1].r != NH_BOND_LENGTH:
             print "The bond length has not been set correctly."
             return
 
Index: specific_fns/jw_mapping.py
===================================================================
--- specific_fns/jw_mapping.py  (revision 3351)
+++ specific_fns/jw_mapping.py  (working copy)
@@ -29,6 +29,7 @@
 from base_class import Common_functions
 from maths_fns.jw_mapping import Mapping
 from relax_errors import RelaxError, RelaxFuncSetupError, RelaxNoRunError, 
RelaxNoSequenceError, RelaxNoValueError, RelaxNucleusError
+from physical_constants import N15_CSA, NH_BOND_LENGTH
 
 
 # The relax data storage object.
@@ -208,6 +209,7 @@
         """
         Reduced spectral density mapping default values
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+        These default values are found in the file 'physical_constants.py'.
 
         
_______________________________________________________________________________________
         |                                       |              |             
                 |
@@ -216,18 +218,18 @@
         |                                       |              |             
                 |
         | Bond length                           | 'r'          | 1.02 * 
1e-10                 |
         |                                       |              |             
                 |
-        | CSA                                   | 'csa'        | -170 * 1e-6 
                 |
+        | CSA                                   | 'csa'        | -172 * 1e-6 
                 |
         
|_______________________________________|______________|______________________________|
 
         """
 
         # Bond length.
         if param == 'r':
-            return 1.02 * 1e-10
+            return NH_BOND_LENGTH
 
         # CSA.
         if param == 'CSA':
-            return -170 * 1e-6
+            return N15_CSA
 
 
     def num_instances(self, run=None):
Index: physical_constants.py
===================================================================
--- physical_constants.py       (revision 3351)
+++ physical_constants.py       (working copy)
@@ -32,3 +32,10 @@
 
 # The magnetic constant or the permeability of vacuum.
 mu0 = 4.0 * pi * 1e-7
+
+# The 15N CSA in the NH bond (default value).
+N15_CSA = -172 * 1e-6
+
+# The length of the NH bond (default value).
+NH_BOND_LENGTH = 1.02 * 1e-10
+

Related Messages


Powered by MHonArc, Updated Mon Jul 23 14:40:29 2007