#include <Potential.h>
Public Member Functions | |
| Potential (PotType a_ptype) | |
| Potential (PotType a_ptype, const Parameters &) | |
| Potential (const Parameters &a_params) | |
| virtual | ~Potential () |
| virtual void | force (long nAtoms, const double *positions, const int *atomicNrs, double *forces, double *energy, double *variance, const double *box)=0 |
| 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 | isThreadSafe () const noexcept |
| Whether this potential's force() can be called from multiple threads on the SAME instance. | |
| virtual bool | isSharedInstanceThreadSafe () const noexcept |
| Conservative gate for sharing one Potential instance across threads. | |
| virtual bool | needsPerImageInstance () const noexcept |
| Whether NEB should create separate Potential instances per image for true parallel force evaluation. | |
| 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. | |
Public Attributes | |
| std::atomic< size_t > | forceCallCounter |
Protected Attributes | |
| PotType | ptype |
Private Attributes | |
| uint64_t | m_registry_id |
| PotRegistry::TimePoint | m_created_at |
Definition at line 23 of file Potential.h.
|
inlineexplicit |
Definition at line 35 of file Potential.h.
|
inline |
Definition at line 42 of file Potential.h.
|
inline |
Definition at line 45 of file Potential.h.
|
inlinevirtual |
Definition at line 48 of file Potential.h.
|
pure virtual |
|
inlinevirtual |
Evaluate forces for N systems in a single call.
Default: loops over force(). Override in potentials that support native batching (e.g. MetatomicPotential uses a single model.forward() for all N systems).
Definition at line 108 of file Potential.h.
| std::tuple< double, AtomMatrix > Potential::get_ef | ( | const AtomMatrix & | pos, |
| const VectorXi & | atmnrs, | ||
| const Matrix3d & | box ) |
Definition at line 102 of file Potential.cpp.
|
inlinenodiscard |
Definition at line 62 of file Potential.h.
|
inlinenodiscardvirtualnoexcept |
Conservative gate for sharing one Potential instance across threads.
Defaults to isThreadSafe(); backends whose state lives outside the wrapper instance (global/common-block Fortran entry points) override this to false on their own classes.
Definition at line 85 of file Potential.h.
|
inlinenodiscardvirtualnoexcept |
Whether this is a surrogate (GP) potential.
Override in SurrogatePotential.
Definition at line 66 of file Potential.h.
|
inlinenodiscardvirtualnoexcept |
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.
Definition at line 79 of file Potential.h.
|
inlinenodiscardvirtualnoexcept |
Whether NEB should create separate Potential instances per image for true parallel force evaluation.
When true, NEB calls makePotential() once per image instead of sharing one instance. Override in potentials that use internal mutexes (e.g. MetatomicPotential).
Definition at line 94 of file Potential.h.
|
inlinenodiscardvirtualnoexcept |
True for molecular QM / non-PBC backends (NWChem socket, ASE ORCA/NWChem, …).
Callers must not apply periodic wraps that can tear molecules (#188).
Definition at line 70 of file Potential.h.
|
inlinenodiscardvirtualnoexcept |
Whether this potential supports batched evaluation of N systems in a single call.
When true, callers (NEB, Dimer) should use forceBatch() instead of N individual force() calls for better GPU utilization.
Definition at line 101 of file Potential.h.
| std::atomic<size_t> eonc::Potential::forceCallCounter |
Definition at line 32 of file Potential.h.
Definition at line 29 of file Potential.h.
|
private |
Definition at line 28 of file Potential.h.
|
protected |
Definition at line 25 of file Potential.h.