def METHOD_NAME(self, atoms) -> np.ndarray:
    """Compute angles (degrees) for all dihedrals."""
    positions = [
        atoms.positions[self.dihedrals["atoms"][:, i]]
        for i in range(4)
    ]
    return METHOD_NAME(positions[1] - positions[0],
                         positions[2] - positions[1],
                         positions[3] - positions[2],
                         atoms.cell, atoms.pbc)