1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 import sys
24
25 import help
26
27
30
31 self.__relax_help__ = \
32 """Class for holding the functions for manipulating runs."""
33
34
35 self.__relax_help__ = self.__relax_help__ + "\n" + help.relax_class_help
36
37
38 self.__relax__ = relax
39
40
41 - def create(self, run=None, run_type=None):
42 """Function for setting up a run type.
43
44 Keyword Arguments
45 ~~~~~~~~~~~~~~~~~
46
47 run: The name of the run.
48
49 type: The type of run.
50
51
52 Description
53 ~~~~~~~~~~~
54
55 The run name can be any string however the run type can only be one of the following
56
57 'ct': Consistency tests.
58 'jw': Reduced spectral density mapping,
59 'mf': Model-free analysis,
60 'noe': Steady state NOE calculation,
61 'relax_fit': Relaxation curve fitting,
62 'srls': SRLS analysis.
63
64
65 Examples
66 ~~~~~~~~
67
68 To set up a model-free analysis run with the name 'm5', type:
69
70 relax> run.create('m5', 'mf')
71 """
72
73
74 if self.__relax__.interpreter.intro:
75 text = sys.ps3 + "run.create("
76 text = text + "run=" + `run`
77 text = text + ", run_type=" + `run_type` + ")"
78 print text
79
80
81 if type(run) != str:
82 raise RelaxStrError, ('run', run)
83
84
85 if type(run_type) != str:
86 raise RelaxStrError, ('run_type', run_type)
87
88
89 self.__relax__.generic.runs.create(run=run, run_type=run_type)
90
91
93 """Function for deleting a run.
94
95 Keyword Arguments
96 ~~~~~~~~~~~~~~~~~
97
98 run: The name of the run.
99
100
101 Description
102 ~~~~~~~~~~~
103
104 This function will destroy all data corresponding to the given run.
105 """
106
107
108 if self.__relax__.interpreter.intro:
109 text = sys.ps3 + "run.delete("
110 text = text + "run=" + `run` + ")"
111 print text
112
113
114 if run != None and type(run) != str:
115 raise RelaxNoneStrError, ('run', run)
116
117
118 self.__relax__.generic.runs.delete(run=run)
119
120
121 - def hybridise(self, hybrid=None, runs=None):
122 """Function for a hybridised run from a number of other runs.
123
124 Keyword Arguments
125 ~~~~~~~~~~~~~~~~~
126
127 hybrid: The name of the hybrid run to create.
128
129 runs: An array containing the names of all runs to hybridise.
130
131
132 Description
133 ~~~~~~~~~~~
134
135 This user function can be used to construct hybrid models. An example of the use of a
136 hybrid model could be if the protein consists of two independent domains. These two domains
137 could be analysed separately, each having their own optimised diffusion tensors. The
138 N-terminal domain run could be called 'N_sphere' while the C-terminal domain could be called
139 'C_ellipsoid'. These two runs could then be hybridised into a run called 'mixed model' by
140 typing
141
142 relax> run.hybridise('mixed model', ['N_sphere', 'C_ellipsoid'])
143 relax> run.hybridise(hybrid='mixed model', runs=['N_sphere', 'C_ellipsoid'])
144
145 This hybrid run can then be compared via model selection to a run where the entire protein
146 is assumed to have a single diffusion tensor.
147
148 The only requirements for runs to be hybridised is that, at minimum, a sequence has been
149 loaded, that the sequence for all hybridised runs is the same, and that no residue is
150 allowed to be selected in two or more runs. The last condition is to ensure that overlap
151 does not occur to allow statistically significant comparisons.
152 """
153
154
155 if self.__relax__.interpreter.intro:
156 text = sys.ps3 + "run.hybridise("
157 text = text + "hybrid=" + `hybrid`
158 text = text + ", runs=" + `runs` + ")"
159 print text
160
161
162 if hybrid != None and type(hybrid) != str:
163 raise RelaxNoneStrError, ('hybrid run', hybrid)
164
165
166 if type(runs) != list:
167 raise RelaxNoneListError, ('runs', runs)
168 else:
169 for name in runs:
170 if type(name) != str:
171 raise RelaxListStrError, ('runs', runs)
172
173
174 self.__relax__.specific.hybrid.hybridise(hybrid=hybrid, runs=runs)
175