d-SEAMS
Install
Output
Methods
Docs
Engine & CLI
Python
Rust
Julia
R
Lua / Fennel
Fortran
PLUMED
linkcell
Wiki
Cite
GitHub
seams-core
v2.14.0
libyodaLib, the C++ engine of d-SEAMS
Toggle main menu visibility
Loading...
Searching...
No Matches
water_select.hpp
Go to the documentation of this file.
1
// Copyright (c) d-SEAMS developers
2
// SPDX-License-Identifier: MIT
3
#ifndef SEAMS_WATER_SELECT_H_
4
#define SEAMS_WATER_SELECT_H_
5
6
#include <
mol_sys.hpp
>
7
8
#include <string>
9
#include <vector>
10
18
19
namespace
water
{
20
21
enum class
MolMode
{
None
,
Ids
,
Water
};
22
23
struct
Request
{
24
int
type
= 0;
25
std::vector<int>
types
;
26
std::vector<int>
molecules
;
27
MolMode
mol_mode
=
MolMode::None
;
28
std::vector<int>
ion_types
;
29
};
30
31
struct
Selection
{
32
std::vector<char>
keep
;
33
std::vector<int>
index
;
34
std::vector<int>
oxygen_types
;
35
int
n_oxygen
= 0;
36
};
37
38
struct
IonSite
{
39
double
x
= 0;
40
double
y
= 0;
41
double
z
= 0;
42
int
type
= 0;
43
};
44
45
struct
IonReport
{
46
int
ice
= 0;
47
int
liquid
= 0;
48
double
front
= -1;
49
bool
any
=
false
;
50
};
51
52
bool
hasMultiAtomMolecule
(
53
const
molSys::PointCloud
<
molSys::Point<double>
,
double
> &cloud);
54
55
Selection
selectOxygens
(
56
const
molSys::PointCloud
<
molSys::Point<double>
,
double
> &cloud,
57
const
Request
&request);
58
59
molSys::PointCloud<molSys::Point<double>
,
double
>
subsetCloud
(
60
const
molSys::PointCloud
<
molSys::Point<double>
,
double
> &cloud,
61
const
Selection
&selection);
62
65
molSys::PointCloud<molSys::Point<double>
,
double
>
keepHistoricalOxygen
(
66
const
molSys::PointCloud
<
molSys::Point<double>
,
double
> &cloud);
67
68
std::vector<IonSite>
collectIons
(
69
const
molSys::PointCloud
<
molSys::Point<double>
,
double
> &cloud,
70
const
Selection
&selection);
71
74
IonReport
ionFront
(
75
const
molSys::PointCloud
<
molSys::Point<double>
,
double
> &oxygen,
76
const
std::vector<IonSite> &ions);
77
78
bool
iceLabel
(
molSys::atom_state_type
label);
79
80
}
// namespace water
81
82
#endif
mol_sys.hpp
The main molecular system handler.
molSys::atom_state_type
atom_state_type
Definition
mol_sys.hpp:107
water
Water-oxygen selection for a mixed frame.
Definition
water_select.hpp:19
water::ionFront
IonReport ionFront(const molSys::PointCloud< molSys::Point< double >, double > &oxygen, const std::vector< IonSite > &ions)
oxygen is the labeled water subset.
water::iceLabel
bool iceLabel(molSys::atom_state_type label)
water::collectIons
std::vector< IonSite > collectIons(const molSys::PointCloud< molSys::Point< double >, double > &cloud, const Selection &selection)
water::hasMultiAtomMolecule
bool hasMultiAtomMolecule(const molSys::PointCloud< molSys::Point< double >, double > &cloud)
water::MolMode
MolMode
Definition
water_select.hpp:21
water::MolMode::Water
@ Water
Definition
water_select.hpp:21
water::MolMode::None
@ None
Definition
water_select.hpp:21
water::MolMode::Ids
@ Ids
Definition
water_select.hpp:21
water::keepHistoricalOxygen
molSys::PointCloud< molSys::Point< double >, double > keepHistoricalOxygen(const molSys::PointCloud< molSys::Point< double >, double > &cloud)
Historical dump guess: type 2 when any atom has it, otherwise type 1.
water::selectOxygens
Selection selectOxygens(const molSys::PointCloud< molSys::Point< double >, double > &cloud, const Request &request)
water::subsetCloud
molSys::PointCloud< molSys::Point< double >, double > subsetCloud(const molSys::PointCloud< molSys::Point< double >, double > &cloud, const Selection &selection)
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
water::IonReport
Definition
water_select.hpp:45
water::IonReport::liquid
int liquid
Definition
water_select.hpp:47
water::IonReport::any
bool any
Definition
water_select.hpp:49
water::IonReport::front
double front
Definition
water_select.hpp:48
water::IonReport::ice
int ice
Definition
water_select.hpp:46
water::IonSite
Definition
water_select.hpp:38
water::IonSite::y
double y
Definition
water_select.hpp:40
water::IonSite::x
double x
Definition
water_select.hpp:39
water::IonSite::type
int type
Definition
water_select.hpp:42
water::IonSite::z
double z
Definition
water_select.hpp:41
water::Request
Definition
water_select.hpp:23
water::Request::type
int type
Definition
water_select.hpp:24
water::Request::types
std::vector< int > types
Definition
water_select.hpp:25
water::Request::ion_types
std::vector< int > ion_types
Definition
water_select.hpp:28
water::Request::mol_mode
MolMode mol_mode
Definition
water_select.hpp:27
water::Request::molecules
std::vector< int > molecules
Definition
water_select.hpp:26
water::Selection
Definition
water_select.hpp:31
water::Selection::keep
std::vector< char > keep
Definition
water_select.hpp:32
water::Selection::oxygen_types
std::vector< int > oxygen_types
Definition
water_select.hpp:34
water::Selection::index
std::vector< int > index
Definition
water_select.hpp:33
water::Selection::n_oxygen
int n_oxygen
Definition
water_select.hpp:35
src
include
internal
water_select.hpp