Utils Module
get_residue_rc_shifts(res_indices)
Map residue indices to their random coil CA shifts.
montelione_loss(phi, psi, target_shifts, res_indices)
A loss function inspired by the Montelione group's approach of validating structures against experimental chemical shifts.
Source code in torsiontuner/montelione_utils.py
ramachandran_penalty(phi, psi)
A soft Ramachandran-region penalty used as a backbone geometry regularizer.
Penalizes phi/psi values that fall far from the three canonical favored regions of the Ramachandran plot (alpha-helix, beta-strand, and left-handed alpha-helix), using a smooth log-sum-exp potential.
This is analogous to the Ramachandran term used in programs such as CNS and Rosetta (e.g., Engh & Huber torsion potentials), and is similar in spirit to the G-factor computed by PROCHECK.
Note: This is NOT related to the ANSURR validation method (Fowler, Sljoka & Williamson, 2020, Nature Commun. 11:6321). ANSURR measures agreement between experimental NMR backbone flexibility (RCI) and structural rigidity computed by graph-theoretic rigidity theory (FIRST algorithm); it cannot be computed from torsion angles alone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phi
|
ndarray
|
(N,) backbone phi angles in radians. |
required |
psi
|
ndarray
|
(N,) backbone psi angles in radians. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Scalar penalty (lower = more geometrically regular backbone). |