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
24namespace site {
25
39
40enum 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
51struct Table {
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
59std::vector<int>
61 const Table &table, Kind kind);
62
63int 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.
75 const Table &table);
76
77Table parseSiteSpec(std::string_view spec);
78
79} // namespace site
80
81#endif // SEAMS_SITE_H_
The main molecular system handler.
int lammpsTypeOfKind(const Table &table, Kind kind)
molSys::PointCloud< molSys::Point< double >, double > ionCloud(const molSys::PointCloud< molSys::Point< double >, double > &src, const Table &table)
std::vector< int > indicesOf(const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const Table &table, Kind kind)
Family
Definition site.hpp:40
@ electrolyte
Definition site.hpp:45
@ confinedWater
Definition site.hpp:47
@ ionicLiquid
Definition site.hpp:42
@ networkFormer
Definition site.hpp:48
Table parseSiteSpec(std::string_view spec)
Kind
Definition site.hpp:26
@ cationHead
Definition site.hpp:28
@ acceptor
Definition site.hpp:32
@ solvent
Definition site.hpp:37
@ unspecified
Definition site.hpp:27
This contains a collection of points; contains information for a particular frame.
Definition mol_sys.hpp:173
This contains per-particle information.
Definition mol_sys.hpp:152
Family family
Definition site.hpp:52
std::unordered_map< int, Kind > typeToKind
Definition site.hpp:53
Kind ofType(int typeId) const
Kind of(const molSys::Point< double > &p) const
std::unordered_map< int, Kind > atomOverride
Definition site.hpp:54