API Reference
deer_trace(distances, time, modulation_depth=0.3, background_decay=0.05)
Simulate a DEER (Double Electron-Electron Resonance) time-domain trace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
distances
|
ndarray
|
(M,) distribution of distances. |
required |
time
|
ndarray
|
(T,) time points in microseconds. |
required |
modulation_depth
|
float
|
Modulation depth λ. |
0.3
|
background_decay
|
float
|
Decay rate of the background signal. |
0.05
|
Returns:
| Type | Description |
|---|---|
ndarray
|
V(t) normalized DEER signal. |
Source code in diff_epr/kernels.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
deer_trace_oriented(distance, relative_orientation, time, modulation_depth=0.3)
Simulate an oriented (single-crystal) DEER trace for a rigid spin pair using the Polyhach et al. (2007) 5-angle geometric model.
In this model the five angles are
theta_r1, phi_r1 : orientation of the interspin vector r in the g-tensor principal-axis frame of spin label 1. alpha, beta, gamma: ZYZ Euler angles rotating the g-tensor frame of label 1 into that of label 2.
For a single-crystal experiment the external field B₀ is fixed along the z-axis of the lab frame. The dipolar coupling frequency depends on the angle between r and B₀, which is theta_r1 when the molecule is oriented so that spin-1's g-frame z-axis is aligned with B₀.
For full orientation-selection (selecting a sub-set of B₀ orientations via the observer pulse bandwidth) the four remaining angles (phi_r1, alpha, beta, gamma) are needed; that extension is deferred to a future version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
distance
|
float
|
Inter-spin distance r in Angstroms. |
required |
relative_orientation
|
ndarray
|
(5,) angles (theta_r1, phi_r1, alpha, beta, gamma) in radians. Only theta_r1 is used in the current implementation. |
required |
time
|
ndarray
|
(T,) time points in microseconds. |
required |
modulation_depth
|
float
|
Modulation depth λ. |
0.3
|
Returns:
| Type | Description |
|---|---|
ndarray
|
V(t) normalised DEER signal of shape (T,). |
Source code in diff_epr/kernels.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | |
deer_trace_rotamers(rotamers1, weights1, rotamers2, weights2, time, modulation_depth=0.3, background_decay=0.05)
Simulate a DEER trace using weighted rotamer libraries for both labels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rotamers1
|
ndarray
|
(N1, 3) coordinates of label 1 rotamers. |
required |
weights1
|
ndarray
|
(N1,) weights for label 1 rotamers (sum to 1). |
required |
rotamers2
|
ndarray
|
(N2, 3) coordinates of label 2 rotamers. |
required |
weights2
|
ndarray
|
(N2,) weights for label 2 rotamers (sum to 1). |
required |
time
|
ndarray
|
(T,) time points. |
required |
modulation_depth
|
float
|
Modulation depth λ. |
0.3
|
background_decay
|
float
|
Background decay rate. |
0.05
|
Returns:
| Type | Description |
|---|---|
ndarray
|
V(t) normalized DEER signal. |
Source code in diff_epr/kernels.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
spin_distance(coords1, coords2)
Compute distance between spin centers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coords1
|
ndarray
|
(N, 3) coordinates of first spin label. |
required |
coords2
|
ndarray
|
(N, 3) coordinates of second spin label. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Distances (N,). |
Source code in diff_epr/kernels.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |