Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
BondCutoffMapper.hpp
Go to the documentation of this file.
1
8
9#pragma once
10
12#include "core/Atom.hpp"
13
14#include <span>
15#include <string>
16#include <vector>
17
18namespace correlation::app {
19
25 std::string element1;
26 std::string element2;
27 std::string min_distance;
28 std::string max_distance;
29};
30
36public:
42 [[nodiscard]] static std::vector<CutoffEntry>
43 createDefaultCutoffEntries(std::span<const correlation::core::Element> elements);
44
52 parseCutoffMatrix(std::span<const CutoffEntry> entries,
53 std::span<const correlation::core::Element> elements);
54
55private:
61 [[nodiscard]] static real_t parseDistanceSafe(const std::string &str);
62
69 [[nodiscard]] static int findElementIndex(std::span<const correlation::core::Element> elements,
70 const std::string &symbol);
71};
72
73} // namespace correlation::app
Atom data structure and AtomID type definitions.
Contiguous 2D matrix of element-pair bond cutoff ranges.
Definition AnalysisTypes.hpp:48
Stateless transformation service mapping atomic elements to cutoff configurations.
Definition BondCutoffMapper.hpp:35
static real_t parseDistanceSafe(const std::string &str)
Safely parses a distance string to real_t with a zero fallback.
Definition BondCutoffMapper.cpp:17
static int findElementIndex(std::span< const correlation::core::Element > elements, const std::string &symbol)
Finds the index of an element symbol within an element span.
Definition BondCutoffMapper.cpp:25
static std::vector< CutoffEntry > createDefaultCutoffEntries(std::span< const correlation::core::Element > elements)
Generates default covalent cutoff entries for a collection of elements.
Definition BondCutoffMapper.cpp:36
static correlation::analysis::BondCutoffMatrix parseCutoffMatrix(std::span< const CutoffEntry > entries, std::span< const correlation::core::Element > elements)
Parses and validates cutoff entries into a symmetric BondCutoffMatrix.
Definition BondCutoffMapper.cpp:70
Definition AppController.hpp:27
double real_t
Definition Precision.hpp:18
Plain data representation of a bond cutoff pair decoupled from UI frameworks.
Definition BondCutoffMapper.hpp:24
std::string element2
Second element symbol.
Definition BondCutoffMapper.hpp:26
std::string min_distance
Minimum cutoff distance string.
Definition BondCutoffMapper.hpp:27
std::string max_distance
Maximum cutoff distance string.
Definition BondCutoffMapper.hpp:28
std::string element1
First element symbol.
Definition BondCutoffMapper.hpp:25