1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 """The relaxation data BMRB API interface."""
24
25
26
27 from bmrblib.kinetics.auto_relaxation_v3_1 import AutoRelaxationSaveframe_v3_1
28 from bmrblib.kinetics.heteronucl_NOEs_v2_1 import HeteronuclNOESaveframe_v2_1
29 from bmrblib.kinetics.heteronucl_NOEs_v3_1 import HeteronuclNOESaveframe_v3_1
30 from bmrblib.kinetics.heteronucl_T1_relaxation_v2_1 import HeteronuclT1Saveframe_v2_1
31 from bmrblib.kinetics.heteronucl_T1_relaxation_v3_1 import HeteronuclT1Saveframe_v3_1
32 from bmrblib.kinetics.heteronucl_T2_relaxation_v2_1 import HeteronuclT2Saveframe_v2_1
33 from bmrblib.kinetics.heteronucl_T2_relaxation_v3_1 import HeteronuclT2Saveframe_v3_1
34
35
37 """Class for the relaxation data part of the BMRB API."""
38
50
51
52 - def add(self, **keywords):
53 """Distribute the relaxation data to the appropriate saveframes.
54
55 @keyword data_type: The relaxation data type (one of 'NOE', 'R1', or 'R2').
56 @type data_type: str
57 @keyword sample_cond_list_id: The sample conditions list ID number.
58 @type sample_cond_list_id: str
59 @keyword sample_cond_list_label: The sample conditions list label.
60 @type sample_cond_list_label: str
61 @keyword temp_calibration: The temperature calibration method (unused).
62 @type temp_calibration: str
63 @keyword temp_control: The temperature control method (unused).
64 @type temp_control: str
65 @keyword peak_intensity_type: The peak intensity type - one of 'height' or 'volume'.
66 @type peak_intensity_type: str
67 @keyword frq: The spectrometer proton frequency, in Hz.
68 @type frq: float
69 @keyword details: The details tag.
70 @type details: None or str
71 @keyword assembly_atom_ids: The assembly atom ID numbers.
72 @type assembly_atom_ids: list of int
73 @keyword entity_assembly_ids: The entity assembly ID numbers.
74 @type entity_assembly_ids: list of int
75 @keyword entity_ids: The entity ID numbers.
76 @type entity_ids: int
77 @keyword res_nums: The residue number list.
78 @type res_nums: list of int
79 @keyword res_names: The residue name list.
80 @type res_names: list of str
81 @keyword atom_names: The atom name list.
82 @type atom_names: list of str
83 @keyword atom_types: The atom types as IUPAC element abbreviations.
84 @type atom_types: list of str
85 @keyword isotope: The isotope type list, ie 15 for '15N'.
86 @type isotope: list of int
87 @keyword assembly_atom_ids_2: The assembly atom ID numbers. This is for the second atom used in the heteronuclear NOE.
88 @type assembly_atom_ids_2: list of int
89 @keyword entity_assembly_ids_2: The entity assembly ID numbers. This is for the second atom used in the heteronuclear NOE.
90 @type entity_assembly_ids_2: list of int
91 @keyword entity_ids_2: The entity ID numbers. This is for the second atom used in the heteronuclear NOE.
92 @type entity_ids_2: int
93 @keyword res_nums_2: The residue number list. This is for the second atom used in the heteronuclear NOE.
94 @type res_nums_2: list of int
95 @keyword res_names_2: The residue name list. This is for the second atom used in the heteronuclear NOE.
96 @type res_names_2: list of str
97 @keyword atom_names_2: The atom name list. This is for the second atom used in the heteronuclear NOE.
98 @type atom_names_2: list of str
99 @keyword atom_types_2: The atom types as IUPAC element abbreviations. This is for the second atom used in the heteronuclear NOE.
100 @type atom_types_2: list of str
101 @keyword isotope_2: The isotope type list, ie 1 for '1H'. This is for the second atom used in the heteronuclear NOE.
102 @type isotope_2: list of int
103 @keyword data: The relaxation data.
104 @type data: list of float
105 @keyword errors: The errors associated with the relaxation data.
106 @type errors: list of float
107 """
108
109
110 if keywords['data_type'] == 'R1':
111 self.heteronucl_T1_relaxation.add(**keywords)
112 elif keywords['data_type'] == 'R2':
113 self.heteronucl_T2_relaxation.add(**keywords)
114 elif keywords['data_type'] == 'NOE':
115 self.heteronucl_NOEs.add(**keywords)
116
117
135
136
137
139 """Class for the relaxation data part of the BMRB API (v3.0)."""
140
142 """Initialise the class, placing the pystarlib data nodes into the namespace.
143
144 @param datanodes: The pystarlib data nodes object.
145 @type datanodes: list
146 """
147
148
149 Relaxation_v2_1.__init__(self, datanodes)
150
151
152
154 """Class for the relaxation data part of the BMRB API (v3.1)."""
155
171
172
173 - def add(self, **keywords):
174 """Add relaxation data to the data nodes.
175
176 @keyword data_type: The relaxation data type (one of 'NOE', 'R1', or 'R2').
177 @type data_type: str
178 @keyword sample_cond_list_id: The sample conditions list ID number.
179 @type sample_cond_list_id: str
180 @keyword sample_cond_list_label: The sample conditions list label.
181 @type sample_cond_list_label: str
182 @keyword temp_calibration: The temperature calibration method.
183 @type temp_calibration: str
184 @keyword temp_control: The temperature control method.
185 @type temp_control: str
186 @keyword peak_intensity_type: The peak intensity type - one of 'height' or 'volume'.
187 @type peak_intensity_type: str
188 @keyword frq: The spectrometer proton frequency, in Hz.
189 @type frq: float
190 @keyword details: The details tag.
191 @type details: None or str
192 @keyword assembly_atom_ids: The assembly atom ID numbers.
193 @type assembly_atom_ids: list of int
194 @keyword entity_assembly_ids: The entity assembly ID numbers.
195 @type entity_assembly_ids: list of int
196 @keyword entity_ids: The entity ID numbers.
197 @type entity_ids: int
198 @keyword res_nums: The residue number list.
199 @type res_nums: list of int
200 @keyword res_names: The residue name list.
201 @type res_names: list of str
202 @keyword atom_names: The atom name list.
203 @type atom_names: list of str
204 @keyword atom_types: The atom types as IUPAC element abbreviations.
205 @type atom_types: list of str
206 @keyword isotope: The isotope type list, ie 15 for '15N'.
207 @type isotope: list of int
208 @keyword assembly_atom_ids_2: The assembly atom ID numbers. This is for the second atom used in the heteronuclear NOE.
209 @type assembly_atom_ids_2: list of int
210 @keyword entity_assembly_ids_2: The entity assembly ID numbers. This is for the second atom used in the heteronuclear NOE.
211 @type entity_assembly_ids_2: list of int
212 @keyword entity_ids_2: The entity ID numbers. This is for the second atom used in the heteronuclear NOE.
213 @type entity_ids_2: int
214 @keyword res_nums_2: The residue number list. This is for the second atom used in the heteronuclear NOE.
215 @type res_nums_2: list of int
216 @keyword res_names_2: The residue name list. This is for the second atom used in the heteronuclear NOE.
217 @type res_names_2: list of str
218 @keyword atom_names_2: The atom name list. This is for the second atom used in the heteronuclear NOE.
219 @type atom_names_2: list of str
220 @keyword atom_types_2: The atom types as IUPAC element abbreviations. This is for the second atom used in the heteronuclear NOE.
221 @type atom_types_2: list of str
222 @keyword isotope_2: The isotope type list, ie 1 for '1H'. This is for the second atom used in the heteronuclear NOE.
223 @type isotope_2: list of int
224 @keyword data: The relaxation data.
225 @type data: list of float
226 @keyword errors: The errors associated with the relaxation data.
227 @type errors: list of float
228 """
229
230
231 if keywords['data_type'] in ['R1', 'R2']:
232 self.auto_relaxation.add(**keywords)
233 elif keywords['data_type'] == 'NOE':
234 self.heteronucl_NOEs.add(**keywords)
235
236
260