mailr13090 - /branches/xyz/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 June 17, 2011 - 11:39:
Author: bugman
Date: Fri Jun 17 11:39:57 2011
New Revision: 13090

URL: http://svn.gna.org/viewcvs/relax?rev=13090&view=rev
Log:
Generating new system test 'test_read_xyz_internal2()'.

This is Han's patch https://gna.org/task/download.php?file_id=13246 attached
to the task http://gna.org/task/?7404.

The new system test was generated in test_suite/system_tests/structure.py for
reading a xyz file 'SSS-cluster4-new-test.xyz' with multiple models.


Modified:
    branches/xyz/test_suite/system_tests/structure.py

Modified: branches/xyz/test_suite/system_tests/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/xyz/test_suite/system_tests/structure.py?rev=13090&r1=13089&r2=13090&view=diff
==============================================================================
--- branches/xyz/test_suite/system_tests/structure.py (original)
+++ branches/xyz/test_suite/system_tests/structure.py Fri Jun 17 11:39:57 2011
@@ -648,3 +648,26 @@
         # And now all the rest of the atoms.
         self.interpreter.structure.load_spins()
 
+
+    def test_read_xyz_internal2(self):
+        """Load the 'SSS-cluster4-new-test.xyz' XYZ file (using the internal 
structural object XYZ reader)."""
+
+        # Path of the files.
+        path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'structures'
+
+        # Read the xyz.
+        
self.interpreter.structure.read_xyz(file='SSS-cluster4-new-test.xyz', 
dir=path)
+
+        # Test the molecule name.
+        self.assertEqual(cdp.structure.structural_data[0].mol[0].mol_name, 
'SSS-cluster4-new-test')
+
+        # Load a single atom and test it.
+        self.interpreter.structure.load_spins('SSS-cluster4-new-test:3@C')
+        self.assertEqual(count_spins(), 1)
+
+        # Try loading a few protons.
+        self.interpreter.structure.load_spins('@*H*')
+
+        # And now all the rest of the atoms.
+        self.interpreter.structure.load_spins()
+




Related Messages


Powered by MHonArc, Updated Fri Jun 17 12:20:03 2011