#include <VASP.h>
Public Member Functions | |
| VASP (const Parameters &p) | |
| ~VASP () | |
| void | initialize () |
| void | cleanMemory (void) |
| void | force (long N, const double *R, const int *atomicNrs, double *F, double *U, double *variance, const double *box) |
| bool | isThreadSafe () const noexcept override |
| force() writes POSCAR, signals through NEWCAR and waits on FU, all at fixed names in the working directory, so two threads in it swap results. | |
| bool | needsPerImageInstance () const noexcept override |
| Every instance drives the one VASP process named by the static vaspPID through the one set of files, so a second instance buys no parallelism. | |
| 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. | |
Static Public Member Functions | |
| static void | removeStaleFiles () |
Private Member Functions | |
| void | writePOSCAR (long N, const double *R, const int *atomicNrs, const double *box) |
| void | readFU (long N, double *F, double *U) |
| void | spawnVASP () |
| bool | vaspRunning () |
Static Private Member Functions | |
| static void | clearHandshakeFiles () |
Static Private Attributes | |
| static bool | firstRun = true |
| static long | vaspRunCount = 0 |
| static pid_t | vaspPID = 0 |
Additional Inherited Members | |
| Public Attributes inherited from eonc::Potential | |
| std::atomic< size_t > | forceCallCounter |
| Protected Attributes inherited from eonc::Potential | |
| PotType | ptype |
|
inline |
|
inline |
Definition at line 23 of file VASP.h.
| void VASP::cleanMemory | ( | void | ) |
Definition at line 128 of file VASP.cpp.
|
staticprivate |
|
virtual |
Implements eonc::Potential.
Definition at line 215 of file VASP.cpp.
|
inlinenodiscardoverridevirtualnoexcept |
force() writes POSCAR, signals through NEWCAR and waits on FU, all at fixed names in the working directory, so two threads in it swap results.
Reimplemented from eonc::Potential.
Definition at line 30 of file VASP.h.
|
inlinenodiscardoverridevirtualnoexcept |
Every instance drives the one VASP process named by the static vaspPID through the one set of files, so a second instance buys no parallelism.
Delete the results and restart files VASP writes into the working directory, so a calculation starts from an empty one.
Destructive, and nothing in the client calls it: a caller invokes it when it means to discard an earlier calculation's output. A caller that means to restart from WAVECAR or CHGCAR must not, and neither must one that wants the earlier OUTCAR. The examples/akmc-vasp-slurm scripts do the same removals in shell, at the point where the user asks for them.
Reimplemented from eonc::Potential.
|
private |
Definition at line 306 of file VASP.cpp.
|
static |
|
private |
Definition at line 146 of file VASP.cpp.
|
private |
Remove the files eOn and VASP signal each other through, so a run does not inherit the handshake of one that ended in this directory.
|
private |
Definition at line 246 of file VASP.cpp.