eOn 3.2.0
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
LinkCellNeighbors.cpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-3-Clause
2
#include "
eon/CutoffNeighbors.h
"
3
#include <linkcell.hpp>
4
5
namespace
eonc
{
6
std::vector<CutoffPair>
periodicCutoffNeighbors
(
const
double
*positions,
7
size_t
atoms,
8
const
double
*cell,
9
double
cutoff,
bool
full) {
10
const
auto
box = linkcell::Cell::from_vectors({cell[0], cell[1], cell[2]},
11
{cell[3], cell[4], cell[5]},
12
{cell[6], cell[7], cell[8]});
13
const
auto
rows = linkcell::pairs_within(positions, atoms, box, cutoff,
14
nullptr
, 0.0, !full);
15
std::vector<CutoffPair> result;
16
result.reserve(rows.size());
17
for
(
const
auto
&pair : rows)
18
result.push_back({pair.i, pair.j, pair.shift, pair.dist2});
19
return
result;
20
}
21
}
// namespace eonc
CutoffNeighbors.h
eonc
RAII resource manager for the ARTn C library with global synchronization.
Definition
ARTnSaddleSearch.cpp:23
eonc::periodicCutoffNeighbors
std::vector< CutoffPair > periodicCutoffNeighbors(const double *positions, size_t atoms, const double *cell, double cutoff, bool full)
Definition
LinkCellNeighbors.cpp:6
client
LinkCellNeighbors.cpp
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf