mailr12202 - in /1.3: data/ maths_fns/ sample_scripts/ specific_fns/ test_suite/ test_suite/system_tests/ test_suite/system_test...


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

Header


Content

Posted by edward on January 11, 2011 - 12:58:
Author: bugman
Date: Tue Jan 11 12:58:33 2011
New Revision: 12202

URL: http://svn.gna.org/viewcvs/relax?rev=12202&view=rev
Log:
Updates for Python 3.0.

The command used from docs/2to3_checklist was:

2to3 -w \
-f buffer \
-f idioms \
-f set_literal \
-f ws_comma \
-x except \
-x import \
-x imports \
-x long \
-x numliterals \
-x xrange \
relax .


Modified:
    1.3/data/align_tensor.py
    1.3/maths_fns/frame_order.py
    1.3/sample_scripts/dauvergne_protocol.py
    1.3/specific_fns/frame_order.py
    1.3/specific_fns/n_state_model.py
    1.3/test_suite/system_tests/diffusion_tensor.py
    1.3/test_suite/system_tests/model_free.py
    1.3/test_suite/system_tests/relax_fit.py
    
1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/iso_cone_to_iso_cone_free_rotor.py
    
1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/pseudo_ellipse_free_rotor_to_iso_cone_free_rotor.py
    
1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/pseudo_ellipse_to_iso_cone_free_rotor.py
    1.3/test_suite/test_suite_runner.py

Modified: 1.3/data/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/align_tensor.py?rev=12202&r1=12201&r2=12202&view=diff
==============================================================================
--- 1.3/data/align_tensor.py (original)
+++ 1.3/data/align_tensor.py Tue Jan 11 12:58:33 2011
@@ -802,7 +802,7 @@
 
     # Switch from the left handed to right handed universe if required.
     if abs(det(rot_perm) - 1.0) > 1e-7:
-        rot_perm[:,0] = -rot_perm[:,0]
+        rot_perm[:, 0] = -rot_perm[:, 0]
 
     # Return the permuted rotation matrix.
     return rot_perm

Modified: 1.3/maths_fns/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/maths_fns/frame_order.py?rev=12202&r1=12201&r2=12202&view=diff
==============================================================================
--- 1.3/maths_fns/frame_order.py (original)
+++ 1.3/maths_fns/frame_order.py Tue Jan 11 12:58:33 2011
@@ -31,7 +31,7 @@
 from generic_fns.frame_order import print_frame_order_2nd_degree
 from maths_fns.alignment_tensor import to_5D, to_tensor
 from maths_fns.chi2 import chi2
-from maths_fns.frame_order_matrix_ops import compile_2nd_matrix_free_rotor, 
compile_2nd_matrix_iso_cone, 
compile_2nd_matrix_iso_cone_free_rotor,compile_2nd_matrix_iso_cone_torsionless,
 compile_2nd_matrix_pseudo_ellipse, 
compile_2nd_matrix_pseudo_ellipse_free_rotor, 
compile_2nd_matrix_pseudo_ellipse_torsionless, compile_2nd_matrix_rotor, 
reduce_alignment_tensor
+from maths_fns.frame_order_matrix_ops import compile_2nd_matrix_free_rotor, 
compile_2nd_matrix_iso_cone, compile_2nd_matrix_iso_cone_free_rotor, 
compile_2nd_matrix_iso_cone_torsionless, compile_2nd_matrix_pseudo_ellipse, 
compile_2nd_matrix_pseudo_ellipse_free_rotor, 
compile_2nd_matrix_pseudo_ellipse_torsionless, compile_2nd_matrix_rotor, 
reduce_alignment_tensor
 from maths_fns.rotation_matrix import euler_to_R_zyz as euler_to_R
 from relax_errors import RelaxError
 

Modified: 1.3/sample_scripts/dauvergne_protocol.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/sample_scripts/dauvergne_protocol.py?rev=12202&r1=12201&r2=12202&view=diff
==============================================================================
--- 1.3/sample_scripts/dauvergne_protocol.py (original)
+++ 1.3/sample_scripts/dauvergne_protocol.py Tue Jan 11 12:58:33 2011
@@ -195,4 +195,4 @@
 
 
 # Execution (do not change!).
