mailr27053 - /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 10, 2014 - 14:05:
Author: bugman
Date: Wed Dec 10 14:05:33 2014
New Revision: 27053

URL: http://svn.gna.org/viewcvs/relax?rev=27053&view=rev
Log:
Modified the Structure.test_align_molecules system test.

This now simultaneously checks both the pipes and molecules arguments to the 
structure.align 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=27053&r1=27052&r2=27053&view=diff
==============================================================================
--- trunk/test_suite/system_tests/structure.py  (original)
+++ trunk/test_suite/system_tests/structure.py  Wed Dec 10 14:05:33 2014
@@ -182,10 +182,14 @@
     def test_align_molecules(self):
         """Test the U{structure.align user 
function<http://www.nmr-relax.com/manual/structure_align.html>} for aligning 
different molecules in one pipe."""
 
+        # Reset relax.
+        self.interpreter.reset()
+
         # Path of the PDB file.
         path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'diffusion_tensor'+sep+'spheroid'
 
-        # Load the reference structure.
+        # Create a data pipe for the reference structure, then load it.
+        self.interpreter.pipe.create('ref', 'N-state')
         self.interpreter.structure.read_pdb('uniform.pdb', dir=path, 
set_mol_name='ref')
 
         # Delete a residue and atom.
@@ -194,6 +198,9 @@
 
         # Output PDB to stdout to help in debugging.
         self.interpreter.structure.write_pdb(file=sys.stdout)
+
+        # Create a second data pipe for the structures to align and 
superimpose.
+        self.interpreter.pipe.create('align', 'N-state')
 
         # Load the PDB twice as different models.
         self.interpreter.structure.read_pdb('uniform.pdb', dir=path, 
set_mol_name='1')
@@ -213,7 +220,7 @@
         self.interpreter.structure.translate(T=[0., 0., 1.], model=2, 
atom_id='#2')
 
         # The alignment.
-        self.interpreter.structure.align(molecules=['ref', '1', '2'], 
method='fit to first', atom_id='@N,H')
+        self.interpreter.structure.align(pipes=['ref', 'align'], 
molecules=['ref', '1', '2'], method='fit to first', atom_id='@N,H')
 
         # Output PDB to stdout to help in debugging.
         self.interpreter.structure.write_pdb(file=sys.stdout)
@@ -268,10 +275,8 @@
         # Check the molecules.
         self.assertEqual(len(data), 
len(cdp.structure.structural_data[0].mol[0].atom_name))
         self.assertEqual(len(data), 
len(cdp.structure.structural_data[0].mol[1].atom_name))
-        self.assertEqual(len(data), 
len(cdp.structure.structural_data[0].mol[2].atom_name))
         current_mol = ''
         for mol_name, res_num, res_name, atom_name, pos in 
cdp.structure.atom_loop(selection=selection, model_num=1, mol_name_flag=True, 
res_num_flag=True, res_name_flag=True, atom_name_flag=True, pos_flag=True):
-            print mol_name, res_num, res_name, atom_name, pos
             if mol_name != current_mol:
                 current_mol = mol_name
                 i = 0




Related Messages


Powered by MHonArc, Updated Wed Dec 10 14:20:02 2014