mailr12536 - in /branches/bruker_import/prompt: __init__.py interpreter.py pdc.py


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

Header


Content

Posted by edward on February 17, 2011 - 16:22:
Author: bugman
Date: Thu Feb 17 16:22:15 2011
New Revision: 12536

URL: http://svn.gna.org/viewcvs/relax?rev=12536&view=rev
Log:
Created the prompt/script interface to the pdc.read() user function.


Added:
    branches/bruker_import/prompt/pdc.py
Modified:
    branches/bruker_import/prompt/__init__.py
    branches/bruker_import/prompt/interpreter.py

Modified: branches/bruker_import/prompt/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bruker_import/prompt/__init__.py?rev=12536&r1=12535&r2=12536&view=diff
==============================================================================
--- branches/bruker_import/prompt/__init__.py (original)
+++ branches/bruker_import/prompt/__init__.py Thu Feb 17 16:22:15 2011
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2003-2005, 2009-2010 Edward d'Auvergne                       
 #
+# Copyright (C) 2003-2005, 2009-2011 Edward d'Auvergne                       
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -51,6 +51,7 @@
            'palmer',
            'paramag',
            'pcs',
+           'pdc',
            'pipe',
            'pymol_control',
            'rdc',

Modified: branches/bruker_import/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bruker_import/prompt/interpreter.py?rev=12536&r1=12535&r2=12536&view=diff
==============================================================================
--- branches/bruker_import/prompt/interpreter.py (original)
+++ branches/bruker_import/prompt/interpreter.py Thu Feb 17 16:22:15 2011
@@ -82,6 +82,7 @@
 from structure import Structure
 from paramag import Paramag
 from pcs import PCS
+from pdc import Pdc
 from pymol_control import Pymol
 from rdc import RDC
 from relax_data import Relax_data
@@ -203,6 +204,7 @@
         objects['palmer'] = Palmer(self._exec_info)
         objects['paramag'] = Paramag(self._exec_info)
         objects['pcs'] = PCS(self._exec_info)
+        objects['pdc'] = Pdc(self._exec_info)
         objects['pymol'] = Pymol(self._exec_info)
         objects['rdc'] = RDC(self._exec_info)
         objects['relax_data'] = Relax_data(self._exec_info)

Added: branches/bruker_import/prompt/pdc.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bruker_import/prompt/pdc.py?rev=12536&view=auto
==============================================================================
--- branches/bruker_import/prompt/pdc.py (added)
+++ branches/bruker_import/prompt/pdc.py Thu Feb 17 16:22:15 2011
@@ -1,0 +1,66 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2011 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# This file is part of the program relax.                                    
 #
+#                                                                            
 #
+# relax is free software; you can redistribute it and/or modify              
 #
+# it under the terms of the GNU General Public License as published by       
 #
+# the Free Software Foundation; either version 2 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# relax is distributed in the hope that it will be useful,                   
 #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of             
 #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              
 #
+# GNU General Public License for more details.                               
 #
+#                                                                            
 #
+# You should have received a copy of the GNU General Public License          
 #
+# along with relax; if not, write to the Free Software                       
 #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
 #
+#                                                                            
 #
+###############################################################################
+
+# Module docstring.
+"""Module containing the Bruker Protein Dynamics Centre user function 
class."""
+__docformat__ = 'plaintext'
+
+# relax module imports.
+import arg_check
+from base_class import User_fn_class
+from generic_fns import pdc
+
+
+class Pdc(User_fn_class):
+    """Class containing the function for reading the Bruker Protein Dynamics 
Centre (PDC) files."""
+
+    def read(self, file=None, dir=None):
+        """Read the Bruker Protein Dynamics Centre (PDC) file.
+
+        Keyword Arguments
+        ~~~~~~~~~~~~~~~~~
+
+        file:  The name of the PDC file.
+
+        dir:  The directory where the file is located.
+
+
+        Description
+        ~~~~~~~~~~~
+
+        This user function is used to load all of the data out of a Bruker 
PDC file for subsequent
+        analysis within relax.
+        """
+
+        # Function intro text.
+        if self._exec_info.intro:
+            text = self._exec_info.ps3 + "pdc.read("
+            text = text + "file=" + repr(file)
+            text = text + ", dir=" + repr(dir) + ")"
+            print(text)
+
+        # The argument checks.
+        arg_check.is_str(file, 'file name')
+        arg_check.is_str(dir, 'directory name', can_be_none=True)
+
+        # Execute the functional code.
+        pdc.read(file=file, dir=dir)




Related Messages


Powered by MHonArc, Updated Thu Feb 17 16:40:01 2011