Calculate RDC from a known Tensor¶
This example shows how to calculate theoretical RDC values from a known \({\Delta\chi}\)-tensor which has been fitted from PCS data. Paramagpy allows seamless calculation of one PCS/PRE/RDC/CCR effect from a tensor fitted from another effect.
Downloads¶
Download the data files
4icbH_mut.pdb
andcalbindin_Er_HN_PCS_tensor.txt
from here:Download the script
rdc_calculate.py
Script + Explanation¶
First the relevant modules are loaded, the protein is loaded and the metal is loaded from file. The magnetic field strength and temperature are also set.
from paramagpy import protein, metal
# Load the PDB file
prot = protein.load_pdb('../data_files/4icbH_mut.pdb')
# Load the fitted tensor
met = metal.load_tensor('../data_files/calbindin_Er_HN_PCS_tensor.txt')
met.B0 = 18.8
A loop is made over the atoms of the protein. The amide H and N atoms are selected and then the RDC value is calculated. Finally the formated data is appended to list forFile
.
forFile = []
for atom in prot.get_atoms():
if atom.name == 'H':
residue = atom.parent
seq = residue.id[1]
if 'N' in residue:
H = atom
N = residue['N']
rdc = met.atom_rdc(H, N)
line = "{0:2d} {1:^3s} {2:2d} {3:^3s} {4:6.3f} 0.0\n".format(
seq, H.name, seq, N.name, rdc)
forFile.append(line)
The formatted data is written to file:
with open("calbindin_Er_RDC_calc.rdc", 'w') as f:
f.writelines(forFile)
Output: [calbindin_Er_RDC_calc.rdc
]
0 H 0 N -1.724 0.0
1 H 1 N -6.196 0.0
2 H 2 N -4.993 0.0
4 H 4 N -0.922 0.0
5 H 5 N 1.783 0.0
6 H 6 N 0.280 0.0
7 H 7 N -1.906 0.0
8 H 8 N 1.056 0.0
9 H 9 N 0.713 0.0
10 H 10 N 0.213 0.0
11 H 11 N -0.881 0.0
12 H 12 N 2.712 0.0
13 H 13 N 0.614 0.0
14 H 14 N -2.346 0.0
15 H 15 N 1.659 0.0
16 H 16 N 0.648 0.0
17 H 17 N 0.383 0.0
18 H 18 N 0.420 0.0
19 H 19 N -7.863 0.0
21 H 21 N 0.973 0.0
22 H 22 N 1.026 0.0
23 H 23 N -0.613 0.0
24 H 24 N -5.847 0.0
25 H 25 N 1.761 0.0
26 H 26 N 6.470 0.0
27 H 27 N 5.541 0.0
28 H 28 N -0.334 0.0
29 H 29 N 3.624 0.0
30 H 30 N 6.673 0.0
31 H 31 N 3.952 0.0
32 H 32 N 1.658 0.0
33 H 33 N 5.449 0.0
34 H 34 N 7.370 0.0
35 H 35 N 1.033 0.0
36 H 36 N 1.136 0.0
38 H 38 N -7.378 0.0
39 H 39 N -6.979 0.0
40 H 40 N -4.810 0.0
41 H 41 N -3.187 0.0
42 H 42 N 2.415 0.0
43 H 43 N 1.710 0.0
44 H 44 N -5.977 0.0
45 H 45 N -5.467 0.0
46 H 46 N 3.243 0.0
47 H 47 N 3.937 0.0
48 H 48 N 7.047 0.0
49 H 49 N 4.577 0.0
50 H 50 N 3.718 0.0
51 H 51 N 4.519 0.0
52 H 52 N 6.077 0.0
53 H 53 N 2.940 0.0
54 H 54 N 2.541 0.0
55 H 55 N -7.493 0.0
56 H 56 N -7.159 0.0
57 H 57 N 4.948 0.0
58 H 58 N -1.078 0.0
59 H 59 N -0.759 0.0
60 H 60 N 0.161 0.0
61 H 61 N -1.132 0.0
62 H 62 N -5.719 0.0
63 H 63 N 4.025 0.0
64 H 64 N 5.929 0.0
65 H 65 N 2.363 0.0
66 H 66 N 2.477 0.0
67 H 67 N 8.265 0.0
68 H 68 N 5.078 0.0
69 H 69 N 3.724 0.0
70 H 70 N 7.743 0.0
71 H 71 N 2.188 0.0
72 H 72 N 4.911 0.0
73 H 73 N 7.514 0.0
74 H 74 N -0.001 0.0
75 H 75 N 1.119 0.0