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