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& 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) {