One structure whose coordinates are the beads of a closed ring. More...
#include <RingPolymerPotential.h>
Public Member Functions | |
| RingPolymerPotential (BatchPotential beads, long nBeads, long dof, double spring, double energyShift, std::vector< double > eta, bool fold, VectorXd modeDir) | |
| void | force (long nAtoms, const double *positions, const int *atomicNrs, double *forces, double *energy, double *variance, const double *box) override |
| 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) override |
| bool | supportsBatchEvaluation () const noexcept override |
| Whether this potential supports batched evaluation of N systems in a single call. | |
| bool | requiresIsolatedMoleculeLayout () const noexcept override |
| True for molecular QM / non-PBC backends (NWChem socket, ASE ORCA/NWChem, …). | |
| bool | isThreadSafe () const noexcept override |
| The bead batch is a caller-supplied function and is not safe to enter from two threads. | |
| long | structureAtoms () const |
| long | activeBeads () const |
| void | setPhysicalBath (std::shared_ptr< const PhysicalQuadraticBath > bath) |
| void | setDiscretization (std::vector< double > weights) |
| void | packActive (const std::vector< VectorXd > &active, double *positions) const |
| std::vector< VectorXd > | unpack (const double *positions) const |
| void | packMode (const VectorXd &dir, AtomMatrix &mode) const |
| Public Member Functions inherited from eonc::Potential | |
| void | recordForceCall () noexcept |
| Charge one evaluated geometry to this potential and its owning registry. | |
| IPotRegistry & | registry () const noexcept |
| The registry this potential charges its force calls to. | |
| Potential (PotType a_ptype) | |
| Production default: construction-scope registry, else PotRegistry::get(). | |
| Potential (PotType a_ptype, IPotRegistry ®istry) | |
| Test seam: injected registry, no process-default get() counters. | |
| Potential (PotType a_ptype, const Parameters &p) | |
| Potential (const Parameters &a_params) | |
| virtual | ~Potential () |
| void | force (std::span< const double > positions, std::span< const int > atomicNrs, std::span< double > forces, double *energy, double *variance, std::span< const double > box) |
| C++ call site: size-checked view over the raw FFI force(). | |
| virtual void | setFixedMask (long nAtoms, const double *isFixed) |
| Optional frozen-atom mask (nAtoms*3, 1.0 = fixed). | |
| std::tuple< double, AtomMatrix > | get_ef (const AtomMatrix &pos, const VectorXi &atmnrs, const Matrix3d &box) |
| PotType | getType () const |
| virtual unsigned long long | surfaceEpoch () const noexcept |
| Host-visible surface generation. | |
| virtual double | finiteCutoff () const noexcept |
| Finite interaction range in position length units. | |
| virtual bool | isSurrogate () const noexcept |
| Whether this is a surrogate (GP) potential. | |
| virtual unsigned | layoutFlags () const noexcept |
| 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 std::shared_ptr< Potential > | clonePotential () const |
| Independent instance that does not reload from disk. | |
| virtual void | bindBand (const std::vector< std::shared_ptr< Matter > > &) |
| NEB calls this with the finished band before the first force evaluation, so a host surface can name each image. | |
| virtual bool | forwardsStoredCell () const noexcept |
| A host that owns the cell reads the stored matrix. | |
| virtual bool | computesStress () const noexcept |
| True when force() leaves a Cauchy stress that cauchyStress() can read until the next force() on this instance. | |
| virtual Matrix3d | cauchyStress () const |
| Cauchy stress in eV/Angstrom^3. | |
| virtual void | forceBatchOwned (long nSystems, long nAtoms, const double *const *positions, const int *const *atomicNrs, double *const *forces, double *energies, double *variances, const double *const *boxes, const long *owners) |
| Evaluate forces for N systems in a single call. | |
| virtual double | hessianRange () const noexcept |
| Distance beyond which every Hessian block between two atoms is exactly zero, in position length units. | |
Private Member Functions | |
| void | fixLayout (long nBeads, long dof, bool fold, const VectorXd &modeDir) |
| double | writeForces (const std::vector< VectorXd > &grad, const double *positions, double *forces) const |
Private Attributes | |
| BatchPotential | beads_ |
| long | nBeads_ {0} |
| long | dof_ {0} |
| long | nActive_ {0} |
| long | atomsPerBead_ {0} |
| int | usedOnLast_ {3} |
| long | nAtoms_ {0} |
| double | spring_ {0.0} |
| double | energyShift_ {0.0} |
| std::vector< double > | eta_ |
| std::vector< double > | discretization_ |
| std::shared_ptr< const PhysicalQuadraticBath > | physicalBath_ |
| bool | fold_ {false} |
| VectorXd | modeDir_ |
Additional Inherited Members | |
| Public Types inherited from eonc::Potential | |
| enum class | PotLayout : unsigned { InProcess = 1u << 0 , NeedsWorkingDirectory = 1u << 1 , Subprocess = 1u << 2 } |
| How the pot is executed. Combine with bitwise or. More... | |
| Public Attributes inherited from eonc::Potential | |
| std::atomic< size_t > | forceCallCounter |
| Protected Attributes inherited from eonc::Potential | |
| PotType | ptype |
One structure whose coordinates are the beads of a closed ring.
The energy is U_N and the forces are minus its gradient. A call evaluates every bead through the batch potential, so a calculator group can spread the beads. An even ring with the fold set stores one turning point to the other and mirrors the rest.
Definition at line 28 of file RingPolymerPotential.h.
| eonc::tunneling::RingPolymerPotential::RingPolymerPotential | ( | BatchPotential | beads, |
| long | nBeads, | ||
| long | dof, | ||
| double | spring, | ||
| double | energyShift, | ||
| std::vector< double > | eta, | ||
| bool | fold, | ||
| VectorXd | modeDir ) |
Definition at line 3776 of file Tunneling.cpp.
|
inlinenodiscard |
Definition at line 56 of file RingPolymerPotential.h.
|
private |
Definition at line 3750 of file Tunneling.cpp.
|
overridevirtual |
Implements eonc::Potential.
Definition at line 3882 of file Tunneling.cpp.
|
overridevirtual |
Reimplemented from eonc::Potential.
Definition at line 3898 of file Tunneling.cpp.
|
inlinenodiscardoverridevirtualnoexcept |
The bead batch is a caller-supplied function and is not safe to enter from two threads.
Reimplemented from eonc::Potential.
Definition at line 53 of file RingPolymerPotential.h.
| void eonc::tunneling::RingPolymerPotential::packActive | ( | const std::vector< VectorXd > & | active, |
| double * | positions ) const |
Definition at line 3793 of file Tunneling.cpp.
| void eonc::tunneling::RingPolymerPotential::packMode | ( | const VectorXd & | dir, |
| AtomMatrix & | mode ) const |
Definition at line 3836 of file Tunneling.cpp.
|
inlinenodiscardoverridevirtualnoexcept |
True for molecular QM / non-PBC backends (NWChem socket, ASE ORCA/NWChem, …).
Callers must not apply periodic wraps that can tear molecules (#188).
Reimplemented from eonc::Potential.
Definition at line 47 of file RingPolymerPotential.h.
|
inline |
Definition at line 65 of file RingPolymerPotential.h.
|
inline |
Definition at line 57 of file RingPolymerPotential.h.
|
inlinenodiscard |
Definition at line 55 of file RingPolymerPotential.h.
|
inlinenodiscardoverridevirtualnoexcept |
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.
Reimplemented from eonc::Potential.
Definition at line 43 of file RingPolymerPotential.h.
|
nodiscard |
Definition at line 3817 of file Tunneling.cpp.
|
nodiscardprivate |
Definition at line 3850 of file Tunneling.cpp.
|
private |
Definition at line 95 of file RingPolymerPotential.h.
|
private |
Definition at line 91 of file RingPolymerPotential.h.
|
private |
Definition at line 101 of file RingPolymerPotential.h.
|
private |
Definition at line 93 of file RingPolymerPotential.h.
|
private |
Definition at line 99 of file RingPolymerPotential.h.
|
private |
Definition at line 100 of file RingPolymerPotential.h.
|
private |
Definition at line 103 of file RingPolymerPotential.h.
|
private |
Definition at line 104 of file RingPolymerPotential.h.
|
private |
Definition at line 94 of file RingPolymerPotential.h.
|
private |
Definition at line 97 of file RingPolymerPotential.h.
|
private |
Definition at line 92 of file RingPolymerPotential.h.
|
private |
Definition at line 102 of file RingPolymerPotential.h.
|
private |
Definition at line 98 of file RingPolymerPotential.h.
|
private |
Definition at line 96 of file RingPolymerPotential.h.