mailr19003 - in /trunk: auto_analyses/ specific_fns/ test_suite/system_tests/scripts/frame_order/


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

Header


Content

Posted by edward on March 22, 2013 - 17:35:
Author: bugman
Date: Fri Mar 22 17:35:56 2013
New Revision: 19003

URL: http://svn.gna.org/viewcvs/relax?rev=19003&view=rev
Log:
Next block of the manual merger of the frame_order_testing branch.

The commands used were:
svn merge -r18892:18893 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
svn merge -r18916:18917 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
svn merge -r18917:18918 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
svn merge -r18920:18921 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
svn merge -r18921:18922 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
svn merge -r18933:18934 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
svn merge -r18934:18935 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
svn merge -r18935:18936 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .

The console messages were:
[edau@localhost relax-trunk]$ svn merge -r18892:18893 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
--- Merging r18893 into '.':
U    specific_fns/frame_order.py
[edau@localhost relax-trunk]$ svn merge -r18916:18917 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
[edau@localhost relax-trunk]$ svn merge -r18917:18918 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
--- Merging r18918 into '.':
G    specific_fns/frame_order.py
U    auto_analyses/frame_order.py
[edau@localhost relax-trunk]$ svn merge -r18920:18921 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
--- Merging r18921 into '.':
G    specific_fns/frame_order.py
[edau@localhost relax-trunk]$ svn merge -r18921:18922 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
--- Merging r18922 into '.':
G    auto_analyses/frame_order.py
[edau@localhost relax-trunk]$ svn merge -r18933:18934 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
--- Merging r18934 into '.':
G    specific_fns/frame_order.py
[edau@localhost relax-trunk]$ svn merge -r18934:18935 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
--- Merging r18935 into '.':
U    test_suite/system_tests/scripts/frame_order/rigid_test.py
[edau@localhost relax-trunk]$ svn merge -r18935:18936 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing .
--- Merging r18936 into '.':
G    specific_fns/frame_order.py
[edau@localhost relax-trunk]$


Modified:
    trunk/auto_analyses/frame_order.py
    trunk/specific_fns/frame_order.py
    trunk/test_suite/system_tests/scripts/frame_order/rigid_test.py

Modified: trunk/auto_analyses/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/frame_order.py?rev=19003&r1=19002&r2=19003&view=diff
==============================================================================
--- trunk/auto_analyses/frame_order.py (original)
+++ trunk/auto_analyses/frame_order.py Fri Mar 22 17:35:56 2013
@@ -35,6 +35,7 @@
 from data import Relax_data_store; ds = Relax_data_store()
 from generic_fns.angles import wrap_angles
 from generic_fns.pipes import cdp_name, get_pipe
+from lib.text.sectioning import section, subsection, title
 from maths_fns.coord_transform import spherical_to_cartesian
 from prompt.interpreter import Interpreter
 from relax_errors import RelaxError
@@ -86,10 +87,7 @@
         status.exec_lock.acquire(pipe_bundle, mode='auto-analysis')
 
         # Initial printout.
-        text = "# Frame order auto-analysis #"
-        print("\n\n\n\n\n\n\n" + "#"*len(text))
-        print("%s" % text)
-        print("#"*len(text))
+        title(file=sys.stdout, text="Frame order auto-analysis", prespace=7)
 
         # Store the args.
         self.data_pipe_full = data_pipe_full
@@ -331,8 +329,8 @@
             # The model title.
             title = model[0].upper() + model[1:]
 
-            # Print out.
-            self.print_title(title)
+            # Printout.
+            section(file=sys.stdout, text="%s frame order model"%title, 
prespace=5)
 
             # The data pipe name.
             self.pipe_name_dict[model] = '%s - %s' % (title, 
self.pipe_bundle)
@@ -404,7 +402,7 @@
         title = model[0].upper() + model[1:]
 
         # Print out.
-        self.print_title(title)
+        section(file=sys.stdout, text="%s frame order model"%title, 
prespace=5)
 
         # The data pipe name.
         self.pipe_name_dict[model] = '%s - %s' % (title, self.pipe_bundle)
@@ -526,19 +524,6 @@
         sys.stdout.write("\n")
 
 
-    def print_title(self, name):
-        """Title printout for each frame order model.
-
-        @param name:    The frame order model name.
-        @type name:     str
-        """
-
-        text = "# %s frame order model #" % name
-        print("\n\n\n\n\n" + "#"*len(text))
-        print("%s" % text)
-        print("#"*len(text) + "\n")
-
-
     def read_results(self, model=None, pipe_name=None):
         """Attempt to read old results files.
 
@@ -587,6 +572,7 @@
         self.interpreter.frame_order.pdb_model(dir=self.results_dir+model, 
force=True)
 
         # Create the visualisation script.
+        subsection(file=sys.stdout, text="Creating a PyMOL visualisation 
script.")
         script = open_write_file(file_name='pymol_display.py', 
dir=self.results_dir+model, force=True)
 
         # Add a comment for the user.

Modified: trunk/specific_fns/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_fns/frame_order.py?rev=19003&r1=19002&r2=19003&view=diff
==============================================================================
--- trunk/specific_fns/frame_order.py (original)
+++ trunk/specific_fns/frame_order.py Fri Mar 22 17:35:56 2013
@@ -44,6 +44,8 @@
 from generic_fns.structure.cones import Iso_cone, Pseudo_elliptic
 from generic_fns.structure.mass import centre_of_mass
 from generic_fns.structure.internal import Internal
+from lib.structure.rotor import rotor_pdb
+from lib.text.sectioning import subsection
 from maths_fns import frame_order, order_parameters
 from maths_fns.coord_transform import spherical_to_cartesian
 from maths_fns.rotation_matrix import euler_to_R_zyz, two_vect_to_R
@@ -957,6 +959,9 @@
         @type force:    bool
         """
 
