mailr9840 - in /branches/bmrb: data/exp_info.py generic_fns/exp_info.py prompt/bmrb.py


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

Header


Content

Posted by edward on October 29, 2009 - 11:59:
Author: bugman
Date: Thu Oct 29 11:59:17 2009
New Revision: 9840

URL: http://svn.gna.org/viewcvs/relax?rev=9840&view=rev
Log:
Created the bmrb.thiol_state() user function.


Modified:
    branches/bmrb/data/exp_info.py
    branches/bmrb/generic_fns/exp_info.py
    branches/bmrb/prompt/bmrb.py

Modified: branches/bmrb/data/exp_info.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/data/exp_info.py?rev=9840&r1=9839&r2=9840&view=diff
==============================================================================
--- branches/bmrb/data/exp_info.py (original)
+++ branches/bmrb/data/exp_info.py Thu Oct 29 11:59:17 2009
@@ -306,3 +306,18 @@
 
         # Append the container.
         self.temp_control.append(temp_control)
+
+
+    def setup_thiol(self, state):
+        """Set up the thiol state of the system.
+
+        @param thiol_state:     The thiol state of the molecule.
+        @type thiol_state:      str
+        """
+
+        # Check.
+        if hasattr(self, "thiol_state"):
+            raise RelaxError("The thiol state has already been specified")
+
+        # Set the attribute.
+        self.thiol_state = state

Modified: branches/bmrb/generic_fns/exp_info.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/exp_info.py?rev=9840&r1=9839&r2=9840&view=diff
==============================================================================
--- branches/bmrb/generic_fns/exp_info.py (original)
+++ branches/bmrb/generic_fns/exp_info.py Thu Oct 29 11:59:17 2009
@@ -259,3 +259,18 @@
 
         # Add the software info.
         cdp.exp_info.software_setup(name=SPARKY_NAME, version=version, 
vendor_name=SPARKY_AUTHORS, url=SPARKY_URL, cite_ids=['sparky_ref'], 
tasks=SPARKY_TASKS)
+
+
+def thiol_state(state=None):
+    """Set the thiol state of the system.
+
+    @keyword state:         The thiol state of the molecule.
+    @type state:            str
+    """
+
+    # Set up the experimental info data container, if needed.
+    if not hasattr(cdp, 'exp_info'):
+        cdp.exp_info = ExpInfo()
+
+    # Place the data in the container.
+    cdp.exp_info.setup_thiol(state=state)

Modified: branches/bmrb/prompt/bmrb.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/prompt/bmrb.py?rev=9840&r1=9839&r2=9840&view=diff
==============================================================================
--- branches/bmrb/prompt/bmrb.py (original)
+++ branches/bmrb/prompt/bmrb.py Thu Oct 29 11:59:17 2009
@@ -335,6 +335,57 @@
         exp_info.software_select(name=name, version=version)
 
 
+    def thiol_state(self, state='reduced'):
+        """Select the thiol state of the system.
+
+        Keyword Arguments
+        ~~~~~~~~~~~~~~~~~
+
+        state:  The thiol state.
+
+
+        Description
+        ~~~~~~~~~~~
+
+        The thiol state can be any text, thought the BMRB suggests the 
following:
+
+            'all disulfide bound',
+            'all free',
+            'all other bound',
+            'disulfide and other bound',
+            'free and disulfide bound',
+            'free and other bound',
+            'free disulfide and other bound',
+            'not available',
+            'not present',
+            'not reported',
+            'unknown'.
+
+        Alternatively the pure states 'reduced' or 'oxidised' could be 
specified.
+
+
+        Examples
+        ~~~~~~~~
+
+        For BMRB deposition, to say that the protein studied is in the 
oxidised state, tyype one of:
+
+        relax> bmrb.thiol_state('oxidised')
+        relax> bmrb.thiol_state(state='oxidised')
+        """
+
+        # Function intro text.
+        if self.__relax__.interpreter.intro:
+            text = sys.ps3 + "bmrb.thiol_state("
+            text = text + "state=" + repr(state) + ")"
+            print(text)
+
+        # The argument checks.
+        check.is_str(state, 'thiol state')
+
+        # Execute the functional code.
+        exp_info.thiol_state(state=state)
+
+
     def write(self, file=None, dir='pipe_name', version='3.1', force=False):
         """Write the results to a BMRB NMR-STAR formatted file.
 




Related Messages


Powered by MHonArc, Updated Thu Oct 29 13:20:03 2009