xnn.ffnn.models.geometry.dihedral_cos#
- xnn.ffnn.models.geometry.dihedral_cos(data, idx)[source]#
Cosine of the dihedral angle over each atom quadruple.
Uses the plane-normal formula with
phi = 0at cis. Onlycos phiis returned; periodic torsion terms are even inphi, so the multiple angles come from Chebyshev identities and noarccos/atan2(whose derivatives are singular at planar geometries) enters the graph.- Parameters:
data (AtomicGraph) – The batched graph.
idx (Tensor) – Atom indices of shape
(4, M).
- Returns:
cos phiof shape(M,).- Return type:
Tensor