mailr4257 - /1.3/test_suite/unit_tests/value_testing_base.py


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

Header


Content

Posted by edward on January 02, 2008 - 16:39:
Author: bugman
Date: Wed Jan  2 16:39:54 2008
New Revision: 4257

URL: http://svn.gna.org/viewcvs/relax?rev=4257&view=rev
Log:
More changes to prepare the Value_base_class for unit tests.

Spin systems are now set up for the molecule.


Modified:
    1.3/test_suite/unit_tests/value_testing_base.py

Modified: 1.3/test_suite/unit_tests/value_testing_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/value_testing_base.py?rev=4257&r1=4256&r2=4257&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/value_testing_base.py (original)
+++ 1.3/test_suite/unit_tests/value_testing_base.py Wed Jan  2 16:39:54 2008
@@ -45,6 +45,9 @@
         # Add a second model-free data pipe for copying tests.
         relax_data_store.add(pipe_name='mf2', pipe_type='mf')
 
+        # Set up some spins.
+        self.set_up_spins(pipe_name='mf')
+
         # Set the current data pipe to 'mf'.
         relax_data_store.current_pipe = 'mf'
 
@@ -53,3 +56,27 @@
         """Reset the relax data storage object."""
 
         relax_data_store.__reset__()
+
+
+    def set_up_spins(self, pipe_name=None):
+        """Function for setting up a few spins for the given pipe."""
+
+        # Alias the pipe.
+        pipe = relax_data_store[pipe_name]
+
+        # Name the first molecule.
+        pipe.mol[0].name = 'Test mol'
+
+        # Create the first residue and add some data to its spin container.
+        pipe.mol[0].res[0].num = 1
+        pipe.mol[0].res[0].name = 'Met'
+        pipe.mol[0].res[0].spin[0].num = 111
+        pipe.mol[0].res[0].spin[0].name = 'NH'
+
+        # Add some more spins.
+        pipe.mol[0].res[0].spin.add_item('Ca', 114)
+
+        # Create a second residue.
+        pipe.mol[0].res.add_item('Trp', 2)
+        pipe.mol[0].res[1].spin[0].num = 112
+        pipe.mol[0].res[1].spin[0].name = 'NH'




Related Messages


Powered by MHonArc, Updated Wed Jan 02 17:00:28 2008