mailr25195 - /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 August 22, 2014 - 11:11:
Author: bugman
Date: Fri Aug 22 11:11:57 2014
New Revision: 25195

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

This is to show the failure of the structure.create_diff_tensor_pdb user 
function when no structural
data is present.


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=25195&r1=25194&r2=25195&view=diff
==============================================================================
--- trunk/test_suite/system_tests/structure.py  (original)
+++ trunk/test_suite/system_tests/structure.py  Fri Aug 22 11:11:57 2014
@@ -23,7 +23,7 @@
 from math import sqrt
 from numpy import float64, zeros
 from os import sep
-from tempfile import mktemp
+from tempfile import mkdtemp, mktemp
 
 # relax module imports.
 from data_store import Relax_data_store; ds = Relax_data_store()
@@ -43,6 +43,9 @@
 
         # Create the data pipe.
         self.interpreter.pipe.create('mf', 'mf')
+
+        # Create a temporary directory for dumping files.
+        ds.tmpdir = mkdtemp()
 
 
     def strip_remarks(self, lines):
@@ -238,6 +241,19 @@
 
         # Superimpose.
         self.interpreter.structure.superimpose(method='fit to first', 
centre_type='CoM')
+
+
+    def test_create_diff_tensor_pdb(self):
+        """Test the deletion of non-existent structural data."""
+
+        # Delete all structural data.
+        self.interpreter.structure.delete()
+
+        # Set up a diffusion tensor.
+        self.interpreter.diffusion_tensor.init((8.5e-9, 1.1, 20.0, 20.0), 
param_types=2)
+
+        # Create the PDB representation.
+        self.interpreter.structure.create_diff_tensor_pdb(scale=1.8e-06, 
file='prolate.pdb', dir=ds.tmpdir, force=True)
 
 
     def test_delete_empty(self):




Related Messages


Powered by MHonArc, Updated Fri Aug 22 11:20:02 2014