#include <ASE.h>
Public Member Functions | |
| ASE (const Parameters &a_params) | |
| virtual | ~ASE () |
| void | force (long nAtoms, const double *R, const int *atomicNrs, double *F, double *U, double *variance, const double *box) override |
| bool | isThreadSafe () const noexcept override |
| Whether this potential's force() can be called from multiple threads on the SAME instance. | |
| bool | needsPerImageInstance () const noexcept override |
| ASE calculators are independent objects. | |
| Public Member Functions inherited from eonc::Potential | |
| Potential (PotType a_ptype) | |
| Potential (PotType a_ptype, const Parameters &) | |
| Potential (const Parameters &a_params) | |
| virtual | ~Potential () |
| std::tuple< double, AtomMatrix > | get_ef (const AtomMatrix &pos, const VectorXi &atmnrs, const Matrix3d &box) |
| PotType | getType () const |
| virtual bool | isSurrogate () const noexcept |
| Whether this is a surrogate (GP) potential. | |
| virtual bool | requiresIsolatedMoleculeLayout () const noexcept |
| True for molecular QM / non-PBC backends (NWChem socket, ASE ORCA/NWChem, …). | |
| virtual bool | isSharedInstanceThreadSafe () const noexcept |
| Conservative gate for sharing one Potential instance across threads. | |
| virtual bool | supportsBatchEvaluation () const noexcept |
| Whether this potential supports batched evaluation of N systems in a single call. | |
| virtual void | forceBatch (long nSystems, long nAtoms, const double *const *positions, const int *const *atomicNrs, double *const *forces, double *energies, double *variances, const double *const *boxes) |
| Evaluate forces for N systems in a single call. | |
Private Attributes | |
| size_t | counter {0} |
| py::module_ | py_module |
| py::object | calculator |
| py::object | _calculate |
Additional Inherited Members | |
| Public Attributes inherited from eonc::Potential | |
| std::atomic< size_t > | forceCallCounter |
| Protected Attributes inherited from eonc::Potential | |
| PotType | ptype |
| ASE::ASE | ( | const Parameters & | a_params | ) |
Definition at line 26 of file ASE.cpp.
|
inlinevirtual |
Definition at line 30 of file ASE.h.
|
overridevirtual |
Implements eonc::Potential.
Definition at line 64 of file ASE.cpp.
|
inlinenodiscardoverridevirtualnoexcept |
Whether this potential's force() can be called from multiple threads on the SAME instance.
Python-based potentials return false. Potentials with internal mutex (MetatomicPotential) return true but serialize internally – use needsPerImageInstance() to check if separate instances would enable true parallelism.
Reimplemented from eonc::Potential.
Definition at line 37 of file ASE.h.
|
inlinenodiscardoverridevirtualnoexcept |
ASE calculators are independent objects.
Most production calculators (VASP, Gaussian, ORCA, etc.) spawn subprocesses that release the GIL.
Reimplemented from eonc::Potential.
Definition at line 40 of file ASE.h.