mailr21730 - /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 December 02, 2013 - 08:37:
Author: bugman
Date: Mon Dec  2 08:37:02 2013
New Revision: 21730

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

This will be used for implementing and testing the structure.read_gaussian 
user function.


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=21730&r1=21729&r2=21730&view=diff
==============================================================================
--- trunk/test_suite/system_tests/structure.py (original)
+++ trunk/test_suite/system_tests/structure.py Mon Dec  2 08:37:02 2013
@@ -340,6 +340,31 @@
         self.assertEqual(len(cdp.structure.sheets), 2)
         self.assertEqual(cdp.structure.sheets[0], sheets[0])
         self.assertEqual(cdp.structure.sheets[1], sheets[1])
+
+
+    def test_read_gaussian_strychnine(self):
+        """Load the structure from the 
'strychnine_opt_cdcl3_b3lyp_gaussian.log.bz2' compressed Gaussian log file."""
+
+        # Path of the files.
+        path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'structures'
+
+        # Read the XYZ file.
+        
self.interpreter.structure.read_gaussian(file='strychnine_opt_cdcl3_b3lyp_gaussian.log.bz2',
 dir=path, set_mol_name='strychnine')
+
+        # Test the molecule data.
+        self.assertEqual(len(cdp.structure.structural_data), 1)
+        self.assertEqual(len(cdp.structure.structural_data[0].mol), 1)
+
+        # Load the carbon atoms and test it.
+        self.interpreter.structure.load_spins('@C')
+        self.assertEqual(count_spins(), 21)
+
+        # Load the protons.
+        self.interpreter.structure.load_spins('@H')
+        self.assertEqual(count_spins(), 43)
+
+        # And now all the rest of the atoms.
+        self.interpreter.structure.load_spins()
 
 
     def test_read_merge(self):




Related Messages


Powered by MHonArc, Updated Mon Dec 02 10:20:01 2013