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 "Parameters.h"
17#include "Potential.h"
18#include "SurrogatePotential.h"
19#include <array>
20#include <cmath>
21#include <cstdint>
22#include <memory>
23#include <string>
24#include <vector>
25
26// This is a forward declaration of BondBoost to avoid a circular dependency.
27namespace eonc {
28class BondBoost;
29
30// Position / difference MIC conventions (issue #176). Legacy matches historical
31// applyPeriodicBoundary (fmod to [0,1) fractional). MinimumImage matches the
32// existing eonc::pbc::apply path used for interatomic distances (frac in
33// [-0.5,0.5)).
34enum class PbcConvention {
35 Legacy = 0,
37};
38
39namespace pbc {
40
41// Minimum-image on a difference vector (fractional in [-0.5, 0.5)).
42inline AtomMatrix apply(const AtomMatrix &diff, const Matrix3d &cell,
43 const Matrix3d &cellInverse) {
44 // Transform to fractional coordinates, wrap to [-0.5, 0.5), transform back.
45 // Uses floor(x + 0.5) instead of double-fmod: single x86 vroundsd instruction
46 // vs expensive fmod library call. Vectorized via Eigen .array() operations.
47 AtomMatrix frac = diff * cellInverse;
48 frac.array() -= (frac.array() + 0.5).floor();
49 return frac * cell;
50}
51
52// Legacy position wrap: fractional coords into [0, 1) via fmod (historical
53// Matter).
54inline AtomMatrix applyLegacy(const AtomMatrix &coords, const Matrix3d &cell,
55 const Matrix3d &cellInverse) {
56 AtomMatrix frac = coords * cellInverse;
57 for (int i = 0; i < frac.rows(); i++) {
58 for (int j = 0; j < 3; j++) {
59 frac(i, j) = std::fmod(frac(i, j) + 1.0, 1.0);
60 }
61 }
62 return frac * cell;
63}
64
65// Position wrap selecting convention (Legacy vs MinimumImage centering).
66inline AtomMatrix applyPositions(const AtomMatrix &coords, const Matrix3d &cell,
67 const Matrix3d &cellInverse,
68 PbcConvention convention) {
69 if (convention == PbcConvention::MinimumImage) {
70 return apply(coords, cell, cellInverse);
71 }
72 return applyLegacy(coords, cell, cellInverse);
73}
74
75inline VectorXd applyV(const VectorXd &diffVector, const Matrix3d &cell,
76 const Matrix3d &cellInverse) {
77 AtomMatrix pbcMatrix =
78 apply(AtomMatrix::Map(diffVector.data(), diffVector.size() / 3, 3), cell,
79 cellInverse);
80 return VectorXd(VectorXd::Map(pbcMatrix.data(), diffVector.size()));
81}
82
83} // namespace pbc
84
85/* Data describing an atomic structure. This class has been devised to handle
86 * information about an atomic structure such as positions, velocities, masses,
87 * etc. It also allow to associate a forcefield for the structure through a
88 * pointer to function (potential()). The class can read and save data to a .con
89 * file (atom2con() and con2atom()). It can also save to a .xyz file
90 * (atom2xyz()).*/
91
92class Matter {
93public:
94 ~Matter() = default;
95 Matter(std::shared_ptr<Potential> pot, const Parameters &params)
96 : potential{pot},
97 // Isolated molecular QM (NWChem/ORCA) must start with PBC off (#188).
98 usePeriodicBoundaries{!(pot && pot->requiresIsolatedMoleculeLayout())},
100 recomputePotential{true},
101 forceCalls{0},
102 removeNetForce{params.main_options.removeNetForce},
103 structComp{params.structure_comparison_options},
104 parameters{&params},
105 nAtoms{0},
106 positions{MatrixXd::Zero(0, 3)},
107 velocities{MatrixXd::Zero(0, 3)},
108 forces{MatrixXd::Zero(0, 3)},
109 biasForces{MatrixXd::Zero(0, 3)},
110 biasPotential{nullptr},
111 masses{Eigen::VectorXd::Zero(0)},
112 atomicNrs{Eigen::VectorXi::Zero(0)},
113 isFixed{AtomMatrix::Zero(0, 3)},
114 cell{Matrix3d::Zero()},
115 cellInverse{Matrix3d::Zero()},
116 energyVariance{0.0},
117 potentialEnergy{0.0} {} // the number of atoms shall be set later
118 // using resize()
119 Matter(const Matter &matter); // create a copy of matter
120 const Matter &operator=(const Matter &matter); // copy the matter object
124 Matter(Matter &&other) noexcept;
125 Matter &operator=(Matter &&other) noexcept;
126 bool compare(const Matter &matter, bool indistinguishable = false);
127
128 double
129 distanceTo(const Matter &matter); // the distance to the given matter object
130 double perAtomNorm(const Matter &matter); // the maximum distance between two
131 // atoms in the Matter objects
132 void
133 setPotential(std::shared_ptr<Potential> pot); // set potential function to use
134 std::shared_ptr<Potential> getPotential(); // get potential function to use
135 void resize(long int nAtoms); // set or reset the number of atoms
136 long int numberOfAtoms() const; // return the number of atoms
137 Matrix3d getCell() const;
138 void setCell(const Matrix3d &newCell);
139 double getPosition(long int atom, int axis)
140 const; // return the position of an atom along one of the axis
141 void setPosition(
142 long int atom, int axis,
143 double position); // set the position of atom along axis to position
144 void setVelocity(
145 long int atom, int axis,
146 double velocity); // set the velocity of atom along axis to velocity
147 bool relax(bool quiet = false, bool writeMovie = false,
148 bool checkpoint = false, std::string prefixMovie = std::string(),
149 std::string prefixCheckpoint = std::string(),
150 bool retainMovieFrames = false);
151
154 [[nodiscard]] const std::vector<readcon::ConFrame> &movieFrames() const {
155 return movie_frames_;
156 }
157 void clearMovieFrames() { movie_frames_.clear(); }
159 [[nodiscard]] std::vector<readcon::ConFrame> takeMovieFrames() {
160 return std::move(movie_frames_);
161 }
162
163 AtomMatrix pbc(const AtomMatrix &diff) const {
164 return eonc::pbc::apply(diff, cell, cellInverse);
165 }
166 VectorXd pbcV(const VectorXd &diff) const {
167 return eonc::pbc::applyV(diff, cell, cellInverse);
168 }
169
170 size_t getPotentialCalls() const;
171 const AtomMatrix &getPositions() const; // return coordinates of atoms
172 AtomMatrix getPositionsCopy() const; // return a modifiable copy
173 VectorXd getPositionsV() const;
175 getPositionsFree() const; // return coordinates of free atoms in array pos
176 VectorXd getPositionsFreeV() const;
177 void
178 setPositions(const AtomMatrix &pos); // update Matter with the new positions
179 // of the free atoms given in array pos
180 void setPositionsV(const VectorXd &pos);
181 void setPositionsFree(
182 const AtomMatrix &pos); // update Matter with the new positions of the
183 // free atoms given in array pos
184 void setPositionsFreeV(const VectorXd &pos);
185
187 void setVelocities(const AtomMatrix &v);
188 void setBiasForces(const AtomMatrix &bf);
189 void setBiasPotential(BondBoost *bondBoost);
190 void setForces(const AtomMatrix &f);
192
193 const AtomMatrix &getForces() const;
194 const AtomMatrix &getForcesRaw() const;
196 VectorXd getForcesV() const;
197 // Const so callers can read free-atom forces without mutating Matter (#171).
199 VectorXd getForcesFreeV() const;
200
203 pbcConvention = convention;
204 }
205
206 double getMass(long int atom) const; // return the mass of the atom specified
207 void setMass(long int atom, double mass); // set the mass of an atom
208 void setMasses(const VectorXd &massesIn); // set the mass of an atom
209 long getAtomicNr(
210 long int atom) const; // return the atomic number of the atom specified
211 void setAtomicNr(long int atom,
212 long atomicNr); // set the atomic number of an atom
213 VectorXi getAtomicNrs() const; // Get the vector of atomic numbers
214 VectorXi getAtomicNrsFree() const; // Get the vector of atomic numbers
215 void setAtomicNrs(const VectorXi &atmnrs); // set the vector of atomic numbers
216
218 int getFixed(long int atom) const;
220 int getFixed(long int atom, int axis) const;
222 [[nodiscard]] std::array<bool, 3> getFixedMask(long int atom) const;
224 void setFixed(long int atom, int isFixed);
226 void setFixed(long int atom, int axis, int isFixed);
227 void setFixedMask(long int atom, std::array<bool, 3> mask);
228 double getEnergyVariance() const;
229 double getPotentialEnergy() const;
230
232 [[nodiscard]] bool needsForceUpdate() const { return recomputePotential; }
233
236 double *forcesData() { return forces.data(); }
237
240 void setComputedPotential(double energy, double variance);
241 double getKineticEnergy() const;
242 double getMechanicalEnergy() const;
243
244 double distance(long index1, long index2)
245 const; // return the distance between two atoms in same configuration
246 double pdistance(long index1, long index2, int axis) const;
247 double distance(const Matter &matter, long index)
248 const; // the distance between the same atom in two cofigurations
249
250 long int
251 numberOfFreeAtoms() const; // return the number of free (or movable) atoms
252 long int numberOfFixedAtoms() const; // return the number of fixed atoms
253
254 long
255 getForceCalls() const; // return how many force calls that have been performed
256 void resetForceCalls(); // zeroing the value of force calls
257
258 double maxForce(void) const;
259
261 [[nodiscard]] bool getWriteConForces() const noexcept {
262 return parameters != nullptr && parameters->main_options.writeConForces;
263 }
264
265 // I/O delegates to eonc::io free functions (IoStatus for bindings).
266 [[nodiscard]] io::IoStatus writeTibble(std::string filename) {
267 return io::writeTibble(*this, filename);
268 }
269 [[nodiscard]] io::IoStatus con2matter(std::string filename) {
270 return io::con2matter(*this, filename);
271 }
272 [[nodiscard]] io::IoStatus
273 con2matter(const readcon::ConFrame &frame,
274 io::ConFrameMetadata *out_metadata = nullptr) {
275 return io::con2matter(*this, frame, out_metadata);
276 }
277 [[nodiscard]] io::IoStatus convel2matter(std::string filename) {
278 return io::convel2matter(*this, filename);
279 }
280 [[nodiscard]] io::IoStatus
281 matter2con(std::string filename, bool append = false,
282 const io::ConFrameMetadata *metadata = nullptr) {
283 return io::matter2con(*this, filename, append, metadata);
284 }
285 [[nodiscard]] io::IoStatus matter2convel(std::string filename) {
286 return io::matter2convel(*this, filename);
287 }
288 [[nodiscard]] io::IoStatus matter2xyz(std::string filename,
289 bool append = false) {
290 return io::matter2xyz(*this, filename, append);
291 }
292
293 AtomMatrix getFree() const;
294 VectorXd getFreeV() const;
295 Eigen::Matrix<double, Eigen::Dynamic, 1> getMasses() const;
296
300 [[nodiscard]] std::int64_t getAtomIndex(long int atom) const {
301 return atomIndex(atom);
302 }
303 void setAtomIndex(long int atom, std::int64_t index) {
304 atomIndex(atom) = index;
305 }
306
308 [[nodiscard]] const std::array<std::string, 5> &getHeaderCon() const {
309 return headerCon;
310 }
311 void setHeaderCon(const std::array<std::string, 5> &headers) {
312 headerCon = headers;
313 }
314 void setHeaderConLine(size_t i, std::string line) {
315 headerCon.at(i) = std::move(line);
316 }
317
318 [[nodiscard]] bool getPeriodic() const noexcept {
320 }
321 void setPeriodic(bool periodic) {
322 usePeriodicBoundaries = periodic;
323 recomputePotential = true;
325 }
326
332
333private:
334 // Friend declarations for eonc::io free functions that need private access
335 // con2matter still needs private headerCon + recompute flags for faithful
336 // force/energy restore without an extra potential evaluation.
337 friend io::IoStatus io::con2matter(Matter &, const readcon::ConFrame &,
339
341 std::shared_ptr<Potential>
342 potential; // pointer to function calculating the energy and forces
343 bool usePeriodicBoundaries; // boolean telling periodic boundaries are used
344
347 PbcConvention pbcConvention; // position-wrap MIC convention (issue #176)
348 mutable bool recomputePotential; // boolean indicating if the potential energy
349 // and forces need to be recalculated
350 mutable long
351 forceCalls; // keep track of how many force calls have been performed
352
353 // CON file header lines (indices 0-4 map to old headerCon1,2,4,5,6)
354 std::array<std::string, 5> headerCon;
355
356 void computePotential() const;
358 void applyPeriodicBoundary(double &component, int axis);
360
361 // Narrowed from Parameters: only fields Matter actually reads
362 bool removeNetForce{true};
364 // Full Parameters pointer retained solely for relax() delegation
366 long nAtoms;
372 VectorXd masses;
373 VectorXi atomicNrs;
374 AtomMatrix isFixed; // Nx3; 1.0 if that axis is fixed, 0.0 if free
375 Eigen::Matrix<std::int64_t, Eigen::Dynamic, 1>
376 atomIndex; // original atom index from .con column 5
377 mutable AtomMatrix freeMask; // cached Nx3 mask (1.0 for free, 0.0 for fixed)
378 mutable AtomMatrix maskedForces; // cached forces with fixed atoms zeroed
379 mutable std::vector<int> freeIndices; // cached indices of free atoms
380 mutable bool recomputeFreeMask{true};
381 mutable bool recomputeMaskedForces{true};
384 mutable double energyVariance;
385 std::vector<readcon::ConFrame> movie_frames_;
386 mutable double potentialEnergy;
387};
388
389} // namespace eonc
390
391using eonc::Matter;
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, eOnStorageOrder > MatrixXd
Definition Eigen.h:33
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:386
io::IoStatus writeTibble(std::string filename)
Definition Matter.h:266
Parameters::structure_comparison_options_t structComp
Definition Matter.h:363
double getPotentialEnergy() const
Definition Matter.cpp:446
bool getWriteConForces() const noexcept
Parameters.main_options.writeConForces for this Matter, if bound.
Definition Matter.h:261
VectorXd getFreeV() const
Definition Matter.cpp:596
long int numberOfFixedAtoms() const
Definition Matter.cpp:465
void setComputedPotential(double energy, double variance)
Set energy/variance from external batched evaluation and mark forces as up-to-date (recomputePotentia...
Definition Matter.cpp:643
void setForces(const AtomMatrix &f)
Definition Matter.cpp:608
Eigen::Matrix< std::int64_t, Eigen::Dynamic, 1 > atomIndex
Definition Matter.h:376
void setPositionsFreeV(const VectorXd &pos)
Definition Matter.cpp:301
bool recomputeFreeMask
Definition Matter.h:380
io::IoStatus convel2matter(std::string filename)
Definition Matter.h:277
PbcConvention pbcConvention
Definition Matter.h:347
void setAtomicNrs(const VectorXi &atmnrs)
Definition Matter.cpp:571
VectorXd getPositionsV() const
Definition Matter.cpp:240
VectorXd masses
Definition Matter.h:372
std::vector< readcon::ConFrame > movie_frames_
Definition Matter.h:385
long getForceCalls() const
Definition Matter.cpp:479
void setMasses(const VectorXd &massesIn)
Definition Matter.cpp:386
eonc::log::Scoped m_log
Definition Matter.h:340
void setHeaderConLine(size_t i, std::string line)
Definition Matter.h:314
void setPosition(long int atom, int axis, double position)
Definition Matter.cpp:222
io::IoStatus matter2convel(std::string filename)
Definition Matter.h:285
void computePotential() const
Definition Matter.cpp:498
std::vector< int > freeIndices
Definition Matter.h:379
double distance(long index1, long index2) const
Definition Matter.cpp:360
VectorXi atomicNrs
Definition Matter.h:373
AtomMatrix getFree() const
Definition Matter.cpp:580
bool getPeriodic() const noexcept
Definition Matter.h:318
void setBiasPotential(BondBoost *bondBoost)
Definition Matter.cpp:314
const AtomMatrix & getForces() const
Definition Matter.cpp:324
double maxForce(void) const
Definition Matter.cpp:554
void setPbcConvention(PbcConvention convention)
Definition Matter.h:202
AtomMatrix velocities
Definition Matter.h:368
bool recomputeMaskedForces
Definition Matter.h:381
void setPeriodic(bool periodic)
Definition Matter.h:321
void setVelocities(const AtomMatrix &v)
Definition Matter.cpp:604
VectorXi getAtomicNrs() const
Definition Matter.cpp:569
void applyPeriodicBoundaryIfEnabled()
Apply MIC wrap when periodic boundaries are enabled (I/O path).
Definition Matter.h:327
const Parameters * parameters
Definition Matter.h:365
bool removeNetForce
Definition Matter.h:362
long nAtoms
Definition Matter.h:366
void setBiasForces(const AtomMatrix &bf)
Definition Matter.cpp:318
AtomMatrix pbc(const AtomMatrix &diff) const
Definition Matter.h:163
VectorXd getForcesV() const
Definition Matter.cpp:340
std::shared_ptr< Potential > potential
Definition Matter.h:342
double getEnergyVariance() const
Definition Matter.cpp:663
AtomMatrix getPositionsCopy() const
Definition Matter.cpp:238
BondBoost * biasPotential
Definition Matter.h:371
long int numberOfAtoms() const
Definition Matter.cpp:209
void setAtomIndex(long int atom, std::int64_t index)
Definition Matter.h:303
Eigen::Matrix< double, Eigen::Dynamic, 1 > getMasses() const
Definition Matter.cpp:623
PbcConvention getPbcConvention() const
Definition Matter.h:201
AtomMatrix getPositionsFree() const
Definition Matter.cpp:244
long forceCalls
Definition Matter.h:351
std::shared_ptr< Potential > getPotential()
Definition Matter.cpp:671
VectorXd pbcV(const VectorXd &diff) const
Definition Matter.h:166
void setPositionsFree(const AtomMatrix &pos)
Definition Matter.cpp:287
double getPosition(long int atom, int axis) const
Definition Matter.cpp:218
void applyPeriodicBoundary(double &component, int axis)
AtomMatrix freeMask
Definition Matter.h:377
void resize(long int nAtoms)
Definition Matter.cpp:173
AtomMatrix forces
Definition Matter.h:369
void applyPeriodicBoundary()
Definition Matter.cpp:543
const std::vector< readcon::ConFrame > & movieFrames() const
In-memory minimization movie (same stamps as writeMovie CON).
Definition Matter.h:154
void resetForceCalls()
Definition Matter.cpp:481
const AtomMatrix & getForcesRaw() const
Definition Matter.cpp:335
void setMass(long int atom, double mass)
Definition Matter.cpp:382
bool recomputePotential
Definition Matter.h:348
io::IoStatus con2matter(const readcon::ConFrame &frame, io::ConFrameMetadata *out_metadata=nullptr)
Definition Matter.h:273
void setPositionsV(const VectorXd &pos)
Definition Matter.cpp:283
void setCell(const Matrix3d &newCell)
Definition Matter.cpp:213
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:257
double * forcesData()
Mutable access to force storage for batched potential evaluation.
Definition Matter.h:236
bool needsForceUpdate() const
Whether forces need recomputation (positions changed since last eval).
Definition Matter.h:232
std::array< std::string, 5 > headerCon
Definition Matter.h:354
void clearMovieFrames()
Definition Matter.h:157
void assertIsolatedMoleculeLayoutSafe() const
Throw if pot forbids PBC (isolated molecular QM backends, issue #188).
Definition Matter.cpp:486
void setHeaderCon(const std::array< std::string, 5 > &headers)
Definition Matter.h:311
~Matter()=default
bool usePeriodicBoundaries
Definition Matter.h:343
AtomMatrix isFixed
Definition Matter.h:374
std::array< bool, 3 > getFixedMask(long int atom) const
Per-axis CON column-4 mask (bit0=x, bit1=y, bit2=z).
Definition Matter.cpp:413
VectorXd getForcesFreeV() const
Definition Matter.cpp:354
Matrix3d cell
Definition Matter.h:382
Matter(std::shared_ptr< Potential > pot, const Parameters &params)
Definition Matter.h:95
VectorXd getPositionsFreeV() const
Definition Matter.cpp:268
Matrix3d cellInverse
Definition Matter.h:383
VectorXi getAtomicNrsFree() const
Definition Matter.cpp:253
double getMechanicalEnergy() const
Definition Matter.cpp:461
const Matter & operator=(const Matter &matter)
Definition Matter.cpp:25
io::IoStatus matter2xyz(std::string filename, bool append=false)
Definition Matter.h:288
long int numberOfFreeAtoms() const
Definition Matter.cpp:475
const std::array< std::string, 5 > & getHeaderCon() const
CON header lines (indices 0..4); public for I/O / bindings.
Definition Matter.h:308
std::int64_t getAtomIndex(long int atom) const
.con column-5 index (pre-grouping); public for I/O / bindings.
Definition Matter.h:300
bool compare(const Matter &matter, bool indistinguishable=false)
Definition Matter.cpp:129
void setFixed(long int atom, int isFixed)
Broadcast a whole-atom flag onto all three axes.
Definition Matter.cpp:418
long getAtomicNr(long int atom) const
Definition Matter.cpp:392
void setFixedMask(long int atom, std::array< bool, 3 > mask)
Definition Matter.cpp:433
Matrix3d getCell() const
Definition Matter.cpp:211
AtomMatrix getVelocities() const
Definition Matter.cpp:600
double energyVariance
Definition Matter.h:384
double perAtomNorm(const Matter &matter)
Definition Matter.cpp:160
AtomMatrix getForcesFree() const
Definition Matter.cpp:344
void setPositions(const AtomMatrix &pos)
Definition Matter.cpp:273
io::IoStatus matter2con(std::string filename, bool append=false, const io::ConFrameMetadata *metadata=nullptr)
Definition Matter.h:281
double getKineticEnergy() const
Definition Matter.cpp:454
AtomMatrix maskedForces
Definition Matter.h:378
double getMass(long int atom) const
Definition Matter.cpp:380
double distanceTo(const Matter &matter)
Definition Matter.cpp:155
size_t getPotentialCalls() const
Definition Matter.cpp:659
void setVelocity(long int atom, int axis, double velocity)
Definition Matter.cpp:231
io::IoStatus con2matter(std::string filename)
Definition Matter.h:269
AtomMatrix biasForces
Definition Matter.h:370
std::vector< readcon::ConFrame > takeMovieFrames()
Take ownership of retained frames (leaves storage empty).
Definition Matter.h:159
const AtomMatrix & getPositions() const
Definition Matter.cpp:236
AtomMatrix getAccelerations()
Definition Matter.cpp:612
void applyPeriodicBoundary(AtomMatrix &diff)
AtomMatrix getBiasForces()
Definition Matter.cpp:305
double pdistance(long index1, long index2, int axis) const
Definition Matter.cpp:366
AtomMatrix positions
Definition Matter.h:367
void setAtomicNr(long int atom, long atomicNr)
Definition Matter.cpp:396
void setPotential(std::shared_ptr< Potential > pot)
Definition Matter.cpp:625
int getFixed(long int atom) const
1 if every Cartesian axis of the atom is fixed, else 0.
Definition Matter.cpp:402
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.
AtomMatrix apply(const AtomMatrix &diff, const Matrix3d &cell, const Matrix3d &cellInverse)
Definition Matter.h:42
AtomMatrix applyLegacy(const AtomMatrix &coords, const Matrix3d &cell, const Matrix3d &cellInverse)
Definition Matter.h:54
AtomMatrix applyPositions(const AtomMatrix &coords, const Matrix3d &cell, const Matrix3d &cellInverse, PbcConvention convention)
Definition Matter.h:66
VectorXd applyV(const VectorXd &diffVector, const Matrix3d &cell, const Matrix3d &cellInverse)
Definition Matter.h:75
RAII resource manager for the ARTn C library with global synchronization.
PbcConvention
Definition Matter.h:34
RAII helper for class-scoped logging.
Definition EonLogger.h:171