using fixup

This commit is contained in:
Maarten L. Hekkelman
2025-08-19 12:42:43 +02:00
parent 73e7cd9500
commit 5d7a9e8ead
2 changed files with 12 additions and 7 deletions

View File

@@ -129,8 +129,6 @@ int d_main(int argc, const char *argv[])
try
{
auto &cf = cif::validator_factory::instance();
cif::gzio::ifstream in(config.operands().front());
if (not in.is_open())
{
@@ -138,11 +136,18 @@ int d_main(int argc, const char *argv[])
exit(1);
}
f.load(in);
f.front().set_validator(&cf.get("mmcif_pdbx.dic"));
if (cif::VERBOSE > 0)
std::cerr << "Loading file...";
if (f.empty() or f.front().get("pdbx_poly_seq_scheme") == nullptr)
throw std::runtime_error("Missing pdbx_poly_seq_scheme, will attempt to recover...");
f.load(in);
if (cif::VERBOSE > 0)
std::cerr << " fixup file...";
cif::pdb::fixup_pdbx(f);
if (cif::VERBOSE > 0)
std::cerr << " done\n";
}
catch (const std::exception &e)
{

View File

@@ -1,7 +1,7 @@
CPMFindPackage(
NAME Catch2 3
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.8.0
GIT_TAG v3.7.1
EXCLUDE_FROM_ALL YES)
add_executable(unit-test-dssp ${CMAKE_CURRENT_SOURCE_DIR}/unit-test-dssp.cpp ${PROJECT_SOURCE_DIR}/libdssp/src/dssp-io.cpp)