-dAuvergne_protocol(diff_model=DIFF_MODEL, mf_models=MF_MODELS, 
local_tm_models=LOCAL_TM_MODELS, pdb_file=PDB_FILE, seq_args=SEQ_ARGS, 
het_name=HET_NAME,attached_name=ATTACHED_NAME, relax_data=RELAX_DATA, 
unres=UNRES, exclude=EXCLUDE, bond_length=BOND_LENGTH, csa=CSA, 
hetnuc=HETNUC, proton=PROTON, grid_inc=GRID_INC, min_algor=MIN_ALGOR, 
mc_num=MC_NUM, conv_loop=CONV_LOOP)
+dAuvergne_protocol(diff_model=DIFF_MODEL, mf_models=MF_MODELS, 
local_tm_models=LOCAL_TM_MODELS, pdb_file=PDB_FILE, seq_args=SEQ_ARGS, 
het_name=HET_NAME, attached_name=ATTACHED_NAME, relax_data=RELAX_DATA, 
unres=UNRES, exclude=EXCLUDE, bond_length=BOND_LENGTH, csa=CSA, 
hetnuc=HETNUC, proton=PROTON, grid_inc=GRID_INC, min_algor=MIN_ALGOR, 
mc_num=MC_NUM, conv_loop=CONV_LOOP)

Modified: 1.3/specific_fns/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/frame_order.py?rev=12202&r1=12201&r2=12202&view=diff
==============================================================================
--- 1.3/specific_fns/frame_order.py (original)
+++ 1.3/specific_fns/frame_order.py Tue Jan 11 12:58:33 2011
@@ -272,7 +272,7 @@
 
                 # Fill the structure.
                 for i in range(cdp.sim_number):
-                    euler_to_R_zyz(cdp.eigen_alpha_sim[i], 
cdp.eigen_beta_sim[i], cdp.eigen_gamma_sim[i], axes_sim[:,i])
+                    euler_to_R_zyz(cdp.eigen_alpha_sim[i], 
cdp.eigen_beta_sim[i], cdp.eigen_gamma_sim[i], axes_sim[:, i])
 
                 # Rotation and inversion.
                 axes_sim_pos = axes_sim
@@ -284,12 +284,12 @@
             for i in range(2):
                 # Simulation structures.
                 if sim:
-                    axis_sim_pos = axes_sim_pos[:,i]
-                    axis_sim_neg = axes_sim_neg[:,i]
+                    axis_sim_pos = axes_sim_pos[:, i]
+                    axis_sim_neg = axes_sim_neg[:, i]
 
                 # The vectors.
-                res_num = generate_vector_residues(mol=mol, 
vector=axes_pos[:,i], atom_name='%s-ax'%label[i], 
res_name_vect='%sAX'%upper(label[i]), sim_vectors=axis_sim_pos, 
res_num=res_num+1, origin=cdp.pivot, scale=size)
-                res_num = generate_vector_residues(mol=mol, 
vector=axes_neg[:,i], atom_name='%s-ax'%label[i], 
res_name_vect='%sAX'%upper(label[i]), sim_vectors=axis_sim_neg, 
res_num=res_num+1, origin=cdp.pivot, scale=size)
+                res_num = generate_vector_residues(mol=mol, 
vector=axes_pos[:, i], atom_name='%s-ax'%label[i], 
res_name_vect='%sAX'%upper(label[i]), sim_vectors=axis_sim_pos, 
res_num=res_num+1, origin=cdp.pivot, scale=size)
+                res_num = generate_vector_residues(mol=mol, 
vector=axes_neg[:, i], atom_name='%s-ax'%label[i], 
res_name_vect='%sAX'%upper(label[i]), sim_vectors=axis_sim_neg, 
res_num=res_num+1, origin=cdp.pivot, scale=size)
 
 
         # The cone object.

