mailr4185 - in /branches/N_state_model: generic_fns/nuclei.py physical_constants.py


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

Header


Content

Posted by edward on December 11, 2007 - 17:20:
Author: bugman
Date: Tue Dec 11 17:20:49 2007
New Revision: 4185

URL: http://svn.gna.org/viewcvs/relax?rev=4185&view=rev
Log:
Shifted the gyromagnetic ratio values into the physical_constants.py file.


Modified:
    branches/N_state_model/generic_fns/nuclei.py
    branches/N_state_model/physical_constants.py

Modified: branches/N_state_model/generic_fns/nuclei.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/generic_fns/nuclei.py?rev=4185&r1=4184&r2=4185&view=diff
==============================================================================
--- branches/N_state_model/generic_fns/nuclei.py (original)
+++ branches/N_state_model/generic_fns/nuclei.py Tue Dec 11 17:20:49 2007
@@ -26,10 +26,7 @@
 # relax module imports.
 from data import Data as relax_data_store
 from relax_errors import RelaxInvalidError
-
-
-# The relax data storage object.
-
+from physical_constants import gC, gH, gN, gO, gP
 
 
 class Nuclei:
@@ -50,6 +47,7 @@
         if relax_data_store.gx == self.gn():
             return 'N'
 
+
         # Carbon
         if relax_data_store.gx == self.gc():
             return 'C'
@@ -66,34 +64,31 @@
     def gc(self):
         """The 13C gyromagnetic ratio."""
 
-        return 6.728e7
+        return gC
 
 
     def gh(self):
         """The 1H gyromagnetic ratio."""
 
-        # Old, low precision gyromagnetic ratio.
-        #return 26.7522e7
-
-        return 26.7522212e7
+        return gH
 
 
     def gn(self):
         """The 15N gyromagnetic ratio."""
 
-        return -2.7126e7
+        return gN
 
 
     def go(self):
         """The 17O gyromagnetic ratio."""
 
-        return -3.628e7
+        return gO
 
 
     def gp(self):
         """The 31P gyromagnetic ratio."""
 
-        return 1.0841e8
+        return gP
 
 
     def set_values(self, heteronuc):

Modified: branches/N_state_model/physical_constants.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/physical_constants.py?rev=4185&r1=4184&r2=4185&view=diff
==============================================================================
--- branches/N_state_model/physical_constants.py (original)
+++ branches/N_state_model/physical_constants.py Tue Dec 11 17:20:49 2007
@@ -39,3 +39,22 @@
 # The length of the NH bond (default value).
 NH_BOND_LENGTH = 1.02 * 1e-10
 
+
+# Gyromagentic ratios.
+######################
+
+# 13C.
+gC = 6.728e7
+
+# 1H.
+#gH = 26.7522e7    # Old, low precision gyromagnetic ratio.
+gH = 26.7522212e7
+
+# 15N.
+gN = -2.7126e7
+
+# 17O.
+gO = -3.628e7
+
+# 31P.
+gP = 1.0841e8




Related Messages


Powered by MHonArc, Updated Tue Dec 11 18:00:17 2007