Loading...
Searching...
No Matches
VASP.h
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#pragma once
13
14#include "eon/Potential.h"
15
16class VASP : public Potential {
17
18public:
19 VASP(const Parameters &p)
20 : Potential(p) {
22 }
24 void initialize() {};
25 void cleanMemory(void);
26 void force(long N, const double *R, const int *atomicNrs, double *F,
27 double *U, double *variance, const double *box);
30 [[nodiscard]] bool isThreadSafe() const noexcept override { return false; }
33 [[nodiscard]] bool needsPerImageInstance() const noexcept override {
34 return false;
35 }
45 static void removeStaleFiles();
46
47private:
48 void writePOSCAR(long N, const double *R, const int *atomicNrs,
49 const double *box);
50 void readFU(long N, double *F, double *U);
51 void spawnVASP();
52 bool vaspRunning();
55 static void clearHandshakeFiles();
56 static bool firstRun;
57 static long vaspRunCount;
58 static pid_t vaspPID;
59};
void spawnVASP()
Definition VASP.cpp:146
static long vaspRunCount
Definition VASP.h:57
static void clearHandshakeFiles()
Definition VASP.cpp:104
void initialize()
Definition VASP.h:24
void writePOSCAR(long N, const double *R, const int *atomicNrs, const double *box)
Definition VASP.cpp:246
~VASP()
Definition VASP.h:23
static bool firstRun
Definition VASP.h:56
void force(long N, const double *R, const int *atomicNrs, double *F, double *U, double *variance, const double *box)
Definition VASP.cpp:215
void cleanMemory(void)
Definition VASP.cpp:128
static void removeStaleFiles()
Definition VASP.cpp:116
bool needsPerImageInstance() const noexcept override
Every instance drives the one VASP process named by the static vaspPID through the one set of files,...
Definition VASP.h:33
void readFU(long N, double *F, double *U)
Definition VASP.cpp:306
VASP(const Parameters &p)
Definition VASP.h:19
bool vaspRunning()
Definition VASP.cpp:197
bool isThreadSafe() const noexcept override
force() writes POSCAR, signals through NEWCAR and waits on FU, all at fixed names in the working dire...
Definition VASP.h:30
static pid_t vaspPID
Definition VASP.h:58
Potential(PotType a_ptype)
Definition Potential.h:35