Re-referencing¶
High-level entry point: ChemicalShifts.reref. The routines
below operate on raw DataFrames.
Dispatch¶
compute_offsets
¶
Fit per-atom re-referencing offsets for a long-format shift table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
Long-format shifts with at least Comp_ID, Seq_ID, Atom_ID, Val. |
required |
method
|
(lacs, panav)
|
|
'lacs'
|
n_std
|
int
|
LACS only — BMRB-statistics outlier threshold (default 4). |
_N_STD_OUTLIER
|
Returns:
| Name | Type | Description |
|---|---|---|
offsets |
dict {atom: float | None}
|
Correction per atom such that |
check |
dict {atom: bool}
|
Whether re-referencing succeeded for each atom. |
Returns ``(None, None)`` if no backbone shifts are present.
|
|
Source code in makeshift/reref/__init__.py
apply_offsets
¶
Return a copy of df with Val corrected by per-atom offsets
(Val - offset).
Atoms absent from offsets (or whose offset is None) are left
unchanged, so sidechain shifts pass through untouched.
Source code in makeshift/reref/base.py
LACS¶
reref_lacs
¶
Compute per-atom LACS offsets for a backbone shift table.
Source code in makeshift/reref/lacs.py
PANAV¶
reref_panav
¶
Compute cumulative per-atom PANAV offsets over two rounds. Returns (offsets, check), offsets such that corrected = Val - offset.