2#ifndef STORMM_FILE_UTIL_H
3#define STORMM_FILE_UTIL_H
9#include "Constants/behavior.h"
10#include "Parsing/textfile.h"
11#include "Topology/atomgraph_enumerators.h"
12#include "Trajectory/trajectory_enumerators.h"
13#include "file_enumerators.h"
18using constants::ExceptionResponse;
20using topology::TopologyKind;
21using trajectory::CoordinateFileKind;
23const char default_amber_crd_extension[] =
"crd";
24const char default_amber_inpcrd_extension[] =
"inpcrd";
25const char default_amber_ascii_rst_extension[] =
"rst";
26const char default_amber_netcdf_extension[] =
"cdf";
27const char default_amber_netcdf_rst_extension[] =
"rcdf";
28const char default_sd_file_extension[] =
"sdf";
29const char default_pdb_file_extension[] =
"pdb";
38std::ofstream openOutputFile(
const std::string &filename,
39 PrintSituation expectation = PrintSituation::OPEN_NEW,
40 const std::string &description = std::string(
""),
41 DataFormat style = DataFormat::ASCII);
48int removeFile(
const std::string &filename, ExceptionResponse policy = ExceptionResponse::WARN);
54DataFormat getTrajectoryFormat(CoordinateFileKind cfkind);
62TextFile readFileSample(
const std::string &file_name,
const std::string &caller,
75CoordinateFileKind detectCoordinateFileKind(
const TextFile &tf);
77CoordinateFileKind detectCoordinateFileKind(
const std::string &file_name,
78 const std::string &caller = std::string(
""));
85TopologyKind detectTopologyKind(
const TextFile &tf);
87TopologyKind detectTopologyKind(
const std::string &file_name,
88 const std::string &caller = std::string(
""));
95std::string getDefaultFileExtension(CoordinateFileKind kind);
104CoordinateFileKind inferCoordinateFileKind(
const std::string &file_name);
118std::string assembleFilePath(
const std::string &root_path,
const std::string &base_path,
119 const std::string &extn);
Structure for translating a text file into a compact, rapidly parsable vector of characters in CPU RA...
Definition textfile.h:45