torchref.restraints.ramachandran module
Ramachandran NLL surfaces for backbone restraints.
Pre-computed NLL = -log P(phi, psi | residue_type) surfaces derived from
MolProbity/cctbx distributions (6 residue-type-dependent surfaces at 1°
resolution). The surfaces are stored as a single tensor of shape
(6, 360, 360) in torchref/data/rama_nll_surfaces.pt.
Surface types
0 general Standard amino acids (not GLY, PRO, ILE, VAL, pre-PRO) 1 glycine Current residue is GLY 2 cis-proline Current residue is PRO with cis peptide bond 3 trans-proline Current residue is PRO with trans peptide bond 4 pre-proline Next residue is PRO 5 ile/val Current residue is ILE or VAL
- torchref.restraints.ramachandran.load_nll_surfaces(device)[source]
Load pre-computed Ramachandran NLL surfaces.
- Parameters:
device (torch.device) – Target device for the returned tensor.
- Returns:
Shape
(6, 360, 360)with NLL values. Index[type, i, j]corresponds to phi = (i - 180)° and psi = (j - 180)°.- Return type: