35 return got < 0 && err != EINTR;
43 if (restarted || pos < 0 || fileSize < pos) {
52 const std::string &screen) {
53 std::vector<std::string> args{
"liblammps",
"-echo",
"screen",
"-log",
"none"};
55 args.insert(args.end(), {
"-screen", screen});
57 args.insert(args.end(), {
"-screen",
"none"});
60 args.insert(args.end(), {
"-suffix",
"omp"});
82 void force(
long N,
const double *R,
const int *atomicNrs,
double *F,
83 double *U,
double *variance,
const double *box)
override;
84 void setFixedMask(
long nAtoms,
const double *isFixed)
override;
115 void makeNewLAMMPS(
long N,
const double *R,
const int *atomicNrs,
128#if !defined(EONMPI) && !defined(IS_WINDOWS)
172 void forceLocal(
long N,
const double *R,
const int *atomicNrs,
double *F,
173 double *U,
const double *box);
Eigen::Matrix< double, 3, 3, eOnStorageOrder > Matrix3d
bool lammpsScreenRestart_
std::string lammpsScreenPath_
bool computesStress() const noexcept override
True when force() leaves a Cauchy stress that cauchyStress() can read until the next force() on this ...
void setFixedMask(long nAtoms, const double *isFixed) override
Optional frozen-atom mask (nAtoms*3, 1.0 = fixed).
Matrix3d cauchyStress() const override
Cauchy stress in eV/Angstrom^3.
std::vector< double > fixedMask_
void makeNewLAMMPS(long N, const double *R, const int *atomicNrs, const double *box)
LAMMPSPot(const eonc::Parameters &p)
Production: process-default LammpsLoader and POSIX worker isolation.
void lammpsCommand(const char *cmd)
bool needsPerImageInstance() const noexcept override
Whether NEB should create separate Potential instances per image for true parallel force evaluation.
std::int64_t lammpsScreenPos_
void force(long N, const double *R, const int *atomicNrs, double *F, double *U, double *variance, const double *box) override
bool noteScreenGeometry(long N, const double *box)
void forceLocal(long N, const double *R, const int *atomicNrs, double *F, double *U, const double *box)
void applySetforce(long N)
eonc::ILammpsLoader & loader_
RAII resource manager for the ARTn C library with global synchronization.
std::int64_t lammpsScreenCursor(std::int64_t pos, std::int64_t fileSize, bool restarted)
Byte offset at which to keep copying a LAMMPS screen file.
bool lammpsWorkerReaped(long got, long child, int err)
True when waitpid has collected the child. EINTR is not a collection.
std::vector< std::string > lammpsOpenArgs(bool logging, bool with_omp, const std::string &screen)
LAMMPS argv.