torchref.refinement.targets.geometry.ramachandran module

class torchref.refinement.targets.geometry.ramachandran.RamachandranTarget(model=None, verbose=0)[source]

Bases: GeometryTarget

Ramachandran restraint via pre-computed NLL surfaces.

Uses 6 residue-type-dependent NLL surfaces (general, glycine, cis-proline, trans-proline, pre-proline, ile/val) at 1-degree resolution. The loss is computed by bilinear interpolation of the NLL surface at the current (phi, psi) angles.

The surfaces store NLL = -log P(phi, psi | residue_type), so favored regions have low values and outlier regions have high values — consistent with all other geometry targets.

name: str = 'geometry/ramachandran'
__init__(model=None, verbose=0)[source]

Initialize model target.

Parameters:
  • model (Model, optional) – Reference to the Model object (optional for empty init).

  • verbose (int, optional) – Verbosity level. Default is 0.

forward()[source]

Compute and return the loss. Override in subclasses.

stats()[source]

Get Ramachandran restraint statistics.