Author: bugman
Date: Wed Mar 4 15:23:13 2015
New Revision: 27777
URL: http://svn.gna.org/viewcvs/relax?rev=27777&view=rev
Log:
Created the Align_tensor.test_copy_pipes_sims system test.
This demonstrates a failure of the align_tensor.copy user function when Monte
Carlo simulated
tensors are present.
Modified:
trunk/test_suite/system_tests/align_tensor.py
Modified: trunk/test_suite/system_tests/align_tensor.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/align_tensor.py?rev=27777&r1=27776&r2=27777&view=diff
==============================================================================
--- trunk/test_suite/system_tests/align_tensor.py (original)
+++ trunk/test_suite/system_tests/align_tensor.py Wed Mar 4 15:23:13 2015
@@ -20,6 +20,7 @@
###############################################################################
# Python module imports.
+from copy import deepcopy
from tempfile import mktemp
# relax module imports.
@@ -310,6 +311,37 @@
self.assertEqual(cdp.align_tensors[0].name, 'orig')
+ def test_copy_pipes_sims(self):
+ """Test the copying of alignment tensor Monte Carlo simulations
between data pipes."""
+
+ # First reset.
+ self.interpreter.reset()
+
+ # Create two data pipes.
+ self.interpreter.pipe.create('target', 'N-state')
+ self.interpreter.pipe.create('source', 'N-state')
+
+ # Initialise one tensor.
+ self.interpreter.align_tensor.init(tensor='orig', align_id='test',
params=self.tensors_full[0], param_types=0)
+
+ # Set up the number of simulations.
+ sim_number = 10
+ cdp.align_tensors[0].set_sim_num(sim_number)
+
+ # Initialise simulation tensors.
+ for object_name in ['Axx', 'Ayy', 'Axy', 'Axz', 'Ayz']:
+ for i in range(sim_number):
+ cdp.align_tensors[0].set(param=object_name,
value=deepcopy(getattr(cdp.align_tensors[0], object_name)), category='sim',
sim_index=i)
+
+ # Copy the tensor.
+ self.interpreter.align_tensor.copy(pipe_from='source',
pipe_to='target')
+
+ # Checks.
+ self.interpreter.pipe.switch('target')
+ self.assertEqual(len(cdp.align_tensors), 1)
+ self.assertEqual(cdp.align_tensors[0].name, 'orig')
+
+
def test_fix(self):
"""Test the align_tensor.fix user function."""
_______________________________________________
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