mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
f7ea463738
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
Ref: https://github.com/OpenChemistry/avogadrolibs/commit/0db79eb15b2f1dda1dd07a807b98086698cfee7a
|
|
Thanks to StefanBruens from OpenChemistry project
|
|
|
|
--- avogadrolibs-1.97.0/avogadro/io/mmtfformat.cpp 2023-20-03 18:50:00.000000000 +0200
|
|
+++ avogadrolibs-1.97.0-fixed/avogadro/io/mmtfformat.cpp 2023-20-03 18:50:01.000000000 +0200
|
|
@@ -33,21 +33,25 @@
|
|
|
|
MMTFFormat::~MMTFFormat() = default;
|
|
|
|
+namespace {
|
|
// from latest MMTF code, under the MIT license
|
|
// https://github.com/rcsb/mmtf-cpp/blob/master/include/mmtf/structure_data.hpp
|
|
+#if MMTF_SPEC_VERSION_MAJOR <= 1 && MMTF_SPEC_VERSION_MINOR < 1
|
|
bool is_polymer(const unsigned int chain_index,
|
|
const std::vector<mmtf::Entity>& entity_list)
|
|
{
|
|
for (const auto & i : entity_list) {
|
|
if (std::find(i.chainIndexList.begin(),
|
|
i.chainIndexList.end(),
|
|
chain_index) != i.chainIndexList.end()) {
|
|
return (i.type == "polymer" ||
|
|
i.type == "POLYMER");
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
+#endif
|
|
+} // namespace
|
|
|
|
bool MMTFFormat::read(std::istream& file, Molecule& molecule)
|
|
{
|