eval_energy_and_forces¶
- jaxrens.backends.base.eval_energy_and_forces(backend, positions, species, cell, max_neighbors, ensemble_params=None)[source]¶
Evaluate energy and forces, using a native force path when available.
If
backenddefinesenergy_and_forces, it is called directly. Otherwise forces are obtained by reverse-mode autodiff ofbackend’s energy (forces = -dE/dx), preserving the control fields viahas_aux.Returns a
BackendResultwithforcespopulated.- Parameters:
backend (EnergyBackend)
positions (Array)
species (Array)
cell (Array)
max_neighbors (int)
- Return type: