seams-core v2.6.0
libyodaLib, the C++ engine of d-SEAMS
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
site.hpp
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------------
2
// d-SEAMS - Deferred Structural Elucidation Analysis for Molecular Simulations
3
// SPDX-License-Identifier: MIT
4
//-----------------------------------------------------------------------------------
5
6
#ifndef SEAMS_SITE_H_
7
#define SEAMS_SITE_H_
8
9
#include <
mol_sys.hpp
>
10
11
#include <string_view>
12
#include <unordered_map>
13
#include <vector>
14
23
24
namespace
site
{
25
26
enum class
Kind
{
27
unspecified
,
28
cationHead
,
29
anion
,
30
tail
,
31
donorH
,
32
acceptor
,
33
polar
,
34
apolar
,
35
waterO
,
36
waterH
,
37
solvent
38
};
39
40
enum class
Family
{
41
waterIce
,
// default; CHILL/TUM allowed
42
ionicLiquid
,
// CHILL/TUM refused
43
moltenSalt
,
// CHILL/TUM refused
44
des
,
// CHILL/TUM refused
45
electrolyte
,
// CHILL/TUM only if the caller also names a waterIce subset
46
confinedIL
,
// CHILL/TUM refused
47
confinedWater
,
// 2D RDF / monolayer rings; bulk CHILL refused
48
networkFormer
// silica / BeF2; Franzblau yes, CHILL no
49
};
50
51
struct
Table
{
52
Family
family
=
Family::waterIce
;
53
std::unordered_map<int, Kind>
typeToKind
;
// LAMMPS type ID
54
std::unordered_map<int, Kind>
atomOverride
;
// atom ID wins over type
55
Kind
of
(
const
molSys::Point<double>
&p)
const
;
56
Kind
ofType
(
int
typeId)
const
;
57
};
58
59
std::vector<int>
60
indicesOf
(
const
molSys::PointCloud
<
molSys::Point<double>
,
double
> &yCloud,
61
const
Table
&table,
Kind
kind);
62
63
int
lammpsTypeOfKind
(
const
Table
&table,
Kind
kind);
// error if not unique
64
65
// One vertex per molID that carries ionKind (cationHead or anion).
66
// Coordinates: unweighted geometric COM of atoms of that molID whose
67
// kind is ionKind, unwrapped with gen::relDist to the first atom of
68
// the group (createMolIDAtomIDMultiMap, mol_sys.hpp:187-190). Copies
69
// box / boxLow from src. Point::type is 1 for cationHead molecules
70
// and 2 for anion molecules so neighList(merged, 1, 2) is legal.
71
// A molecule that is already one tagged site (UA, or one designated
72
// type per ion) is a no-op: the COM is that site.
73
molSys::PointCloud<molSys::Point<double>
,
double
>
74
ionCloud
(
const
molSys::PointCloud
<
molSys::Point<double>
,
double
> &src,
75
const
Table
&table);
76
77
Table
parseSiteSpec
(std::string_view spec);
78
79
}
// namespace site
80
81
#endif
// SEAMS_SITE_H_
mol_sys.hpp
The main molecular system handler.
site
Definition
density.hpp:22
site::lammpsTypeOfKind
int lammpsTypeOfKind(const Table &table, Kind kind)
site::ionCloud
molSys::PointCloud< molSys::Point< double >, double > ionCloud(const molSys::PointCloud< molSys::Point< double >, double > &src, const Table &table)
site::indicesOf
std::vector< int > indicesOf(const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const Table &table, Kind kind)
site::Family
Family
Definition
site.hpp:40
site::Family::electrolyte
@ electrolyte
Definition
site.hpp:45
site::Family::des
@ des
Definition
site.hpp:44
site::Family::confinedWater
@ confinedWater
Definition
site.hpp:47
site::Family::moltenSalt
@ moltenSalt
Definition
site.hpp:43
site::Family::waterIce
@ waterIce
Definition
site.hpp:41
site::Family::confinedIL
@ confinedIL
Definition
site.hpp:46
site::Family::ionicLiquid
@ ionicLiquid
Definition
site.hpp:42
site::Family::networkFormer
@ networkFormer
Definition
site.hpp:48
site::parseSiteSpec
Table parseSiteSpec(std::string_view spec)
site::Kind
Kind
Definition
site.hpp:26
site::Kind::cationHead
@ cationHead
Definition
site.hpp:28
site::Kind::waterO
@ waterO
Definition
site.hpp:35
site::Kind::waterH
@ waterH
Definition
site.hpp:36
site::Kind::acceptor
@ acceptor
Definition
site.hpp:32
site::Kind::donorH
@ donorH
Definition
site.hpp:31
site::Kind::anion
@ anion
Definition
site.hpp:29
site::Kind::tail
@ tail
Definition
site.hpp:30
site::Kind::solvent
@ solvent
Definition
site.hpp:37
site::Kind::unspecified
@ unspecified
Definition
site.hpp:27
site::Kind::apolar
@ apolar
Definition
site.hpp:34
site::Kind::polar
@ polar
Definition
site.hpp:33
molSys::PointCloud
This contains a collection of points; contains information for a particular frame.
Definition
mol_sys.hpp:173
molSys::Point
This contains per-particle information.
Definition
mol_sys.hpp:152
site::Table
Definition
site.hpp:51
site::Table::family
Family family
Definition
site.hpp:52
site::Table::typeToKind
std::unordered_map< int, Kind > typeToKind
Definition
site.hpp:53
site::Table::ofType
Kind ofType(int typeId) const
site::Table::of
Kind of(const molSys::Point< double > &p) const
site::Table::atomOverride
std::unordered_map< int, Kind > atomOverride
Definition
site.hpp:54
src
include
internal
site.hpp
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf