Implement serialization of torsion, distance profile,
and torsion profile restraints.