espaloma.mm.functional.periodic_fixed_phases
- espaloma.mm.functional.periodic_fixed_phases(dihedrals: torch.Tensor, ks: torch.Tensor) torch.Tensor [source]
Periodic torsion term with n_phases = 6, periodicities = 1..n_phases, phases = zeros
- Parameters
dihedrals (torch.Tensor, shape=(n_snapshots, n_dihedrals)) – dihedral angles – TODO: confirm in radians?
ks (torch.Tensor, shape=(n_dihedrals, n_phases)) – force constants – TODO: confirm in esp.unit.ENERGY_UNIT ?
- Returns
u – potential energy of each snapshot
- Return type
torch.Tensor, shape=(n_snapshots, 1)
Notes
TODO: is there a way to annotate / type-hint tensor shapes? (currently adding many assert statements) TODO: merge with esp.mm.functional.periodic – adding this because I was having difficulty debugging runtime tensor
shape errors in esp.mm.functional.periodic, which allows for a more flexible mix of input shapes and types