mailr5576 - /1.3/generic_fns/structure/main.py


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

Header


Content

Posted by edward on April 11, 2008 - 12:39:
Author: bugman
Date: Fri Apr 11 12:39:08 2008
New Revision: 5576

URL: http://svn.gna.org/viewcvs/relax?rev=5576&view=rev
Log:
Updated the load_spins() function to print out a list of spins appended to 
the data store.


Modified:
    1.3/generic_fns/structure/main.py

Modified: 1.3/generic_fns/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/main.py?rev=5576&r1=5575&r2=5576&view=diff
==============================================================================
--- 1.3/generic_fns/structure/main.py (original)
+++ 1.3/generic_fns/structure/main.py Fri Apr 11 12:39:08 2008
@@ -22,12 +22,14 @@
 
 # Python module imports.
 from os import F_OK, access
+import sys
 from warnings import warn
 
 # relax module imports.
 from data import Data as relax_data_store
 from generic_fns import molmol
 from generic_fns.selection import exists_mol_res_spin_data, return_molecule, 
return_residue, return_spin, spin_loop
+from generic_fns.sequence import write_header
 from generic_fns.structure.scientific import Scientific_data
 from relax_errors import RelaxError, RelaxFileError, RelaxNoPipeError, 
RelaxNoSequenceError, RelaxPdbError
 from relax_io import get_file_path
@@ -47,13 +49,17 @@
         raise RelaxNoPipeError
 
     # Print out.
-    print "Generating the spins from the loaded structure.\n"
+    print "Adding the following spins to the relax data store.\n"
+    write_header(sys.stdout, mol_name_flag=True, res_num_flag=True, 
res_name_flag=True, spin_num_flag=True, spin_name_flag=True)
 
     # Alias the current data pipe.
     cdp = relax_data_store[relax_data_store.current_pipe]
 
     # Loop over all atoms of the spin_id selection.
     for mol_name, res_num, res_name, atom_num, atom_name, element, pos in 
cdp.structure.atom_loop(atom_id=spin_id, mol_name_flag=True, 
res_num_flag=True, res_name_flag=True, atom_num_flag=True, 
atom_name_flag=True, element_flag=True, pos_flag=True):
+        # Print out.
+        write_line(sys.stdout, mol_name, res_num, res_name, atom_num, 
atom_name, mol_name_flag=True, res_num_flag=True, res_name_flag=True, 
spin_num_flag=True, spin_name_flag=True)
+
         # Initialise the identification string.
         id = ''
 




Related Messages


Powered by MHonArc, Updated Fri Apr 11 13:00:14 2008