eOn client
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
EAM.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 <array>
15
#include <cmath>
16
#include <vector>
17
18
#ifndef EAM_STANDALONE
19
#include "
eon/Potential.h
"
20
#endif
21
23
class
EAM
24
#ifndef EAM_STANDALONE
25
:
public
Potential
26
#endif
27
{
28
public
:
29
explicit
EAM
(
const
Parameters
¶ms)
30
:
Potential
(
PotType
::EAM_AL, params),
31
rc_
{6.0, 6.0, 6.0} {}
32
33
~EAM
()
override
=
default
;
34
35
void
cleanMemory
();
36
void
force
(
long
N,
const
double
*R,
const
int
*atomicNrs,
double
*F,
37
double
*U,
double
*variance,
const
double
*fullbox)
override
;
38
39
private
:
40
struct
element_parameters
{
41
const
int
Z
;
// Atomic number
42
const
double
Dm
;
// Morse potential well depth
43
const
double
alphaM
;
// Curvature at Morse minimum
44
const
double
Rm
;
// Position of Morse minimum
45
const
double
beta1
;
// Density parameter 1
46
const
double
beta2
;
// Density parameter 2
47
const
double
r_cut
;
// Cutoff distance
48
const
double
func_coeff
[9];
// 8th order poly for embedding function
49
};
50
static
const
element_parameters
el_params
[];
51
52
std::vector<long>
celllist_old_
;
53
std::vector<long>
celllist_new_
;
54
std::vector<long>
neigh_list_
;
55
bool
initialized_
{
false
};
56
std::array<double, 3>
rc_
;
57
58
void
calc_force
(
long
N,
double
*R,
const
int
*atomicNrs,
double
*F,
double
*U,
59
const
double
*box);
60
void
new_celllist
(
long
N,
const
double
*box,
long
*num_axis,
61
long
*cell_length,
long
*celllist_new,
long
num_cells,
62
double
*Rnew);
63
void
cell_to_neighbor
(
long
N,
long
num_of_cells,
long
*num_axis,
64
long
*cell_length,
long
*celllist_new,
65
long
*neigh_list);
66
int
update_cell_list
(
long
N,
long
num_cells,
long
*num_axis,
67
long
*cell_length,
long
*celllist_old,
double
*Rnew);
68
[[nodiscard]]
static
double
embedding_function
(
const
double
*func_coeff,
69
double
rho);
70
[[nodiscard]]
static
double
embedding_force
(
const
double
*func_coeff,
71
double
rho);
72
[[nodiscard]]
element_parameters
get_element_parameters
(
int
atomic_number);
73
};
Potential.h
EAM::update_cell_list
int update_cell_list(long N, long num_cells, long *num_axis, long *cell_length, long *celllist_old, double *Rnew)
Definition
EAM.cpp:326
EAM::~EAM
~EAM() override=default
EAM::neigh_list_
std::vector< long > neigh_list_
Definition
EAM.h:54
EAM::EAM
EAM(const Parameters ¶ms)
Definition
EAM.h:29
EAM::cell_to_neighbor
void cell_to_neighbor(long N, long num_of_cells, long *num_axis, long *cell_length, long *celllist_new, long *neigh_list)
Definition
EAM.cpp:250
EAM::calc_force
void calc_force(long N, double *R, const int *atomicNrs, double *F, double *U, const double *box)
Definition
EAM.cpp:125
EAM::get_element_parameters
element_parameters get_element_parameters(int atomic_number)
Definition
EAM.cpp:116
EAM::celllist_old_
std::vector< long > celllist_old_
Definition
EAM.h:52
EAM::new_celllist
void new_celllist(long N, const double *box, long *num_axis, long *cell_length, long *celllist_new, long num_cells, double *Rnew)
Definition
EAM.cpp:228
EAM::initialized_
bool initialized_
Definition
EAM.h:55
EAM::rc_
std::array< double, 3 > rc_
Definition
EAM.h:56
EAM::embedding_force
static double embedding_force(const double *func_coeff, double rho)
Definition
EAM.cpp:358
EAM::cleanMemory
void cleanMemory()
Definition
EAM.cpp:24
EAM::force
void force(long N, const double *R, const int *atomicNrs, double *F, double *U, double *variance, const double *fullbox) override
Definition
EAM.cpp:28
EAM::el_params
static const element_parameters el_params[]
Definition
EAM.h:15
EAM::embedding_function
static double embedding_function(const double *func_coeff, double rho)
Definition
EAM.cpp:349
EAM::celllist_new_
std::vector< long > celllist_new_
Definition
EAM.h:53
eonc::Parameters
Definition
Parameters.h:28
eonc::Potential::Potential
Potential(PotType a_ptype)
Definition
Potential.h:35
eonc::PotType
PotType
Definition
BaseStructures.h:36
EAM::element_parameters
Definition
EAM.h:40
EAM::element_parameters::beta1
const double beta1
Definition
EAM.h:45
EAM::element_parameters::Z
const int Z
Definition
EAM.h:41
EAM::element_parameters::r_cut
const double r_cut
Definition
EAM.h:47
EAM::element_parameters::Dm
const double Dm
Definition
EAM.h:42
EAM::element_parameters::alphaM
const double alphaM
Definition
EAM.h:43
EAM::element_parameters::beta2
const double beta2
Definition
EAM.h:46
EAM::element_parameters::Rm
const double Rm
Definition
EAM.h:44
EAM::element_parameters::func_coeff
const double func_coeff[9]
Definition
EAM.h:48
include
eon
potentials
EAM
EAM.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf