STORMM Source Documentation
Loading...
Searching...
No Matches
atomgraph.h
1// -*-c++-*-
2#ifndef STORMM_TOPOLOGY_H
3#define STORMM_TOPOLOGY_H
4
5#include <cmath>
6#include <vector>
7#include <string>
8#include <time.h>
9#include "copyright.h"
10#include "Constants/behavior.h"
11#include "Constants/hpc_bounds.h"
12#include "Constants/symbol_values.h"
13#include "Accelerator/hybrid.h"
14#include "DataTypes/common_types.h"
15#include "DataTypes/stormm_vector_types.h"
16#include "FileManagement/file_enumerators.h"
17#include "Parsing/citation.h"
18#include "Parsing/parsing_enumerators.h"
19#include "Structure/structure_enumerators.h"
20#include "atomgraph_abstracts.h"
21#include "atomgraph_constants.h"
22#include "atomgraph_enumerators.h"
23#include "atomgraph_refinement.h"
24#include "topology_limits.h"
25
26namespace stormm {
27namespace topology {
28
29using constants::ExceptionResponse;
30using constants::PrecisionModel;
31using card::Hybrid;
32using card::HybridTargetLevel;
33using diskutil::PrintSituation;
34using parse::Citation;
35using parse::NumberFormat;
36using parse::PolyNumeric;
37using structure::ApplyConstraints;
38using symbols::amber_ancient_bioq;
39
50class AtomGraph {
51public:
52
55 AtomGraph();
56
83 AtomGraph(const std::string &file_name, ExceptionResponse policy = ExceptionResponse::WARN,
84 TopologyKind engine_format = TopologyKind::AMBER);
85
86 AtomGraph(const std::string &file_name, ExceptionResponse policy, TopologyKind engine_format,
87 double coulomb_constant_in, double default_elec14_screening,
88 double default_vdw14_screening, double charge_rounding_tol,
89 double charge_discretization,
90 ApplyConstraints use_bond_constraints_in = ApplyConstraints::NO,
91 ApplyConstraints use_settle_in = ApplyConstraints::NO);
92
93 AtomGraph(const std::vector<AtomGraph*> &agv, const std::vector<int> &counts,
94 MoleculeOrdering arrangement = MoleculeOrdering::REORDER_ALL,
95 ExceptionResponse policy = ExceptionResponse::DIE);
96
97 AtomGraph(const AtomGraph &ag_a, int n_a, const AtomGraph &ag_b, int n_b,
98 MoleculeOrdering arrangement = MoleculeOrdering::REORDER_ALL,
99 ExceptionResponse policy = ExceptionResponse::DIE);
100
101 AtomGraph(const AtomGraph &ag_a, const AtomGraph &ag_b, int n_b,
102 MoleculeOrdering arrangement = MoleculeOrdering::REORDER_ALL,
103 ExceptionResponse policy = ExceptionResponse::DIE);
104
105 AtomGraph(const AtomGraph &ag_a, const AtomGraph &ag_b,
106 MoleculeOrdering arrangement = MoleculeOrdering::REORDER_ALL,
107 ExceptionResponse policy = ExceptionResponse::DIE);
108
109 AtomGraph(const AtomGraph &original, const std::vector<int> &atom_subset,
110 ExceptionResponse policy = ExceptionResponse::DIE,
111 double charge_rounding_tol = default_charge_rounding_tol,
112 double charge_discretization = default_charge_precision_inc,
113 ApplyConstraints use_bond_constraints_in = ApplyConstraints::NO,
114 ApplyConstraints use_settle_in = ApplyConstraints::NO);
115
116 AtomGraph(const AtomGraph &original, const std::vector<bool> &mask,
117 ExceptionResponse policy = ExceptionResponse::DIE,
118 double charge_rounding_tol = default_charge_rounding_tol,
119 double charge_discretization = default_charge_precision_inc,
120 ApplyConstraints use_bond_constraints_in = ApplyConstraints::NO,
121 ApplyConstraints use_settle_in = ApplyConstraints::NO);
123
125 ~AtomGraph() = default;
126
132 AtomGraph(const AtomGraph &original);
133
137 AtomGraph& operator=(const AtomGraph &other);
138
144 AtomGraph(AtomGraph &&original);
145
149 AtomGraph& operator=(AtomGraph &&other);
150
156 void buildFromPrmtop(const std::string &file_name,
157 const ExceptionResponse policy = ExceptionResponse::WARN,
158 double coulomb_constant_in = amber_ancient_bioq,
159 double default_elec14_screening = amber_default_elec14_screen,
160 double default_vdw14_screening = amber_default_vdw14_screen,
161 double charge_rounding_tol = default_charge_rounding_tol,
162 double charge_discretization = default_charge_precision_inc);
163
164 // Most getter functions (getThisStuff) will return the corresponding member variable. Usually
165 // a variable with a single value is an int, but it could also be an enumeration or a string.
166 // For Hybrid object member variables, getThisHybridObjectStuff() will return the entirety of
167 // the POINTER-kind object's host_data vector, up to its stated length.
168
170 std::string getTitle() const;
171
174 std::string getFileName() const;
175
179 int getAtomCount() const;
180
182 int getResidueCount() const;
183
185 int getMoleculeCount() const;
186
190 MoleculeKind getMoleculeKind(int mol_index) const;
191
194 int getOrganicMoleculeCount() const;
195
198 int getOrganicAtomCount() const;
199
202 int getWaterResidueSize() const;
203
205 int getWaterResidueCount() const;
206
208 int getLargestResidueSize() const;
209
211 int getLastSoluteResidue() const;
212
214 int getLastSoluteAtom() const;
215
217 int getFirstSolventMolecule() const;
218
220 int getFirstSolventAtom() const;
221
223 int getLargestMoleculeSize() const;
224
227 double getTotalMass() const;
228
230 int getDegreesOfFreedom() const;
231
234
248 int getDescriptor(TopologyDescriptor choice) const;
249 int getDescriptor(SanderDescriptor choice) const;
251
260 const Hybrid<int>& getResidueLimits() const;
261 int2 getResidueLimits(int index) const;
263
273 std::vector<int> getResidueIndex() const;
274 int getResidueIndex(int atom_index) const;
276
290 std::vector<int> getStructuralAtomNumber() const;
291 std::vector<int> getStructuralAtomNumber(int low_index, int high_index) const;
292 int getStructuralAtomNumber(int index) const;
294
306 std::vector<int> getResidueNumber() const;
307 std::vector<int> getResidueNumber(int low_index, int high_index) const;
308 int getResidueNumber(int index) const;
310
321 std::vector<int> getMoleculeLimits() const;
322 int2 getMoleculeLimits(int index) const;
324
333 std::vector<int> getParticlesPerMolecule() const;
334 int getParticlesPerMolecule(int index) const;
336
348 std::vector<int> getAtomicNumber() const;
349 std::vector<int> getAtomicNumber(int low_index, int high_index) const;
350 int getAtomicNumber(int index) const;
352
365 std::vector<bool> getAtomMobility() const;
366 std::vector<bool> getAtomMobility(int low_index, int high_index) const;
367 bool getAtomMobility(int index) const;
369
379 std::vector<uint> getAtomMobilityMask() const;
380 std::vector<uint> getAtomMobilityMask(int low_index, int high_index) const;
382
396 void modifyAtomMobility(MobilitySetting movement);
397 void modifyAtomMobility(int low_index, int high_index, MobilitySetting movement);
398 void modifyAtomMobility(int index, MobilitySetting movement);
399 void modifyAtomMobility(const std::vector<int> &mask, MobilitySetting movement);
401
413 std::vector<int> getMoleculeMembership() const;
414 std::vector<int> getMoleculeMembership(int low_index, int high_index) const;
415 int getMoleculeMembership(int index) const;
417
426 std::vector<int> getMoleculeContents() const;
427 std::vector<int> getMoleculeContents(int index) const;
429
441 template <typename T> std::vector<T> getPartialCharge() const;
442 template <typename T> std::vector<T> getPartialCharge(int low_index, int high_index) const;
443 template <typename T> T getPartialCharge(int index) const;
445
460 template <typename T> std::vector<T> getAtomicMass(MassForm rep = MassForm::ORDINARY) const;
461 template <typename T> std::vector<T> getAtomicMass(int low_index, int high_index,
462 MassForm rep = MassForm::ORDINARY) const;
463 template <typename T> T getAtomicMass(int index, MassForm rep = MassForm::ORDINARY) const;
465
477 const Hybrid<char4>& getAtomName() const;
478 std::vector<char4> getAtomName(int low_index, int high_index) const;
479 char4 getAtomName(int index) const;
481
493 const Hybrid<char4>& getAtomType() const;
494 std::vector<char4> getAtomType(int low_index, int high_index) const;
495 char4 getAtomType(int index) const;
497
502 std::string getFullAtomName(int index) const;
503
506 std::vector<std::vector<char4>> getAtomTypeNameTable() const;
507
516 const Hybrid<char4>& getResidueName() const;
517 char4 getResidueName(int index) const;
519
521 int getUreyBradleyTermCount() const;
522
524 int getCharmmImprTermCount() const;
525
527 int getCmapTermCount() const;
528
531
533 int getCharmmImprParameterCount() const;
534
536 int getCmapSurfaceCount() const;
537
542 int getCmapDimension(int index) const;
543
551 template <typename T> UreyBradleyTerm<T> getUreyBradleyTerm(int index) const;
552
560 template <typename T> CharmmImprTerm<T> getCharmmImprTerm(int index) const;
561
568 template <typename T> CmapTerm<T> getCmapTerm(int index) const;
569
571 int getBondTermCount() const;
572
574 int getAngleTermCount() const;
575
577 int getDihedralTermCount() const;
578
580 int getBondParameterCount() const;
581
583 int getAngleParameterCount() const;
584
586 int getDihedralParameterCount() const;
587
592 template <typename T> BondTerm<T> getBondTerm(int index) const;
593
598 template <typename T> AngleTerm<T> getAngleTerm(int index) const;
599
604 template <typename T> DihedralTerm<T> getDihedralTerm(int index) const;
605
607 int getVirtualSiteCount() const;
608
613
629 std::vector<int> findVirtualSites() const;
630 std::vector<int2> findVirtualSites(int low_index, int high_index) const;
631 int findVirtualSites(int index) const;
633
639 int getVirtualSiteIndex(int atom_index, ExceptionResponse policy = ExceptionResponse::DIE) const;
640
645 VirtualSiteKind getVirtualSiteFrameType(int index) const;
646
653 int getVirtualSiteFrameAtom(int index, int nfrm) const;
654
662 template <typename T> T getVirtualSiteFrameDimension(int index, int ndim);
663
665 int getChargeTypeCount() const;
666
668 int getLJTypeCount() const;
669
671 int getTotalExclusions() const;
672
674 UnitCellType getUnitCellType() const;
675
677 ImplicitSolventModel getImplicitSolventModel() const;
678
680 double getDielectricConstant() const;
681
683 double getSaltConcentration() const;
684
687 double getCoulombConstant() const;
688
690 double getElectrostatic14Screening() const;
691
693 double getVanDerWaals14Screening() const;
694
696 std::string getPBRadiiSet() const;
697
699 bool usesShake() const;
700
702 bool usesSettle() const;
703
705 std::string getWaterResidueName() const;
706
709 int getRigidWaterCount() const;
710
714
716 int getSettleGroupCount() const;
717
719 int getBondConstraintCount() const;
720
722 int getConstraintGroupCount() const;
723
727 std::vector<int> getConstraintGroupAtoms(int index) const;
728
730 int getConstraintGroupTotalSize() const;
731
733 int getNonrigidParticleCount() const;
734
746 std::vector<int> getChargeIndex() const;
747 std::vector<int> getChargeIndex(int low_index, int high_index) const;
748 int getChargeIndex(int index) const;
750
762 std::vector<int> getLennardJonesIndex() const;
763 std::vector<int> getLennardJonesIndex(int low_index, int high_index) const;
764 int getLennardJonesIndex(int index) const;
766
774 std::vector<int> getAtomExclusions(int index) const;
775
780 std::vector<int> getNonbonded11Exclusions(int index) const;
781
785 std::vector<int> getNonbonded12Exclusions(int index) const;
786
790 std::vector<int> getNonbonded13Exclusions(int index) const;
791
795 std::vector<int> getNonbonded14Exclusions(int index) const;
796
801 template <typename T> T getChargeParameter(int index) const;
802
815 template <typename T> T getLennardJonesSigma(int index_a, int index_b) const;
816 template <typename T> T getLennardJonesSigma(int index_a) const;
817 template <typename T> std::vector<T> getLennardJonesSigma() const;
819
832 template <typename T> T getLennardJonesEpsilon(int index_a, int index_b) const;
833 template <typename T> T getLennardJonesEpsilon(int index_a) const;
834 template <typename T> std::vector<T> getLennardJonesEpsilon() const;
836
848 template <typename T> std::vector<T> getAtomPBRadius() const;
849 template <typename T> std::vector<T> getAtomPBRadius(int low_index, int high_index) const;
850 template <typename T> T getAtomPBRadius(int index) const;
852
864 template <typename T> std::vector<T> getGBScreeningFactor() const;
865 template <typename T> std::vector<T> getGBScreeningFactor(int low_index, int high_index) const;
866 template <typename T> T getGBScreeningFactor(int index) const;
868
872 std::vector<char4> matchOverflowAtomName(const std::string &query) const;
873
877 std::vector<char4> matchOverflowAtomType(const std::string &query) const;
878
882 std::vector<char4> matchOverflowResidueName(const std::string &query) const;
883
888 getDoublePrecisionValenceKit(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
889
894 getSinglePrecisionValenceKit(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
895
900 getDoublePrecisionNonbondedKit(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
901
906 getSinglePrecisionNonbondedKit(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
907
912 getDoublePrecisionImplicitSolventKit(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
913
918 getSinglePrecisionImplicitSolventKit(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
919
925 getChemicalDetailsKit(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
926
932 getDoublePrecisionVirtualSiteKit(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
933
939 getSinglePrecisionVirtualSiteKit(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
940
945 getDoublePrecisionConstraintKit(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
946
956 getSinglePrecisionConstraintKit(HybridTargetLevel tier = HybridTargetLevel::HOST) const;
957
958#ifdef STORMM_USE_HPC
959# ifdef STORMM_USE_CUDA
962 ValenceKit<double> getDeviceViewToHostDPValenceKit() const;
963
966 ValenceKit<float> getDeviceViewToHostSPValenceKit() const;
967
970 NonbondedKit<double> getDeviceViewToHostDPNonbondedKit() const;
971
974 NonbondedKit<float> getDeviceViewToHostSPNonbondedKit() const;
975
978 ImplicitSolventKit<double> getDeviceViewToHostDPImplicitSolventKit() const;
979
982 ImplicitSolventKit<float> getDeviceViewToHostSPImplicitSolventKit() const;
983
986 ChemicalDetailsKit getDeviceViewToHostChemicalDetailsKit() const;
987
990 VirtualSiteKit<double> getDeviceViewToHostDPVirtualSiteKit() const;
991
994 VirtualSiteKit<float> getDeviceViewToHostSPVirtualSiteKit() const;
995
998 ConstraintKit<double> getDeviceViewToHostDPConstraintKit() const;
999
1002 ConstraintKit<float> getDeviceViewToHostSPConstraintKit() const;
1003# endif
1004#endif
1005
1012 const AtomGraph* getSelfPointer() const;
1015
1016#ifdef STORMM_USE_HPC
1018 void upload();
1019
1021 void download();
1022#endif
1023
1027 void setSource(const std::string &new_source);
1028
1051 void setBondParameters(double new_keq, double new_leq, bool set_keq, bool set_leq, int parm_idx,
1052 ExceptionResponse policy = ExceptionResponse::SILENT);
1053
1054 void setBondParameters(double new_keq, double new_leq, bool set_keq, bool set_leq, char4 type_a,
1055 char4 type_b, ExceptionResponse policy = ExceptionResponse::SILENT);
1057
1081 void setAngleParameters(double new_keq, double new_teq, bool set_keq, bool set_teq, int parm_idx,
1082 ExceptionResponse policy = ExceptionResponse::SILENT);
1083
1084 void setAngleParameters(double new_keq, double new_teq, bool set_keq, bool set_teq, char4 type_a,
1085 char4 type_b, char4 type_c,
1086 ExceptionResponse policy = ExceptionResponse::SILENT);
1088
1116 void setDihedralParameters(double new_amplitude, double new_phase_angle, bool set_amplitude,
1117 bool set_phase_angle, int parm_idx,
1118 ExceptionResponse policy = ExceptionResponse::SILENT);
1119
1120 void setDihedralParameters(double new_amplitude, double new_phase_angle, bool set_amplitude,
1121 bool set_phase_angle, char4 type_a, char4 type_b, char4 type_c,
1122 char4 type_d, double periodicity,
1123 ExceptionResponse policy = ExceptionResponse::SILENT);
1125
1145 void setUreyBradleyParameters(double new_keq, double new_leq, bool set_keq, bool set_leq,
1146 int parm_idx,
1147 ExceptionResponse policy = ExceptionResponse::SILENT);
1148
1149 void setUreyBradleyParameters(double new_keq, double new_leq, bool set_keq, bool set_leq,
1150 char4 type_a, char4 type_b, char4 type_c,
1151 ExceptionResponse policy = ExceptionResponse::SILENT);
1153
1176 void setCharmmImprParameters(double new_stiffness, double new_phase_angle, bool set_stiffness,
1177 bool set_phase_angle, int parm_idx,
1178 ExceptionResponse policy = ExceptionResponse::SILENT);
1179
1180 void setCharmmImprParameters(double new_stiffness, double new_phase_angle, bool set_stiffness,
1181 bool set_phase_angle, char4 type_a, char4 type_b, char4 type_c,
1182 char4 type_d, ExceptionResponse policy = ExceptionResponse::SILENT);
1184
1197 void setImplicitSolventModel(ImplicitSolventModel igb_in, double dielectric_in = 80.0,
1198 double saltcon_in = 0.0,
1199 AtomicRadiusSet radii_set = AtomicRadiusSet::NONE,
1200 ExceptionResponse policy = ExceptionResponse::WARN);
1201
1210 void setWaterResidueName(const char4 new_name);
1211 void setWaterResidueName(const std::string &new_name);
1213
1224 void printToFile(const std::string &output_file = {},
1225 TopologyKind output_style = TopologyKind::AMBER,
1226 PrintSituation expectation = PrintSituation::OPEN_NEW,
1227 ExceptionResponse pr_policy = ExceptionResponse::DIE) const;
1228
1231 void printAmberFormat(const std::string &output_file = {},
1232 PrintSituation expectation = PrintSituation::OPEN_NEW,
1233 ExceptionResponse pr_policy = ExceptionResponse::DIE) const;
1234
1235private:
1236
1237 // Title, version, and date stamps found in this topology
1238 char version_stamp[16];
1239 tm date;
1240 std::string title;
1241 std::string source;
1242
1244 std::vector<Citation> force_fields;
1245
1246 // Counts of atoms, residues, and other parts of the system
1247 int atom_count;
1248 int residue_count;
1249 int molecule_count;
1250 int largest_residue_size;
1251 int last_solute_residue;
1252 int last_solute_atom;
1253 int first_solvent_molecule;
1254 int last_atom_before_cap;
1255 int implicit_copy_count;
1258 int largest_molecule_size;
1259 int water_residue_size;
1260 int water_residue_count;
1261 int unconstrained_dof;
1263 int constrained_dof;
1265 Hybrid<int> descriptors;
1267 Hybrid<int> residue_limits;
1268 Hybrid<int> atom_struc_numbers;
1271 Hybrid<int> residue_numbers;
1275 Hybrid<int> molecule_limits;
1277
1278 // Atom and residue details
1279 Hybrid<int> atomic_numbers;
1280 Hybrid<int> mobile_atoms;
1281 Hybrid<int> molecule_membership;
1283 Hybrid<int> molecule_contents;
1285 Hybrid<double> atomic_charges;
1286 Hybrid<double> atomic_masses;
1287 Hybrid<double> inverse_atomic_masses;
1288 Hybrid<float> sp_atomic_charges;
1289 Hybrid<float> sp_atomic_masses;
1290 Hybrid<float> sp_inverse_atomic_masses;
1291 Hybrid<char4> atom_names;
1292 Hybrid<char4> atom_types;
1293 Hybrid<char4> residue_names;
1294
1295 // Relevant information for CHARMM valence terms (the CHARMM force field has many terms that
1296 // function in the same ways as the parameters that make up all of Amber, but since Amber works
1297 // exclusively in these terms (harmonic angles in the theta bending dimension, cosine-based
1298 // dihedral terms, cosine-based impropers using the same formula) they are referred to as
1299 // "AMBER" force field family parameters (see ForceFieldFamily enum class above). The "CHARMM"
1300 // family of parameters include Urey-Bradley angle terms, CHARMM impropers (yet another take on
1301 // harmonic potentials), and CHARMM CMAP terms. The Amber ff19SB force field uses CHARMM CMAPs,
1302 // but such terms always belong to the "CHARMM" family of parameters.
1303 int urey_bradley_term_count;
1304 int charmm_impr_term_count;
1305 int cmap_term_count;
1306 int urey_bradley_parameter_count;
1307 int charmm_impr_parameter_count;
1308 int cmap_surface_count;
1309 int urey_bradley_pert_term_count;
1311 int charmm_impr_pert_term_count;
1313 int cmap_pert_term_count;
1314 int urey_bradleys_in_perturbed_group;
1315 int charmm_imprs_in_perturbed_group;
1317 int cmaps_in_perturbed_group;
1318 Hybrid<int> urey_bradley_i_atoms;
1319 Hybrid<int> urey_bradley_k_atoms;
1320 Hybrid<int> urey_bradley_parameter_indices;
1321 Hybrid<int> urey_bradley_assigned_atoms;
1326 Hybrid<int> urey_bradley_assigned_index;
1331 Hybrid<int> urey_bradley_assigned_terms;
1333 Hybrid<int> urey_bradley_assigned_bounds;
1335 Hybrid<int> charmm_impr_i_atoms;
1336 Hybrid<int> charmm_impr_j_atoms;
1337 Hybrid<int> charmm_impr_k_atoms;
1338 Hybrid<int> charmm_impr_l_atoms;
1339 Hybrid<int> charmm_impr_parameter_indices;
1340 Hybrid<int> charmm_impr_assigned_atoms;
1346 Hybrid<int> charmm_impr_assigned_index;
1352 Hybrid<int> charmm_impr_assigned_terms;
1354 Hybrid<int> charmm_impr_assigned_bounds;
1356 Hybrid<int> cmap_i_atoms;
1357 Hybrid<int> cmap_j_atoms;
1358 Hybrid<int> cmap_k_atoms;
1359 Hybrid<int> cmap_l_atoms;
1360 Hybrid<int> cmap_m_atoms;
1361 Hybrid<int> cmap_surface_dimensions;
1363 Hybrid<int> cmap_surface_bounds;
1366 Hybrid<int> cmap_patch_bounds;
1373 Hybrid<int> cmap_surface_indices;
1374 Hybrid<int> cmap_assigned_atoms;
1379 Hybrid<int> cmap_assigned_index;
1384 Hybrid<int> cmap_assigned_terms;
1385 Hybrid<int> cmap_assigned_bounds;
1386 Hybrid<double> urey_bradley_stiffnesses;
1387 Hybrid<double> urey_bradley_equilibria;
1388 Hybrid<double> charmm_impr_stiffnesses;
1389 Hybrid<double> charmm_impr_phase_angles;
1390 Hybrid<double> cmap_surfaces;
1392 Hybrid<double> cmap_phi_derivatives;
1394 Hybrid<double> cmap_psi_derivatives;
1396 Hybrid<double> cmap_phi_psi_derivatives;
1398
1408 Hybrid<double> cmap_patches;
1409 Hybrid<float> sp_urey_bradley_stiffnesses;
1411 Hybrid<float> sp_urey_bradley_equilibria;
1413 Hybrid<float> sp_charmm_impr_stiffnesses;
1414 Hybrid<float> sp_charmm_impr_phase_angles;
1415 Hybrid<float> sp_cmap_surfaces;
1417 Hybrid<float> sp_cmap_phi_derivatives;
1418 Hybrid<float> sp_cmap_psi_derivatives;
1419 Hybrid<float> sp_cmap_phi_psi_derivatives;
1420 Hybrid<float> sp_cmap_patches;
1421
1422 // Relevant information for the standard ("Amber") bonded calculation
1423 int bond_term_with_hydrogen;
1424 int angl_term_with_hydrogen;
1425 int dihe_term_with_hydrogen;
1426 int bond_term_without_hydrogen;
1427 int angl_term_without_hydrogen;
1428 int dihe_term_without_hydrogen;
1429 int bond_term_count;
1430 int angl_term_count;
1431 int dihe_term_count;
1432 int bond_parameter_count;
1433 int angl_parameter_count;
1434 int dihe_parameter_count;
1435 int bond_perturbation_term_count;
1436 int angl_perturbation_term_count;
1437 int dihe_perturbation_term_count;
1438 int bonds_in_perturbed_group;
1439 int angls_in_perturbed_group;
1440 int dihes_in_perturbed_group;
1441 int bonded_group_count;
1442 Hybrid<double> bond_stiffnesses;
1443 Hybrid<double> bond_equilibria;
1444 Hybrid<double> angl_stiffnesses;
1445 Hybrid<double> angl_equilibria;
1446 Hybrid<double> dihe_amplitudes;
1447 Hybrid<double> dihe_periodicities;
1448 Hybrid<double> dihe_phase_angles;
1449 Hybrid<float> sp_bond_stiffnesses;
1450 Hybrid<float> sp_bond_equilibria;
1451 Hybrid<float> sp_angl_stiffnesses;
1452 Hybrid<float> sp_angl_equilibria;
1453 Hybrid<float> sp_dihe_amplitudes;
1454 Hybrid<float> sp_dihe_periodicities;
1455 Hybrid<float> sp_dihe_phase_angles;
1456 Hybrid<int> bond_i_atoms;
1457 Hybrid<int> bond_j_atoms;
1458 Hybrid<int> bond_parameter_indices;
1459 Hybrid<int> bond_assigned_atoms;
1464 Hybrid<int> bond_assigned_index;
1468 Hybrid<int> bond_assigned_terms;
1469 Hybrid<int> bond_assigned_bounds;
1470 Hybrid<int> angl_i_atoms;
1471 Hybrid<int> angl_j_atoms;
1472 Hybrid<int> angl_k_atoms;
1473 Hybrid<int> angl_parameter_indices;
1474 Hybrid<int> angl_assigned_atoms;
1479 Hybrid<int> angl_assigned_index;
1484 Hybrid<int> angl_assigned_terms;
1485 Hybrid<int> angl_assigned_bounds;
1486 Hybrid<int> dihe_i_atoms;
1487 Hybrid<int> dihe_j_atoms;
1488 Hybrid<int> dihe_k_atoms;
1489 Hybrid<int> dihe_l_atoms;
1490 Hybrid<int> dihe_parameter_indices;
1491 Hybrid<int> dihe14_parameter_indices;
1493 Hybrid<int> dihe_assigned_atoms;
1498 Hybrid<int> dihe_assigned_index;
1503 Hybrid<int> dihe_assigned_terms;
1504 Hybrid<int> dihe_assigned_bounds;
1505 Hybrid<int> bond_evaluation_mask;
1508 Hybrid<int> angl_evaluation_mask;
1511 Hybrid<char4> bond_modifiers;
1512 Hybrid<char4> angl_modifiers;
1513 Hybrid<char4> dihe_modifiers;
1514 Hybrid<char4> bond_assigned_mods;
1517 Hybrid<char4> angl_assigned_mods;
1520 Hybrid<char4> dihe_assigned_mods;
1523
1524 // Information relevant to virtual site placement
1525 int virtual_site_count;
1526 int virtual_site_parameter_set_count;
1529 Hybrid<int> virtual_site_atoms;
1530 Hybrid<int> virtual_site_frame_types;
1531 Hybrid<int> virtual_site_frame1_atoms;
1532 Hybrid<int> virtual_site_frame2_atoms;
1533 Hybrid<int> virtual_site_frame3_atoms;
1534 Hybrid<int> virtual_site_frame4_atoms;
1535 Hybrid<int> virtual_site_parameter_indices;
1541 Hybrid<double> virtual_site_frame_dim1;
1542 Hybrid<double> virtual_site_frame_dim2;
1544 Hybrid<double> virtual_site_frame_dim3;
1546 Hybrid<float> sp_virtual_site_frame_dim1;
1547 Hybrid<float> sp_virtual_site_frame_dim2;
1548 Hybrid<float> sp_virtual_site_frame_dim3;
1549
1550 // Relevant information for the non-bonded calculation
1551 int charge_type_count;
1552 int lj_type_count;
1553 bool has_14_lennard_jones_data;
1556 int total_exclusions;
1557 int attenuated_14_type_count;
1558 int inferred_14_attenuations;
1569 UnitCellType periodic_box_class;
1571 ImplicitSolventModel gb_style;
1576 double dielectric_constant;
1578 double salt_concentration;
1580 double coulomb_constant;
1583 double elec14_screening_factor;
1586 double vdw14_screening_factor;
1588 std::string pb_radii_set;
1589 Hybrid<int> charge_indices;
1590 Hybrid<int> lennard_jones_indices;
1591 Hybrid<int> atom_exclusion_bounds;
1592 Hybrid<int> atom_exclusion_list;
1597 Hybrid<int> nb11_exclusion_bounds;
1598 Hybrid<int> nb11_exclusion_list;
1599 Hybrid<int> nb12_exclusion_bounds;
1600 Hybrid<int> nb12_exclusion_list;
1601 Hybrid<int> nb13_exclusion_bounds;
1602 Hybrid<int> nb13_exclusion_list;
1603 Hybrid<int> nb14_exclusion_bounds;
1604 Hybrid<int> nb14_exclusion_list;
1605 Hybrid<int> infr14_i_atoms;
1607 Hybrid<int> infr14_l_atoms;
1609 Hybrid<int> infr14_parameter_indices;
1614 Hybrid<int> neck_gb_indices;
1616 Hybrid<double> charge_parameters;
1619 Hybrid<double> lj_a_values;
1620 Hybrid<double> lj_b_values;
1621 Hybrid<double> lj_c_values;
1622 Hybrid<double> lj_14_a_values;
1623 Hybrid<double> lj_14_b_values;
1624 Hybrid<double> lj_14_c_values;
1625 Hybrid<double> lj_sigma_values;
1627 Hybrid<double> lj_14_sigma_values;
1629 Hybrid<double> lj_type_corrections;
1630 Hybrid<double> attn14_elec_factors;
1632 Hybrid<double> attn14_vdw_factors;
1634 Hybrid<double> atomic_pb_radii;
1635 Hybrid<double> gb_screening_factors;
1636 Hybrid<double> gb_alpha_parameters;
1639 Hybrid<double> gb_beta_parameters;
1640 Hybrid<double> gb_gamma_parameters;
1641 Hybrid<float> sp_charge_parameters;
1643 Hybrid<float> sp_lj_a_values;
1644 Hybrid<float> sp_lj_b_values;
1645 Hybrid<float> sp_lj_c_values;
1646 Hybrid<float> sp_lj_14_a_values;
1647 Hybrid<float> sp_lj_14_b_values;
1648 Hybrid<float> sp_lj_14_c_values;
1649 Hybrid<float> sp_lj_sigma_values;
1650 Hybrid<float> sp_lj_14_sigma_values;
1651 Hybrid<float> sp_lj_type_corrections;
1652 Hybrid<float> sp_attn14_elec_factors;
1654 Hybrid<float> sp_attn14_vdw_factors;
1656 Hybrid<float> sp_atomic_pb_radii;
1657 Hybrid<float> sp_gb_screening_factors;
1658 Hybrid<float> sp_gb_alpha_parameters;
1659 Hybrid<float> sp_gb_beta_parameters;
1660 Hybrid<float> sp_gb_gamma_parameters;
1661
1662 // MD propagation algorithm directives
1663 ApplyConstraints use_shake;
1664 ApplyConstraints use_settle;
1665 PerturbationSetting use_perturbation_info;
1666 SolventCapSetting use_solvent_cap_option;
1667 PolarizationSetting use_polarization;
1668 char4 water_residue_name;
1670 std::string bond_constraint_mask;
1671 std::string bond_constraint_omit_mask;
1673 int bond_constraint_count;
1678 int nonrigid_particle_count;
1681 int settle_group_count;
1684 int settle_parameter_count;
1689 int constraint_group_count;
1690 int constraint_parameter_count;
1695 Hybrid<int> settle_oxygen_atoms;
1696 Hybrid<int> settle_hydro1_atoms;
1697 Hybrid<int> settle_hydro2_atoms;
1698 Hybrid<int> settle_parameter_indices;
1701 Hybrid<int> constraint_group_atoms;
1709 Hybrid<int> constraint_group_bounds;
1712 Hybrid<int> constraint_parameter_indices;
1723 Hybrid<int> constraint_parameter_bounds;
1725 Hybrid<double> settle_mo;
1726 Hybrid<double> settle_mh;
1727 Hybrid<double> settle_moh;
1729 Hybrid<double> settle_mormt;
1730 Hybrid<double> settle_mhrmt;
1732 Hybrid<double> settle_ra;
1733 Hybrid<double> settle_rb;
1734 Hybrid<double> settle_rc;
1735 Hybrid<double> constraint_inverse_masses;
1736 Hybrid<double> constraint_squared_lengths;
1737 Hybrid<float> sp_settle_mo;
1738 Hybrid<float> sp_settle_mh;
1739 Hybrid<float> sp_settle_moh;
1741 Hybrid<float> sp_settle_mormt;
1743 Hybrid<float> sp_settle_mhrmt;
1745 Hybrid<float> sp_settle_ra;
1746 Hybrid<float> sp_settle_rb;
1747 Hybrid<float> sp_settle_rc;
1748 Hybrid<float> sp_constraint_inverse_masses;
1749 Hybrid<float> sp_constraint_squared_lengths;
1750
1751 // Atom, atom type, and residue name overflow keys
1752 Hybrid<char4> atom_overflow_names;
1753 Hybrid<char4> atom_overflow_types;
1754 Hybrid<char4> residue_overflow_names;
1755
1756 // Information currently unused
1757 int unused_nhparm;
1758 int unused_nparm;
1760 int unused_natyp;
1762 int hbond_10_12_parameter_count;
1763 int heavy_bonds_plus_constraints;
1764 int heavy_angls_plus_constraints;
1765 int heavy_dihes_plus_constraints;
1767 Hybrid<int> tree_joining_info;
1769 Hybrid<int> last_rotator_info;
1771 Hybrid<double> solty_info;
1772 Hybrid<double> hbond_a_values;
1774 Hybrid<double> hbond_b_values;
1776 Hybrid<double> hbond_cutoffs;
1778 Hybrid<double> atomic_polarizabilities;
1780 Hybrid<char4> tree_symbols;
1782
1789 Hybrid<int> int_data;
1790 Hybrid<double> double_data;
1791 Hybrid<float> float_data;
1792 Hybrid<char4> char4_data;
1794
1798 void loadHybridArrays(const std::vector<int> &tmp_desc,
1799 const std::vector<int> &tmp_residue_limits,
1800 const std::vector<int> &tmp_atom_struc_numbers,
1801 const std::vector<int> &tmp_residue_numbers,
1802 const std::vector<int> &tmp_molecule_limits,
1803 const std::vector<int> &tmp_atomic_numbers,
1804 const std::vector<int> &tmp_molecule_membership,
1805 const std::vector<int> &tmp_mobile_atoms,
1806 const std::vector<int> &tmp_molecule_contents,
1807 const std::vector<int> &tmp_cmap_surf_dims,
1808 const std::vector<int> &tmp_cmap_surf_bounds,
1809 const std::vector<int> &tmp_charge_indices,
1810 const std::vector<int> &tmp_lennard_jones_indices,
1811 const std::vector<int> &tmp_inferred_14_i_atoms,
1812 const std::vector<int> &tmp_inferred_14_j_atoms,
1813 const std::vector<int> &tmp_inferred_14_param_idx,
1814 const std::vector<int> &tmp_neck_gb_indices,
1815 const std::vector<int> &tmp_tree_joining_info,
1816 const std::vector<int> &tmp_last_rotator_info,
1817 const std::vector<double> &tmp_charges,
1818 const std::vector<double> &tmp_masses,
1819 const std::vector<double> &tmp_ub_stiffnesses,
1820 const std::vector<double> &tmp_ub_equilibria,
1821 const std::vector<double> &tmp_charmm_impr_stiffnesses,
1822 const std::vector<double> &tmp_charmm_impr_phase_angles,
1823 const std::vector<double> &tmp_cmap_surfaces,
1824 const std::vector<double> &tmp_bond_stiffnesses,
1825 const std::vector<double> &tmp_bond_equilibria,
1826 const std::vector<double> &tmp_angl_stiffnesses,
1827 const std::vector<double> &tmp_angl_equilibria,
1828 const std::vector<double> &tmp_dihe_amplitudes,
1829 const std::vector<double> &tmp_dihe_periodicities,
1830 const std::vector<double> &tmp_dihe_phase_angles,
1831 const std::vector<double> &tmp_charge_parameters,
1832 const std::vector<double> &tmp_lj_a_values,
1833 const std::vector<double> &tmp_lj_b_values,
1834 const std::vector<double> &tmp_lj_c_values,
1835 const std::vector<double> &tmp_lj_14_a_values,
1836 const std::vector<double> &tmp_lj_14_b_values,
1837 const std::vector<double> &tmp_lj_14_c_values,
1838 const std::vector<double> &tmp_atomic_pb_radii,
1839 const std::vector<double> &tmp_gb_screening_factors,
1840 const std::vector<double> &tmp_gb_coef,
1841 const std::vector<double> &tmp_solty_info,
1842 const std::vector<double> &tmp_hbond_a_values,
1843 const std::vector<double> &tmp_hbond_b_values,
1844 const std::vector<double> &tmp_hbond_cutoffs,
1845 const std::vector<double> &tmp_atpol,
1846 const std::vector<char4> &tmp_atom_names,
1847 const std::vector<char4> &tmp_atom_types,
1848 const std::vector<char4> &tmp_residue_names,
1849 const std::vector<char4> &tmp_tree_symbols,
1850 const CmapAccessories &cmap_table,
1851 const CondensedExclusions &cond_excl,
1852 const BasicValenceTable &basic_vtable,
1853 const CharmmValenceTable &charmm_vtable,
1854 const AttenuationParameterSet &attn_parm,
1855 const VirtualSiteTable &vsite_table,
1856 const Map1234 &all_nb_excl, const ConstraintTable &cnst_table);
1857
1860 void rebasePointers();
1861
1866 void characterizeWaterResidue();
1867
1871 void printAmberSection(std::ofstream *foutp, const std::string &section_name,
1872 const std::vector<PolyNumeric> &values, int values_per_line,
1873 int value_width, int decimal_places, NumberFormat fmt,
1874 const std::string &task) const;
1875
1878 friend class AtomGraphStage;
1879};
1880
1889std::vector<int2> findMoleculeOrder(const std::vector<AtomGraph*> &agv,
1890 const std::vector<int> &counts,
1891 std::vector<int2> *origins = nullptr,
1892 MoleculeOrdering arrangement = MoleculeOrdering::REORDER_ALL);
1893
1902bool scanForExclusion(const std::vector<int> &list, int llim, int hlim, int partner);
1903
1913void cullPriorExclusions(std::vector<int3> *proposals, const std::vector<int3> &priors);
1914
1915} // namespace topology
1916} // namespace stormm
1917
1918#include "atomgraph.tpp"
1919
1920#endif
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
AtomGraph()
The blank constructor makes a blank AtomGraph, which is used by the general- purpose file-based const...
Definition atomgraph_constructors.cpp:25
void modifyAtomMobility(MobilitySetting movement)
Change an atom's mobility in the topology.
Definition atomgraph_setters.cpp:28
std::vector< T > getAtomPBRadius() const
Get the Poisson-Boltzmann radius of a particular atom.
int getBondTermCount() const
Get the number of bond stretching terms in the system.
Definition atomgraph_getters.cpp:599
int getVirtualSiteParameterSetCount() const
Get the number of unique virtual site frames in the system. For example, a system of 1024 TIP-4P wate...
Definition atomgraph_getters.cpp:634
DihedralTerm< T > getDihedralTerm(int index) const
Collect the atom indices and actual parameters for implement one of the system's cosine-based dihedra...
std::vector< int > getConstraintGroupAtoms(int index) const
Get the atoms of a single constraint group.
Definition atomgraph_getters.cpp:820
UreyBradleyTerm< T > getUreyBradleyTerm(int index) const
Collect the atom indices and actual parameters to implement one of the system's Urey-Bradley terms....
BondTerm< T > getBondTerm(int index) const
Collect the atom indices and actual parameters for implement one of the system's harmonic bond stretc...
int getDihedralParameterCount() const
Return the number of unique dihedral parameter sets.
Definition atomgraph_getters.cpp:624
VirtualSiteKind getVirtualSiteFrameType(int index) const
Get the frame type of a particular virtual site.
Definition atomgraph_getters.cpp:686
std::vector< int > getChargeIndex() const
Get the charge type index of atoms in the system.
Definition atomgraph_getters.cpp:845
ValenceKit< float > getSinglePrecisionValenceKit(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get a single-precision abstract for calculating valence terms.
Definition atomgraph_getters.cpp:995
int getChargeTypeCount() const
Get the number of charge types in the system.
Definition atomgraph_getters.cpp:710
int getDescriptor(TopologyDescriptor choice) const
Get a descriptor from within the array of topology descriptors. If this topology were read from an Am...
Definition atomgraph_getters.cpp:259
void setSource(const std::string &new_source)
Set the source file for the topology. Primary use is to impart a destination file for a topology to b...
Definition atomgraph_setters.cpp:93
int getCharmmImprParameterCount() const
Return the number of unique CHARMM improper parameter sets.
Definition atomgraph_getters.cpp:584
const Hybrid< char4 > & getAtomType() const
Get the types of atoms in the system.
Definition atomgraph_getters.cpp:482
ConstraintKit< double > getDoublePrecisionConstraintKit(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get an abstract for managing constraints based on double-precision parameters.
Definition atomgraph_getters.cpp:1151
int getLastSoluteResidue() const
Get the final solute residue, indexed according to C/C++ array indexing conventions.
Definition atomgraph_getters.cpp:208
std::string getPBRadiiSet() const
Get the PB Radii set.
Definition atomgraph_getters.cpp:760
NonbondedKit< double > getDoublePrecisionNonbondedKit(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get a double-precision abstract for calculating non-bonded energy and forces.
Definition atomgraph_getters.cpp:1053
std::vector< int > getNonbonded14Exclusions(int index) const
Get all 1:4 exclusions for a particular atom.
Definition atomgraph_getters.cpp:927
int getAngleParameterCount() const
Return the number of unique bond angle bending parameter sets.
Definition atomgraph_getters.cpp:619
MoleculeKind getMoleculeKind(int mol_index) const
Get the kind of a specific molecule wihtin the topology.
Definition atomgraph_getters.cpp:49
T getLennardJonesEpsilon(int index_a, int index_b) const
Get the Lennard-Jones interaction epsilon value. The quantity is derived from tables at the specified...
void setAngleParameters(double new_keq, double new_teq, bool set_keq, bool set_teq, int parm_idx, ExceptionResponse policy=ExceptionResponse::SILENT)
Alter the parameters for an angle parameter set. This will alter the parameters in the topology and a...
Definition atomgraph_setters.cpp:188
std::vector< char4 > matchOverflowAtomType(const std::string &query) const
Match a long atom type and return its key in the standard list of char4 atom types.
Definition atomgraph_miscellaneous.cpp:23
CharmmImprTerm< T > getCharmmImprTerm(int index) const
Collect the atom indices and actual parameters to implement one of the system's CHARMM improper terms...
std::string getWaterResidueName() const
Get the water residue name.
Definition atomgraph_getters.cpp:787
std::vector< char4 > matchOverflowAtomName(const std::string &query) const
Match a long atom name and return its key in the standard list of char4 atom names.
Definition atomgraph_miscellaneous.cpp:11
bool usesShake() const
Get the status of SHAKE and RATTLE constraints in the system.
Definition atomgraph_getters.cpp:765
int getResidueCount() const
Get the number of residues.
Definition atomgraph_getters.cpp:39
void setDihedralParameters(double new_amplitude, double new_phase_angle, bool set_amplitude, bool set_phase_angle, int parm_idx, ExceptionResponse policy=ExceptionResponse::SILENT)
Alter the parameters for a cosine-based dihedral angle parameter set. This will alter the parameters ...
Definition atomgraph_setters.cpp:282
std::vector< uint > getAtomMobilityMask() const
Get the raw mobility bitmask over a particular range.
Definition atomgraph_getters.cpp:407
const Hybrid< char4 > & getAtomName() const
Get the names of atoms in the system.
Definition atomgraph_getters.cpp:466
int getSettleGroupCount() const
Get the number of SETTLE groups in the system.
Definition atomgraph_getters.cpp:805
T getChargeParameter(int index) const
Get the charge parameter for a specific atom. The quantity is derived from tables at the specified le...
ConstraintKit< float > getSinglePrecisionConstraintKit(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get an abstract for managing constraints based on single-precision parameters. While the overall impl...
Definition atomgraph_getters.cpp:1169
std::vector< T > getGBScreeningFactor() const
Get GB screening factors for one or more atoms.
std::vector< int > getResidueNumber() const
Get the residue numbers for atoms in the system.
Definition atomgraph_getters.cpp:320
friend class AtomGraphStage
Definition atomgraph.h:1878
int getRigidWaterCount() const
Get the number of rigid waters in the system. This will check through the SETTLE groups and confirm t...
Definition atomgraph_getters.cpp:792
CmapTerm< T > getCmapTerm(int index) const
Collect the atom indices and a pointer to the surface to implement one of the system's CMAP terms....
int getTotalExclusions() const
Get the number of exclusions in the entire topology.
Definition atomgraph_getters.cpp:720
void setImplicitSolventModel(ImplicitSolventModel igb_in, double dielectric_in=80.0, double saltcon_in=0.0, AtomicRadiusSet radii_set=AtomicRadiusSet::NONE, ExceptionResponse policy=ExceptionResponse::WARN)
Set the implicit solvent model. This will leverage a lot of hard-coded constants to fill out some all...
Definition atomgraph_setters.cpp:593
double getVanDerWaals14Screening() const
Get the general 1:4 screening factor on van-der Waals interactions.
Definition atomgraph_getters.cpp:755
int getUreyBradleyTermCount() const
Get the number of Urey-Bradley terms in the system.
Definition atomgraph_getters.cpp:564
double getTotalMass() const
Get the total mass of all atoms in the topology (this is a computation, not a stored value).
Definition atomgraph_getters.cpp:239
VirtualSiteKit< float > getSinglePrecisionVirtualSiteKit(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get a single-precision abstract for placing virtual sites and transmitting their forces to frame atom...
Definition atomgraph_getters.cpp:1135
void printAmberFormat(const std::string &output_file={}, PrintSituation expectation=PrintSituation::OPEN_NEW, ExceptionResponse pr_policy=ExceptionResponse::DIE) const
Print the contents of the topology in the AMBER file format. Descriptions of input parameters follow ...
Definition atomgraph_writing.cpp:79
double getCoulombConstant() const
Get the fundamental coulomb constant that this system uses in electrostatic calculations.
Definition atomgraph_getters.cpp:745
int getBondConstraintCount() const
Get the number of bond constraints.
Definition atomgraph_getters.cpp:810
int getConstraintGroupTotalSize() const
Get the total size of the constrained group atoms list.
Definition atomgraph_getters.cpp:835
int getUreyBradleyParameterCount() const
Return the number of unique Urey-Bradley parameter sets.
Definition atomgraph_getters.cpp:579
int getNonrigidParticleCount() const
Get the number of non-rigid particles in the system.
Definition atomgraph_getters.cpp:840
std::vector< int > getNonbonded13Exclusions(int index) const
Get all 1:3 exclusions for a particular atom.
Definition atomgraph_getters.cpp:915
int getVirtualSiteCount() const
Get the number of virtual sites in the system.
Definition atomgraph_getters.cpp:629
void setWaterResidueName(const char4 new_name)
Set the name of the water residue.
Definition atomgraph_setters.cpp:1098
double getElectrostatic14Screening() const
Get the general 1:4 screening factor on electrostatic interactions.
Definition atomgraph_getters.cpp:750
T getVirtualSiteFrameDimension(int index, int ndim)
Get the dimensions (could be length in A, could be scaling factor for a distance or cross product) of...
int getLJTypeCount() const
Get the number of atom types in the system.
Definition atomgraph_getters.cpp:715
int getOrganicMoleculeCount() const
Get the number of organic molecules in the system, based on the criteria of greater than or equal to ...
Definition atomgraph_getters.cpp:141
double getSaltConcentration() const
Get the salt concentration (part of the implicit solvent setup)
Definition atomgraph_getters.cpp:740
AngleTerm< T > getAngleTerm(int index) const
Collect the atom indices and actual parameters for implement one of the system's harmonic bond angle ...
std::vector< int > getLennardJonesIndex() const
Get the Lennard-Jones type index of atoms in the system.
Definition atomgraph_getters.cpp:861
std::vector< int > getAtomicNumber() const
Get the atomic numbers for atoms in the system.
Definition atomgraph_getters.cpp:362
void setUreyBradleyParameters(double new_keq, double new_leq, bool set_keq, bool set_leq, int parm_idx, ExceptionResponse policy=ExceptionResponse::SILENT)
Alter the parameters for a Urey-Bradley parameter set.
Definition atomgraph_setters.cpp:385
NonbondedKit< float > getSinglePrecisionNonbondedKit(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get a single-precision abstract for calculating non-bonded energy and forces.
Definition atomgraph_getters.cpp:1069
const Hybrid< char4 > & getResidueName() const
Get the names of residues in the system.
Definition atomgraph_getters.cpp:554
~AtomGraph()=default
The default destructor is adequate.
int getVirtualSiteFrameAtom(int index, int nfrm) const
Get the general topology index of one of a virtual site's frame atoms.
Definition atomgraph_getters.cpp:692
int getAngleTermCount() const
Get the number of angle bending terms in the system.
Definition atomgraph_getters.cpp:604
ImplicitSolventKit< double > getDoublePrecisionImplicitSolventKit(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get a double-precision abstract for calculating implicit solvent energy and forces.
Definition atomgraph_getters.cpp:1086
std::vector< char4 > matchOverflowResidueName(const std::string &query) const
Match a long residue name and return its key among the standard char4 residue names.
Definition atomgraph_miscellaneous.cpp:36
int getFirstSolventAtom() const
Get the first solvent atom, indexed according to C/C++ array indexing conventions.
Definition atomgraph_getters.cpp:223
double getDielectricConstant() const
Get the dielectric constant (part of the implicit solvent setup)
Definition atomgraph_getters.cpp:735
int getVirtualSiteIndex(int atom_index, ExceptionResponse policy=ExceptionResponse::DIE) const
Get the virtual site index of an atom index. If the atom index is not a virtual site,...
Definition atomgraph_getters.cpp:663
std::vector< int > getParticlesPerMolecule() const
Get the sizes of all molecules in the system. Rather redundant with the molecule limits being accessi...
Definition atomgraph_getters.cpp:347
int getLastSoluteAtom() const
Get the final solute atom, indexed according to C/C++ array indexing conventions.
Definition atomgraph_getters.cpp:213
int getWaterResidueCount() const
Get the number of water residues in the system.
Definition atomgraph_getters.cpp:198
std::vector< int > getStructuralAtomNumber() const
Get the (arbitrarily defined) atom numbers for atoms in the system. For example, a PDB file could ahv...
Definition atomgraph_getters.cpp:303
int getCmapDimension(int index) const
Return the dimension of a particular CMAP surface (all CMAPs are assumed to be square)
Definition atomgraph_getters.cpp:594
int getFirstSolventMolecule() const
Get the first solvent molecule, indexed according to C/C++ array indexing conventions.
Definition atomgraph_getters.cpp:218
T getLennardJonesSigma(int index_a, int index_b) const
Get the Lennard-Jones interaction sigma. The quantity is derived from tables at the specified level o...
ValenceKit< double > getDoublePrecisionValenceKit(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get an abstract for calculating valence terms in double precision.
Definition atomgraph_getters.cpp:939
void buildFromPrmtop(const std::string &file_name, const ExceptionResponse policy=ExceptionResponse::WARN, double coulomb_constant_in=amber_ancient_bioq, double default_elec14_screening=amber_default_elec14_screen, double default_vdw14_screening=amber_default_vdw14_screen, double charge_rounding_tol=default_charge_rounding_tol, double charge_discretization=default_charge_precision_inc)
Build an AtomGraph form a file. This is called by the general-purpose constructor or also by the deve...
Definition atomgraph_detailers.cpp:607
std::vector< int > getNonbonded11Exclusions(int index) const
Get the 1:1 exclusions for a particular atom. This list will only be populated if the atom is a virtu...
Definition atomgraph_getters.cpp:891
ChemicalDetailsKit getChemicalDetailsKit(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get an abstract of the chemical details of the system, such as atom name and type or residue names an...
Definition atomgraph_getters.cpp:1106
int getRigidWaterAtomCount() const
Get the number of atoms in a rigid water molecule of the system, if the system has rigid waters....
void printToFile(const std::string &output_file={}, TopologyKind output_style=TopologyKind::AMBER, PrintSituation expectation=PrintSituation::OPEN_NEW, ExceptionResponse pr_policy=ExceptionResponse::DIE) const
Print out a topology in the specified format.
Definition atomgraph_writing.cpp:22
std::vector< int > getMoleculeMembership() const
Get molecule membership for atoms within the system.
Definition atomgraph_getters.cpp:438
std::vector< T > getAtomicMass(MassForm rep=MassForm::ORDINARY) const
Get the masses of atoms in the system. The developer may also choose to take the pre-computed inverse...
int getOrganicAtomCount() const
Get the number of organic atoms in the system, based on the criteria of greater than or equal to eigh...
Definition atomgraph_getters.cpp:168
UnitCellType getUnitCellType() const
Get the simulation cell type (isolated boundary conditions, rectilinear, triclinic)
Definition atomgraph_getters.cpp:725
AtomGraph & operator=(const AtomGraph &other)
Copy constructor.
Definition atomgraph_constructors.cpp:945
int getCmapTermCount() const
Get the number of CMAP terms (the number of CMAP parameter surfaces is different)
Definition atomgraph_getters.cpp:574
int getMoleculeCount() const
Get the number of separate molecules in the system.
Definition atomgraph_getters.cpp:44
std::vector< int > getResidueIndex() const
Get the index (topology index, not natural / structure-informed residue number) of a particular resid...
Definition atomgraph_getters.cpp:280
void setBondParameters(double new_keq, double new_leq, bool set_keq, bool set_leq, int parm_idx, ExceptionResponse policy=ExceptionResponse::SILENT)
Alter the parameters for a bond parameter set. This will alter the parameters in the topology and all...
Definition atomgraph_setters.cpp:98
std::vector< std::vector< char4 > > getAtomTypeNameTable() const
Get a table with the names of all unique atom types, arranged according to their Lennard-Jones indice...
Definition atomgraph_getters.cpp:507
void setCharmmImprParameters(double new_stiffness, double new_phase_angle, bool set_stiffness, bool set_phase_angle, int parm_idx, ExceptionResponse policy=ExceptionResponse::SILENT)
Alter the characteristics of a CHARMM improper dihedral parameter set.
Definition atomgraph_setters.cpp:493
int getBondParameterCount() const
Return the number of unique bond stretching parameter sets.
Definition atomgraph_getters.cpp:614
int getCmapSurfaceCount() const
Return the number of unique CMAP surfaces.
Definition atomgraph_getters.cpp:589
int getConstrainedDegreesOfFreedom() const
Get the number of degrees of freedom after geometric constraints have been applied.
Definition atomgraph_getters.cpp:254
std::vector< int > getMoleculeContents() const
Get the contents of a one or more molecules in the system.
Definition atomgraph_getters.cpp:455
int getConstraintGroupCount() const
Get the total number of constrained groups.
Definition atomgraph_getters.cpp:815
std::string getFileName() const
Get the file name where a topology originated (may be blank, indicating that the topology was produce...
Definition atomgraph_getters.cpp:29
bool usesSettle() const
Get the status of SETTLE rigid water constraints in the system.
Definition atomgraph_getters.cpp:776
std::vector< T > getPartialCharge() const
Get the atomic partial charges of atoms in the system.
int getWaterResidueSize() const
Get the number of particles (which may include virtual sites) in a single water molecule within the s...
Definition atomgraph_getters.cpp:193
int getDegreesOfFreedom() const
Get the number of degrees of freedom, without consideration to geometric constraints.
Definition atomgraph_getters.cpp:249
std::vector< int > getMoleculeLimits() const
Get the molecule limits, indices into molecule_contents, for every molecule in the system....
Definition atomgraph_getters.cpp:336
std::string getFullAtomName(int index) const
Get the full name (including the residue and structural residue number) of an atom,...
Definition atomgraph_getters.cpp:498
std::vector< int > getAtomExclusions(int index) const
Get the exclusion list for a particular atom. This will concatenate 1:1, 1:2, 1:3,...
Definition atomgraph_getters.cpp:877
std::vector< int > getNonbonded12Exclusions(int index) const
Get all 1:2 exclusions for a particular atom.
Definition atomgraph_getters.cpp:903
const Hybrid< int > & getResidueLimits() const
Get residue limits for the beginning and ends of up to N residues.
Definition atomgraph_getters.cpp:269
int getAtomCount() const
Get the number of atoms, using the topology's dedicated private variable rather than a list of input ...
Definition atomgraph_getters.cpp:34
AtomGraph()
The blank constructor makes a blank AtomGraph, which is used by the general- purpose file-based const...
Definition atomgraph_constructors.cpp:25
int getDihedralTermCount() const
Get the number of dihedral torsion terms in the system.
Definition atomgraph_getters.cpp:609
std::vector< int > findVirtualSites() const
Get a list of the general topological indices of one or more virtual sites.
Definition atomgraph_getters.cpp:639
std::vector< bool > getAtomMobility() const
Get the mobile atom mask for the system, as a boolean vector translated from the bitmask stored inter...
Definition atomgraph_getters.cpp:378
int getCharmmImprTermCount() const
Get the number of CHARMM improper terms.
Definition atomgraph_getters.cpp:569
int getLargestMoleculeSize() const
Get the largest molecule's size.
Definition atomgraph_getters.cpp:234
ImplicitSolventModel getImplicitSolventModel() const
Get the implicit solvent model type, i.e. some flavor of GB or NONE.
Definition atomgraph_getters.cpp:730
const AtomGraph * getSelfPointer() const
Get a pointer to the object itself.
Definition atomgraph_getters.cpp:1552
VirtualSiteKit< double > getDoublePrecisionVirtualSiteKit(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get a double-precision abstract for placing virtual sites and transmitting their forces to frame atom...
Definition atomgraph_getters.cpp:1119
std::string getTitle() const
Get the title of the topology (may be blank).
Definition atomgraph_getters.cpp:24
int getLargestResidueSize() const
Get the number of separate molecules in the system.
Definition atomgraph_getters.cpp:203
ImplicitSolventKit< float > getSinglePrecisionImplicitSolventKit(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get a single-precision abstract for calculating implicit solvent energy and forces.
Definition atomgraph_getters.cpp:1096
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
Definition stormm_vector_types.h:141
Definition stormm_vector_types.h:22
Unguarded struct to store the ingredients of a single bond angle interaction.
Definition atomgraph_abstracts.h:54
Unguarded struct to store the ingredients of a single bond stretching interaction.
Definition atomgraph_abstracts.h:45
Unguarded struct to store the ingredients of a single CHARMM improper dihedral.
Definition atomgraph_abstracts.h:21
Information on atoms and residues which may be useful for applying atom masks or identifying specific...
Definition atomgraph_abstracts.h:382
Unguarded struct to store the ingredients of a single CMAP interaction.
Definition atomgraph_abstracts.h:32
Information needed to manage constraint groups. This additional abstract is needed due to the way tha...
Definition atomgraph_abstracts.h:466
Unguarded struct to store the ingredients of a single dihedral (proper or improper) torsion interacti...
Definition atomgraph_abstracts.h:67
Information needed for Generalized Born (and perhaps other) implicit solvent methods....
Definition atomgraph_abstracts.h:352
Information needed for non-bonded real-space calculations. Templating is used as above,...
Definition atomgraph_abstracts.h:287
Unguarded struct to store the ingredients of a single Urey-Bradley interaction.
Definition atomgraph_abstracts.h:12
Information need for bonded calculations. Templating is used to serve either of two levels of precisi...
Definition atomgraph_abstracts.h:88
Information needed for the placement of virtual sites and transmission of forces on these sites to th...
Definition atomgraph_abstracts.h:430