3 #include <spdlog/fmt/bundled/core.h>
8 const std::vector<Particle>& particles)
const {
9 auto file_name = params.
output_dir_path / fmt::format(
"MD_XYZ_{:04d}.xyz", iteration);
14 file << particles.size() << std::endl;
15 file <<
"Generated by MolSim. See http://openbabel.org/wiki/XYZ_(format) for file format doku." << std::endl;
17 for (
auto& p : particles) {
18 std::array<double, 3> x = p.getX();
20 file.setf(std::ios_base::showpoint);
Contains all parameters needed to run a simulation.
std::filesystem::path output_dir_path
Path to the directory in which to save the simulation output.
const std::filesystem::path writeFile(const SimulationParams ¶ms, size_t iteration, const std::vector< Particle > &particles) const override
Writes the data of the given ParticleContainer to a .xyz file.