torchref.refinement.targets.geometry.chiral module
- class torchref.refinement.targets.geometry.chiral.ChiralTarget(model=None, verbose=0)[source]
Bases:
GeometryTargetChiral volume restraint target.
Restrains the signed volume of tetrahedral chiral centers to maintain correct stereochemistry (R vs S configuration, L vs D amino acids).
- The chiral volume is computed as:
V = v1 · (v2 × v3)
where vi = position of neighbor i - position of center.
For standard protein Cα atoms with ordering (N, C, CB): - L-amino acids: positive volume (~+2.5 ų) - D-amino acids: negative volume (~-2.5 ų)
- The loss function penalizes deviations from the ideal signed volume:
NLL = 0.5 * ((V - V_ideal) / σ)² + log(σ) + 0.5 * log(2π)
For achiral centers (volume_sign=’both’), we restrain the absolute volume.