Loading...
Searching...
No Matches
Matter.h
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#pragma once
13#include "ConFileIO.h"
14#include "Eigen.h"
15#include "EonLogger.h"
16#include "PbcSimd.h"
17#include "Potential.h"
19#include "SurrogatePotential.h"
20#include <array>
21#include <cstdint>
22#include <memory>
23#include <span>
24#include <string>
25#include <vector>
26
27// This is a forward declaration of BondBoost to avoid a circular dependency.
28namespace eonc {
29class BondBoost;
30class Parameters;
31
32// Position / difference MIC conventions (issue #176). Legacy matches historical
33// applyPeriodicBoundary (fmod to [0,1) fractional). MinimumImage matches the
34// existing eonc::pbc::apply path used for interatomic distances (frac in
35// [-0.5,0.5)).
36enum class PbcConvention {
37 Legacy = 0,
39};
40
41namespace pbc {
42
43// Minimum-image on a difference vector (fractional in [-0.5, 0.5)).
44inline AtomMatrix apply(const AtomMatrix &diff, const Matrix3d &cell,
45 const Matrix3d &cellInverse) {
46 // Fractional coordinates, minimum-image wrap to [-0.5, 0.5), back to
47 // Cartesian. x - floor(x + 0.5), Highway when the build has it.
48 AtomMatrix frac = diff * cellInverse;
49 wrapMinimumImage(frac.data(), static_cast<size_t>(frac.size()));
50 return frac * cell;
51}
52
53// Legacy position wrap: fractional coords into [0, 1) via fmod (historical
54// Matter).
55inline AtomMatrix applyLegacy(const AtomMatrix &coords, const Matrix3d &cell,
56 const Matrix3d &cellInverse) {
57 AtomMatrix frac = coords * cellInverse;
58 // Same values as fmod(x + 1, 1): (x + 1) - trunc(x + 1).
59 wrapLegacyUnit(frac.data(), static_cast<size_t>(frac.size()));
60 return frac * cell;
61}
62
63// Position wrap selecting convention (Legacy vs MinimumImage centering).
64inline AtomMatrix applyPositions(const AtomMatrix &coords, const Matrix3d &cell,
65 const Matrix3d &cellInverse,
66 PbcConvention convention) {
67 if (convention == PbcConvention::MinimumImage) {
68 return apply(coords, cell, cellInverse);
69 }
70 return applyLegacy(coords, cell, cellInverse);
71}
72
73inline VectorXd applyV(const VectorXd &diffVector, const Matrix3d &cell,
74 const Matrix3d &cellInverse) {
75 AtomMatrix pbcMatrix =
76 apply(AtomMatrix::Map(diffVector.data(), diffVector.size() / 3, 3), cell,
77 cellInverse);
78 return VectorXd(VectorXd::Map(pbcMatrix.data(), diffVector.size()));
79}
80
81} // namespace pbc
82
83/* Data describing an atomic structure. This class has been devised to handle
84 * information about an atomic structure such as positions, velocities, masses,
85 * etc. It also allow to associate a forcefield for the structure through a
86 * pointer to function (potential()). The class can read and save data to a .con
87 * file (atom2con() and con2atom()). It can also save to a .xyz file
88 * (atom2xyz()).*/
89
90class Matter {
91public:
93 Matter(std::shared_ptr<Potential> pot, const Parameters &params);
94 Matter(const Matter &matter); // create a copy of matter
95 const Matter &operator=(const Matter &matter); // copy the matter object
99 Matter(Matter &&other) noexcept;
100 Matter &operator=(Matter &&other) noexcept;
101 bool compare(const Matter &matter, bool indistinguishable = false);
102
103 double
104 distanceTo(const Matter &matter); // the distance to the given matter object
105 double perAtomNorm(const Matter &matter); // the maximum distance between two
106 // atoms in the Matter objects
107 void
108 setPotential(std::shared_ptr<Potential> pot); // set potential function to use
109 std::shared_ptr<Potential> getPotential(); // get potential function to use
110 void resize(long int nAtoms); // set or reset the number of atoms
111 long int numberOfAtoms() const; // return the number of atoms
112 Matrix3d getCell() const;
113 void setCell(const Matrix3d &newCell);
114 double getPosition(long int atom, int axis)
115 const; // return the position of an atom along one of the axis
116 void setPosition(
117 long int atom, int axis,
118 double position); // set the position of atom along axis to position
119 void setVelocity(
120 long int atom, int axis,
121 double velocity); // set the velocity of atom along axis to velocity
122 bool relax(bool quiet = false, bool writeMovie = false,
123 bool checkpoint = false, std::string prefixMovie = std::string(),
124 std::string prefixCheckpoint = std::string(),
125 bool retainMovieFrames = false);
126
129 [[nodiscard]] const std::vector<readcon::ConFrame> &movieFrames() const {
130 return movie_frames_;
131 }
132 void clearMovieFrames() { movie_frames_.clear(); }
134 [[nodiscard]] std::vector<readcon::ConFrame> takeMovieFrames() {
135 return std::move(movie_frames_);
136 }
137
138 AtomMatrix pbc(const AtomMatrix &diff) const;
139 VectorXd pbcV(const VectorXd &diff) const;
140
141 size_t getPotentialCalls() const;
142 const AtomMatrix &getPositions() const; // return coordinates of atoms
143 AtomMatrix getPositionsCopy() const; // return a modifiable copy
144 VectorXd getPositionsV() const;
146 getPositionsFree() const; // return coordinates of free atoms in array pos
147 VectorXd getPositionsFreeV() const;
148 void
149 setPositions(const AtomMatrix &pos); // update Matter with the new positions
150 // of the free atoms given in array pos
151 void setPositionsV(const VectorXd &pos);
152 void setPositionsFree(
153 const AtomMatrix &pos); // update Matter with the new positions of the
154 // free atoms given in array pos
155 void setPositionsFreeV(const VectorXd &pos);
156
158 void setVelocities(const AtomMatrix &v);
159 void setBiasForces(const AtomMatrix &bf);
160 void setBiasPotential(BondBoost *bondBoost);
165 void assignKeepingBias(const Matter &other);
166 void setForces(const AtomMatrix &f);
168
169 const AtomMatrix &getForces() const;
170 const AtomMatrix &getForcesRaw() const;
172 VectorXd getForcesV() const;
173 // Const so callers can read free-atom forces without mutating Matter (#171).
175 VectorXd getForcesFreeV() const;
176
179 pbcConvention = convention;
180 }
181
182 double getMass(long int atom) const; // return the mass of the atom specified
183 void setMass(long int atom, double mass); // set the mass of an atom
184 void setMasses(const VectorXd &massesIn); // set the mass of an atom
185 long getAtomicNr(
186 long int atom) const; // return the atomic number of the atom specified
187 void setAtomicNr(long int atom,
188 long atomicNr); // set the atomic number of an atom
189 VectorXi getAtomicNrs() const; // Get the vector of atomic numbers
190 VectorXi getAtomicNrsFree() const; // Get the vector of atomic numbers
191 void setAtomicNrs(const VectorXi &atmnrs); // set the vector of atomic numbers
192
194 int getFixed(long int atom) const;
196 int getFixed(long int atom, int axis) const;
198 [[nodiscard]] std::array<bool, 3> getFixedMask(long int atom) const;
200 void setFixed(long int atom, int isFixed);
202 void setFixed(long int atom, int axis, int isFixed);
203 void setFixedMask(long int atom, std::array<bool, 3> mask);
204 double getEnergyVariance() const;
205 double getPotentialEnergy() const;
209
211 [[nodiscard]] bool needsForceUpdate() const { return recomputePotential; }
212
215 double *forcesData();
219 void setEvaluation(const AtomMatrix &forces, double energy) {
220 restoreFileForces(forces, true, energy);
221 }
222
225 void setComputedPotential(double energy, double variance);
226 double getKineticEnergy() const;
227 double getMechanicalEnergy() const;
228
229 double distance(long index1, long index2)
230 const; // return the distance between two atoms in same configuration
231 double pdistance(long index1, long index2, int axis) const;
232 double distance(const Matter &matter, long index)
233 const; // the distance between the same atom in two cofigurations
234
235 long int
236 numberOfFreeAtoms() const; // return the number of free (or movable) atoms
237 long int numberOfFixedAtoms() const; // return the number of fixed atoms
238
239 long
240 getForceCalls() const; // return how many force calls that have been performed
241 void resetForceCalls(); // zeroing the value of force calls
242
243 double maxForce(void) const;
244
247 [[nodiscard]] double maxFreeAtomForce(const AtomMatrix &rows) const;
248
250 [[nodiscard]] bool getWriteConForces() const noexcept;
251
252 // I/O delegates to eonc::io free functions (IoStatus for bindings).
253 [[nodiscard]] io::IoStatus writeTibble(std::string filename) {
254 return io::writeTibble(*this, filename);
255 }
256 [[nodiscard]] io::IoStatus con2matter(std::string filename) {
257 return io::con2matter(*this, filename);
258 }
259 [[nodiscard]] io::IoStatus
260 con2matter(const readcon::ConFrame &frame,
261 io::ConFrameMetadata *out_metadata = nullptr) {
262 return io::con2matter(*this, frame, out_metadata);
263 }
264 [[nodiscard]] io::IoStatus convel2matter(std::string filename) {
265 return io::convel2matter(*this, filename);
266 }
267 [[nodiscard]] io::IoStatus
268 matter2con(std::string filename, bool append = false,
269 const io::ConFrameMetadata *metadata = nullptr) {
270 return io::matter2con(*this, filename, append, metadata);
271 }
272 [[nodiscard]] io::IoStatus matter2convel(std::string filename) {
273 return io::matter2convel(*this, filename);
274 }
275 [[nodiscard]] io::IoStatus matter2xyz(std::string filename,
276 bool append = false) {
277 return io::matter2xyz(*this, filename, append);
278 }
279
280 AtomMatrix getFree() const;
281 VectorXd getFreeV() const;
282 Eigen::Matrix<double, Eigen::Dynamic, 1> getMasses() const;
283
287 [[nodiscard]] std::int64_t getAtomIndex(long int atom) const;
288 void setAtomIndex(long int atom, std::int64_t index);
289
293 [[nodiscard]] long mapFileRow(long file_row) const {
294 if (file_row < 0 || file_row >= nAtoms ||
295 fileToMatter.size() != static_cast<size_t>(nAtoms)) {
296 return file_row;
297 }
298 return fileToMatter[static_cast<size_t>(file_row)];
299 }
300 void setFileToMatter(std::vector<long> map) { fileToMatter = std::move(map); }
301
303 [[nodiscard]] const std::array<std::string, 5> &getHeaderCon() const {
304 return headerCon;
305 }
306 void setHeaderCon(const std::array<std::string, 5> &headers) {
307 headerCon = headers;
308 }
309 void setHeaderConLine(size_t i, std::string line) {
310 headerCon.at(i) = std::move(line);
311 }
312
313 [[nodiscard]] bool getPeriodic() const noexcept {
315 }
316 void setPeriodic(bool periodic) {
317 usePeriodicBoundaries = periodic;
318 recomputePotential = true;
320 }
321
327
328private:
329 // Friend declarations for eonc::io free functions that need private access
330 // con2matter still needs private headerCon + recompute flags for faithful
331 // force/energy restore without an extra potential evaluation.
332 friend io::IoStatus io::con2matter(Matter &, const readcon::ConFrame &,
334
336 std::shared_ptr<Potential>
337 potential; // pointer to function calculating the energy and forces
338 bool usePeriodicBoundaries; // boolean telling periodic boundaries are used
339
342 PbcConvention pbcConvention; // position-wrap MIC convention (issue #176)
343 mutable bool recomputePotential; // boolean indicating if the potential energy
344 // and forces need to be recalculated
345 mutable long
346 forceCalls; // keep track of how many force calls have been performed
347
348 // CON file header lines (indices 0-4 map to old headerCon1,2,4,5,6)
349 std::array<std::string, 5> headerCon;
350
351 void computePotential() const;
353 void applyPeriodicBoundary(double &component, int axis);
355
356 // Narrowed from Parameters: only fields Matter actually reads
357 bool removeNetForce{true};
359 // Full Parameters pointer retained solely for relax() delegation
361 long nAtoms;
364 struct Impl;
365 std::unique_ptr<Impl> impl_;
367 std::vector<long> fileToMatter; // CON file row -> Matter row
369 void restoreFileForces(const AtomMatrix &fileForces, bool trustEnergy,
370 double energy);
371 mutable std::vector<int> freeIndices; // cached indices of free atoms
372 mutable bool recomputeFreeMask{true};
373 mutable bool recomputeMaskedForces{true};
374 mutable double energyVariance;
375 std::vector<readcon::ConFrame> movie_frames_;
376 mutable double potentialEnergy;
377};
378
383void evaluateTogether(Potential &pot, std::span<Matter *const> systems);
384
385} // namespace eonc
Eigen::Matrix< double, 3, 3, eOnStorageOrder > Matrix3d
Definition Eigen.h:35
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition Eigen.h:37
Functionality relying on the conjugate gradients algorithm.
Definition BondBoost.h:25
double potentialEnergy
Definition Matter.h:376
void applyPeriodicBoundary()
Definition Matter.cpp:666
void setBiasPotential(BondBoost *bondBoost)
Definition Matter.cpp:394
double getKineticEnergy() const
Definition Matter.cpp:562
io::IoStatus writeTibble(std::string filename)
Definition Matter.h:253
void resetForceCalls()
Definition Matter.cpp:589
bool getWriteConForces() const noexcept
Parameters.main_options().writeConForces for this Matter, if bound.
Definition Matter.cpp:64
VectorXi getAtomicNrs() const
Definition Matter.cpp:691
bool recomputeFreeMask
Definition Matter.h:372
void setComputedPotential(double energy, double variance)
Set energy/variance from external batched evaluation and mark forces as up-to-date (recomputePotentia...
Definition Matter.cpp:772
io::IoStatus convel2matter(std::string filename)
Definition Matter.h:264
void setForces(const AtomMatrix &f)
Definition Matter.cpp:732
void setFixed(long int atom, int isFixed)
Broadcast a whole-atom flag onto all three axes.
Definition Matter.cpp:527
std::shared_ptr< Potential > getPotential()
Definition Matter.cpp:808
BondBoost * getBiasPotential() const
The bias potential added to this Matter's forces, or nullptr.
Definition Matter.cpp:398
double maxFreeAtomForce(const AtomMatrix &rows) const
Max per-atom Euclidean norm of rows.
Definition Matter.cpp:677
void setFixedMask(long int atom, std::array< bool, 3 > mask)
Definition Matter.cpp:545
void setPosition(long int atom, int axis, double position)
Definition Matter.cpp:290
PbcConvention pbcConvention
Definition Matter.h:342
const AtomMatrix & getPositions() const
Definition Matter.cpp:308
bool relax(bool quiet=false, bool writeMovie=false, bool checkpoint=false, std::string prefixMovie=std::string(), std::string prefixCheckpoint=std::string(), bool retainMovieFrames=false)
Definition Matter.cpp:334
double distanceTo(const Matter &matter)
Definition Matter.cpp:206
VectorXd getForcesFreeV() const
Definition Matter.cpp:442
void setPositions(const AtomMatrix &pos)
Definition Matter.cpp:350
void setAtomicNr(long int atom, long atomicNr)
Definition Matter.cpp:499
double pdistance(long index1, long index2, int axis) const
Definition Matter.cpp:457
AtomMatrix getForcesFree() const
Definition Matter.cpp:432
const Matter & operator=(const Matter &matter)
Definition Matter.cpp:86
std::vector< readcon::ConFrame > movie_frames_
Definition Matter.h:375
eonc::log::Scoped m_log
Definition Matter.h:335
bool compare(const Matter &matter, bool indistinguishable=false)
Definition Matter.cpp:184
void setHeaderConLine(size_t i, std::string line)
Definition Matter.h:309
io::IoStatus matter2convel(std::string filename)
Definition Matter.h:272
void setPositionsV(const VectorXd &pos)
Definition Matter.cpp:363
void setCell(const Matrix3d &newCell)
Definition Matter.cpp:277
std::vector< int > freeIndices
Definition Matter.h:371
AtomMatrix getFree() const
Definition Matter.cpp:704
bool getPeriodic() const noexcept
Definition Matter.h:313
void setVelocity(long int atom, int axis, double velocity)
Definition Matter.cpp:301
void computePotential() const
Definition Matter.cpp:606
void setPbcConvention(PbcConvention convention)
Definition Matter.h:178
void setPotential(std::shared_ptr< Potential > pot)
Definition Matter.cpp:754
void setPositionsFreeV(const VectorXd &pos)
Definition Matter.cpp:381
bool recomputeMaskedForces
Definition Matter.h:373
void setPeriodic(bool periodic)
Definition Matter.h:316
Matrix3d getCell() const
Definition Matter.cpp:275
void applyPeriodicBoundaryIfEnabled()
Apply MIC wrap when periodic boundaries are enabled (I/O path).
Definition Matter.h:322
const Parameters * parameters
Definition Matter.h:360
bool removeNetForce
Definition Matter.h:357
long nAtoms
Definition Matter.h:361
long int numberOfAtoms() const
Definition Matter.cpp:273
Matrix3d cauchyStress()
Cauchy stress in eV/Angstrom^3.
Definition Matter.cpp:794
std::shared_ptr< Potential > potential
Definition Matter.h:337
long getForceCalls() const
Definition Matter.cpp:587
VectorXd getPositionsFreeV() const
Definition Matter.cpp:345
BondBoost * biasPotential
Definition Matter.h:366
void setAtomicNrs(const VectorXi &atmnrs)
Definition Matter.cpp:693
AtomMatrix getVelocities() const
Definition Matter.cpp:724
void setVelocities(const AtomMatrix &v)
Definition Matter.cpp:728
double getMechanicalEnergy() const
Definition Matter.cpp:569
void setAtomIndex(long int atom, std::int64_t index)
Definition Matter.cpp:830
PbcConvention getPbcConvention() const
Definition Matter.h:177
double perAtomNorm(const Matter &matter)
Definition Matter.cpp:214
const AtomMatrix & getForcesRaw() const
Definition Matter.cpp:423
long forceCalls
Definition Matter.h:346
void resize(long int nAtoms)
Definition Matter.cpp:227
VectorXd pbcV(const VectorXd &diff) const
Definition Matter.cpp:817
AtomMatrix getPositionsFree() const
Definition Matter.cpp:316
double getPosition(long int atom, int axis) const
Definition Matter.cpp:284
void applyPeriodicBoundary(double &component, int axis)
size_t getPotentialCalls() const
Definition Matter.cpp:788
VectorXi getAtomicNrsFree() const
Definition Matter.cpp:325
const std::vector< readcon::ConFrame > & movieFrames() const
In-memory minimization movie (same stamps as writeMovie CON).
Definition Matter.h:129
void restoreFileForces(const AtomMatrix &fileForces, bool trustEnergy, double energy)
Write .con forces without the fixed-atom mask setForces applies.
Definition Matter.cpp:834
Eigen::Matrix< double, Eigen::Dynamic, 1 > getMasses() const
Definition Matter.cpp:750
long int numberOfFixedAtoms() const
Definition Matter.cpp:573
std::unique_ptr< Impl > impl_
Definition Matter.h:365
double distance(long index1, long index2) const
Definition Matter.cpp:448
double getMass(long int atom) const
Definition Matter.cpp:478
bool recomputePotential
Definition Matter.h:343
void setMasses(const VectorXd &massesIn)
Definition Matter.cpp:488
void setMass(long int atom, double mass)
Definition Matter.cpp:483
io::IoStatus con2matter(const readcon::ConFrame &frame, io::ConFrameMetadata *out_metadata=nullptr)
Definition Matter.h:260
double getPotentialEnergy() const
Definition Matter.cpp:554
AtomMatrix getAccelerations()
Definition Matter.cpp:739
double * forcesData()
Mutable access to force storage for batched potential evaluation.
Definition Matter.cpp:824
bool needsForceUpdate() const
Whether forces need recomputation (positions changed since last eval).
Definition Matter.h:211
AtomMatrix getBiasForces()
Definition Matter.cpp:385
long mapFileRow(long file_row) const
Map a CON file-order row onto the Matter row after matter_order.
Definition Matter.h:293
std::array< std::string, 5 > headerCon
Definition Matter.h:349
void clearMovieFrames()
Definition Matter.h:132
void setHeaderCon(const std::array< std::string, 5 > &headers)
Definition Matter.h:306
StructureComparisonOptions structComp
Definition Matter.h:358
bool usePeriodicBoundaries
Definition Matter.h:338
long int numberOfFreeAtoms() const
Definition Matter.cpp:583
VectorXd getFreeV() const
Definition Matter.cpp:720
Matter(std::shared_ptr< Potential > pot, const Parameters &params)
Definition Matter.cpp:49
long getAtomicNr(long int atom) const
Definition Matter.cpp:495
double getEnergyVariance() const
Definition Matter.cpp:792
AtomMatrix getPositionsCopy() const
Definition Matter.cpp:310
std::array< bool, 3 > getFixedMask(long int atom) const
Per-axis CON column-4 mask (bit0=x, bit1=y, bit2=z).
Definition Matter.cpp:520
io::IoStatus matter2xyz(std::string filename, bool append=false)
Definition Matter.h:275
void setBiasForces(const AtomMatrix &bf)
Definition Matter.cpp:406
void setPositionsFree(const AtomMatrix &pos)
Definition Matter.cpp:367
std::vector< long > fileToMatter
Definition Matter.h:367
const std::array< std::string, 5 > & getHeaderCon() const
CON header lines (indices 0..4); public for I/O / bindings.
Definition Matter.h:303
std::int64_t getAtomIndex(long int atom) const
.con column-5 index (pre-grouping); public for I/O / bindings.
Definition Matter.cpp:826
void assertIsolatedMoleculeLayoutSafe() const
Throw if pot forbids PBC (isolated molecular QM backends, issue #188).
Definition Matter.cpp:594
VectorXd getPositionsV() const
Definition Matter.cpp:312
void assignKeepingBias(const Matter &other)
Copy another structure in and keep this Matter's own bias potential.
Definition Matter.cpp:400
const AtomMatrix & getForces() const
Definition Matter.cpp:412
double energyVariance
Definition Matter.h:374
void setFileToMatter(std::vector< long > map)
Definition Matter.h:300
io::IoStatus matter2con(std::string filename, bool append=false, const io::ConFrameMetadata *metadata=nullptr)
Definition Matter.h:268
void setEvaluation(const AtomMatrix &forces, double energy)
Puts a known evaluation back after a position reset: the forces and energy of a geometry this object ...
Definition Matter.h:219
int getFixed(long int atom) const
1 if every Cartesian axis of the atom is fixed, else 0.
Definition Matter.cpp:505
io::IoStatus con2matter(std::string filename)
Definition Matter.h:256
std::vector< readcon::ConFrame > takeMovieFrames()
Take ownership of retained frames (leaves storage empty).
Definition Matter.h:134
VectorXd getForcesV() const
Definition Matter.cpp:428
void applyPeriodicBoundary(AtomMatrix &diff)
double maxForce(void) const
Definition Matter.cpp:685
IoStatus convel2matter(Matter &m, std::string filename)
IoStatus matter2convel(Matter &m, std::string filename)
IoStatus matter2con(Matter &m, std::string filename, bool append, const ConFrameMetadata *metadata)
Append a frame to a .con, or truncate and write one frame.
IoStatus con2matter(Matter &m, std::string filename)
IoStatus matter2xyz(Matter &m, std::string filename, bool append)
Write one extended-XYZ frame: Lattice= cell and 17-digit coordinates.
IoStatus
Structured I/O result for the client surface (nanobind-friendly).
Definition ConFileIO.h:29
IoStatus writeTibble(Matter &m, std::string fname)
Debug table (positions, optional cached forces). Not a structure format.
void wrapMinimumImage(double *data, size_t n)
Definition PbcSimd.cpp:109
AtomMatrix apply(const AtomMatrix &diff, const Matrix3d &cell, const Matrix3d &cellInverse)
Definition Matter.h:44
void wrapLegacyUnit(double *data, size_t n)
Definition PbcSimd.cpp:113
AtomMatrix applyLegacy(const AtomMatrix &coords, const Matrix3d &cell, const Matrix3d &cellInverse)
Definition Matter.h:55
AtomMatrix applyPositions(const AtomMatrix &coords, const Matrix3d &cell, const Matrix3d &cellInverse, PbcConvention convention)
Definition Matter.h:64
VectorXd applyV(const VectorXd &diffVector, const Matrix3d &cell, const Matrix3d &cellInverse)
Definition Matter.h:73
RAII resource manager for the ARTn C library with global synchronization.
void evaluateTogether(Potential &pot, std::span< Matter *const > systems)
Evaluates every system that needs a force update.
Definition Matter.cpp:847
PbcConvention
Definition Matter.h:36
Options for Matter::compare / distance.
RAII helper for class-scoped logging.
Definition EonLogger.h:171