diff --git a/src/compound.cpp b/src/compound.cpp index 8a7fa20..7fa0324 100644 --- a/src/compound.cpp +++ b/src/compound.cpp @@ -784,7 +784,7 @@ void compound_factory::report_missing_compound(std::string_view compound_id) << "in /var/cache/libcifpp using the following commands:\n\n" << "curl -o " << CACHE_DIR << "/components.cif https://files.wwpdb.org/pub/pdb/data/monomers/components.cif\n" << "curl -o " << CACHE_DIR << "/mmcif_pdbx.dic https://mmcif.wwpdb.org/dictionaries/ascii/mmcif_pdbx_v50.dic\n" - << "curl -o " << CACHE_DIR << "/mmcif_ma.dic https://github.com/ihmwg/ModelCIF/raw/master/dist/mmcif_ma.dic\n\n"; + << "curl -o " << CACHE_DIR << "/mmcif_ma.dic https://mmcif.wwpdb.org/dictionaries/ascii/mmcif_ma.dic\n\n"; #endif if (m_impl) diff --git a/src/model.cpp b/src/model.cpp index d052f78..9ceaacc 100644 --- a/src/model.cpp +++ b/src/model.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -1896,13 +1897,12 @@ void structure::swap_atoms(atom a1, atom a2) auto r1 = atomSites.find1(key("id") == a1.id()); auto r2 = atomSites.find1(key("id") == a2.id()); - auto l1 = r1["label_atom_id"]; - auto l2 = r2["label_atom_id"]; - l1.swap(l2); - - auto l3 = r1["auth_atom_id"]; - auto l4 = r2["auth_atom_id"]; - l3.swap(l4); + for (std::string fld : std::initializer_list{ "label_atom_id", "auth_atom_id", "type_symbol" }) + { + auto l1 = r1[fld]; + auto l2 = r2[fld]; + l1.swap(l2); + } } catch (const std::exception &ex) { diff --git a/tools/update-libcifpp-data.in b/tools/update-libcifpp-data.in index f6824bc..c1c5262 100755 --- a/tools/update-libcifpp-data.in +++ b/tools/update-libcifpp-data.in @@ -63,7 +63,7 @@ update_dictionary() { update_dictionary "@CIFPP_CACHE_DIR@/components.cif" "https://files.wwpdb.org/pub/pdb/data/monomers/components.cif.gz" update_dictionary "@CIFPP_CACHE_DIR@/mmcif_pdbx.dic" "https://mmcif.wwpdb.org/dictionaries/ascii/mmcif_pdbx_v50.dic.gz" -update_dictionary "@CIFPP_CACHE_DIR@/mmcif_ma.dic" "https://github.com/ihmwg/ModelCIF/raw/master/dist/mmcif_ma.dic" +update_dictionary "@CIFPP_CACHE_DIR@/mmcif_ma.dic" "https://mmcif.wwpdb.org/dictionaries/ascii/mmcif_ma.dic" # notify subscribers, using find instead of run-parts to make it work on FreeBSD as well