mailr25402 - /branches/frame_order_cleanup/test_suite/shared_data/frame_order/cam/generate_base.py


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

Header


Content

Posted by edward on August 28, 2014 - 18:45:
Author: bugman
Date: Thu Aug 28 18:45:24 2014
New Revision: 25402

URL: http://svn.gna.org/viewcvs/relax?rev=25402&view=rev
Log:
Fix for the recent lib.period_table and lib.physical_constant module changes.


Modified:
    
branches/frame_order_cleanup/test_suite/shared_data/frame_order/cam/generate_base.py

Modified: 
branches/frame_order_cleanup/test_suite/shared_data/frame_order/cam/generate_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/test_suite/shared_data/frame_order/cam/generate_base.py?rev=25402&r1=25401&r2=25402&view=diff
==============================================================================
--- 
branches/frame_order_cleanup/test_suite/shared_data/frame_order/cam/generate_base.py
        (original)
+++ 
branches/frame_order_cleanup/test_suite/shared_data/frame_order/cam/generate_base.py
        Thu Aug 28 18:45:24 2014
@@ -38,7 +38,8 @@
 from lib.geometry.rotations import axis_angle_to_R, R_to_euler_zyz
 from lib.io import open_write_file
 from lib.linear_algebra.kronecker_product import kron_prod
-from lib.physical_constants import dipolar_constant, g1H, pcs_constant, 
return_gyromagnetic_ratio
+from lib.periodic_table import periodic_table
+from lib.physical_constants import dipolar_constant, pcs_constant
 from pipe_control.interatomic import interatomic_loop
 from pipe_control.mol_res_spin import return_spin, spin_loop
 from prompt.interpreter import Interpreter
@@ -147,7 +148,7 @@
 
             # Calculate the partial PCS constant (with no vector length).
             for tag in self._tensors:
-                d[tag].append(pcs_constant(cdp.temperature[tag], 
cdp.spectrometer_frq[tag] * 2.0 * pi / g1H, 1.0))
+                d[tag].append(pcs_constant(cdp.temperature[tag], 
cdp.spectrometer_frq[tag] * 2.0 * pi / 
periodic_table.gyromagnetic_ratio('1H'), 1.0))
 
         # Repackage the data for speed.
         spin_pos = array(spin_pos, float64)
@@ -249,8 +250,8 @@
             spin2 = return_spin(interatom.spin_id2)
 
             # Gyromagnetic ratios.
-            g1 = return_gyromagnetic_ratio(spin1.isotope)
-            g2 = return_gyromagnetic_ratio(spin2.isotope)
+            g1 = periodic_table.gyromagnetic_ratio(spin1.isotope)
+            g2 = periodic_table.gyromagnetic_ratio(spin2.isotope)
 
             # Calculate the RDC dipolar constant (in Hertz, and the 3 comes 
from the alignment tensor), and append it to the list.
             d.append(3.0/(2.0*pi) * dipolar_constant(g1, g2, interatom.r))




Related Messages


Powered by MHonArc, Updated Thu Aug 28 20:00:03 2014