Skip to content

Commit

Permalink
Correctly skip all structures where gemmi throws exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Jun 13, 2024
1 parent 8d2fe3a commit 7cd8939
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ include_directories(lib)
include_directories(lib/3di)
include_directories(lib/pulchra)
include_directories(lib/kerasify)
include_directories(lib/gemmi)

set(ENV{CARGO_NET_OFFLINE} true)
add_subdirectory(lib/corrosion)
Expand Down
3 changes: 2 additions & 1 deletion src/strucclustutils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set(strucclustutils_source_files
PARENT_SCOPE
)

add_library(gemmiwrapper OBJECT
add_library(gemmiwrapper
GemmiWrapper.cpp
GemmiWrapper.h
)
Expand All @@ -34,4 +34,5 @@ set_property(TARGET gemmiwrapper APPEND PROPERTY COMPILE_DEFINITIONS ${DEF_TMP})
set_property(TARGET gemmiwrapper APPEND PROPERTY INCLUDE_DIRECTORIES ${INCL_TMP})
restore_exceptions(gemmiwrapper)
target_link_libraries(gemmiwrapper foldcomp)
target_include_directories(gemmiwrapper PRIVATE ../../lib/gemmi)
target_include_directories(gemmiwrapper PRIVATE ../../lib/foldcomp/src)
4 changes: 2 additions & 2 deletions src/strucclustutils/GemmiWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ bool GemmiWrapper::load(const std::string& filename, Format format) {
st = gemmi::read_pdb(infile);
}
updateStructure((void*) &st, filename, entity_to_tax_id);
} catch (std::runtime_error& e) {
} catch (...) {
return false;
}
return true;
Expand Down Expand Up @@ -240,7 +240,7 @@ bool GemmiWrapper::loadFromBuffer(const char * buffer, size_t bufferSize, const
return false;
}
updateStructure((void*) &st, name, entity_to_tax_id);
} catch (std::runtime_error& e) {
} catch (...) {
return false;
}
return true;
Expand Down

0 comments on commit 7cd8939

Please sign in to comment.