Modified: 1.3/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/n_state_model.py?rev=12202&r1=12201&r2=12202&view=diff
==============================================================================
--- 1.3/specific_fns/n_state_model.py (original)
+++ 1.3/specific_fns/n_state_model.py Tue Jan 11 12:58:33 2011
@@ -569,7 +569,7 @@
 
         # Loop over the structures.
         i = 0
-        while 1:
+        while True:
             # End condition.
             if i == cdp.N - 1:
                 break

Modified: 1.3/test_suite/system_tests/diffusion_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/diffusion_tensor.py?rev=12202&r1=12201&r2=12202&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/diffusion_tensor.py (original)
+++ 1.3/test_suite/system_tests/diffusion_tensor.py Tue Jan 11 12:58:33 2011
@@ -225,8 +225,8 @@
         vects = array(vects)
         for vect in vects:
             # The projections.
-            proj1 = dot(vect,dot(cdp.diff_tensor.tensor, vect)) 
-            proj2 = dot(vect,dot(D, vect)) 
+            proj1 = dot(vect, dot(cdp.diff_tensor.tensor, vect)) 
+            proj2 = dot(vect, dot(D, vect)) 
 
             # Compare projections.
             self.assertAlmostEqual(proj1, proj2)
@@ -268,8 +268,8 @@
         vects = array(vects)
         for vect in vects:
             # The projections.
-            proj1 = dot(vect,dot(cdp.diff_tensor.tensor, vect)) 
-            proj2 = dot(vect,dot(D, vect)) 
+            proj1 = dot(vect, dot(cdp.diff_tensor.tensor, vect)) 
+            proj2 = dot(vect, dot(D, vect)) 
 
             # Print out.
             print("\nVector: %s" % vect)
@@ -295,8 +295,8 @@
         gamma = 0.5
 
         # The actual tensor in the PDB frame.
