mailr27616 - /trunk/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 February 10, 2015 - 13:08:
Author: bugman
Date: Tue Feb 10 13:08:00 2015
New Revision: 27616

URL: http://svn.gna.org/viewcvs/relax?rev=27616&view=rev
Log:
Created the Structure.test_atomic_fluctuations_no_match system test.

This demonstrates a failure in the operation of the 
structure.atomic_fluctuations user function when
the supplied atom ID matches no atoms.


Modified:
    trunk/test_suite/system_tests/structure.py

Modified: trunk/test_suite/system_tests/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/structure.py?rev=27616&r1=27615&r2=27616&view=diff
==============================================================================
--- trunk/test_suite/system_tests/structure.py  (original)
+++ trunk/test_suite/system_tests/structure.py  Tue Feb 10 13:08:00 2015
@@ -559,6 +559,25 @@
         self.assertEqual(len(script), len(lines))
         for i in range(len(lines)):
             self.assertEqual(script[i], lines[i])
+
+
+    def test_atomic_fluctuations_no_match(self):
+        """Check the operation of the structure.atomic_fluctuations user 
function when no data matches the atom ID.
+
+        This checks the interatomic distance fluctuations calculated by the 
U{structure.atomic_fluctuations user 
function<http://www.nmr-relax.com/manual/structure_atomic_fluctuations.html>}.
+        """
+
+        # Load the file.
+        path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'structures'
+        self.interpreter.structure.read_pdb('web_of_motion.pdb', dir=path)
+
+        # Run the structure.atomic_fluctuations user function and collect 
the results in a dummy file object.
+        file = DummyFileObject()
+        self.interpreter.structure.atomic_fluctuations(atom_id='@X', 
file=file, format='text')
+
+        # Check the file.
+        lines = file.readlines()
+        self.assertEqual(len(lines), 0)
 
 
     def test_atomic_fluctuations_parallax(self):




Related Messages


Powered by MHonArc, Updated Tue Feb 10 13:20:02 2015