STORMM Source Documentation
Loading...
Searching...
No Matches
topology_util.h
1// -*-c++-*-
2#ifndef STORMM_TOPOLOGY_BOUNDS_CHECKS_H
3#define STORMM_TOPOLOGY_BOUNDS_CHECKS_H
4
5#include <string>
6#include <vector>
7#include "copyright.h"
8#include "Accelerator/hybrid.h"
9#include "Constants/scaling.h"
10#include "DataTypes/common_types.h"
11#include "DataTypes/stormm_vector_types.h"
12#include "Math/sorting_enumerators.h"
13#include "Math/vector_ops.h"
14#include "Potential/energy_enumerators.h"
15#include "Reporting/error_format.h"
16#include "atomgraph.h"
17#include "atomgraph_abstracts.h"
18#include "topology_limits.h"
19
20namespace stormm {
21namespace topology {
22
23using card::Hybrid;
24using card::HybridTargetLevel;
25using data_types::getStormmScalarTypeName;
26using data_types::getStormmHpcVectorTypeName;
27using data_types::isScalarType;
28using data_types::isHpcVectorType;
29using energy::NonbondedTheme;
30using energy::VdwCombiningRule;
31using stmath::UniqueValueHandling;
32using stmath::reduceUniqueValues;
33
53template <typename T> std::vector<T> extractBoundedListEntries(const std::vector<T> &va,
54 const std::vector<int> &va_bounds,
55 int index);
56
57template <typename T>
58void extractBoundedListEntries(std::vector<T> *result, const std::vector<T> &va,
59 const std::vector<int> &va_bounds, int index);
60
61template <typename T> std::vector<T>
62extractBoundedListEntries(const std::vector<T> &va, const std::vector<int> &va_bounds,
63 const std::vector<int> &indices,
64 UniqueValueHandling filter = UniqueValueHandling::UNIQUE_VALUES_ONLY);
65
66template <typename T> void
67extractBoundedListEntries(std::vector<T> *result, const std::vector<T> &va,
68 const std::vector<int> &va_bounds, const std::vector<int> &indices,
69 UniqueValueHandling filter = UniqueValueHandling::UNIQUE_VALUES_ONLY);
71
81template <typename T>
82std::vector<T> getRealParameters(const Hybrid<double> &item, const Hybrid<float> &sp_item,
83 HybridTargetLevel tier, int low_index, int high_index,
84 const char* caller = nullptr, const char* method = nullptr);
85
92std::string writeAtomList(const std::vector<int> &atom_list, const ChemicalDetailsKit &cdk);
93
105bool isBonded(const NonbondedKit<double> &nbk, int atom_i, int atom_j);
106bool isBonded(const AtomGraph &ag, int atom_i, int atom_j);
107bool isBonded(const AtomGraph *ag, int atom_i, int atom_j);
109
124int matchTopology(const AtomGraph *query_ag, const std::vector<AtomGraph*> &repo);
125int matchTopology(const AtomGraph &query_ag, const std::vector<AtomGraph*> &repo);
126int matchTopology(const AtomGraph *query_ag, const std::vector<AtomGraph> &repo);
127int matchTopology(const AtomGraph &query_ag, const std::vector<AtomGraph> &repo);
129
143template <typename T>
144bool hasVdwProperties(const NonbondedKit<T> &nbk, int atom_index,
145 VdwCombiningRule lj_rule = VdwCombiningRule::NBFIX);
146
147bool hasVdwProperties(const AtomGraph *ag, int atom_index,
148 VdwCombiningRule lj_rule = VdwCombiningRule::NBFIX);
149
150bool hasVdwProperties(const AtomGraph &ag, int atom_index,
151 VdwCombiningRule lj_rule = VdwCombiningRule::NBFIX);
153
164template <typename T>
165bool hasRelevantProperties(const NonbondedKit<T> &nbk, int atom_index, NonbondedTheme theme,
166 VdwCombiningRule lj_rule = VdwCombiningRule::NBFIX);
167
168} // namespace topology
169} // namespace stormm
170
171#include "topology_util.tpp"
172
173#endif
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
A struct to hold information relating to an Amber topology. This struct's member functions are limite...
Definition atomgraph.h:50
Information on atoms and residues which may be useful for applying atom masks or identifying specific...
Definition atomgraph_abstracts.h:382
Information needed for non-bonded real-space calculations. Templating is used as above,...
Definition atomgraph_abstracts.h:287