HYDRONMR prediction¶
makeshift.hydronmr is a pure-Python port of Fast-HYDRONMR: it predicts
per-residue NMR relaxation (T1, T2, T1/T2, NOE) from a protein PDB structure by
computing a rigid-body diffusion tensor.
Typical use is not calling run() directly — it is the engine behind
RelaxationProfile.add_rigid_prediction(). Build a profile
with a PeakList, add the rigid prediction, then label() and
plot():
from makeshift import PeakList
from makeshift.relaxation import RelaxationProfile
pl = PeakList.from_bmrb(19151)
prof = RelaxationProfile.from_bmrb(25013, peaklist=pl)
prof.add_rigid_prediction(source='afdb')
prof.label()
prof.plot("R2_R1")
The rest of this page documents the low-level run() API for when you only
need structure → T1/T2/NOE (e.g. validation or a custom pipeline).
Low-level: run() on a PDB¶
run() takes two optional arguments:
config_path=— a differentconfig.yml(defaults to the one bundled next to the engine).csv_path=— also write a CSV (resseq, T1, T2, T1_over_T2, NOE).
Getting results¶
The Result object exposes tidy views — no intermediate
file needed:
result = run("in.pdb")
df = result.to_dataframe()
# chain seqpos T1 T2 T1_over_T2 NOE
# one row per residue
result.to_csv("t1t2.csv") # resseq, T1, T2, T1_over_T2, NOE
The raw mapping is also available:
to_dataframe() is the general, correctly-labelled table; derive whatever a
given analysis needs from it.
Where the structure comes from¶
run() takes a local PDB path. To fetch a structure by PDB id or UniProt
accession first, use fetch_structure:
from makeshift.utils import fetch_structure
pdb = fetch_structure("1WRP") # RCSB
pdb = fetch_structure("P0DP23") # AlphaFold DB
result = run(pdb)
Full API¶
See the HYDRONMR reference.