diff --git a/docs/contents/user/tools/element/group/get_bonded_atom_pairs.ipynb b/docs/contents/user/tools/element/group/get_bonded_atom_pairs.ipynb index 54863ffa2..47623f302 100644 --- a/docs/contents/user/tools/element/group/get_bonded_atom_pairs.ipynb +++ b/docs/contents/user/tools/element/group/get_bonded_atom_pairs.ipynb @@ -20,7 +20,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "1e89da9f146c4d0fb4667d405f7e5b5c", + "model_id": "fc8b56fda4bd48509a680626ea2ad898", "version_major": 2, "version_minor": 0 }, @@ -93,23 +93,6 @@ "id": "a3d5ed12-0081-4c28-8078-5ce59947a1a8", "metadata": {}, "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "[autoreload of molsysmt.element.group.amino_acid.get_bonded_atom_pairs failed: Traceback (most recent call last):\n", - " File \"/conda/miniconda3/envs/MolSysMT@uibcdf_3.12/lib/python3.12/site-packages/IPython/extensions/autoreload.py\", line 276, in check\n", - " superreload(m, reload, self.old_objects)\n", - " File \"/conda/miniconda3/envs/MolSysMT@uibcdf_3.12/lib/python3.12/site-packages/IPython/extensions/autoreload.py\", line 500, in superreload\n", - " update_generic(old_obj, new_obj)\n", - " File \"/conda/miniconda3/envs/MolSysMT@uibcdf_3.12/lib/python3.12/site-packages/IPython/extensions/autoreload.py\", line 397, in update_generic\n", - " update(a, b)\n", - " File \"/conda/miniconda3/envs/MolSysMT@uibcdf_3.12/lib/python3.12/site-packages/IPython/extensions/autoreload.py\", line 309, in update_function\n", - " setattr(old, name, getattr(new, name))\n", - "ValueError: get_bonded_atom_pairs() requires a code object with 0 free vars, not 2\n", - "]\n" - ] - }, { "data": { "text/plain": [ @@ -176,14 +159,6 @@ "atom_indices = list(range(10, 10+len(atom_names)))\n", "msm.element.group.amino_acid.get_bonded_atom_pairs('VAL', atom_names, atom_indices=atom_indices)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ec9d2016-b9ae-4f7d-bfdc-5808f3d85d0b", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/molsysmt/_private/digestion/argument/bonded_atom_pairs.py b/molsysmt/_private/digestion/argument/bonded_atom_pairs.py index 85a4e53e5..4db893a1d 100644 --- a/molsysmt/_private/digestion/argument/bonded_atom_pairs.py +++ b/molsysmt/_private/digestion/argument/bonded_atom_pairs.py @@ -11,7 +11,7 @@ def digest_bonded_atom_pairs(bonded_atom_pairs, caller=None): for sublist in bonded_atom_pairs: if not (isinstance(sublist, list) and len(sublist) == 2): raise ArgumentError('bonded_atom_pairs', value=bonded_atom_pairs, caller=caller, message=None) - if not all(isinstance(item, int) for item in sublist): + if not all(isinstance(item, (int, np.integer)) for item in sublist): print('aa') raise ArgumentError('bonded_atom_pairs', value=bonded_atom_pairs, caller=caller, message=None) return np.array(bonded_atom_pairs) diff --git a/molsysmt/build/add_missing_bonds.py b/molsysmt/build/add_missing_bonds.py index f1a017d6d..6afb426ed 100644 --- a/molsysmt/build/add_missing_bonds.py +++ b/molsysmt/build/add_missing_bonds.py @@ -18,7 +18,6 @@ def add_missing_bonds(molecular_system, threshold='2 angstroms', selection='all' bonds = get_missing_bonds(molecular_system, threshold=threshold, selection=selection, structure_index=structure_index, syntax=syntax, skip_digestion=True) - return add_bonds(molecular_system, bonds, in_place=in_place, skip_digestion=True) else: diff --git a/tests/element/group/amino_acid/test_get_bonded_atom_pairs.py b/tests/element/group/amino_acid/test_get_bonded_atom_pairs_amino_acid.py similarity index 100% rename from tests/element/group/amino_acid/test_get_bonded_atom_pairs.py rename to tests/element/group/amino_acid/test_get_bonded_atom_pairs_amino_acid.py diff --git a/tests/element/group/amino_acid/test_get_group_db.py b/tests/element/group/amino_acid/test_get_group_db_amino_acid.py similarity index 100% rename from tests/element/group/amino_acid/test_get_group_db.py rename to tests/element/group/amino_acid/test_get_group_db_amino_acid.py diff --git a/tests/element/group/amino_acid/test_group_names.py b/tests/element/group/amino_acid/test_group_names_amino_acid.py similarity index 100% rename from tests/element/group/amino_acid/test_group_names.py rename to tests/element/group/amino_acid/test_group_names_amino_acid.py diff --git a/tests/element/group/ion/test_get_bonded_atom_pairs.py b/tests/element/group/ion/test_get_bonded_atom_pairs_ion.py similarity index 100% rename from tests/element/group/ion/test_get_bonded_atom_pairs.py rename to tests/element/group/ion/test_get_bonded_atom_pairs_ion.py diff --git a/tests/element/group/ion/test_get_group_db.py b/tests/element/group/ion/test_get_group_db_ion.py similarity index 100% rename from tests/element/group/ion/test_get_group_db.py rename to tests/element/group/ion/test_get_group_db_ion.py diff --git a/tests/element/group/ion/test_group_names.py b/tests/element/group/ion/test_group_names_ion.py similarity index 100% rename from tests/element/group/ion/test_group_names.py rename to tests/element/group/ion/test_group_names_ion.py