mailr23162 - in /trunk: auto_analyses/ pipe_control/ specific_analyses/n_state_model/ test_suite/shared_data/frame_order/cam/rot...


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

Header


Content

Posted by edward on May 13, 2014 - 23:41:
Author: bugman
Date: Tue May 13 23:41:56 2014
New Revision: 23162

URL: http://svn.gna.org/viewcvs/relax?rev=23162&view=rev
Log:
Replaced 'Q-factor' with 'Q factor' throughout the relax codebase.

This change to the correct notation covers code, comments, and docstrings.


Modified:
    trunk/auto_analyses/stereochem_analysis.py
    trunk/pipe_control/pcs.py
    trunk/pipe_control/rdc.py
    trunk/specific_analyses/n_state_model/api.py
    
trunk/test_suite/shared_data/frame_order/cam/rotor2/pcs_only/ave_pos_back_calc.py
    trunk/test_suite/system_tests/scripts/n_state_model/rdc_tensor.py
    trunk/test_suite/system_tests/scripts/n_state_model/stereochem_analysis.py

Modified: trunk/auto_analyses/stereochem_analysis.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/stereochem_analysis.py?rev=23162&r1=23161&r2=23162&view=diff
==============================================================================
--- trunk/auto_analyses/stereochem_analysis.py  (original)
+++ trunk/auto_analyses/stereochem_analysis.py  Tue May 13 23:41:56 2014
@@ -24,7 +24,7 @@
 
 The analysis is preformed by using multiple ensembles of structures, 
randomly sampled from a given
 set of structures.  The discrimination is performed by comparing the sets of 
ensembles using NOE
-violations and RDC Q-factors.
+violations and RDC Q factors.
 
 This script is split into multiple stages:
 
@@ -39,12 +39,12 @@
     using the fit to first algorithm.  The superimposed ensembles will be 
placed into the
     "ensembles_superimposed" directory.  This stage is not necessary for the 
NOE analysis.
 
-    4.  The RDC Q-factor analysis.
+    4.  The RDC Q factor analysis.
 
     5.  Generation of Grace graphs.
 
-    6.  Final ordering of ensembles using the combined RDC and NOE 
Q-factors, whereby the NOE
-    Q-factor is defined as::
+    6.  Final ordering of ensembles using the combined RDC and NOE Q 
factors, whereby the NOE
+    Q factor is defined as::
 
         Q^2 = U / sum(NOE_i^2),
 
@@ -210,7 +210,7 @@
         elif self.stage == 3:
             self.superimpose()
 
-        # RDC Q-factor analysis.
+        # RDC Q factor analysis.
         elif self.stage == 4:
             self.rdc_analysis()
 
@@ -231,13 +231,13 @@
 
 
     def combined_q(self):
-        """Calculate the combined Q-factor.
+        """Calculate the combined Q factor.
 
         The combined Q is defined as::
 
             Q_total^2 = Q_NOE^2 + Q_RDC^2,
 
-        and the NOE Q-factor as::
+        and the NOE Q factor as::
 
             Q^2 = U / sum(NOE_i^2),
 
@@ -253,7 +253,7 @@
         # Loop over the configurations.
         for i in range(len(self.configs)):
             # Print out.
