mailr13239 - /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 hasu on June 27, 2011 - 15:21:
Author: han87
Date: Mon Jun 27 15:21:31 2011
New Revision: 13239

URL: http://svn.gna.org/viewcvs/relax?rev=13239&view=rev
Log:
Adding code for checking the atomic positions in the system test 
test_read_xyz_internal2() 

Code for checking the atomic position (x, y and z) of the last spin was added 
in the system test test_read_xyz_internal2().

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=13239&r1=13238&r2=13239&view=diff
==============================================================================
--- branches/xyz/test_suite/system_tests/structure.py (original)
+++ branches/xyz/test_suite/system_tests/structure.py Mon Jun 27 15:21:31 2011
@@ -665,6 +665,20 @@
         
self.interpreter.structure.load_spins('#SSS-cluster4-new-test_mol1@2')
         self.assertEqual(count_spins(), 1)
 
+        # Test the spin coordinates.
+        mol = cdp.structure.structural_data[0].mol[0]
+        last_spin_x=[]
+        last_spin_y=[]
+        last_spin_z=[]
+        for i in xrange(len(mol.atom_num)):
+            last_spin_x.append(mol.x[i])
+            last_spin_y.append(mol.y[i])
+            last_spin_z.append(mol.z[i])
+        
+        self.assertEqual(last_spin_x[160], -9.947)
+        self.assertEqual(last_spin_y[160], -6.062)
+        self.assertEqual(last_spin_z[160], 11.682)
+
         # Try loading a few protons.
         #self.interpreter.structure.load_spins('@H')
 




Related Messages


Powered by MHonArc, Updated Mon Jun 27 16:00:02 2011