eOn client
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
ExtPot.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
16
#include <filesystem>
17
#include <string>
18
19
class
ExtPot
:
public
Potential
{
20
21
public
:
22
ExtPot
(
const
Parameters
&p);
23
~ExtPot
();
24
void
cleanMemory
(
void
);
25
void
force
(
long
N,
const
double
*R,
const
int
*atomicNrs,
double
*F,
26
double
*U,
double
*variance,
const
double
*box)
override
;
29
[[nodiscard]]
bool
isThreadSafe
() const noexcept
override
{
return
false
; }
32
[[nodiscard]]
bool
needsPerImageInstance
() const noexcept
override
{
33
return
true
;
34
}
35
36
private
:
37
void
passToSystem
(
long
N,
const
double
*R,
const
int
*atomicNrs,
38
const
double
*box);
39
void
recieveFromSystem
(
long
N,
double
*F,
double
*U);
42
void
prepareExchangeDir
();
43
// Owned by value: the Parameters this was built from may go out of scope
44
// long before the potential does.
45
std::string
eon_extpot_path
;
49
std::filesystem::path
exchangeDir
;
52
bool
retainExchangeDir
{
false
};
53
};
Potential.h
ExtPot::recieveFromSystem
void recieveFromSystem(long N, double *F, double *U)
Definition
ExtPot.cpp:215
ExtPot::prepareExchangeDir
void prepareExchangeDir()
Definition
ExtPot.cpp:138
ExtPot::ExtPot
ExtPot(const Parameters &p)
Definition
ExtPot.cpp:120
ExtPot::~ExtPot
~ExtPot()
Definition
ExtPot.cpp:136
ExtPot::cleanMemory
void cleanMemory(void)
Definition
ExtPot.cpp:124
ExtPot::eon_extpot_path
std::string eon_extpot_path
Definition
ExtPot.h:45
ExtPot::isThreadSafe
bool isThreadSafe() const noexcept override
One instance owns one exchange directory, so two threads in force() on it write the same structure fi...
Definition
ExtPot.h:29
ExtPot::retainExchangeDir
bool retainExchangeDir
Definition
ExtPot.h:52
ExtPot::needsPerImageInstance
bool needsPerImageInstance() const noexcept override
The external program runs as a subprocess and each instance runs it in a directory of its own,...
Definition
ExtPot.h:32
ExtPot::exchangeDir
std::filesystem::path exchangeDir
Definition
ExtPot.h:49
ExtPot::passToSystem
void passToSystem(long N, const double *R, const int *atomicNrs, const double *box)
Definition
ExtPot.cpp:186
ExtPot::force
void force(long N, const double *R, const int *atomicNrs, double *F, double *U, double *variance, const double *box) override
Definition
ExtPot.cpp:166
eonc::Parameters
Definition
Parameters.h:28
eonc::Potential::Potential
Potential(PotType a_ptype)
Definition
Potential.h:35
include
eon
potentials
ExtPot
ExtPot.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf