From 1220f01f1e16659320cae3139c06b7976500d85d Mon Sep 17 00:00:00 2001 From: "Maarten L. Hekkelman" Date: Wed, 10 Sep 2025 14:22:52 +0200 Subject: [PATCH 1/2] change location of mmcif_ma.dic --- src/compound.cpp | 2 +- tools/update-libcifpp-data.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/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 From da500025c3f87e85a9b76bdf80aeb4e2ada8d7d4 Mon Sep 17 00:00:00 2001 From: "Maarten L. Hekkelman" Date: Wed, 10 Sep 2025 17:16:22 +0200 Subject: [PATCH 2/2] swap atoms should swap type_symbol as well --- src/model.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/model.cpp b/src/model.cpp index 797990d..12d074e 100644 --- a/src/model.cpp +++ b/src/model.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -1898,13 +1899,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) {