mailr27407 - in /trunk/test_suite/system_tests: scripts/n_state_model/structure_align.py structure.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on January 31, 2015 - 10:03:
Author: bugman
Date: Sat Jan 31 10:03:50 2015
New Revision: 27407

URL: http://svn.gna.org/viewcvs/relax?rev=27407&view=rev
Log:
Updated the Structure system tests for the structure.align and 
structure.superimpose user function merger.


Modified:
    trunk/test_suite/system_tests/scripts/n_state_model/structure_align.py
    trunk/test_suite/system_tests/structure.py

Modified: 
trunk/test_suite/system_tests/scripts/n_state_model/structure_align.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/n_state_model/structure_align.py?rev=27407&r1=27406&r2=27407&view=diff
==============================================================================
--- trunk/test_suite/system_tests/scripts/n_state_model/structure_align.py    
  (original)
+++ trunk/test_suite/system_tests/scripts/n_state_model/structure_align.py    
  Sat Jan 31 10:03:50 2015
@@ -16,11 +16,13 @@
     # Load the structure.
     structure.read_pdb('%s.pdb' % code, dir=status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'structures')
 
-# First align the N-domains - aligning 1OSA onto 1J70 to act as a scaffold.
-structure.align(pipes=['1J7O', '1OSA'], atom_id='@N,C,CA,O', method='fit to 
first', matrix='BLOSUM62', gap_open_penalty=10.0, gap_extend_penalty=1.0, 
end_gap_open_penalty=0.0, end_gap_extend_penalty=0.0)
+# First align then superimpose the N-domains - aligning 1OSA onto 1J70 to 
act as a scaffold.
+structure.sequence_alignment(pipes=['1J7O', '1OSA'], matrix='BLOSUM62', 
gap_open_penalty=10.0, gap_extend_penalty=1.0, end_gap_open_penalty=0.0, 
end_gap_extend_penalty=0.0)
+structure.superimpose(pipes=['1J7O', '1OSA'], atom_id='@N,C,CA,O', 
method='fit to first')
 
-# Then align the C-domains - aligning 1J7P onto the 1OSA scaffold.
-structure.align(pipes=['1OSA', '1J7P'], atom_id='@N,C,CA,O', method='fit to 
first', matrix='BLOSUM62', gap_open_penalty=10.0, gap_extend_penalty=1.0, 
end_gap_open_penalty=0.0, end_gap_extend_penalty=0.0)
+# Then align then superimpose the C-domains - aligning 1J7P onto the 1OSA 
scaffold.
+structure.sequence_alignment(pipes=['1OSA', '1J7P'], matrix='BLOSUM62', 
gap_open_penalty=10.0, gap_extend_penalty=1.0, end_gap_open_penalty=0.0, 
end_gap_extend_penalty=0.0)
+structure.superimpose(pipes=['1OSA', '1J7P'], atom_id='@N,C,CA,O', 
method='fit to first')
 
 # Write out the result.
 structure.write_pdb('devnull', force=True)

Modified: trunk/test_suite/system_tests/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/structure.py?rev=27407&r1=27406&r2=27407&view=diff
==============================================================================
--- trunk/test_suite/system_tests/structure.py  (original)
+++ trunk/test_suite/system_tests/structure.py  Sat Jan 31 10:03:50 2015
@@ -64,7 +64,7 @@
 
 
     def test_align(self):
-        """Test the U{structure.align user 
function<http://www.nmr-relax.com/manual/structure_align.html>}."""
+        """Test the U{structure.superimpose user 
function<http://www.nmr-relax.com/manual/structure_superimpose.html>}."""
 
         # Reset relax.
         self.interpreter.reset()
@@ -107,7 +107,7 @@
         self.interpreter.structure.add_atom(mol_name='uniform_mol1', 
atom_name='Ti', res_name='TST', res_num=1, pos=[[1.0, 2.0, 3.0], [1.0, 2.0, 
3.0]], element='Ti', pdb_record='HETATM')
 
         # The alignment.
