mailr9010 - /1.3/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 April 15, 2009 - 14:33:
Author: bugman
Date: Wed Apr 15 14:33:53 2009
New Revision: 9010

URL: http://svn.gna.org/viewcvs/relax?rev=9010&view=rev
Log:
Expanded the test_read_pdb_internal3() and test_read_pdb_scientific3() system 
tests.

Now the reading of atomic positions from different models is tested.


Modified:
    1.3/test_suite/system_tests/structure.py

Modified: 1.3/test_suite/system_tests/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/structure.py?rev=9010&r1=9009&r2=9010&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/structure.py (original)
+++ 1.3/test_suite/system_tests/structure.py Wed Apr 15 14:33:53 2009
@@ -200,14 +200,20 @@
     def test_read_pdb_internal3(self):
         """Load the 'gromacs_phthalic_acid.pdb' PDB file (using the internal 
structural object PDB reader)."""
 
+        # Alias the current data pipe.
+        cdp = pipes.get_pipe()
+
         # Path of the files.
         path = sys.path[-1] + '/test_suite/shared_data/structures'
 
         # Read the PDB.
         
self.relax.interpreter._Structure.read_pdb(file='gromacs_phthalic_acid.pdb', 
dir=path, parser='internal')
 
-        # Try loading a few protons.
-        self.relax.interpreter._Structure.load_spins('@*H*')
+        # Try loading a few protons, without positions averaging across 
models.
+        self.relax.interpreter._Structure.load_spins('@*H*', ave_pos=False)
+
+        # A test.
+        self.assertEqual(len(cdp.mol[0].res[0].spin[0].pos), 2)
 
         # And now all the rest of the atoms.
         self.relax.interpreter._Structure.load_spins()
@@ -443,6 +449,9 @@
     def test_read_pdb_scientific3(self):
         """Load the 'gromacs_phthalic_acid.pdb' PDB file (using the 
Scientific python structural object PDB reader)."""
 
+        # Alias the current data pipe.
+        cdp = pipes.get_pipe()
+
         # Path of the files.
         path = sys.path[-1] + '/test_suite/shared_data/structures'
 
@@ -450,7 +459,10 @@
         
self.relax.interpreter._Structure.read_pdb(file='gromacs_phthalic_acid.pdb', 
dir=path, parser='scientific')
 
         # Try loading a few protons.
-        self.relax.interpreter._Structure.load_spins('@*H*')
+        self.relax.interpreter._Structure.load_spins('@*H*', ave_pos=False)
+
+        # A test.
+        self.assertEqual(len(cdp.mol[0].res[0].spin[0].pos), 2)
 
         # And now all the rest of the atoms.
         self.relax.interpreter._Structure.load_spins()




Related Messages


Powered by MHonArc, Updated Wed Apr 15 15:40:04 2009