mailr14909 - /1.3/prompt/structure.py


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

Header


Content

Posted by edward on October 25, 2011 - 11:02:
Author: bugman
Date: Tue Oct 25 11:02:49 2011
New Revision: 14909

URL: http://svn.gna.org/viewcvs/relax?rev=14909&view=rev
Log:
Created the front end for the new structure.displacement user function.

This is used to calculate the rotational and translational displacement 
between two models.


Modified:
    1.3/prompt/structure.py

Modified: 1.3/prompt/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/structure.py?rev=14909&r1=14908&r2=14909&view=diff
==============================================================================
--- 1.3/prompt/structure.py (original)
+++ 1.3/prompt/structure.py Tue Oct 25 11:02:49 2011
@@ -195,6 +195,56 @@
     _build_doc(delete)
 
 
+    def displacement(self, model_from=None, model_to=None):
+        # Function intro text.
+        if self._exec_info.intro:
+            text = self._exec_info.ps3 + "structure.displacement("
+            text = text + "model_from=" + repr(model_from)
+            text = text + ", model_to=" + repr(model_to) + ")"
+            print(text)
+
+        # The argument checks.
+        arg_check.is_int(model_from, 'model from', can_be_none=True)
+        arg_check.is_int(model_to, 'model to', can_be_none=True)
+
+        # Execute the functional code.
+        generic_fns.structure.main.displacement(model_from=model_from, 
model_to=model_to)
+
+    # The function doc info.
+    displacement._doc_title = "Determine the rotational and translational 
displacement between a set of models."
+    displacement._doc_title_short = "Rotational and translational 
displacement."
+    displacement._doc_args = [
+        ["model_from", "The optional model number for the starting position 
of the displacement."],
+        ["model_to", "The optional model number for the ending position of 
the displacement."]
+    ]
+    displacement._doc_desc = """
+        This user function allows the rotational and translational 
displacement between two models of the same structure to be calculated.  The 
information will be printed out in various formats and held in the relax data 
store.  This is directional, so there is a starting and ending position for 
each displacement.  If the starting and ending models are not specified, then 
the displacements in all directions between all models will be calculated.
+        """
+    displacement._doc_examples = """
+        To determine the rotational and translational displacements between 
all sets of models, type:
+
+        relax> structure.displacement()
+
+
+        To determine the displacement from model 5 to all other models, type:
+
+        relax> structure.displacement(model_from=5)
+
+
+        To determine the displacement of all models to model 5, type:
+
+        relax> structure.displacement(model_to=5)
+
+
+
+        To determine the displacement of model 2 to model 3, type one of:
+
+        relax> structure.displacement(2, 3)
+        relax> structure.displacement(model_from=2, model_to=3)
+         """
+    _build_doc(displacement)
+
+
     def load_spins(self, spin_id=None, ave_pos=True):
         # Function intro text.
         if self._exec_info.intro:




Related Messages


Powered by MHonArc, Updated Tue Oct 25 11:20:02 2011