1#ifndef STRUCTUREUTILS_H
2#define STRUCTUREUTILS_H
20 std::filesystem::path path,
21 std::unique_ptr<Structure> & structure,
29 std::cout << path <<
" does not appear to refer to an [EXT]XYZ or CONFIG-like\n";
33 structure = std::make_unique<CONFIG>(path,
blocking);
35 catch (std::runtime_error &
e)
37 std::cout <<
"Could not parse "
39 <<
" as a CONFIG-like:\n"
40 <<
e.what() <<
"\n Trying [EXT]XYZ\n";
41 structure = std::make_unique<XYZ>(path,
blocking);
48 structure = std::make_unique<XYZ>(path,
blocking);
50 catch (std::runtime_error &
e)
52 std::cout <<
"Could not parse "
54 <<
" as an [EXT]XYZ:\n"
55 <<
e.what() <<
"\n Trying CONFIG-like\n";
56 structure = std::make_unique<CONFIG>(path,
blocking);
glm::vec< L, float, glm::qualifier::highp > vec
Definition commandLine.h:214
bool ostensiblyCONFIGLike(std::filesystem::path path)
Check if a path is CONFIG'y.
Definition config.h:24
void readStructureFile(std::filesystem::path path, std::unique_ptr< Structure > &structure, bool blocking=false)
Read a structure file from the path.
Definition structureUtils.h:19
bool ostensiblyXYZLike(std::filesystem::path path)
Check if a path is XYZ'y.
Definition xyz.h:21