Author: bugman
Date: Thu Oct 23 11:54:27 2014
New Revision: 26368

URL: http://svn.gna.org/viewcvs/relax?rev=26368&view=rev
Log:
Fix for the structure.load_spins user function when the from_mols argument is 
used.

The load_spins_multi_mol() function of the pipe_control.structure.main module 
was incorrectly
handling the atomic position returned by the internal structural object 
atom_loop() method.  This
position is a list of lists when multiple models are present.  But when only a 
single model is
present, it returns a simple list.


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=26368&r1=26367&r2=26368&view=diff
==============================================================================
--- trunk/pipe_control/structure/main.py        (original)
+++ trunk/pipe_control/structure/main.py        Thu Oct 23 11:54:27 2014
@@ -29,6 +29,7 @@
 from warnings import warn
 
 # relax module imports.
+from lib.check_types import is_float
 from lib.checks import Check
 from lib.errors import RelaxError, RelaxFileError
 from lib.io import get_file_path, open_write_file, write_data
@@ -854,8 +855,11 @@
             # Generate a spin ID for the current atom.
             id = generate_spin_id_unique(mol_name=mol_name_target, 
res_num=res_num, res_name=res_name, spin_name=atom_name)
 
-            # Store the position info in all cases.
-            positions[mol_name][id] = pos[0]
+            # Store the position info in all cases, collapsing list of lists 
into single lists when needed.
+            if is_float(pos[0]):
+                positions[mol_name][id] = pos
+            else:
+                positions[mol_name][id] = pos[0]
 
             # Not a new ID.
             if id in ids:


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to