-        D = array([[ 22758858.4088357 ,  -7267400.1700938 ,   
6272205.75829415],
-                   [ -7267400.1700938 ,  17923072.3436445 ,   
1284270.53726401],
+        D = array([[ 22758858.4088357,  -7267400.1700938,   
6272205.75829415],
+                   [ -7267400.1700938,  17923072.3436445,   
1284270.53726401],
                    [  6272205.75829415,   1284270.53726401,  
19318069.2475198 ]], float64)
 
         # The tensor in the eigenframe.

Modified: 1.3/test_suite/system_tests/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/model_free.py?rev=12202&r1=12201&r2=12202&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/model_free.py (original)
+++ 1.3/test_suite/system_tests/model_free.py Tue Jan 11 12:58:33 2011
@@ -1573,7 +1573,7 @@
         eqi = [None, 'mf_ext']
         select = [False, True]
         model = [None, 'm5']
-        params = [[], ['S2f','S2','ts']]
+        params = [[], ['S2f', 'S2', 'ts']]
         s2 = [None, 0.86578779694713515]
         s2f = [None, 0.88618694421409949]
         s2s = [None, 0.97698098871784322]
@@ -1635,7 +1635,7 @@
         self.assertEqual(cdp.warning_sim[2], None)
 
         # Global relaxation data tests.
-        self.assertEqual(cdp.ri_labels, 
['R1','NOE','R1','R2','NOE','R1','R2','NOE'])
+        self.assertEqual(cdp.ri_labels, ['R1', 'NOE', 'R1', 'R2', 'NOE', 
'R1', 'R2', 'NOE'])
         self.assertEqual(cdp.remap_table, [0, 0, 1, 1, 1, 2, 2, 2])
         self.assertEqual(cdp.frq_labels, ['800', '600', '500'])
         self.assertEqual(cdp.frq, [799744000.0, 599737000.0, 499719000.0])
@@ -1722,7 +1722,7 @@
         eqi = [None, None, None, 'mf_ext', 'mf_orig', 'mf_orig', None, 
'mf_orig']
         select = [False, False, False, True, True, True, False, True]
         model = [None, None, None, 'm5', 'm2', 'm1', None, 'm1']
-        params = [None, None, None, ['S2f','S2','ts'], ['S2', 'te'], ['S2'], 
None, ['S2']]
+        params = [None, None, None, ['S2f', 'S2', 'ts'], ['S2', 'te'], 
['S2'], None, ['S2']]
         s2 = [None, None, None, 0.85674161305142216, 0.89462664243726608, 
0.90201790111143165, None, 0.92099297347361675]
         s2f = [None, None, None, 0.88220054271390302, None, None, None, None]
         s2s = [None, None, None, 0.97114156200339452, None, None, None, None]
@@ -1732,7 +1732,7 @@
         rex = [None, None, None, None, None, None, None, None]
         r = [None, None, None, 1.0200000000000001e-10, 
1.0200000000000001e-10, 1.0200000000000001e-10, None, 1.0200000000000001e-10]
         csa = [None, None, None, -0.00017199999999999998, 
-0.00017199999999999998, -0.00017199999999999998, None, 
-0.00017199999999999998]
-        ri_labels = [[], [], [], 
['R1','R2','R1','R2','NOE','R1','R2','NOE'], 
['R1','R2','R1','R2','NOE','R1','R2','NOE'], 
['R1','R2','R1','R2','NOE','R1','R2','NOE'], [], 
['R1','R2','R1','R2','NOE','R1','R2','NOE']]
+        ri_labels = [[], [], [], ['R1', 'R2', 'R1', 'R2', 'NOE', 'R1', 'R2', 
'NOE'], ['R1', 'R2', 'R1', 'R2', 'NOE', 'R1', 'R2', 'NOE'], ['R1', 'R2', 
'R1', 'R2', 'NOE', 'R1', 'R2', 'NOE'], [], ['R1', 'R2', 'R1', 'R2', 'NOE', 
'R1', 'R2', 'NOE']]
         remap_table = [[], [], [], [0, 0, 1, 1, 1, 2, 2, 2], [0, 0, 1, 1, 1, 
2, 2, 2], [0, 0, 1, 1, 1, 2, 2, 2], [], [0, 0, 1, 1, 1, 2, 2, 2]]
         frq_labels = [[], [], [], ['800', '600', '500'], ['800', '600', 
'500'], ['800', '600', '500'], [], ['800', '600', '500']]
         frq = [[], [], [], [799812000.0, 599739000.0, 499827000.0], 
[799812000.0, 599739000.0, 499827000.0], [799812000.0, 599739000.0, 
499827000.0], [], [799812000.0, 599739000.0, 499827000.0]]
@@ -1776,7 +1776,7 @@
         self.assertEqual(cdp.diff_tensor.gamma, 42.15815798778408 / 360.0 * 
2.0 * pi)
 
         # Global relaxation data tests.
-        self.assertEqual(cdp.ri_labels, 
['R1','R2','R1','R2','NOE','R1','R2','NOE'])
+        self.assertEqual(cdp.ri_labels, ['R1', 'R2', 'R1', 'R2', 'NOE', 
'R1', 'R2', 'NOE'])
         self.assertEqual(cdp.remap_table, [0, 0, 1, 1, 1, 2, 2, 2])
         self.assertEqual(cdp.frq_labels, ['800', '600', '500'])
         self.assertEqual(cdp.frq, [799812000.0, 599739000.0, 499827000.0])

Modified: 1.3/test_suite/system_tests/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/relax_fit.py?rev=12202&r1=12201&r2=12202&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/relax_fit.py (original)
+++ 1.3/test_suite/system_tests/relax_fit.py Tue Jan 11 12:58:33 2011
@@ -72,8 +72,7 @@
         self.assertEqual(cdp.curve_type, 'exp')
         self.assertEqual(cdp.int_method, ds.int_type)
         self.assertEqual(len(cdp.relax_times), 10)
-        cdp_relax_times = cdp.relax_times.values()
-        cdp_relax_times.sort()
+        cdp_relax_times = sorted(cdp.relax_times.values())
         for i in range(10):
             self.assertEqual(cdp_relax_times[i], relax_times[i])
 

Modified: 
1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/iso_cone_to_iso_cone_free_rotor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/iso_cone_to_iso_cone_free_rotor.py?rev=12202&r1=12201&r2=12202&view=diff
==============================================================================
--- 
1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/iso_cone_to_iso_cone_free_rotor.py
 (original)
+++ 
1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/iso_cone_to_iso_cone_free_rotor.py
 Tue Jan 11 12:58:33 2011
@@ -42,9 +42,9 @@
 
 # Build the frame.
 EIG_FRAME = zeros((3, 3), float64)
-EIG_FRAME[:,0] = vect_x
-EIG_FRAME[:,1] = vect_y
-EIG_FRAME[:,2] = vect_z
+EIG_FRAME[:, 0] = vect_x
+EIG_FRAME[:, 1] = vect_y
+EIG_FRAME[:, 2] = vect_z
 a, b, g = R_to_euler_zyz(EIG_FRAME)
 
 # Load the tensors.

Modified: 
1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/pseudo_ellipse_free_rotor_to_iso_cone_free_rotor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/pseudo_ellipse_free_rotor_to_iso_cone_free_rotor.py?rev=12202&r1=12201&r2=12202&view=diff
==============================================================================
--- 
1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/pseudo_ellipse_free_rotor_to_iso_cone_free_rotor.py
 (original)
+++ 
1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/pseudo_ellipse_free_rotor_to_iso_cone_free_rotor.py
 Tue Jan 11 12:58:33 2011
@@ -42,9 +42,9 @@
 
 # Build the frame.
 EIG_FRAME = zeros((3, 3), float64)
-EIG_FRAME[:,0] = vect_x
-EIG_FRAME[:,1] = vect_y
-EIG_FRAME[:,2] = vect_z
+EIG_FRAME[:, 0] = vect_x
+EIG_FRAME[:, 1] = vect_y
+EIG_FRAME[:, 2] = vect_z
 a, b, g = R_to_euler_zyz(EIG_FRAME)
 
 # Load the tensors.

Modified: 
1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/pseudo_ellipse_to_iso_cone_free_rotor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/pseudo_ellipse_to_iso_cone_free_rotor.py?rev=12202&r1=12201&r2=12202&view=diff
==============================================================================
--- 
1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/pseudo_ellipse_to_iso_cone_free_rotor.py
 (original)
+++ 
1.3/test_suite/system_tests/scripts/frame_order/parametric_restriction/pseudo_ellipse_to_iso_cone_free_rotor.py
 Tue Jan 11 12:58:33 2011
@@ -42,9 +42,9 @@
 
 # Build the frame.
 EIG_FRAME = zeros((3, 3), float64)
-EIG_FRAME[:,0] = vect_x
-EIG_FRAME[:,1] = vect_y
-EIG_FRAME[:,2] = vect_z
+EIG_FRAME[:, 0] = vect_x
+EIG_FRAME[:, 1] = vect_y
+EIG_FRAME[:, 2] = vect_z
 a, b, g = R_to_euler_zyz(EIG_FRAME)
 
 # Load the tensors.

Modified: 1.3/test_suite/test_suite_runner.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/test_suite_runner.py?rev=12202&r1=12201&r2=12202&view=diff
==============================================================================
--- 1.3/test_suite/test_suite_runner.py (original)
+++ 1.3/test_suite/test_suite_runner.py Tue Jan 11 12:58:33 2011
@@ -165,10 +165,7 @@
                 unit_count[test[1]] += 1
 
         # The missing modules.
-        missing_modules = system_count.keys()
-        missing_modules.sort()
-
-        # Sub-title.
+        missing_modules = sorted(system_count.keys())
         subtitle("Optional packages/modules")
 
         # Nothing missing.




Related Messages


Powered by MHonArc, Updated Tue Jan 11 13:40:02 2011