Loading...
Searching...
No Matches
ASE_ORCA.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#define PYBIND11_DETAILED_ERROR_MESSAGES
14
15#include "eon/Potential.h"
16
17#include <filesystem>
18
19#include <pybind11/eigen.h>
20#include <pybind11/embed.h>
21#include <pybind11/pybind11.h>
22
23namespace py = pybind11;
24
26
27private:
28 py::object calc;
29 py::object ase;
30 std::filesystem::path workDir;
31 size_t counter{0};
32
33public:
34 ASEOrcaPot(const eonc::Parameters &a_params);
35 virtual ~ASEOrcaPot();
36
37 // Functions
38 void force(long nAtoms, const double *R, const int *atomicNrs, double *F,
39 double *U, double *variance, const double *box) override;
40 [[nodiscard]] bool isThreadSafe() const noexcept override { return false; }
42 [[nodiscard]] bool requiresIsolatedMoleculeLayout() const noexcept override {
43 return true;
44 }
45
46 [[nodiscard]] bool needsPerImageInstance() const noexcept override {
47 return true;
48 }
49};
void force(long nAtoms, const double *R, const int *atomicNrs, double *F, double *U, double *variance, const double *box) override
Definition ASE_ORCA.cpp:119
bool isThreadSafe() const noexcept override
Whether this potential's force() can be called from multiple threads on the SAME instance.
Definition ASE_ORCA.h:40
virtual ~ASEOrcaPot()
Definition ASE_ORCA.cpp:110
ASEOrcaPot(const eonc::Parameters &a_params)
Definition ASE_ORCA.cpp:59
bool requiresIsolatedMoleculeLayout() const noexcept override
ORCA does not support PBC; non-centered PBC wraps tear molecules (#188).
Definition ASE_ORCA.h:42
py::object ase
Definition ASE_ORCA.h:29
size_t counter
Definition ASE_ORCA.h:31
bool needsPerImageInstance() const noexcept override
ORCA runs as external subprocess; separate instances are independent.
Definition ASE_ORCA.h:46
py::object calc
Definition ASE_ORCA.h:28
std::filesystem::path workDir
Definition ASE_ORCA.h:30