+        # Printout.
+        subsection(file=sys.stdout, text="Creating a PDB file with the 
moving domains shifted to the average position.")
+
         # Make a copy of the structural object (so as to preserve the 
original structure).
         structure = deepcopy(cdp.structure)
 
@@ -966,7 +971,11 @@
             euler_to_R_zyz(cdp.ave_pos_alpha, cdp.ave_pos_beta, 
cdp.ave_pos_gamma, R)
         else:
             euler_to_R_zyz(0.0, cdp.ave_pos_beta, cdp.ave_pos_gamma, R)
-        structure.rotate(R=R, origin=cdp.pivot, 
atom_id=self._domain_moving())
+        if cdp.ave_pos_pivot == 'com':
+            origin = centre_of_mass(atom_id=self._domain_moving(), 
verbosity=0)
+        else:
+            origin = cdp.pivot
+        structure.rotate(R=R, origin=origin, atom_id=self._domain_moving())
 
         # Then translate the moving domain.
         if not self._translation_fixed():
@@ -988,6 +997,10 @@
         @keyword force: Flag which if set to True will cause any 
pre-existing file to be overwritten.
         @type force:    bool
         """
+
+        # Printout.
+        subsection(file=sys.stdout, text="Creating a PDB file of a 
distribution of positions coving the full dynamics of the moving domain.")
+
 
 
     def _pdb_geometric_rep(self, file=None, dir=None, size=30.0, inc=36, 
force=False, neg_cone=True):
@@ -1007,6 +1020,9 @@
         @type neg_cone:         bool
         """
 
+        # Printout.
+        subsection(file=sys.stdout, text="Creating a PDB file containing a 
geometric object representing the frame order dynamics.")
+
         # Monte Carlo simulation flag.
         sim = False
         num_sim = 0
@@ -1025,8 +1041,38 @@
         if neg_cone:
             model_neg = structure.add_model(model=2)
 
+        # The rotor object.
+        if cdp.model in ['rotor', 'free rotor', 'iso cone', 'iso cone, free 
rotor', 'pseudo-ellipse']:
+            # The rotor angle.
+            if cdp.model in ['free rotor', 'iso cone, free rotor']:
+                rotor_angle = pi
+            else:
+                rotor_angle = cdp.cone_sigma_max
+
+            # Generate the rotor axis.
+            if cdp.model in ['rotor', 'free rotor', 'iso cone', 'iso cone, 
free rotor']:
+                axis = zeros(3, float64)
+                spherical_to_cartesian([1.0, cdp.axis_theta, cdp.axis_phi], 
axis)
+            else:
+                axes = zeros((3, 3), float64)
+                euler_to_R_zyz(cdp.eigen_alpha, cdp.eigen_beta, 
cdp.eigen_gamma, axes)
+                axis = axes[:,2]
+
+            # Get the CoM of the entire molecule to use as the centre of the 
rotor.
+            com = centre_of_mass(verbosity=0)
+
+            # Add the rotor object to the structure as a new molecule.
+            rotor_pdb(structure=structure, rotor_angle=rotor_angle, 
axis=axis, axis_pt=cdp.pivot, centre=com, span=2e-9, blade_length=5e-10, 
staggered=False)
+
+        # FIXME:  Temporary write out and exit.
+        print("\nGenerating the PDB file.")
+        pdb_file = open_write_file(file, dir, force=force)
+        structure.write_pdb(pdb_file)
+        pdb_file.close()
+        return
+
         # Create the molecule.
-        structure.add_molecule(name=cdp.model)
+        structure.add_molecule(name='rest')
 
         # Alias the molecules.
         mol = model.mol[0]

Modified: trunk/test_suite/system_tests/scripts/frame_order/rigid_test.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/frame_order/rigid_test.py?rev=19003&r1=19002&r2=19003&view=diff
==============================================================================
--- trunk/test_suite/system_tests/scripts/frame_order/rigid_test.py (original)
+++ trunk/test_suite/system_tests/scripts/frame_order/rigid_test.py Fri Mar 
22 17:35:56 2013
@@ -121,9 +121,6 @@
 # Set the reference domain.
 self._execute_uf(uf_name='frame_order.ref_domain', ref='fixed')
 
-# Link the domains to the PDB files.
-self._execute_uf(uf_name='frame_order.domain_to_pdb', domain='fixed', 
pdb='displaced.pdb')
-
 # Set up the mechanics of the displacement to the average domain position.
 self._execute_uf(uf_name='frame_order.average_position', pivot='com', 
translation=True)
 




Related Messages


Powered by MHonArc, Updated Fri Mar 22 18:00:02 2013