xnn.common.deploy.openmm_force.OpenMMPotential#
- class xnn.common.deploy.openmm_force.OpenMMPotential(potential, atomic_numbers, atoms=None, periodic=False)[source]#
Bases:
ModuleA scriptable module with openmm-torch’s calling convention.
forward(positions, boxvectors)takes the positions of every particle of the OpenMM system (nanometers) and, for a periodic system, the box vectors as rows, and returns the energy in kJ/mol and the forces in kJ/mol/nm of every particle. The model sees onlyatoms.- Parameters:
potential (TorchScriptPotential) – The exported model.
atomic_numbers (sequence of int) – Atomic numbers of the model’s atoms, in the order of
atoms.atoms (sequence of int or None, optional) – Indices of the model’s atoms among the system’s particles;
None(default) for every particle.periodic (bool, optional) – Whether the system is periodic, by default
False.