Author: bugman Date: Tue Jan 21 11:43:21 2014 New Revision: 22039 URL: http://svn.gna.org/viewcvs/relax?rev=22039&view=rev Log: Reintroduced the distribution PDB file creation to the frame order test data generation script. This is the generate_base.py script in the test_suite/shared_data/frame_order/cam directory. The ability to create the distribution.pdb file was long lost in this script, and can now be activated using the DIST_PDB class variable. Modified: branches/double_rotor/test_suite/shared_data/frame_order/cam/generate_base.py Modified: branches/double_rotor/test_suite/shared_data/frame_order/cam/generate_base.py URL: http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/shared_data/frame_order/cam/generate_base.py?rev=22039&r1=22038&r2=22039&view=diff ============================================================================== --- branches/double_rotor/test_suite/shared_data/frame_order/cam/generate_base.py (original) +++ branches/double_rotor/test_suite/shared_data/frame_order/cam/generate_base.py Tue Jan 21 11:43:21 2014 @@ -47,6 +47,9 @@ PIVOT = array([ 37.254, 0.5, 16.7465]) COM = array([ 26.83678091, -12.37906417, 28.34154128]) + # The PDB distribution flag. + DIST_PDB = False + def run(self, save_path=None): """Generate the distribution and alignment data. @@ -177,9 +180,14 @@ sys.stdout.write("\n\nRotating %s states:\n\n" % self.N) # Load N copies of the original C-domain. + self.interpreter.off() for i in range(self.N): # Print out. self._progress(i) + + # Load the structure for the PDB distribution. + if self.DIST_PDB: + self.interpreter.structure.read_pdb('1J7P_1st_NH.pdb', dir=self.path, set_mol_name='C-dom', set_model_num=i+1) # Generate the distribution specific rotation. self.rotation(i) @@ -201,6 +209,10 @@ # The frame order matrix component. self.daeg += kron_prod(self.R, self.R) + # Rotate the structure for the PDB distribution. + if self.DIST_PDB: + self.interpreter.structure.rotate(R=self.R, origin=self.PIVOT, model=i+1) + # Print out. sys.stdout.write('\n\n') @@ -210,6 +222,11 @@ # Write out the frame order matrix. file = open(self.save_path+sep+'frame_order_matrix', 'w') print_frame_order_2nd_degree(self.daeg, file=file) + + # Write out the PDB distribution. + self.interpreter.on() + if self.DIST_PDB: + self.interpreter.structure.write_pdb('distribution.pdb', compress_type=2, force=True) def _print_axis_system(self):