Package user_functions :: Module domain
[hide private]
[frames] | no frames]

Source Code for Module user_functions.domain

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2003-2013 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  # Module docstring. 
23  """The domain user function definitions.""" 
24   
25  # relax module imports. 
26  from pipe_control import domain 
27  from user_functions.data import Uf_info; uf_info = Uf_info() 
28  from user_functions.objects import Desc_container 
29   
30   
31  # The domain user function. 
32  uf = uf_info.add_uf('domain') 
33  uf.title = "Definition of structural domains." 
34  uf.title_short = "Domain definition." 
35  uf.add_keyarg( 
36      name = "id", 
37      py_type = "str", 
38      desc_short = "domain ID string", 
39      desc = "The ID string used to identify molecular domains.", 
40  ) 
41  uf.add_keyarg( 
42      name = "spin_id", 
43      py_type = "str", 
44      arg_type = "spin ID", 
45      desc_short = "spin ID string", 
46      desc = "The spin ID string of all atomic members of the domain.", 
47      can_be_none = True 
48  ) 
49  # Description. 
50  uf.desc.append(Desc_container()) 
51  uf.desc[-1].add_paragraph("This is used to define structural domains.  Multiple domains can be defined, and these can overlap.  Rather than labelling the currently loaded spins with the ID string, the spin ID string is stored for later use.  This allows new spins to be loaded later and still be included within the same domain.") 
52  uf.backend = domain.define 
53  uf.menu_text = "&domain" 
54