mailr13477 - /branches/gui_testing/prompt/molecule.py


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

Header


Content

Posted by edward on July 07, 2011 - 11:17:
Author: bugman
Date: Thu Jul  7 11:17:40 2011
New Revision: 13477

URL: http://svn.gna.org/viewcvs/relax?rev=13477&view=rev
Log:
The ALLOWED_MOL_TYPES list is now used for all the molecule docstrings.

This allows this list to change, and all documentation will be up to date.


Modified:
    branches/gui_testing/prompt/molecule.py

Modified: branches/gui_testing/prompt/molecule.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/prompt/molecule.py?rev=13477&r1=13476&r2=13477&view=diff
==============================================================================
--- branches/gui_testing/prompt/molecule.py (original)
+++ branches/gui_testing/prompt/molecule.py Thu Jul  7 11:17:40 2011
@@ -101,8 +101,10 @@
         ["mol_name", "The name of the molecule."],
         ["type", "The type of molecule."]]
     create._doc_desc = """
-        This adds a new molecule data container to the relax data storage 
object.  The same molecule name cannot be used more than once.  The molecule 
type need not be specified.  However if it given, it should be one of 
'protein', 'RNA', 'DNA', 'organic molecule', 'inorganic molecule', 'other'.
-        """
+        This adds a new molecule data container to the relax data storage 
object.  The same molecule name cannot be used more than once.  The molecule 
type need not be specified.  However if it given, it should be one of"""
+    for i in range(len(ALLOWED_MOL_TYPES)):
+        create._doc_desc = "%s '%s'," % (create._doc_desc, 
ALLOWED_MOL_TYPES[i]) 
+    create._doc_desc = "%s or '%s'." % (create._doc_desc, 
ALLOWED_MOL_TYPES[-1]) 
     create._doc_examples = """
         To create the molecules 'Ap4Aase', 'ATP', and 'MgF4', type:
 
@@ -225,8 +227,9 @@
         This allows the type of the molecule to be specified.  It can be one 
of:
 
         """
-    for name in ALLOWED_MOL_TYPES:
-        type._doc_desc = "%s            '%s'\n" % (type._doc_desc, name) 
+    for i in range(len(ALLOWED_MOL_TYPES)):
+        type._doc_desc = "%s            '%s',\n" % (type._doc_desc, 
ALLOWED_MOL_TYPES[i]) 
+    type._doc_desc = "%s            '%s'.\n" % (type._doc_desc, 
ALLOWED_MOL_TYPES[-1]) 
     type._doc_examples = """
         To set the molecule 'Ap4Aase' to the 'protein' type, type one of:
 




Related Messages


Powered by MHonArc, Updated Thu Jul 07 11:40:02 2011