Author: bugman Date: Thu Dec 11 19:01:54 2014 New Revision: 27099 URL: http://svn.gna.org/viewcvs/relax?rev=27099&view=rev Log: Modified the Structure.test_superimpose_fit_to_mean system test. This is also to demonstrate a bug, this time in the structure.superimpose user function, in which the algorithm causes a translation and rotation of all atoms rather than just those selected by the atom_id argument. 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=27099&r1=27098&r2=27099&view=diff ============================================================================== --- trunk/test_suite/system_tests/structure.py (original) +++ trunk/test_suite/system_tests/structure.py Thu Dec 11 19:01:54 2014 @@ -4331,6 +4331,9 @@ self.interpreter.structure.read_pdb('1J7P_1st_NH.pdb', dir=path, set_model_num=1, set_mol_name='CaM') self.interpreter.structure.read_pdb('1J7P_1st_NH_rot.pdb', dir=path, set_model_num=2, set_mol_name='CaM') + # Add an atom that should not be superimposed. + 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], [2.0, 3.0, 4.0]], element='Ti', pdb_record='HETATM') + # Superimpose the backbone heavy atoms. self.interpreter.structure.superimpose(method='fit to mean', atom_id='@N,C,CA,O') @@ -4341,6 +4344,11 @@ self.assertAlmostEqual(model1.x[i], model2.x[i], 2) self.assertAlmostEqual(model1.y[i], model2.y[i], 2) self.assertAlmostEqual(model1.z[i], model2.z[i], 2) + + # The last atom must be different. + self.assertNotAlmostEqual(model1.x[-1], model2.x[-1], 2) + self.assertNotAlmostEqual(model1.y[-1], model2.y[-1], 2) + self.assertNotAlmostEqual(model1.z[-1], model2.z[-1], 2) def test_superimpose_fit_to_mean2(self):