Loading...
Searching...
No Matches
RgpotPot.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#include <memory>
16#include <string>
17
18class RGPotEngine;
19
25class RgpotPot final : public Potential {
26public:
27 explicit RgpotPot(const Parameters &p);
28 ~RgpotPot() override;
29
30 RgpotPot(const RgpotPot &) = delete;
31 RgpotPot &operator=(const RgpotPot &) = delete;
32
33 void force(long N, const double *R, const int *atomicNrs, double *F,
34 double *U, double *variance, const double *box) override;
35
36 [[nodiscard]] bool isThreadSafe() const noexcept override { return false; }
38 [[nodiscard]] bool requiresIsolatedMoleculeLayout() const noexcept override {
39 return backend_ == "nwchemc";
40 }
41 [[nodiscard]] const std::string &backend() const noexcept { return backend_; }
42 [[nodiscard]] bool engineAvailable() const;
43
44private:
45 std::unique_ptr<RGPotEngine> impl_;
46 std::string backend_;
47};
Opaque rgpot-backed engine (nwchemc / cpmdc / metatomic / xtb).
Definition RGPotEngine.h:40
RgpotPot(const RgpotPot &)=delete
bool engineAvailable() const
Definition RgpotPot.cpp:107
bool requiresIsolatedMoleculeLayout() const noexcept override
NWChem molecular SCF does not support PBC; CPMD may be periodic.
Definition RgpotPot.h:38
std::string backend_
Definition RgpotPot.h:46
RgpotPot(const Parameters &p)
Definition RgpotPot.cpp:13
std::unique_ptr< RGPotEngine > impl_
Definition RgpotPot.h:45
const std::string & backend() const noexcept
Definition RgpotPot.h:41
bool isThreadSafe() const noexcept override
Whether this potential's force() can be called from multiple threads on the SAME instance.
Definition RgpotPot.h:36
~RgpotPot() override
RgpotPot & operator=(const RgpotPot &)=delete
void force(long N, const double *R, const int *atomicNrs, double *F, double *U, double *variance, const double *box) override
Definition RgpotPot.cpp:109
Potential(PotType a_ptype)
Definition Potential.h:35