mailr13381 - /branches/gui_testing/prompt/structure.py


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

Header


Content

Posted by edward on July 01, 2011 - 17:32:
Author: bugman
Date: Fri Jul  1 17:32:45 2011
New Revision: 13381

URL: http://svn.gna.org/viewcvs/relax?rev=13381&view=rev
Log:
The structure.load_spins() user function now uses _build_doc().


Modified:
    branches/gui_testing/prompt/structure.py

Modified: branches/gui_testing/prompt/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/prompt/structure.py?rev=13381&r1=13380&r2=13381&view=diff
==============================================================================
--- branches/gui_testing/prompt/structure.py (original)
+++ branches/gui_testing/prompt/structure.py Fri Jul  1 17:32:45 2011
@@ -273,37 +273,36 @@
 
 
     def load_spins(self, spin_id=None, combine_models=True, ave_pos=True):
-        """Load spins from the structure into the relax data store.
-
-        Keyword Arguments
-        ~~~~~~~~~~~~~~~~~
-
-        spin_id:  The spin identification string.
-
-        combine_models:  A flag which specifies if spins from separate 
models should be combined.
-
-        ave_pos:  A flag specifying if the position of the atom is to be 
averaged across models.
-
-
-        Description
-        ~~~~~~~~~~~
-
-        This function allows a sequence to be generated within the relax 
data store using the atomic
-        information from the structure already associated with this data 
pipe.  The spin_id string
-        is used to select which molecules, which residues, and which atoms 
will be recognised as
-        spin systems within relax.  If spin_id is left as None, then all 
molecules, residues, and
-        atoms will be placed within the data store.
-
-        If the combine_models flag is True, then the spins from only a 
single structure from the
-        ensemble of models will be taken.  If False, then spins will be 
loaded for each model.
-
-        If the ave_pos flag is True, the average position of all models will 
be loaded into the spin
-        container.  If False, then the positions from all models will be 
loaded.
-
-
-        Example
-        ~~~~~~~
-
+        # Function intro text.
+        if self._exec_info.intro:
+            text = self._exec_info.ps3 + "structure.load_spins("
+            text = text + "spin_id=" + repr(spin_id)
+            text = text + ", combine_models=" + repr(combine_models)
+            text = text + ", ave_pos=" + repr(ave_pos) + ")"
+            print(text)
+
+        # The argument checks.
+        arg_check.is_str(spin_id, 'spin identification string', 
can_be_none=True)
+        arg_check.is_bool(combine_models, 'model combining flag')
+        arg_check.is_bool(ave_pos, 'average position flag')
+
+        # Execute the functional code.
+        generic_fns.structure.main.load_spins(spin_id=spin_id, 
combine_models=combine_models, ave_pos=ave_pos)
+
+    # The function doc info.
+    load_spins._doc_title = "Load spins from the structure into the relax 
data store."
+    load_spins._doc_args = [
+        ["spin_id", "The spin identification string."],
+        ["combine_models", "A flag which specifies if spins from separate 
models should be combined."],
+        ["ave_pos", "A flag specifying if the position of the atom is to be 
averaged across models."]]
+    load_spins._doc_desc = """
+        This function allows a sequence to be generated within the relax 
data store using the atomic information from the structure already associated 
with this data pipe.  The spin_id string is used to select which molecules, 
which residues, and which atoms will be recognised as spin systems within 
relax.  If spin_id is left as None, then all molecules, residues, and atoms 
will be placed within the data store.
+
+        If the combine_models flag is True, then the spins from only a 
single structure from the ensemble of models will be taken.  If False, then 
spins will be loaded for each model.
+
+        If the ave_pos flag is True, the average position of all models will 
be loaded into the spin container.  If False, then the positions from all 
models will be loaded.
+        """
+    load_spins._doc_examples = """
         For a model-free backbone amide nitrogen analysis, to load just the 
backbone N sequence from
         the file '1F3Y.pdb' (which is a single protein), type the following 
two user functions:
 
@@ -330,22 +329,7 @@
         relax> for id in [":A@C8", ":A@C2", ":G@C8", ":G@N1", ":C@C5", 
":C@C6", ":U@N3", ":U@C5", ":U@C6"]:
         relax>     structure.load_spins(spin_id=id)
         """
-
-        # Function intro text.
-        if self._exec_info.intro:
-            text = self._exec_info.ps3 + "structure.load_spins("
-            text = text + "spin_id=" + repr(spin_id)
-            text = text + ", combine_models=" + repr(combine_models)
-            text = text + ", ave_pos=" + repr(ave_pos) + ")"
-            print(text)
-
-        # The argument checks.
-        arg_check.is_str(spin_id, 'spin identification string', 
can_be_none=True)
-        arg_check.is_bool(combine_models, 'model combining flag')
-        arg_check.is_bool(ave_pos, 'average position flag')
-
-        # Execute the functional code.
-        generic_fns.structure.main.load_spins(spin_id=spin_id, 
combine_models=combine_models, ave_pos=ave_pos)
+    _build_doc(load_spins)
 
 
     def read_pdb(self, file=None, dir=None, read_mol=None, 
set_mol_name=None, read_model=None, set_model_num=None, parser='internal'):




Related Messages


Powered by MHonArc, Updated Fri Jul 01 18:00:02 2011