seams-core v2.14.0
libyodaLib, the C++ engine of d-SEAMS
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
19namespace water {
20
21enum class MolMode { None, Ids, Water };
22
23struct Request {
24 int type = 0;
25 std::vector<int> types;
26 std::vector<int> molecules;
28 std::vector<int> ion_types;
29};
30
31struct Selection {
32 std::vector<char> keep;
33 std::vector<int> index;
34 std::vector<int> oxygen_types;
35 int n_oxygen = 0;
36};
37
38struct IonSite {
39 double x = 0;
40 double y = 0;
41 double z = 0;
42 int type = 0;
43};
44
45struct IonReport {
46 int ice = 0;
47 int liquid = 0;
48 double front = -1;
49 bool any = false;
50};
51
53 const molSys::PointCloud<molSys::Point<double>, double> &cloud);
54
56 const molSys::PointCloud<molSys::Point<double>, double> &cloud,
57 const Request &request);
58
60 const molSys::PointCloud<molSys::Point<double>, double> &cloud,
61 const Selection &selection);
62
66 const molSys::PointCloud<molSys::Point<double>, double> &cloud);
67
68std::vector<IonSite> collectIons(
69 const molSys::PointCloud<molSys::Point<double>, double> &cloud,
70 const Selection &selection);
71
75 const molSys::PointCloud<molSys::Point<double>, double> &oxygen,
76 const std::vector<IonSite> &ions);
77
79
80} // namespace water
81
82#endif
The main molecular system handler.
atom_state_type
Definition mol_sys.hpp:107
Water-oxygen selection for a mixed frame.
IonReport ionFront(const molSys::PointCloud< molSys::Point< double >, double > &oxygen, const std::vector< IonSite > &ions)
oxygen is the labeled water subset.
bool iceLabel(molSys::atom_state_type label)
std::vector< IonSite > collectIons(const molSys::PointCloud< molSys::Point< double >, double > &cloud, const Selection &selection)
bool hasMultiAtomMolecule(const molSys::PointCloud< molSys::Point< double >, double > &cloud)
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.
Selection selectOxygens(const molSys::PointCloud< molSys::Point< double >, double > &cloud, const Request &request)
molSys::PointCloud< molSys::Point< double >, double > subsetCloud(const molSys::PointCloud< molSys::Point< double >, double > &cloud, const Selection &selection)
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
std::vector< int > types
std::vector< int > ion_types
std::vector< int > molecules
std::vector< char > keep
std::vector< int > oxygen_types
std::vector< int > index