mailr27131 - /trunk/pipe_control/structure/main.py


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

Header


Content

Posted by edward on December 18, 2014 - 12:25:
Author: bugman
Date: Thu Dec 18 12:25:01 2014
New Revision: 27131

URL: http://svn.gna.org/viewcvs/relax?rev=27131&view=rev
Log:
More simplifications for the structure.atomic_fluctuations user function 
backend.


Modified:
    trunk/pipe_control/structure/main.py

Modified: trunk/pipe_control/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/structure/main.py?rev=27131&r1=27130&r2=27131&view=diff
==============================================================================
--- trunk/pipe_control/structure/main.py        (original)
+++ trunk/pipe_control/structure/main.py        Thu Dec 18 12:25:01 2014
@@ -262,14 +262,15 @@
     # The output file.
     output = open_write_file(file, dir=dir, force=force)
 
-    # The header line.
+    # The number of dimensions.
+    n = len(atom_names)
+
+    # The labels as spin ID strings.
     labels = []
-    for i in range(len(atom_names)):
-        # The spin identification string.
+    for i in range(n):
         labels.append(generate_spin_id_unique(mol_name=mol_names[i], 
res_num=res_nums[i], res_name=res_names[i], spin_name=atom_names[i]))
 
     # Generate the pairwise matrix.
-    n = len(atom_names)
     matrix = zeros((n, n), float64)
     for i in range(n):
         for j in range(n):




Related Messages


Powered by MHonArc, Updated Thu Dec 18 12:40:02 2014