Package prompt :: Module bruker
[hide private]
[frames] | no frames]

Source Code for Module prompt.bruker

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2011-2012 Edward d'Auvergne                                   # 
 4  #                                                                             # 
 5  # This file is part of the program relax.                                     # 
 6  #                                                                             # 
 7  # relax is free software; you can redistribute it and/or modify               # 
 8  # it under the terms of the GNU General Public License as published by        # 
 9  # the Free Software Foundation; either version 2 of the License, or           # 
10  # (at your option) any later version.                                         # 
11  #                                                                             # 
12  # relax is distributed in the hope that it will be useful,                    # 
13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
15  # GNU General Public License for more details.                                # 
16  #                                                                             # 
17  # You should have received a copy of the GNU General Public License           # 
18  # along with relax; if not, write to the Free Software                        # 
19  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   # 
20  #                                                                             # 
21  ############################################################################### 
22   
23  # Module docstring. 
24  """Module containing the Bruker Dynamics Center user function class.""" 
25  __docformat__ = 'plaintext' 
26   
27  # relax module imports. 
28  import arg_check 
29  from base_class import User_fn_class, _build_doc 
30  from generic_fns import bruker 
31   
32   
33 -class Bruker(User_fn_class):
34 """Class containing the function for reading the Bruker Dynamics Center (DC) files.""" 35
36 - def read(self, ri_id=None, file=None, dir=None):
37 # Function intro text. 38 if self._exec_info.intro: 39 text = self._exec_info.ps3 + "bruker.read(" 40 text = text + "ri_id=" + repr(ri_id) 41 text = text + ", file=" + repr(file) 42 text = text + ", dir=" + repr(dir) + ")" 43 print(text) 44 45 # The argument checks. 46 arg_check.is_str(ri_id, 'relaxation data ID string') 47 arg_check.is_str(file, 'file name') 48 arg_check.is_str(dir, 'directory name', can_be_none=True) 49 50 # Execute the functional code. 51 bruker.read(ri_id=ri_id, file=file, dir=dir)
52 53 # The function doc info. 54 read._doc_title = "Read a Bruker Dynamics Center (DC) relaxation data file." 55 read._doc_title_short = "Read a Bruker Dynamics Center file." 56 read._doc_args = [ 57 ["ri_id", "The relaxation data ID string. This must be a unique identifier."], 58 ["file", "The name of the Bruker Dynamics Center file containing the relaxation data."], 59 ["dir", "The directory where the file is located."], 60 ] 61 read._doc_desc = """ 62 This user function is used to load all of the data out of a Bruker Dynamics Center (DC) relaxation data file for subsequent analysis within relax. Currently the R1 and R2 relaxation rates and steady-state NOE data is supported. 63 """ 64 _build_doc(read)
65