-            print("Creating the combined Q-factor file for configuration 
'%s'." % self.configs[i])
+            print("Creating the combined Q factor file for configuration 
'%s'." % self.configs[i])
 
             # Open the NOE results file and read the data.
             file = open(self.results_dir+sep+"NOE_viol_" + self.configs[i])
@@ -265,7 +265,7 @@
             rdc_lines = file.readlines()
             file.close()
 
-            # The combined Q-factor file.
+            # The combined Q factor file.
             out = open(self.results_dir+sep+"Q_total_%s" % self.configs[i], 
'w')
             out_sorted = open(self.results_dir+sep+"Q_total_%s_sorted" % 
self.configs[i], 'w')
 
@@ -277,7 +277,7 @@
                 noe_viol = float(noe_lines[j].split()[1])
                 q_rdc = float(rdc_lines[j].split()[1])
 
-                # The NOE Q-factor.
+                # The NOE Q factor.
                 q_noe = sqrt(noe_viol/self.noe_norm)
 
                 # Combined Q.
@@ -430,10 +430,10 @@
             grace_curve.close()
             grace_dist.close()
 
-        # RDC Q-factors.
+        # RDC Q factors.
         if access(self.results_dir+sep+"Q_factors_" + self.configs[0] + 
"_sorted", F_OK):
             # Print out.
-            print("Generating RDC Q-factor Grace plots.")
+            print("Generating RDC Q factor Grace plots.")
 
             # Open the Grace output files.
             grace_curve = open(self.results_dir+sep+"RDC_%s_curve.agr" % 
self.rdc_name, 'w')
@@ -451,7 +451,7 @@
                 # Add a new graph set.
                 data.append([])
 
-                # Loop over the Q-factors.
+                # Loop over the Q factors.
                 values = []
                 for j in range(1, len(lines)):
                     # Extract the violation.
@@ -465,8 +465,8 @@
                 dist.append(self.generate_distribution(values, 
inc=self.bucket_num, upper=self.upper_lim_rdc, lower=self.lower_lim_rdc))
 
             # Headers.
-            write_xy_header(file=grace_curve, title='%s RDC Q-factor 
comparison' % self.rdc_name, subtitle=subtitle, sets=[n], 
set_names=[self.configs], set_colours=[colours], symbols=[[0]*n], 
axis_labels=[['Ensemble (sorted)', '%s RDC Q-factor (pales format)' % 
self.rdc_name]], legend_pos=[[0.3, 0.8]])
-            write_xy_header(file=grace_dist, title='%s RDC Q-factor 
comparison' % self.rdc_name, subtitle=subtitle, sets=[n], 
set_names=[self.configs], set_colours=[colours], symbols=[[1]*n], 
symbol_sizes=[[0.5]*n], linestyle=[[3]*n], axis_labels=[['%s RDC Q-factor 
(pales format)' % self.rdc_name, 'Frequency']], legend_pos=[[1.1, 0.8]])
+            write_xy_header(file=grace_curve, title='%s RDC Q factor 
comparison' % self.rdc_name, subtitle=subtitle, sets=[n], 
set_names=[self.configs], set_colours=[colours], symbols=[[0]*n], 
axis_labels=[['Ensemble (sorted)', '%s RDC Q factor (pales format)' % 
self.rdc_name]], legend_pos=[[0.3, 0.8]])
+            write_xy_header(file=grace_dist, title='%s RDC Q factor 
comparison' % self.rdc_name, subtitle=subtitle, sets=[n], 
set_names=[self.configs], set_colours=[colours], symbols=[[1]*n], 
symbol_sizes=[[0.5]*n], linestyle=[[3]*n], axis_labels=[['%s RDC Q factor 
(pales format)' % self.rdc_name, 'Frequency']], legend_pos=[[1.1, 0.8]])
 
             # Write the data.
             write_xy_data([data], file=grace_curve, graph_type='xy')
@@ -514,8 +514,8 @@
                     data_scaled[i].append([sqrt(noe_viol/self.noe_norm), 
q_factor])
 
             # Write the data.
-            write_xy_header(file=grace_file, title='Correlation plot - %s 
RDC vs. NOE' % self.rdc_name, subtitle=subtitle, sets=[n], 
set_names=[self.configs], set_colours=[colours], symbols=[[9]*n], 
symbol_sizes=[[0.24]*n], linetype=[[0]*n], axis_labels=[['NOE violation 
(Angstrom\\S2\\N)', '%s RDC Q-factor (pales format)' % self.rdc_name]], 
legend_pos=[[1.1, 0.8]])
-            write_xy_header(file=grace_file_scaled, title='Correlation plot 
- %s RDC vs. NOE Q-factor' % self.rdc_name, subtitle=subtitle, sets=[n], 
set_names=[self.configs], set_colours=[colours], symbols=[[9]*n], 
symbol_sizes=[[0.24]*n], linetype=[[0]*n], axis_labels=[['Normalised NOE 
violation (Q = sqrt(U / \\xS\\f{}NOE\\si\\N\\S2\\N))', '%s RDC Q-factor 
(pales format)' % self.rdc_name]], legend_pos=[[1.1, 0.8]])
+            write_xy_header(file=grace_file, title='Correlation plot - %s 
RDC vs. NOE' % self.rdc_name, subtitle=subtitle, sets=[n], 
set_names=[self.configs], set_colours=[colours], symbols=[[9]*n], 
symbol_sizes=[[0.24]*n], linetype=[[0]*n], axis_labels=[['NOE violation 
(Angstrom\\S2\\N)', '%s RDC Q factor (pales format)' % self.rdc_name]], 
legend_pos=[[1.1, 0.8]])
+            write_xy_header(file=grace_file_scaled, title='Correlation plot 
- %s RDC vs. NOE Q factor' % self.rdc_name, subtitle=subtitle, sets=[n], 
set_names=[self.configs], set_colours=[colours], symbols=[[9]*n], 
symbol_sizes=[[0.24]*n], linetype=[[0]*n], axis_labels=[['Normalised NOE 
violation (Q = sqrt(U / \\xS\\f{}NOE\\si\\N\\S2\\N))', '%s RDC Q factor 
(pales format)' % self.rdc_name]], legend_pos=[[1.1, 0.8]])
             write_xy_data([data], file=grace_file, graph_type='xy')
             write_xy_data([data_scaled], file=grace_file_scaled, 
graph_type='xy')
 
@@ -694,7 +694,7 @@
                 #grid_search(inc=4)
                 self.interpreter.minimise("simplex", constraints=False)
 
-                # Store and write out the Q-factors.
+                # Store and write out the Q factors.
                 q_factors.append([cdp.q_rdc, ens])
                 out.write("%-20i%20.15f%20.15f\n" % (ens, cdp.q_rdc, 
cdp.q_rdc_norm2))
 

Modified: trunk/pipe_control/pcs.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/pcs.py?rev=23162&r1=23161&r2=23162&view=diff
==============================================================================
--- trunk/pipe_control/pcs.py   (original)
+++ trunk/pipe_control/pcs.py   Tue May 13 23:41:56 2014
@@ -544,9 +544,9 @@
 
 
 def q_factors(spin_id=None):
-    """Calculate the Q-factors for the PCS data.
-
-    @keyword spin_id:   The spin ID string used to restrict the Q-factor 
calculation to a subset of all spins.
+    """Calculate the Q factors for the PCS data.
+
+    @keyword spin_id:   The spin ID string used to restrict the Q factor 
calculation to a subset of all spins.
     @type spin_id:      None or str
     """
 
@@ -558,7 +558,7 @@
         warn(RelaxWarning("No PCS data exists, Q factors cannot be 
calculated."))
         return
 
-    # Q-factor dictionary.
+    # Q factor dictionary.
     cdp.q_factors_pcs = {}
 
     # Loop over the alignments.
@@ -595,7 +595,7 @@
             # Sum the PCSs squared (for normalisation).
             pcs2_sum = pcs2_sum + spin.pcs[align_id]**2
 
-        # The Q-factor for the alignment.
+        # The Q factor for the alignment.
         if pcs2_sum:
             Q = sqrt(sse / pcs2_sum)
             cdp.q_factors_pcs[align_id] = Q
@@ -611,7 +611,7 @@
             warn(RelaxWarning("No back-calculated PCS data can be found for 
the alignment ID '%s', skipping the PCS Q factor calculation for this 
alignment." % align_id))
             continue
 
-    # The total Q-factor.
+    # The total Q factor.
     cdp.q_pcs = 0.0
     for id in cdp.q_factors_pcs:
         cdp.q_pcs = cdp.q_pcs + cdp.q_factors_pcs[id]**2

Modified: trunk/pipe_control/rdc.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/rdc.py?rev=23162&r1=23161&r2=23162&view=diff
==============================================================================
--- trunk/pipe_control/rdc.py   (original)
+++ trunk/pipe_control/rdc.py   Tue May 13 23:41:56 2014
@@ -575,9 +575,9 @@
 
 
 def q_factors(spin_id=None):
-    """Calculate the Q-factors for the RDC data.
-
-    @keyword spin_id:   The spin ID string used to restrict the Q-factor 
calculation to a subset of all spins.
+    """Calculate the Q factors for the RDC data.
+
+    @keyword spin_id:   The spin ID string used to restrict the Q factor 
calculation to a subset of all spins.
     @type spin_id:      None or str
     """
 
@@ -589,7 +589,7 @@
         warn(RelaxWarning("No RDC data exists, Q factors cannot be 
calculated."))
         return
 
-    # Q-factor dictonaries.
+    # Q factor dictonaries.
     cdp.q_factors_rdc = {}
     cdp.q_factors_rdc_norm2 = {}
 
@@ -683,16 +683,16 @@
             if Da == 0.0:
                 norm = 1e-15
 
-            # The Q-factor for the alignment.
+            # The Q factor for the alignment.
             cdp.q_factors_rdc[align_id] = sqrt(sse / N / norm)
 
         else:
             cdp.q_factors_rdc[align_id] = 0.0
 
-        # The second Q-factor definition.
+        # The second Q factor definition.
         cdp.q_factors_rdc_norm2[align_id] = sqrt(sse / D2_sum)
 
-    # The total Q-factor.
+    # The total Q factor.
     cdp.q_rdc = 0.0
     cdp.q_rdc_norm2 = 0.0
     for id in cdp.q_factors_rdc:

Modified: trunk/specific_analyses/n_state_model/api.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/n_state_model/api.py?rev=23162&r1=23161&r2=23162&view=diff
==============================================================================
--- trunk/specific_analyses/n_state_model/api.py        (original)
+++ trunk/specific_analyses/n_state_model/api.py        Tue May 13 23:41:56 
2014
@@ -161,11 +161,11 @@
             # Store the back-calculated data.
             minimise_bc_data(model)
 
-            # Calculate the RDC Q-factors.
+            # Calculate the RDC Q factors.
             if 'rdc' in data_types:
                 rdc.q_factors()
 
-            # Calculate the PCS Q-factors.
+            # Calculate the PCS Q factors.
             if 'pcs' in data_types:
                 pcs.q_factors()
 
@@ -568,14 +568,14 @@
 
         # Statistical analysis.
         if sim_index == None and ('rdc' in data_types or 'pcs' in 
data_types):
-            # Get the final back calculated data (for the Q-factor and
+            # Get the final back calculated data (for the Q factor and
             minimise_bc_data(model)
 
-            # Calculate the RDC Q-factors.
+            # Calculate the RDC Q factors.
             if 'rdc' in data_types:
                 rdc.q_factors()
 
-            # Calculate the PCS Q-factors.
+            # Calculate the PCS Q factors.
             if 'pcs' in data_types:
                 pcs.q_factors()
 

Modified: 
trunk/test_suite/shared_data/frame_order/cam/rotor2/pcs_only/ave_pos_back_calc.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/frame_order/cam/rotor2/pcs_only/ave_pos_back_calc.py?rev=23162&r1=23161&r2=23162&view=diff
==============================================================================
--- 
trunk/test_suite/shared_data/frame_order/cam/rotor2/pcs_only/ave_pos_back_calc.py
   (original)
+++ 
trunk/test_suite/shared_data/frame_order/cam/rotor2/pcs_only/ave_pos_back_calc.py
   Tue May 13 23:41:56 2014
@@ -64,7 +64,7 @@
     rdc.write(align_id=id, file='ave_pos_rdc_%s.txt'%id, bc=True, force=True)
     pcs.write(align_id=id, file='ave_pos_pcs_%s.txt'%id, bc=True, force=True)
 
-# Calculate Q-factors.
+# Calculate Q factors.
 rdc.calc_q_factors()
 pcs.calc_q_factors()
 

Modified: trunk/test_suite/system_tests/scripts/n_state_model/rdc_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/n_state_model/rdc_tensor.py?rev=23162&r1=23161&r2=23162&view=diff
==============================================================================
--- trunk/test_suite/system_tests/scripts/n_state_model/rdc_tensor.py   
(original)
+++ trunk/test_suite/system_tests/scripts/n_state_model/rdc_tensor.py   Tue 
May 13 23:41:56 2014
@@ -55,7 +55,7 @@
 # Back calc.
 self._execute_uf(uf_name='rdc.back_calc')
 
-# Q-factors.
+# Q factors.
 self._execute_uf(uf_name='rdc.calc_q_factors')
 
 # Correlation plots.

Modified: 
trunk/test_suite/system_tests/scripts/n_state_model/stereochem_analysis.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/n_state_model/stereochem_analysis.py?rev=23162&r1=23161&r2=23162&view=diff
==============================================================================
--- 
trunk/test_suite/system_tests/scripts/n_state_model/stereochem_analysis.py  
(original)
+++ 
trunk/test_suite/system_tests/scripts/n_state_model/stereochem_analysis.py  
Tue May 13 23:41:56 2014
@@ -23,7 +23,7 @@
 
 The analysis is preformed by using multiple ensembles of structures, 
randomly sampled from a given
 set of structures.  The discrimination is performed by comparing the sets of 
ensembles using NOE
-violations and RDC Q-factors.
+violations and RDC Q factors.
 
 This script is split into multiple stages:
 
@@ -38,7 +38,7 @@
     using the fit to first algorithm.  The superimposed ensembles will be 
placed into the
     "ensembles_superimposed" directory.  This stage is not necessary for the 
NOE analysis.
 
-    4.  The RDC Q-factor analysis.
+    4.  The RDC Q factor analysis.
 
     5.  Generation of Grace graphs.
 """




Related Messages


Powered by MHonArc, Updated Wed May 14 00:40:02 2014