eOn 3.2.0
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
testpot.cpp
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
#include "
eon/Matter.h
"
13
#include "
eon/Parameters.h
"
14
#include "
eon/Potential.h
"
15
#include "
eon/PyGuard.h
"
16
#include <cstdlib>
17
#include <iostream>
18
#include <memory>
19
#include <sstream>
20
21
int
main
() {
22
std::string confile(
"pos.con"
);
23
auto
params = std::make_shared<eonc::Parameters>();
24
eonc::ensure_interpreter
();
25
ParametersLoadAccess::potential_options
(*params).potential =
26
eonc::PotType::CatLearn
;
27
auto
pot =
28
eonc::helpers::sharePotential
(
eonc::helpers::makePotential
(params));
29
auto
matter = std::make_unique<eonc::Matter>(pot, params);
30
matter->con2matter(confile);
31
auto
[energy, forces] = pot->get_ef(
32
matter->getPositions(), matter->getAtomicNrs(), matter->getCell());
33
std::ostringstream oss;
34
oss <<
"Got "
<< energy <<
"\n"
<< forces <<
"\n"
;
35
std::cout << oss.str();
36
return
EXIT_SUCCESS;
37
}
Matter.h
Parameters.h
Potential.h
PyGuard.h
eonc::helpers::makePotential
std::unique_ptr< Potential > makePotential(const Parameters ¶ms)
Exclusive ownership.
Definition
Potential.cpp:268
eonc::helpers::sharePotential
std::shared_ptr< Potential > sharePotential(std::unique_ptr< Potential > pot)
Multi-owner boundary: one instance observed by several Matters, images, or a binding.
Definition
Potential.h:292
eonc::PotType::CatLearn
@ CatLearn
Definition
BaseStructures.h:62
eonc::ensure_interpreter
void ensure_interpreter()
Definition
NbGuard.h:21
ParametersLoadAccess::potential_options
static potential_options_t & potential_options(Parameters &p)
Definition
ParametersAccess.cpp:282
main
int main()
Definition
testpot.cpp:21
client
testpot.cpp
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf