Loading...
Searching...
No Matches
ChemfilesIO.cpp File Reference
#include "eon/ChemfilesIO.h"
#include "eon/EonLogger.h"
#include "eon/Matter.h"
#include "eon/fpe_handler.h"
#include <algorithm>
#include <cctype>
#include <filesystem>
#include <format>
#include <mutex>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  eonc
 RAII resource manager for the ARTn C library with global synchronization.
namespace  eonc::io

Functions

bool eonc::io::chemfiles_available () noexcept
 True when this build links chemfiles (-Dwith_chemfiles found it).
bool eonc::io::is_readcon_path (std::string_view filename)
 True for paths readcon owns: .con, .convel and their .gz/.zst forms.
bool eonc::io::is_chemfiles_path (std::string_view filename)
 True for structure paths routed to chemfiles: a known extension (xyz, extxyz, pdb, cif, mmcif, gro, data, lmp, mol2, sdf, vasp, xtc, trr, dcd, nc, arc, cml, cssr, mmtf, tng) or a POSCAR/CONTCAR name.
void eonc::io::set_structure_input_format (std::string fmt)
 [Main] input_format: empty or "con" keeps readcon only.
const std::string & eonc::io::structure_input_format () noexcept
std::vector< double > eonc::io::parse_cell_values (const std::string &text)
 Parse "a b c" or nine numbers; throws std::invalid_argument.
void eonc::io::set_config_cell (const std::vector< double > &values, bool pbc)
 Fallback cell for foreign files that carry none ([Main] cell / pbc).
void eonc::io::set_default_vacuum (double angstrom)
 Vacuum padding per side (Angstrom) for the bounding-box default cell.
double eonc::io::default_vacuum () noexcept
void eonc::io::publish_structure_input (std::string format, const std::string &cell, bool pbc, double vacuum)
 Publish [Main] input_format, cell, pbc, and default_vacuum to the process-wide readers.
const std::string & eonc::io::last_cell_warning () noexcept
 Read the first frame of any chemfiles-supported file into Matter.
IoStatus eonc::io::inp2matter (Matter &m, const std::string &filename)
 Input entry point: .con/.convel (and .gz/.zst) go to readcon, everything else goes to chemfiles.
IoStatus eonc::io::chemfiles2matter (Matter &, const std::string &filename, const std::string &)