mailr7293 - /1.3/test_suite/system_tests/unit_vectors.py


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

Header


Content

Posted by edward on September 25, 2008 - 15:48:
Author: bugman
Date: Thu Sep 25 15:48:24 2008
New Revision: 7293

URL: http://svn.gna.org/viewcvs/relax?rev=7293&view=rev
Log:
Added a simple system test for the calculation of unit XH bond vectors.


Added:
    1.3/test_suite/system_tests/unit_vectors.py

Added: 1.3/test_suite/system_tests/unit_vectors.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/unit_vectors.py?rev=7293&view=auto
==============================================================================
--- 1.3/test_suite/system_tests/unit_vectors.py (added)
+++ 1.3/test_suite/system_tests/unit_vectors.py Thu Sep 25 15:48:24 2008
@@ -1,0 +1,57 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2008 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# This file is part of the program relax.                                    
 #
+#                                                                            
 #
+# relax is free software; you can redistribute it and/or modify              
 #
+# it under the terms of the GNU General Public License as published by       
 #
+# the Free Software Foundation; either version 2 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# relax is distributed in the hope that it will be useful,                   
 #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of             
 #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              
 #
+# GNU General Public License for more details.                               
 #
+#                                                                            
 #
+# You should have received a copy of the GNU General Public License          
 #
+# along with relax; if not, write to the Free Software                       
 #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
 #
+#                                                                            
 #
+###############################################################################
+
+# Python module imports.
+import sys
+from unittest import TestCase
+
+# relax module imports.
+from data import Relax_data_store; ds = Relax_data_store()
+
+
+class Unit_vectors(TestCase):
+    """Class for testing the calculation of unit vectors."""
+
+    def setUp(self):
+        """Set up for all the functional tests."""
+
+        # Create the data pipe.
+        self.relax.interpreter._Pipe.create('mf', 'mf')
+
+
+    def tearDown(self):
+        """Reset the relax data storage object."""
+
+        ds.__reset__()
+
+
+    def test_calc_unit_vectors(self):
+        """Load the PDB file and calculate the XH unit vectors from it."""
+
+        # Read the PDB file.
+        
self.relax.interpreter._Structure.read_pdb(file='Ap4Aase_res1-12.pdb', 
dir=sys.path[-1] + '/test_suite/shared_data/structures', model=1)
+
+        # Calculate the unit vectors.
+        self.relax.interpreter._Structure.vectors(attached='H')
+
+        # Leu 3.
+        self.assert_(hasattr(cdp.mol[0].res[2].spin[0], xh_vect))




Related Messages


Powered by MHonArc, Updated Thu Sep 25 16:00:02 2008