Package user_functions
[hide private]
[frames] | no frames]

Source Code for Package user_functions

  1  ############################################################################### 
  2  #                                                                             # 
  3  # Copyright (C) 2012-2014 Edward d'Auvergne                                   # 
  4  #                                                                             # 
  5  # This file is part of the program relax (http://www.nmr-relax.com).          # 
  6  #                                                                             # 
  7  # This program 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 3 of the License, or           # 
 10  # (at your option) any later version.                                         # 
 11  #                                                                             # 
 12  # This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.       # 
 19  #                                                                             # 
 20  ############################################################################### 
 21   
 22  # Package docstring. 
 23  """Package containing all of the user function details. 
 24   
 25  This package contains all information and details about user functions, from documentation to icons to be used in the GUI.  This package contains a special data structure which will be used by the different UIs to automatically generate their interfaces to the user functions. 
 26  """ 
 27   
 28  # The __all__ package list (main modules). 
 29  __all__ = [ 
 30      'data', 
 31      'objects' 
 32  ] 
 33   
 34  # The __all__ package list (user function modules). 
 35  __all__ += [ 
 36      'align_tensor', 
 37      'angles', 
 38      'bmrb', 
 39      'bruker', 
 40      'chemical_shift', 
 41      'consistency_tests', 
 42      'dasha', 
 43      'deselect', 
 44      'diffusion_tensor', 
 45      'domain', 
 46      'dx', 
 47      'eliminate', 
 48      'error_analysis', 
 49      'fix', 
 50      'frame_order', 
 51      'grace', 
 52      'interatom', 
 53      'j_coupling', 
 54      'jw_mapping', 
 55      'minimisation', 
 56      'model_free', 
 57      'model_selection', 
 58      'molecule', 
 59      'molmol', 
 60      'monte_carlo', 
 61      'n_state_model', 
 62      'noe', 
 63      'palmer', 
 64      'paramag', 
 65      'pcs', 
 66      'pipe', 
 67      'pymol_control', 
 68      'rdc', 
 69      'relax_data', 
 70      'relax_disp', 
 71      'relax_fit', 
 72      'residue', 
 73      'reset', 
 74      'results', 
 75      'script', 
 76      'select', 
 77      'sequence', 
 78      'spectrometer', 
 79      'spectrum', 
 80      'spin', 
 81      'state', 
 82      'statistics', 
 83      'structure', 
 84      'sys_info', 
 85      'wildcards', 
 86      'value', 
 87      'vmd' 
 88  ] 
 89   
 90   
91 -def initialise():
92 """Initialise all of the user function definitions by importing then validating them.""" 93 94 # Import all the modules to set up the data. 95 import user_functions.align_tensor 96 import user_functions.angles 97 import user_functions.bmrb 98 import user_functions.bruker 99 import user_functions.chemical_shift 100 import user_functions.consistency_tests 101 import user_functions.dasha 102 import user_functions.deselect 103 import user_functions.diffusion_tensor 104 import user_functions.domain 105 import user_functions.dx 106 import user_functions.eliminate 107 import user_functions.error_analysis 108 import user_functions.fix 109 import user_functions.frame_order 110 import user_functions.grace 111 import user_functions.interatom 112 import user_functions.j_coupling 113 import user_functions.jw_mapping 114 import user_functions.minimisation 115 import user_functions.model_free 116 import user_functions.model_selection 117 import user_functions.molecule 118 import user_functions.molmol 119 import user_functions.monte_carlo 120 import user_functions.n_state_model 121 import user_functions.noe 122 import user_functions.palmer 123 import user_functions.paramag 124 import user_functions.pcs 125 import user_functions.pipe 126 import user_functions.pymol_control 127 import user_functions.rdc 128 import user_functions.relax_data 129 import user_functions.relax_disp 130 import user_functions.relax_fit 131 import user_functions.residue 132 import user_functions.reset 133 import user_functions.results 134 import user_functions.script 135 import user_functions.select 136 import user_functions.sequence 137 import user_functions.spectrometer 138 import user_functions.spectrum 139 import user_functions.spin 140 import user_functions.state 141 import user_functions.statistics 142 import user_functions.structure 143 import user_functions.sys_info 144 import user_functions.value 145 import user_functions.vmd 146 147 # Import the data structure. 148 from user_functions.data import Uf_info; uf_info = Uf_info() 149 150 # Check the validity of the data. 151 uf_info.validate()
152 153 154 # A table of user function renamings - for script compatibility. 155 uf_translation_table = { 156 'calc': 'minimise.calculate', 157 'dipole_pair.define': 'interatom.define', 158 'dipole_pair.read_dist': 'interatom.read_dist', 159 'dipole_pair.set_dist': 'interatom.set_dist', 160 'dipole_pair.unit_vectors': 'interatom.unit_vectors', 161 'exp_info.software_select': 'bmrb.software_select', 162 'frq.set': 'spectrometer.frequency', 163 'grid_search': 'minimise.grid_search', 164 'interatomic.copy': 'interatom.copy', 165 'interatomic.create': 'interatom.define', 166 'minimise': 'minimise.execute', 167 'molmol.macro_exec': 'molmol.macro_run', 168 'molmol.write': 'molmol.macro_write', 169 'n_state_model.set_domain': 'align_tensor.set_domain', 170 'n_state_model.set_type': 'align_tensor.reduction', 171 'noe.error': 'spectrum.error_analysis', 172 'noe.read': 'spectrum.read_intensities', 173 'pcs.centre': 'paramag_centre', 174 'pdc.read': 'bruker.read', 175 'pipe.list': 'pipe.display', 176 'pymol.cmd': 'pymol.command', 177 'pymol.macro_create': 'pymol.macro_write', 178 'pymol.macro_exec': 'pymol.macro_run', 179 'pymol.write': 'pymol.macro_write', 180 'relax_data.frq': 'spectrometer.frequency', 181 'relax_disp.cpmg_frq': 'relax_disp.cpmg_setup', 182 'relax_disp.set_grid_r20_from_min_r2eff': 'relax_disp.r20_from_min_r2eff', 183 'relax_fit.mean_and_error': 'spectrum.error_analysis', 184 'relax_fit.read': 'spectrum.read_intensities', 185 'structure.align': 'structure.superimpose', 186 'structure.vectors': 'interatom.unit_vectors', 187 'sys_info': 'system.sys_info', 188 'temperature': 'spectrometer.temperature', 189 'time': 'system.time' 190 } 191