mailr26372 - in /branches/frame_order_cleanup: ./ pipe_control/structure/main.py test_suite/system_tests/structure.py


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

Header


Content

Posted by edward on October 23, 2014 - 11:56:
Author: bugman
Date: Thu Oct 23 11:56:39 2014
New Revision: 26372

URL: http://svn.gna.org/viewcvs/relax?rev=26372&view=rev
Log:
Merged revisions 26367-26368 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r26367 | bugman | 2014-10-23 11:52:13 +0200 (Thu, 23 Oct 2014) | 5 lines
  
  Fix for the checks in the new Structure.test_load_spins_multi_mol system 
test.
  
  A spin index was incorrect.
........
  r26368 | bugman | 2014-10-23 11:54:27 +0200 (Thu, 23 Oct 2014) | 8 lines
  
  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:
    branches/frame_order_cleanup/   (props changed)
    branches/frame_order_cleanup/pipe_control/structure/main.py
    branches/frame_order_cleanup/test_suite/system_tests/structure.py

Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Oct 23 11:56:39 2014
@@ -1 +1 @@
-/trunk:1-26362,26366
+/trunk:1-26370

Modified: branches/frame_order_cleanup/pipe_control/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/pipe_control/structure/main.py?rev=26372&r1=26371&r2=26372&view=diff
==============================================================================
--- branches/frame_order_cleanup/pipe_control/structure/main.py (original)
+++ branches/frame_order_cleanup/pipe_control/structure/main.py Thu Oct 23 
11:56:39 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:

Modified: branches/frame_order_cleanup/test_suite/system_tests/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/test_suite/system_tests/structure.py?rev=26372&r1=26371&r2=26372&view=diff
==============================================================================
--- branches/frame_order_cleanup/test_suite/system_tests/structure.py   
(original)
+++ branches/frame_order_cleanup/test_suite/system_tests/structure.py   Thu 
Oct 23 11:56:39 2014
@@ -2988,7 +2988,7 @@
         self.assertEqual(cdp.mol[0].res[0].spin[2].name, 'C3')
         self.assertEqual(cdp.mol[0].res[0].spin[2].num, None)
         self.assertEqual(len(cdp.mol[0].res[0].spin[2].pos), 2)
-        self.assertEqual(cdp.mol[0].res[0].spin[0].pos[0], None)
+        self.assertEqual(cdp.mol[0].res[0].spin[2].pos[0], None)
         self.assertEqual(cdp.mol[0].res[0].spin[2].pos[1][0], 8.062)
         self.assertEqual(cdp.mol[0].res[0].spin[2].pos[1][1], 0.431)
         self.assertEqual(cdp.mol[0].res[0].spin[2].pos[1][2], 3.048)




Related Messages


Powered by MHonArc, Updated Thu Oct 23 12:20:02 2014