-        self.interpreter.structure.align(pipes=['ref', 'align'], method='fit 
to first', atom_id='@N,H', displace_id='@N,H')
+        self.interpreter.structure.superimpose(pipes=['ref', 'align'], 
method='fit to first', atom_id='@N,H', displace_id='@N,H')
 
         # Output PDB to stdout to help in debugging.
         self.interpreter.structure.write_pdb(file=sys.stdout)
@@ -213,7 +213,7 @@
 
 
     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."""
+        """Test the U{structure.superimpose user 
function<http://www.nmr-relax.com/manual/structure_superimpose.html>} for 
aligning different molecules in one pipe."""
 
         # Reset relax.
         self.interpreter.reset()
@@ -257,7 +257,7 @@
         self.interpreter.structure.add_atom(mol_name='2', atom_name='Ti', 
res_name='TST', res_num=1, pos=[1.0, 2.0, 3.0], element='Ti', 
pdb_record='HETATM')
 
         # The alignment.
-        self.interpreter.structure.align(pipes=['ref', 'align'], 
molecules=[['ref'], ['1', '2']], method='fit to first', atom_id='@N,H', 
displace_id='@N,H')
+        self.interpreter.structure.superimpose(pipes=['ref', 'align'], 
molecules=[['ref'], ['1', '2']], method='fit to first', atom_id='@N,H', 
displace_id='@N,H')
 
         # Output PDB to stdout to help in debugging.
         self.interpreter.structure.write_pdb(file=sys.stdout)
@@ -349,7 +349,7 @@
 
 
     def test_align_molecules2(self):
-        """Test of the structure.align user function, fitting to the mean 
structure."""
+        """Test of the structure.superimpose user function, fitting to the 
mean structure."""
 
         # Path of the structure file.
         path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'frame_order'+sep+'cam'
@@ -363,7 +363,7 @@
         self.interpreter.structure.add_atom(mol_name='CaM B', 
atom_name='Ti', res_name='TST', res_num=1, pos=[2.0, 3.0, 4.0], element='Ti', 
pdb_record='HETATM')
 
         # Superimpose the backbone heavy atoms.
-        self.interpreter.structure.align(method='fit to mean', 
atom_id='@N,C,CA,O', displace_id=':82-5000')
+        self.interpreter.structure.superimpose(method='fit to mean', 
atom_id='@N,C,CA,O', displace_id=':82-5000')
 
         # Check that the two structures now have the same atomic coordinates.
         mol1 = cdp.structure.structural_data[0].mol[0]
@@ -382,7 +382,7 @@
 
 
     def test_align_molecules_end_truncation(self):
-        """Test of the structure.align user function, fitting to the mean 
structure."""
+        """Test of the structure.superimpose user function, fitting to the 
mean structure."""
 
         # Path of the structure file.
         path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'structures'
@@ -403,7 +403,7 @@
         self.interpreter.pipe.copy('mf', 'comp')
 
         # Superimpose the backbone heavy atoms.
-        self.interpreter.structure.align(method='fit to mean', 
atom_id='@N,C,CA,O')
+        self.interpreter.structure.superimpose(method='fit to mean', 
atom_id='@N,C,CA,O')
 
         # Check that nothing has moved.
         for mol_index in range(3):
@@ -776,7 +776,7 @@
         self.interpreter.structure.superimpose(method='fit to first', 
centre_type='CoM')
 
         # Align.
-        self.interpreter.structure.align(method='fit to first', 
centre_type='CoM')
+        self.interpreter.structure.superimpose(method='fit to first', 
centre_type='CoM')
 
 
     def test_bug_22860_CoM_after_deletion(self):
@@ -4789,7 +4789,7 @@
         self.interpreter.structure.translate([20.0, 0.0, 0.0], model=3)
 
         # Superimpose the backbone heavy atoms.
-        self.interpreter.structure.superimpose(models=[2, 3], method='fit to 
mean', atom_id='@N,C,CA,O')
+        self.interpreter.structure.superimpose(models=[[2, 3]], method='fit 
to mean', atom_id='@N,C,CA,O')
 
         # Check that the two structures now have the same atomic coordinates 
as the original, but shifted 10 Angstrom in x.
         model1 = cdp.structure.structural_data[0].mol[0]




Related Messages


Powered by MHonArc, Updated Sat Jan 31 10:20:02 2015