diff --git a/docs/contents/user/tools/basic/181L.h5msm b/docs/contents/user/tools/basic/181L.h5msm
new file mode 100644
index 000000000..d31fb5c3a
Binary files /dev/null and b/docs/contents/user/tools/basic/181L.h5msm differ
diff --git a/docs/contents/user/tools/basic/append_structures.ipynb b/docs/contents/user/tools/basic/append_structures.ipynb
index 32904e40c..490d9d84a 100644
--- a/docs/contents/user/tools/basic/append_structures.ipynb
+++ b/docs/contents/user/tools/basic/append_structures.ipynb
@@ -45,7 +45,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "0a8ffa12ece7495d8a80c3ab8d2b498a",
+ "model_id": "1b2c8b220a594145a196d9c20d3b0e50",
"version_major": 2,
"version_minor": 0
},
@@ -88,37 +88,37 @@
"text/html": [
"\n",
- "
\n",
+ "\n",
" \n",
" \n",
- " form | \n",
- " n_atoms | \n",
- " n_groups | \n",
- " n_components | \n",
- " n_chains | \n",
- " n_molecules | \n",
- " n_entities | \n",
- " n_peptides | \n",
- " n_structures | \n",
+ " form | \n",
+ " n_atoms | \n",
+ " n_groups | \n",
+ " n_components | \n",
+ " n_chains | \n",
+ " n_molecules | \n",
+ " n_entities | \n",
+ " n_peptides | \n",
+ " n_structures | \n",
"
\n",
" \n",
" \n",
" \n",
- " molsysmt.MolSys | \n",
- " 22 | \n",
- " 3 | \n",
- " 1 | \n",
- " 1 | \n",
- " 1 | \n",
- " 1 | \n",
- " 1 | \n",
- " 1 | \n",
+ " molsysmt.MolSys | \n",
+ " 22 | \n",
+ " 3 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " 1 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 4,
@@ -173,37 +173,37 @@
"text/html": [
"\n",
- "\n",
+ "\n",
" \n",
" \n",
- " form | \n",
- " n_atoms | \n",
- " n_groups | \n",
- " n_components | \n",
- " n_chains | \n",
- " n_molecules | \n",
- " n_entities | \n",
- " n_peptides | \n",
- " n_structures | \n",
+ " form | \n",
+ " n_atoms | \n",
+ " n_groups | \n",
+ " n_components | \n",
+ " n_chains | \n",
+ " n_molecules | \n",
+ " n_entities | \n",
+ " n_peptides | \n",
+ " n_structures | \n",
"
\n",
" \n",
" \n",
" \n",
- " molsysmt.MolSys | \n",
- " 22 | \n",
- " 3 | \n",
- " 1 | \n",
- " 1 | \n",
- " 1 | \n",
- " 1 | \n",
- " 1 | \n",
- " 3 | \n",
+ " molsysmt.MolSys | \n",
+ " 22 | \n",
+ " 3 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " 3 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 6,
@@ -217,7 +217,7 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 7,
"metadata": {
"tags": [
"remove-input"
@@ -233,13 +233,13 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "0215ff885fd24bf1813fb5605036be64",
+ "model_id": "e12bd089b16040b4a320e6f4b8826ad6",
"version_major": 2,
"version_minor": 0
},
@@ -257,7 +257,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 9,
"metadata": {
"editable": true,
"slideshow": {
@@ -306,7 +306,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.11"
+ "version": "3.10.14"
}
},
"nbformat": 4,
diff --git a/docs/contents/user/tools/basic/are_multiple_molecular_systems.ipynb b/docs/contents/user/tools/basic/are_multiple_molecular_systems.ipynb
index c9b7712c5..b92574015 100644
--- a/docs/contents/user/tools/basic/are_multiple_molecular_systems.ipynb
+++ b/docs/contents/user/tools/basic/are_multiple_molecular_systems.ipynb
@@ -45,7 +45,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "7f9bfaec6c8744a28381796878bf06c6",
+ "model_id": "6a8bd0ae5f6d42fabf2822abbc527c73",
"version_major": 2,
"version_minor": 0
},
@@ -57,23 +57,23 @@
],
"source": [
"import molsysmt as msm\n",
- "from molsysmt.systems import demo"
+ "from molsysmt import systems"
]
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"molecular_system_A = '2LAO'\n",
- "molecular_system_B = demo['Trp-Cage']['1l2y.mmtf']\n",
- "molecular_system_C = demo['T4 lysozyme L99A']['t4_lysozyme_L99A.msmpk']"
+ "molecular_system_B = systems['Trp-Cage']['1l2y.h5msm']\n",
+ "molecular_system_C = systems['T4 lysozyme L99A']['t4_lysozyme_L99A.h5msm']"
]
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 4,
"metadata": {},
"outputs": [
{
@@ -82,7 +82,7 @@
"True"
]
},
- "execution_count": 9,
+ "execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -109,7 +109,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
@@ -119,7 +119,7 @@
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 6,
"metadata": {},
"outputs": [
{
@@ -128,7 +128,7 @@
"True"
]
},
- "execution_count": 11,
+ "execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -146,7 +146,7 @@
},
{
"cell_type": "code",
- "execution_count": 12,
+ "execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
@@ -156,7 +156,7 @@
},
{
"cell_type": "code",
- "execution_count": 13,
+ "execution_count": 8,
"metadata": {},
"outputs": [
{
@@ -165,7 +165,7 @@
"False"
]
},
- "execution_count": 13,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@@ -202,7 +202,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.11"
+ "version": "3.10.14"
}
},
"nbformat": 4,
diff --git a/docs/contents/user/tools/basic/compare.ipynb b/docs/contents/user/tools/basic/compare.ipynb
index 735d8c254..4c1e15ee6 100644
--- a/docs/contents/user/tools/basic/compare.ipynb
+++ b/docs/contents/user/tools/basic/compare.ipynb
@@ -48,7 +48,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "96e8ebd49b4046dabf6eaf4696fbb09b",
+ "model_id": "324137bf21524b65b200ceede8d4e5b7",
"version_major": 2,
"version_minor": 0
},
@@ -226,7 +226,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 9,
"id": "bd2ce323-000a-4edb-9b1a-1fe6e02a8552",
"metadata": {},
"outputs": [
@@ -236,7 +236,7 @@
"{'n_groups': True, 'box': True, 'coordinates': True}"
]
},
- "execution_count": 10,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@@ -255,7 +255,7 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 10,
"id": "33cf40d9-ec1c-4d99-aea4-ebc7a45592f8",
"metadata": {},
"outputs": [
@@ -265,7 +265,7 @@
"{'n_groups': True, 'box': True, 'coordinates': True}"
]
},
- "execution_count": 9,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -303,7 +303,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.11"
+ "version": "3.10.14"
}
},
"nbformat": 4,
diff --git a/docs/contents/user/tools/basic/concatenate_structures.ipynb b/docs/contents/user/tools/basic/concatenate_structures.ipynb
index 8ca4995ff..533075231 100644
--- a/docs/contents/user/tools/basic/concatenate_structures.ipynb
+++ b/docs/contents/user/tools/basic/concatenate_structures.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 1,
"metadata": {
"tags": [
"remove-input"
@@ -39,16 +39,29 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 2,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "9ea582c30e9749d5ba8b8572ed74cf98",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": []
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
"source": [
"import molsysmt as msm"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
@@ -59,7 +72,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
@@ -78,16 +91,59 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 5,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ " \n",
+ " \n",
+ " form | \n",
+ " n_atoms | \n",
+ " n_groups | \n",
+ " n_components | \n",
+ " n_chains | \n",
+ " n_molecules | \n",
+ " n_entities | \n",
+ " n_peptides | \n",
+ " n_structures | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " molsysmt.MolSys | \n",
+ " 22 | \n",
+ " 3 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " 3 | \n",
+ "
\n",
+ " \n",
+ "
\n"
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.info(molecular_system_D)"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 6,
"metadata": {
"tags": [
"remove-input"
@@ -103,16 +159,31 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 7,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "13375c3353cd4e58a557d9ff0ef04d30",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "NGLWidget(max_frame=2)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
"source": [
"msm.view(molecular_system_D)"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 8,
"metadata": {
"editable": true,
"slideshow": {
@@ -161,7 +232,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.11"
+ "version": "3.10.14"
}
},
"nbformat": 4,
diff --git a/docs/contents/user/tools/basic/contains.ipynb b/docs/contents/user/tools/basic/contains.ipynb
index 4b6b48d2b..a08a73970 100644
--- a/docs/contents/user/tools/basic/contains.ipynb
+++ b/docs/contents/user/tools/basic/contains.ipynb
@@ -48,7 +48,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "8abfc26fea4846c7aaea0de4825450a3",
+ "model_id": "038e66a02d194ff899e174429d147db1",
"version_major": 2,
"version_minor": 0
},
@@ -69,7 +69,7 @@
"metadata": {},
"outputs": [],
"source": [
- "molecular_system = msm.convert('pdb_id:181L', to_form='molsysmt.MolSys')"
+ "molecular_system = msm.convert('181L')"
]
},
{
@@ -87,43 +87,43 @@
"text/html": [
"\n",
- "\n",
+ "\n",
" \n",
" \n",
- " form | \n",
- " n_atoms | \n",
- " n_groups | \n",
- " n_components | \n",
- " n_chains | \n",
- " n_molecules | \n",
- " n_entities | \n",
- " n_waters | \n",
- " n_ions | \n",
- " n_small_molecules | \n",
- " n_proteins | \n",
- " n_structures | \n",
+ " form | \n",
+ " n_atoms | \n",
+ " n_groups | \n",
+ " n_components | \n",
+ " n_chains | \n",
+ " n_molecules | \n",
+ " n_entities | \n",
+ " n_waters | \n",
+ " n_ions | \n",
+ " n_small_molecules | \n",
+ " n_proteins | \n",
+ " n_structures | \n",
"
\n",
" \n",
" \n",
" \n",
- " molsysmt.MolSys | \n",
- " 1441 | \n",
- " 302 | \n",
- " 141 | \n",
- " 6 | \n",
- " 141 | \n",
- " 4 | \n",
- " 136 | \n",
- " 2 | \n",
- " 2 | \n",
- " 1 | \n",
- " 1 | \n",
+ " molsysmt.MolSys | \n",
+ " 1441 | \n",
+ " 302 | \n",
+ " 141 | \n",
+ " 6 | \n",
+ " 141 | \n",
+ " 5 | \n",
+ " 136 | \n",
+ " 2 | \n",
+ " 2 | \n",
+ " 1 | \n",
+ " 1 | \n",
"
\n",
" \n",
"
\n"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 4,
@@ -300,7 +300,7 @@
{
"data": {
"text/plain": [
- "False"
+ "True"
]
},
"execution_count": 10,
@@ -442,7 +442,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.11"
+ "version": "3.10.14"
}
},
"nbformat": 4,
diff --git a/docs/contents/user/tools/basic/convert.ipynb b/docs/contents/user/tools/basic/convert.ipynb
index e8471c58e..99dae2646 100644
--- a/docs/contents/user/tools/basic/convert.ipynb
+++ b/docs/contents/user/tools/basic/convert.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": null,
"metadata": {
"tags": [
"remove-input"
@@ -44,40 +44,27 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": null,
"metadata": {},
- "outputs": [
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "1bbcf8e8f4f749cbb2cd6491b6ff1f5e",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": []
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
+ "outputs": [],
"source": [
"import molsysmt as msm"
]
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"molecular_system_A = '181L'\n",
- "molecular_system_B = msm.convert(molecular_system_A, to_form='181L.mmtf')\n",
+ "molecular_system_B = msm.convert(molecular_system_A, to_form='181L.h5msm')\n",
"molecular_system_C = msm.convert(molecular_system_B)\n",
"molecular_system_D = msm.convert(molecular_system_C, to_form='string:pdb_text')\n",
"molecular_system_E = msm.convert(molecular_system_D, to_form='mdtraj.Trajectory')\n",
"molecular_system_F = msm.convert(molecular_system_E, to_form='nglview.NGLWidget')\n",
"molecular_system_G = msm.convert(molecular_system_F, to_form='openmm.Topology')\n",
- "molecular_system_H = msm.convert(molecular_system_G, to_form='string:aminoacids3')"
+ "molecular_system_H = msm.convert(molecular_system_G, to_form='string:amino_acids_3')"
]
},
{
@@ -102,62 +89,13 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": null,
"metadata": {
"tags": [
"scroll-output"
]
},
- "outputs": [
- {
- "data": {
- "text/html": [
- "\n",
- "\n",
- " \n",
- " \n",
- " form | \n",
- " n_atoms | \n",
- " n_groups | \n",
- " n_components | \n",
- " n_chains | \n",
- " n_molecules | \n",
- " n_entities | \n",
- " n_waters | \n",
- " n_ions | \n",
- " n_small_molecules | \n",
- " n_proteins | \n",
- " n_structures | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " openmm.Topology | \n",
- " 1441 | \n",
- " 302 | \n",
- " 141 | \n",
- " 6 | \n",
- " 141 | \n",
- " 5 | \n",
- " 136 | \n",
- " 2 | \n",
- " 2 | \n",
- " 1 | \n",
- " None | \n",
- "
\n",
- " \n",
- "
\n"
- ],
- "text/plain": [
- ""
- ]
- },
- "execution_count": 4,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
"msm.info(molecular_system_F)"
]
@@ -181,7 +119,7 @@
"# As such, it will not be shown in documentation\n",
"\n",
"import os\n",
- "os.remove('181L.mmtf')"
+ "os.remove('181L.h5msm')"
]
},
{
@@ -197,7 +135,7 @@
"metadata": {},
"outputs": [],
"source": [
- "benzene = msm.convert('181L', to_form='string:pdb_text', selection='molecule_name==\"Benzene\"')"
+ "benzene = msm.convert('181L', to_form='string:pdb_text', selection='molecule_name==\"BENZENE\"')"
]
},
{
@@ -229,21 +167,73 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 1,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "360e85f74c0548f8855c20b444b52a12",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": []
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
"source": [
- "from molsysmt.systems import demo"
+ "from molsysmt import systems\n",
+ "import molsysmt as msm"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
- "prmtop_file = demo['pentalanine']['pentalanine.prmtop']\n",
- "inpcrd_file = demo['pentalanine']['pentalanine.inpcrd']"
+ "prmtop_file = systems['pentalanine']['pentalanine.prmtop']\n",
+ "inpcrd_file = systems['pentalanine']['pentalanine.inpcrd']"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "da1\n"
+ ]
+ },
+ {
+ "ename": "NotCompatibleConversionError",
+ "evalue": "Error in conversion from file:prmtop to molsysmt.MolSys. The following input attributes of arguments are missing: {'solvent_dielectric', 'velocities', 'entity_type', 'cutoff_distance', 'entity_id', 'hydrogen_mass', 'salt_concentration', 'solute_dielectric', 'component_name', 'formal_charge', 'partial_charge', 'rigid_water', 'component_type', 'entity_name', 'kappa', 'component_id', 'flexible_constraints'}.",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[0;31mNotCompatibleConversionError\u001b[0m Traceback (most recent call last)",
+ "Cell \u001b[0;32mIn[3], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mmsm\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43melement\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmolecule\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_molecule_type\u001b[49m\u001b[43m(\u001b[49m\u001b[43mprmtop_file\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43melement\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mmolecule\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mselection\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mall\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mredefine_indices\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n",
+ "File \u001b[0;32m~/repos@uibcdf/MolSysMT/molsysmt/_private/digestion/digest.py:122\u001b[0m, in \u001b[0;36mdigest..digestor..wrapper\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 120\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m func(all_args[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mself\u001b[39m\u001b[38;5;124m'\u001b[39m], \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mfinal_args)\n\u001b[1;32m 121\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 122\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mfinal_args\u001b[49m\u001b[43m)\u001b[49m\n",
+ "File \u001b[0;32m~/repos@uibcdf/MolSysMT/molsysmt/element/molecule/get_molecule_type.py:15\u001b[0m, in \u001b[0;36mget_molecule_type\u001b[0;34m(molecular_system, element, selection, redefine_indices, redefine_types, syntax, skip_digestion)\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m redefine_indices:\n\u001b[1;32m 14\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mda1\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m---> 15\u001b[0m molecule_types_from_molecule \u001b[38;5;241m=\u001b[39m \u001b[43mget_component_type\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmolecular_system\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43melement\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mcomponent\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mselection\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mselection\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 16\u001b[0m \u001b[43m \u001b[49m\u001b[43mredefine_indices\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msyntax\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msyntax\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 17\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mda2\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 19\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m element \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124matom\u001b[39m\u001b[38;5;124m'\u001b[39m:\n",
+ "File \u001b[0;32m~/repos@uibcdf/MolSysMT/molsysmt/_private/digestion/digest.py:122\u001b[0m, in \u001b[0;36mdigest..digestor..wrapper\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 120\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m func(all_args[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mself\u001b[39m\u001b[38;5;124m'\u001b[39m], \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mfinal_args)\n\u001b[1;32m 121\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 122\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mfinal_args\u001b[49m\u001b[43m)\u001b[49m\n",
+ "File \u001b[0;32m~/repos@uibcdf/MolSysMT/molsysmt/element/component/get_component_type.py:27\u001b[0m, in \u001b[0;36mget_component_type\u001b[0;34m(molecular_system, element, selection, redefine_indices, redefine_types, syntax, skip_digestion)\u001b[0m\n\u001b[1;32m 18\u001b[0m atom_indices \u001b[38;5;241m=\u001b[39m select(molecular_system, element\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124matom\u001b[39m\u001b[38;5;124m'\u001b[39m, selection\u001b[38;5;241m=\u001b[39mselection,\n\u001b[1;32m 19\u001b[0m syntax\u001b[38;5;241m=\u001b[39msyntax, skip_digestion\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n\u001b[1;32m 21\u001b[0m \u001b[38;5;66;03m#if element!='atom':\u001b[39;00m\n\u001b[1;32m 22\u001b[0m \u001b[38;5;66;03m# aux_atom_indices = []\u001b[39;00m\n\u001b[1;32m 23\u001b[0m \u001b[38;5;66;03m# for aux in atom_indices:\u001b[39;00m\n\u001b[1;32m 24\u001b[0m \u001b[38;5;66;03m# aux_atom_indices += aux\u001b[39;00m\n\u001b[1;32m 25\u001b[0m \u001b[38;5;66;03m# atom_indices = aux_atom_indices\u001b[39;00m\n\u001b[0;32m---> 27\u001b[0m component_indices \u001b[38;5;241m=\u001b[39m \u001b[43mget_component_index\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmolecular_system\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43melement\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43matom\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 28\u001b[0m \u001b[43m \u001b[49m\u001b[43mselection\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mall\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mredefine_indices\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[1;32m 29\u001b[0m \u001b[43m \u001b[49m\u001b[43mskip_digestion\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m 31\u001b[0m unique_component_indices, first_atoms, n_atoms \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39munique(component_indices, return_index\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m,\n\u001b[1;32m 32\u001b[0m return_counts\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n\u001b[1;32m 34\u001b[0m component_types\u001b[38;5;241m=\u001b[39m{}\n",
+ "File \u001b[0;32m~/repos@uibcdf/MolSysMT/molsysmt/_private/digestion/digest.py:52\u001b[0m, in \u001b[0;36mdigest..digestor..wrapper\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 48\u001b[0m \u001b[38;5;129m@functools\u001b[39m\u001b[38;5;241m.\u001b[39mwraps(func)\n\u001b[1;32m 49\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mwrapper\u001b[39m(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[1;32m 51\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m kwargs\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mskip_digestion\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;28;01mFalse\u001b[39;00m):\n\u001b[0;32m---> 52\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 54\u001b[0m \u001b[38;5;66;03m# Define caller\u001b[39;00m\n\u001b[1;32m 56\u001b[0m caller \u001b[38;5;241m=\u001b[39m func\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__module__\u001b[39m\u001b[38;5;241m+\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;241m+\u001b[39mfunc\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\n",
+ "File \u001b[0;32m~/repos@uibcdf/MolSysMT/molsysmt/element/component/get_component_index.py:18\u001b[0m, in \u001b[0;36mget_component_index\u001b[0;34m(molecular_system, element, selection, redefine_indices, syntax, skip_digestion)\u001b[0m\n\u001b[1;32m 14\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mmolsysmt\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m convert, get\n\u001b[1;32m 16\u001b[0m component_index_of_atoms \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m---> 18\u001b[0m g \u001b[38;5;241m=\u001b[39m \u001b[43mconvert\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmolecular_system\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mto_form\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mnetworkx.Graph\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mskip_digestion\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m 20\u001b[0m components \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mlist\u001b[39m(nx\u001b[38;5;241m.\u001b[39mconnected_components(g))\n\u001b[1;32m 22\u001b[0m aux_n_components \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mlen\u001b[39m(components)\n",
+ "File \u001b[0;32m~/repos@uibcdf/MolSysMT/molsysmt/_private/digestion/digest.py:52\u001b[0m, in \u001b[0;36mdigest..digestor..wrapper\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 48\u001b[0m \u001b[38;5;129m@functools\u001b[39m\u001b[38;5;241m.\u001b[39mwraps(func)\n\u001b[1;32m 49\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mwrapper\u001b[39m(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[1;32m 51\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m kwargs\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mskip_digestion\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;28;01mFalse\u001b[39;00m):\n\u001b[0;32m---> 52\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 54\u001b[0m \u001b[38;5;66;03m# Define caller\u001b[39;00m\n\u001b[1;32m 56\u001b[0m caller \u001b[38;5;241m=\u001b[39m func\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__module__\u001b[39m\u001b[38;5;241m+\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;241m+\u001b[39mfunc\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\n",
+ "File \u001b[0;32m~/repos@uibcdf/MolSysMT/molsysmt/basic/convert.py:530\u001b[0m, in \u001b[0;36mconvert\u001b[0;34m(molecular_system, to_form, selection, structure_indices, syntax, verbose, skip_digestion, **kwargs)\u001b[0m\n\u001b[1;32m 528\u001b[0m \u001b[38;5;66;03m# If one to one\u001b[39;00m\n\u001b[1;32m 529\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(from_form, (\u001b[38;5;28mlist\u001b[39m, \u001b[38;5;28mtuple\u001b[39m)):\n\u001b[0;32m--> 530\u001b[0m output \u001b[38;5;241m=\u001b[39m \u001b[43m_convert_one_to_one\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmolecular_system\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfrom_form\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mto_form\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mto_form\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mselection\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mselection\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstructure_indices\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstructure_indices\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 531\u001b[0m \u001b[43m \u001b[49m\u001b[43msyntax\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msyntax\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mverbose\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mverbose\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mskip_digestion\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 533\u001b[0m \u001b[38;5;66;03m# If multiple to one\u001b[39;00m\n\u001b[1;32m 534\u001b[0m \n\u001b[1;32m 535\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 536\u001b[0m \n\u001b[1;32m 537\u001b[0m \u001b[38;5;66;03m# conversions in private shortcuts\u001b[39;00m\n\u001b[1;32m 538\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mtuple\u001b[39m(\u001b[38;5;28msorted\u001b[39m(from_form)) \u001b[38;5;129;01min\u001b[39;00m _multiple_conversion_shortcuts:\n",
+ "File \u001b[0;32m~/repos@uibcdf/MolSysMT/molsysmt/basic/convert.py:91\u001b[0m, in \u001b[0;36m_convert_one_to_one\u001b[0;34m(molecular_system, from_form, to_form, selection, structure_indices, syntax, verbose, **kwargs)\u001b[0m\n\u001b[1;32m 87\u001b[0m output \u001b[38;5;241m=\u001b[39m function(molecular_system, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mconversion_arguments, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[1;32m 89\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m (\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmolsysmt.MolSys\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;129;01min\u001b[39;00m _dict_modules[from_form]\u001b[38;5;241m.\u001b[39m_convert_to) \u001b[38;5;129;01mand\u001b[39;00m (to_form \u001b[38;5;129;01min\u001b[39;00m _dict_modules[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmolsysmt.MolSys\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;241m.\u001b[39m_convert_to):\n\u001b[0;32m---> 91\u001b[0m output \u001b[38;5;241m=\u001b[39m \u001b[43m_convert_one_to_one\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmolecular_system\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfrom_form\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mto_form\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mmolsysmt.MolSys\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mselection\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mselection\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 92\u001b[0m \u001b[43m \u001b[49m\u001b[43mstructure_indices\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstructure_indices\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msyntax\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msyntax\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 93\u001b[0m output \u001b[38;5;241m=\u001b[39m _convert_one_to_one(output, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmolsysmt.MolSys\u001b[39m\u001b[38;5;124m'\u001b[39m, to_form\u001b[38;5;241m=\u001b[39mto_form)\n\u001b[1;32m 95\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m output\n",
+ "File \u001b[0;32m~/repos@uibcdf/MolSysMT/molsysmt/basic/convert.py:85\u001b[0m, in \u001b[0;36m_convert_one_to_one\u001b[0;34m(molecular_system, from_form, to_form, selection, structure_indices, syntax, verbose, **kwargs)\u001b[0m\n\u001b[1;32m 82\u001b[0m missing_arguments\u001b[38;5;241m.\u001b[39mdiscard(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mget_missing_bonds\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 84\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(missing_arguments)\u001b[38;5;241m>\u001b[39m\u001b[38;5;241m0\u001b[39m:\n\u001b[0;32m---> 85\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m NotCompatibleConversionError(from_form, to_form, missing_arguments)\n\u001b[1;32m 87\u001b[0m output \u001b[38;5;241m=\u001b[39m function(molecular_system, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mconversion_arguments, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[1;32m 89\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m (\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmolsysmt.MolSys\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;129;01min\u001b[39;00m _dict_modules[from_form]\u001b[38;5;241m.\u001b[39m_convert_to) \u001b[38;5;129;01mand\u001b[39;00m (to_form \u001b[38;5;129;01min\u001b[39;00m _dict_modules[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmolsysmt.MolSys\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;241m.\u001b[39m_convert_to):\n",
+ "\u001b[0;31mNotCompatibleConversionError\u001b[0m: Error in conversion from file:prmtop to molsysmt.MolSys. The following input attributes of arguments are missing: {'solvent_dielectric', 'velocities', 'entity_type', 'cutoff_distance', 'entity_id', 'hydrogen_mass', 'salt_concentration', 'solute_dielectric', 'component_name', 'formal_charge', 'partial_charge', 'rigid_water', 'component_type', 'entity_name', 'kappa', 'component_id', 'flexible_constraints'}."
+ ]
+ }
+ ],
+ "source": [
+ "msm.element.molecule.get_molecule_type(prmtop_file, element='molecule', selection='all', redefine_indices=True)"
]
},
{
@@ -468,7 +458,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.11"
+ "version": "3.10.14"
}
},
"nbformat": 4,
diff --git a/docs/contents/user/tools/basic/select.ipynb b/docs/contents/user/tools/basic/select.ipynb
index 2ef36dd39..6202378af 100644
--- a/docs/contents/user/tools/basic/select.ipynb
+++ b/docs/contents/user/tools/basic/select.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 1,
"metadata": {
"editable": true,
"slideshow": {
@@ -233,16 +233,29 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 2,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "731a9befc8bb479b8b7e90df0c099219",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": []
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
"source": [
"import molsysmt as msm"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
@@ -251,7 +264,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 4,
"metadata": {
"editable": true,
"slideshow": {
@@ -261,7 +274,18 @@
"remove-input"
]
},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[1, 4, 10, 13, 17]"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Atoms with name CA or CB and id < 20\n",
"msm.select(molecular_system, element='atom', selection='atom_name in [\"CA\",\"CB\"] and atom_id<20')"
@@ -279,9 +303,1020 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 5,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[0,\n",
+ " 1,\n",
+ " 2,\n",
+ " 3,\n",
+ " 4,\n",
+ " 5,\n",
+ " 6,\n",
+ " 7,\n",
+ " 8,\n",
+ " 9,\n",
+ " 10,\n",
+ " 11,\n",
+ " 12,\n",
+ " 13,\n",
+ " 14,\n",
+ " 15,\n",
+ " 16,\n",
+ " 17,\n",
+ " 18,\n",
+ " 19,\n",
+ " 20,\n",
+ " 21,\n",
+ " 22,\n",
+ " 23,\n",
+ " 24,\n",
+ " 25,\n",
+ " 26,\n",
+ " 27,\n",
+ " 28,\n",
+ " 29,\n",
+ " 30,\n",
+ " 31,\n",
+ " 32,\n",
+ " 33,\n",
+ " 34,\n",
+ " 35,\n",
+ " 36,\n",
+ " 37,\n",
+ " 38,\n",
+ " 39,\n",
+ " 40,\n",
+ " 41,\n",
+ " 42,\n",
+ " 43,\n",
+ " 44,\n",
+ " 45,\n",
+ " 46,\n",
+ " 47,\n",
+ " 48,\n",
+ " 49,\n",
+ " 50,\n",
+ " 51,\n",
+ " 52,\n",
+ " 53,\n",
+ " 54,\n",
+ " 55,\n",
+ " 56,\n",
+ " 57,\n",
+ " 58,\n",
+ " 59,\n",
+ " 60,\n",
+ " 61,\n",
+ " 62,\n",
+ " 63,\n",
+ " 64,\n",
+ " 65,\n",
+ " 66,\n",
+ " 67,\n",
+ " 68,\n",
+ " 69,\n",
+ " 70,\n",
+ " 71,\n",
+ " 72,\n",
+ " 73,\n",
+ " 74,\n",
+ " 75,\n",
+ " 76,\n",
+ " 77,\n",
+ " 78,\n",
+ " 79,\n",
+ " 80,\n",
+ " 81,\n",
+ " 82,\n",
+ " 83,\n",
+ " 84,\n",
+ " 85,\n",
+ " 86,\n",
+ " 87,\n",
+ " 88,\n",
+ " 89,\n",
+ " 90,\n",
+ " 91,\n",
+ " 92,\n",
+ " 93,\n",
+ " 94,\n",
+ " 95,\n",
+ " 96,\n",
+ " 97,\n",
+ " 98,\n",
+ " 99,\n",
+ " 100,\n",
+ " 101,\n",
+ " 102,\n",
+ " 103,\n",
+ " 104,\n",
+ " 105,\n",
+ " 106,\n",
+ " 107,\n",
+ " 108,\n",
+ " 109,\n",
+ " 110,\n",
+ " 111,\n",
+ " 112,\n",
+ " 113,\n",
+ " 114,\n",
+ " 115,\n",
+ " 116,\n",
+ " 117,\n",
+ " 118,\n",
+ " 119,\n",
+ " 120,\n",
+ " 121,\n",
+ " 122,\n",
+ " 123,\n",
+ " 124,\n",
+ " 125,\n",
+ " 126,\n",
+ " 127,\n",
+ " 128,\n",
+ " 129,\n",
+ " 130,\n",
+ " 131,\n",
+ " 132,\n",
+ " 133,\n",
+ " 134,\n",
+ " 135,\n",
+ " 136,\n",
+ " 137,\n",
+ " 138,\n",
+ " 139,\n",
+ " 140,\n",
+ " 141,\n",
+ " 142,\n",
+ " 143,\n",
+ " 144,\n",
+ " 145,\n",
+ " 146,\n",
+ " 147,\n",
+ " 148,\n",
+ " 149,\n",
+ " 150,\n",
+ " 151,\n",
+ " 152,\n",
+ " 153,\n",
+ " 154,\n",
+ " 155,\n",
+ " 156,\n",
+ " 157,\n",
+ " 158,\n",
+ " 159,\n",
+ " 160,\n",
+ " 161,\n",
+ " 162,\n",
+ " 163,\n",
+ " 164,\n",
+ " 165,\n",
+ " 166,\n",
+ " 167,\n",
+ " 168,\n",
+ " 169,\n",
+ " 170,\n",
+ " 171,\n",
+ " 172,\n",
+ " 173,\n",
+ " 174,\n",
+ " 175,\n",
+ " 176,\n",
+ " 177,\n",
+ " 178,\n",
+ " 179,\n",
+ " 180,\n",
+ " 181,\n",
+ " 182,\n",
+ " 183,\n",
+ " 184,\n",
+ " 185,\n",
+ " 186,\n",
+ " 187,\n",
+ " 188,\n",
+ " 189,\n",
+ " 190,\n",
+ " 191,\n",
+ " 192,\n",
+ " 193,\n",
+ " 194,\n",
+ " 195,\n",
+ " 196,\n",
+ " 197,\n",
+ " 198,\n",
+ " 199,\n",
+ " 200,\n",
+ " 201,\n",
+ " 202,\n",
+ " 203,\n",
+ " 204,\n",
+ " 205,\n",
+ " 206,\n",
+ " 207,\n",
+ " 208,\n",
+ " 209,\n",
+ " 210,\n",
+ " 211,\n",
+ " 212,\n",
+ " 213,\n",
+ " 214,\n",
+ " 215,\n",
+ " 216,\n",
+ " 217,\n",
+ " 218,\n",
+ " 219,\n",
+ " 220,\n",
+ " 221,\n",
+ " 222,\n",
+ " 223,\n",
+ " 224,\n",
+ " 225,\n",
+ " 226,\n",
+ " 227,\n",
+ " 228,\n",
+ " 229,\n",
+ " 230,\n",
+ " 231,\n",
+ " 232,\n",
+ " 233,\n",
+ " 234,\n",
+ " 235,\n",
+ " 236,\n",
+ " 237,\n",
+ " 238,\n",
+ " 239,\n",
+ " 240,\n",
+ " 241,\n",
+ " 242,\n",
+ " 243,\n",
+ " 244,\n",
+ " 245,\n",
+ " 246,\n",
+ " 247,\n",
+ " 248,\n",
+ " 249,\n",
+ " 250,\n",
+ " 251,\n",
+ " 252,\n",
+ " 253,\n",
+ " 254,\n",
+ " 255,\n",
+ " 256,\n",
+ " 257,\n",
+ " 258,\n",
+ " 259,\n",
+ " 260,\n",
+ " 261,\n",
+ " 262,\n",
+ " 263,\n",
+ " 264,\n",
+ " 265,\n",
+ " 266,\n",
+ " 267,\n",
+ " 268,\n",
+ " 269,\n",
+ " 270,\n",
+ " 271,\n",
+ " 272,\n",
+ " 273,\n",
+ " 274,\n",
+ " 275,\n",
+ " 276,\n",
+ " 277,\n",
+ " 278,\n",
+ " 279,\n",
+ " 280,\n",
+ " 281,\n",
+ " 282,\n",
+ " 283,\n",
+ " 284,\n",
+ " 285,\n",
+ " 286,\n",
+ " 287,\n",
+ " 288,\n",
+ " 289,\n",
+ " 290,\n",
+ " 291,\n",
+ " 292,\n",
+ " 293,\n",
+ " 294,\n",
+ " 295,\n",
+ " 296,\n",
+ " 297,\n",
+ " 298,\n",
+ " 299,\n",
+ " 300,\n",
+ " 301,\n",
+ " 302,\n",
+ " 303,\n",
+ " 304,\n",
+ " 305,\n",
+ " 306,\n",
+ " 307,\n",
+ " 308,\n",
+ " 309,\n",
+ " 310,\n",
+ " 311,\n",
+ " 312,\n",
+ " 313,\n",
+ " 314,\n",
+ " 315,\n",
+ " 316,\n",
+ " 317,\n",
+ " 318,\n",
+ " 319,\n",
+ " 320,\n",
+ " 321,\n",
+ " 322,\n",
+ " 323,\n",
+ " 324,\n",
+ " 325,\n",
+ " 326,\n",
+ " 327,\n",
+ " 328,\n",
+ " 329,\n",
+ " 330,\n",
+ " 331,\n",
+ " 332,\n",
+ " 333,\n",
+ " 334,\n",
+ " 335,\n",
+ " 336,\n",
+ " 337,\n",
+ " 338,\n",
+ " 339,\n",
+ " 340,\n",
+ " 341,\n",
+ " 342,\n",
+ " 343,\n",
+ " 344,\n",
+ " 345,\n",
+ " 346,\n",
+ " 347,\n",
+ " 348,\n",
+ " 349,\n",
+ " 350,\n",
+ " 351,\n",
+ " 352,\n",
+ " 353,\n",
+ " 354,\n",
+ " 355,\n",
+ " 356,\n",
+ " 357,\n",
+ " 358,\n",
+ " 359,\n",
+ " 360,\n",
+ " 361,\n",
+ " 362,\n",
+ " 363,\n",
+ " 364,\n",
+ " 365,\n",
+ " 366,\n",
+ " 367,\n",
+ " 368,\n",
+ " 369,\n",
+ " 370,\n",
+ " 371,\n",
+ " 372,\n",
+ " 373,\n",
+ " 374,\n",
+ " 375,\n",
+ " 376,\n",
+ " 377,\n",
+ " 378,\n",
+ " 379,\n",
+ " 380,\n",
+ " 381,\n",
+ " 382,\n",
+ " 383,\n",
+ " 384,\n",
+ " 385,\n",
+ " 386,\n",
+ " 387,\n",
+ " 388,\n",
+ " 389,\n",
+ " 390,\n",
+ " 391,\n",
+ " 392,\n",
+ " 393,\n",
+ " 394,\n",
+ " 395,\n",
+ " 396,\n",
+ " 397,\n",
+ " 398,\n",
+ " 399,\n",
+ " 400,\n",
+ " 401,\n",
+ " 402,\n",
+ " 403,\n",
+ " 404,\n",
+ " 405,\n",
+ " 406,\n",
+ " 407,\n",
+ " 408,\n",
+ " 409,\n",
+ " 410,\n",
+ " 411,\n",
+ " 412,\n",
+ " 413,\n",
+ " 414,\n",
+ " 415,\n",
+ " 416,\n",
+ " 417,\n",
+ " 418,\n",
+ " 419,\n",
+ " 420,\n",
+ " 421,\n",
+ " 422,\n",
+ " 423,\n",
+ " 424,\n",
+ " 425,\n",
+ " 426,\n",
+ " 427,\n",
+ " 428,\n",
+ " 429,\n",
+ " 430,\n",
+ " 431,\n",
+ " 432,\n",
+ " 433,\n",
+ " 434,\n",
+ " 435,\n",
+ " 436,\n",
+ " 437,\n",
+ " 438,\n",
+ " 439,\n",
+ " 440,\n",
+ " 441,\n",
+ " 442,\n",
+ " 443,\n",
+ " 444,\n",
+ " 445,\n",
+ " 446,\n",
+ " 447,\n",
+ " 448,\n",
+ " 449,\n",
+ " 450,\n",
+ " 451,\n",
+ " 452,\n",
+ " 453,\n",
+ " 454,\n",
+ " 455,\n",
+ " 456,\n",
+ " 457,\n",
+ " 458,\n",
+ " 459,\n",
+ " 460,\n",
+ " 461,\n",
+ " 462,\n",
+ " 463,\n",
+ " 464,\n",
+ " 465,\n",
+ " 466,\n",
+ " 467,\n",
+ " 468,\n",
+ " 469,\n",
+ " 470,\n",
+ " 471,\n",
+ " 472,\n",
+ " 473,\n",
+ " 474,\n",
+ " 475,\n",
+ " 476,\n",
+ " 477,\n",
+ " 478,\n",
+ " 479,\n",
+ " 480,\n",
+ " 481,\n",
+ " 482,\n",
+ " 483,\n",
+ " 484,\n",
+ " 485,\n",
+ " 486,\n",
+ " 487,\n",
+ " 488,\n",
+ " 489,\n",
+ " 490,\n",
+ " 491,\n",
+ " 492,\n",
+ " 493,\n",
+ " 494,\n",
+ " 495,\n",
+ " 496,\n",
+ " 497,\n",
+ " 498,\n",
+ " 499,\n",
+ " 500,\n",
+ " 501,\n",
+ " 502,\n",
+ " 503,\n",
+ " 504,\n",
+ " 505,\n",
+ " 506,\n",
+ " 507,\n",
+ " 508,\n",
+ " 509,\n",
+ " 510,\n",
+ " 511,\n",
+ " 512,\n",
+ " 513,\n",
+ " 514,\n",
+ " 515,\n",
+ " 516,\n",
+ " 517,\n",
+ " 518,\n",
+ " 519,\n",
+ " 520,\n",
+ " 521,\n",
+ " 522,\n",
+ " 523,\n",
+ " 524,\n",
+ " 525,\n",
+ " 526,\n",
+ " 527,\n",
+ " 528,\n",
+ " 529,\n",
+ " 530,\n",
+ " 531,\n",
+ " 532,\n",
+ " 533,\n",
+ " 534,\n",
+ " 535,\n",
+ " 536,\n",
+ " 537,\n",
+ " 538,\n",
+ " 539,\n",
+ " 540,\n",
+ " 541,\n",
+ " 542,\n",
+ " 543,\n",
+ " 544,\n",
+ " 545,\n",
+ " 546,\n",
+ " 547,\n",
+ " 548,\n",
+ " 549,\n",
+ " 550,\n",
+ " 551,\n",
+ " 552,\n",
+ " 553,\n",
+ " 554,\n",
+ " 555,\n",
+ " 556,\n",
+ " 557,\n",
+ " 558,\n",
+ " 559,\n",
+ " 560,\n",
+ " 561,\n",
+ " 562,\n",
+ " 563,\n",
+ " 564,\n",
+ " 565,\n",
+ " 566,\n",
+ " 567,\n",
+ " 568,\n",
+ " 569,\n",
+ " 570,\n",
+ " 571,\n",
+ " 572,\n",
+ " 573,\n",
+ " 574,\n",
+ " 575,\n",
+ " 576,\n",
+ " 577,\n",
+ " 578,\n",
+ " 579,\n",
+ " 580,\n",
+ " 581,\n",
+ " 582,\n",
+ " 583,\n",
+ " 584,\n",
+ " 585,\n",
+ " 586,\n",
+ " 587,\n",
+ " 588,\n",
+ " 589,\n",
+ " 590,\n",
+ " 591,\n",
+ " 592,\n",
+ " 593,\n",
+ " 594,\n",
+ " 595,\n",
+ " 596,\n",
+ " 597,\n",
+ " 598,\n",
+ " 599,\n",
+ " 600,\n",
+ " 601,\n",
+ " 602,\n",
+ " 603,\n",
+ " 604,\n",
+ " 605,\n",
+ " 606,\n",
+ " 607,\n",
+ " 608,\n",
+ " 609,\n",
+ " 610,\n",
+ " 611,\n",
+ " 612,\n",
+ " 613,\n",
+ " 614,\n",
+ " 615,\n",
+ " 616,\n",
+ " 617,\n",
+ " 618,\n",
+ " 619,\n",
+ " 620,\n",
+ " 621,\n",
+ " 622,\n",
+ " 623,\n",
+ " 624,\n",
+ " 625,\n",
+ " 626,\n",
+ " 627,\n",
+ " 628,\n",
+ " 629,\n",
+ " 630,\n",
+ " 631,\n",
+ " 632,\n",
+ " 633,\n",
+ " 634,\n",
+ " 635,\n",
+ " 636,\n",
+ " 637,\n",
+ " 638,\n",
+ " 639,\n",
+ " 640,\n",
+ " 641,\n",
+ " 642,\n",
+ " 643,\n",
+ " 644,\n",
+ " 645,\n",
+ " 646,\n",
+ " 647,\n",
+ " 648,\n",
+ " 649,\n",
+ " 650,\n",
+ " 651,\n",
+ " 652,\n",
+ " 653,\n",
+ " 654,\n",
+ " 655,\n",
+ " 656,\n",
+ " 657,\n",
+ " 658,\n",
+ " 659,\n",
+ " 660,\n",
+ " 661,\n",
+ " 662,\n",
+ " 663,\n",
+ " 664,\n",
+ " 665,\n",
+ " 666,\n",
+ " 667,\n",
+ " 668,\n",
+ " 669,\n",
+ " 670,\n",
+ " 671,\n",
+ " 672,\n",
+ " 673,\n",
+ " 674,\n",
+ " 675,\n",
+ " 676,\n",
+ " 677,\n",
+ " 678,\n",
+ " 679,\n",
+ " 680,\n",
+ " 681,\n",
+ " 682,\n",
+ " 683,\n",
+ " 684,\n",
+ " 685,\n",
+ " 686,\n",
+ " 687,\n",
+ " 688,\n",
+ " 689,\n",
+ " 690,\n",
+ " 691,\n",
+ " 692,\n",
+ " 693,\n",
+ " 694,\n",
+ " 695,\n",
+ " 696,\n",
+ " 697,\n",
+ " 698,\n",
+ " 699,\n",
+ " 700,\n",
+ " 701,\n",
+ " 702,\n",
+ " 703,\n",
+ " 704,\n",
+ " 705,\n",
+ " 706,\n",
+ " 707,\n",
+ " 708,\n",
+ " 709,\n",
+ " 710,\n",
+ " 711,\n",
+ " 712,\n",
+ " 713,\n",
+ " 714,\n",
+ " 715,\n",
+ " 716,\n",
+ " 717,\n",
+ " 718,\n",
+ " 719,\n",
+ " 720,\n",
+ " 721,\n",
+ " 722,\n",
+ " 723,\n",
+ " 724,\n",
+ " 725,\n",
+ " 726,\n",
+ " 727,\n",
+ " 728,\n",
+ " 729,\n",
+ " 730,\n",
+ " 731,\n",
+ " 732,\n",
+ " 733,\n",
+ " 734,\n",
+ " 735,\n",
+ " 736,\n",
+ " 737,\n",
+ " 738,\n",
+ " 739,\n",
+ " 740,\n",
+ " 741,\n",
+ " 742,\n",
+ " 743,\n",
+ " 744,\n",
+ " 745,\n",
+ " 746,\n",
+ " 747,\n",
+ " 748,\n",
+ " 749,\n",
+ " 750,\n",
+ " 751,\n",
+ " 752,\n",
+ " 753,\n",
+ " 754,\n",
+ " 755,\n",
+ " 756,\n",
+ " 757,\n",
+ " 758,\n",
+ " 759,\n",
+ " 760,\n",
+ " 761,\n",
+ " 762,\n",
+ " 763,\n",
+ " 764,\n",
+ " 765,\n",
+ " 766,\n",
+ " 767,\n",
+ " 768,\n",
+ " 769,\n",
+ " 770,\n",
+ " 771,\n",
+ " 772,\n",
+ " 773,\n",
+ " 774,\n",
+ " 775,\n",
+ " 776,\n",
+ " 777,\n",
+ " 778,\n",
+ " 779,\n",
+ " 780,\n",
+ " 781,\n",
+ " 782,\n",
+ " 783,\n",
+ " 784,\n",
+ " 785,\n",
+ " 786,\n",
+ " 787,\n",
+ " 788,\n",
+ " 789,\n",
+ " 790,\n",
+ " 791,\n",
+ " 792,\n",
+ " 793,\n",
+ " 794,\n",
+ " 795,\n",
+ " 796,\n",
+ " 797,\n",
+ " 798,\n",
+ " 799,\n",
+ " 800,\n",
+ " 801,\n",
+ " 802,\n",
+ " 803,\n",
+ " 804,\n",
+ " 805,\n",
+ " 806,\n",
+ " 807,\n",
+ " 808,\n",
+ " 809,\n",
+ " 810,\n",
+ " 811,\n",
+ " 812,\n",
+ " 813,\n",
+ " 814,\n",
+ " 815,\n",
+ " 816,\n",
+ " 817,\n",
+ " 818,\n",
+ " 819,\n",
+ " 820,\n",
+ " 821,\n",
+ " 822,\n",
+ " 823,\n",
+ " 824,\n",
+ " 825,\n",
+ " 826,\n",
+ " 827,\n",
+ " 828,\n",
+ " 829,\n",
+ " 830,\n",
+ " 831,\n",
+ " 832,\n",
+ " 833,\n",
+ " 834,\n",
+ " 835,\n",
+ " 836,\n",
+ " 837,\n",
+ " 838,\n",
+ " 839,\n",
+ " 840,\n",
+ " 841,\n",
+ " 842,\n",
+ " 843,\n",
+ " 844,\n",
+ " 845,\n",
+ " 846,\n",
+ " 847,\n",
+ " 848,\n",
+ " 849,\n",
+ " 850,\n",
+ " 851,\n",
+ " 852,\n",
+ " 853,\n",
+ " 854,\n",
+ " 855,\n",
+ " 856,\n",
+ " 857,\n",
+ " 858,\n",
+ " 859,\n",
+ " 860,\n",
+ " 861,\n",
+ " 862,\n",
+ " 863,\n",
+ " 864,\n",
+ " 865,\n",
+ " 866,\n",
+ " 867,\n",
+ " 868,\n",
+ " 869,\n",
+ " 870,\n",
+ " 871,\n",
+ " 872,\n",
+ " 873,\n",
+ " 874,\n",
+ " 875,\n",
+ " 876,\n",
+ " 877,\n",
+ " 878,\n",
+ " 879,\n",
+ " 880,\n",
+ " 881,\n",
+ " 882,\n",
+ " 883,\n",
+ " 884,\n",
+ " 885,\n",
+ " 886,\n",
+ " 887,\n",
+ " 888,\n",
+ " 889,\n",
+ " 890,\n",
+ " 891,\n",
+ " 892,\n",
+ " 893,\n",
+ " 894,\n",
+ " 895,\n",
+ " 896,\n",
+ " 897,\n",
+ " 898,\n",
+ " 899,\n",
+ " 900,\n",
+ " 901,\n",
+ " 902,\n",
+ " 903,\n",
+ " 904,\n",
+ " 905,\n",
+ " 906,\n",
+ " 907,\n",
+ " 908,\n",
+ " 909,\n",
+ " 910,\n",
+ " 911,\n",
+ " 912,\n",
+ " 913,\n",
+ " 914,\n",
+ " 915,\n",
+ " 916,\n",
+ " 917,\n",
+ " 918,\n",
+ " 919,\n",
+ " 920,\n",
+ " 921,\n",
+ " 922,\n",
+ " 923,\n",
+ " 924,\n",
+ " 925,\n",
+ " 926,\n",
+ " 927,\n",
+ " 928,\n",
+ " 929,\n",
+ " 930,\n",
+ " 931,\n",
+ " 932,\n",
+ " 933,\n",
+ " 934,\n",
+ " 935,\n",
+ " 936,\n",
+ " 937,\n",
+ " 938,\n",
+ " 939,\n",
+ " 940,\n",
+ " 941,\n",
+ " 942,\n",
+ " 943,\n",
+ " 944,\n",
+ " 945,\n",
+ " 946,\n",
+ " 947,\n",
+ " 948,\n",
+ " 949,\n",
+ " 950,\n",
+ " 951,\n",
+ " 952,\n",
+ " 953,\n",
+ " 954,\n",
+ " 955,\n",
+ " 956,\n",
+ " 957,\n",
+ " 958,\n",
+ " 959,\n",
+ " 960,\n",
+ " 961,\n",
+ " 962,\n",
+ " 963,\n",
+ " 964,\n",
+ " 965,\n",
+ " 966,\n",
+ " 967,\n",
+ " 968,\n",
+ " 969,\n",
+ " 970,\n",
+ " 971,\n",
+ " 972,\n",
+ " 973,\n",
+ " 974,\n",
+ " 975,\n",
+ " 976,\n",
+ " 977,\n",
+ " 978,\n",
+ " 979,\n",
+ " 980,\n",
+ " 981,\n",
+ " 982,\n",
+ " 983,\n",
+ " 984,\n",
+ " 985,\n",
+ " 986,\n",
+ " 987,\n",
+ " 988,\n",
+ " 989,\n",
+ " 990,\n",
+ " 991,\n",
+ " 992,\n",
+ " 993,\n",
+ " 994,\n",
+ " 995,\n",
+ " 996,\n",
+ " 997,\n",
+ " 998,\n",
+ " 999,\n",
+ " ...]"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Heavy atoms\n",
"msm.select(molecular_system, 'not atom_type==\"H\"')"
@@ -306,9 +1341,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 6,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[0, 1, 2]"
+ ]
+ },
+ "execution_count": 6,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, element='atom', selection=[0,1,2])"
]
@@ -324,9 +1370,1020 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 7,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[2,\n",
+ " 4,\n",
+ " 5,\n",
+ " 6,\n",
+ " 7,\n",
+ " 11,\n",
+ " 13,\n",
+ " 14,\n",
+ " 15,\n",
+ " 18,\n",
+ " 20,\n",
+ " 21,\n",
+ " 22,\n",
+ " 27,\n",
+ " 29,\n",
+ " 30,\n",
+ " 31,\n",
+ " 34,\n",
+ " 36,\n",
+ " 37,\n",
+ " 38,\n",
+ " 39,\n",
+ " 42,\n",
+ " 44,\n",
+ " 47,\n",
+ " 49,\n",
+ " 52,\n",
+ " 54,\n",
+ " 57,\n",
+ " 59,\n",
+ " 60,\n",
+ " 65,\n",
+ " 67,\n",
+ " 68,\n",
+ " 69,\n",
+ " 70,\n",
+ " 72,\n",
+ " 73,\n",
+ " 74,\n",
+ " 75,\n",
+ " 76,\n",
+ " 79,\n",
+ " 81,\n",
+ " 82,\n",
+ " 83,\n",
+ " 84,\n",
+ " 88,\n",
+ " 90,\n",
+ " 94,\n",
+ " 96,\n",
+ " 97,\n",
+ " 102,\n",
+ " 106,\n",
+ " 108,\n",
+ " 112,\n",
+ " 114,\n",
+ " 115,\n",
+ " 116,\n",
+ " 121,\n",
+ " 123,\n",
+ " 127,\n",
+ " 129,\n",
+ " 130,\n",
+ " 131,\n",
+ " 132,\n",
+ " 135,\n",
+ " 137,\n",
+ " 138,\n",
+ " 139,\n",
+ " 140,\n",
+ " 143,\n",
+ " 145,\n",
+ " 146,\n",
+ " 147,\n",
+ " 150,\n",
+ " 152,\n",
+ " 153,\n",
+ " 154,\n",
+ " 157,\n",
+ " 159,\n",
+ " 160,\n",
+ " 161,\n",
+ " 162,\n",
+ " 165,\n",
+ " 167,\n",
+ " 168,\n",
+ " 169,\n",
+ " 170,\n",
+ " 173,\n",
+ " 175,\n",
+ " 176,\n",
+ " 177,\n",
+ " 182,\n",
+ " 184,\n",
+ " 186,\n",
+ " 189,\n",
+ " 191,\n",
+ " 192,\n",
+ " 193,\n",
+ " 194,\n",
+ " 197,\n",
+ " 199,\n",
+ " 200,\n",
+ " 205,\n",
+ " 207,\n",
+ " 210,\n",
+ " 212,\n",
+ " 215,\n",
+ " 217,\n",
+ " 219,\n",
+ " 222,\n",
+ " 224,\n",
+ " 225,\n",
+ " 226,\n",
+ " 227,\n",
+ " 228,\n",
+ " 229,\n",
+ " 230,\n",
+ " 233,\n",
+ " 235,\n",
+ " 236,\n",
+ " 241,\n",
+ " 243,\n",
+ " 244,\n",
+ " 246,\n",
+ " 247,\n",
+ " 251,\n",
+ " 253,\n",
+ " 254,\n",
+ " 259,\n",
+ " 261,\n",
+ " 262,\n",
+ " 263,\n",
+ " 266,\n",
+ " 268,\n",
+ " 269,\n",
+ " 270,\n",
+ " 275,\n",
+ " 277,\n",
+ " 281,\n",
+ " 283,\n",
+ " 284,\n",
+ " 285,\n",
+ " 288,\n",
+ " 290,\n",
+ " 291,\n",
+ " 292,\n",
+ " 295,\n",
+ " 297,\n",
+ " 300,\n",
+ " 302,\n",
+ " 303,\n",
+ " 304,\n",
+ " 307,\n",
+ " 309,\n",
+ " 311,\n",
+ " 314,\n",
+ " 316,\n",
+ " 317,\n",
+ " 318,\n",
+ " 319,\n",
+ " 320,\n",
+ " 321,\n",
+ " 322,\n",
+ " 325,\n",
+ " 327,\n",
+ " 328,\n",
+ " 329,\n",
+ " 330,\n",
+ " 333,\n",
+ " 335,\n",
+ " 336,\n",
+ " 338,\n",
+ " 339,\n",
+ " 343,\n",
+ " 345,\n",
+ " 346,\n",
+ " 347,\n",
+ " 348,\n",
+ " 351,\n",
+ " 353,\n",
+ " 354,\n",
+ " 355,\n",
+ " 358,\n",
+ " 360,\n",
+ " 361,\n",
+ " 363,\n",
+ " 366,\n",
+ " 368,\n",
+ " 370,\n",
+ " 373,\n",
+ " 375,\n",
+ " 376,\n",
+ " 377,\n",
+ " 378,\n",
+ " 382,\n",
+ " 384,\n",
+ " 387,\n",
+ " 389,\n",
+ " 390,\n",
+ " 391,\n",
+ " 393,\n",
+ " 398,\n",
+ " 400,\n",
+ " 401,\n",
+ " 402,\n",
+ " 403,\n",
+ " 406,\n",
+ " 408,\n",
+ " 410,\n",
+ " 413,\n",
+ " 415,\n",
+ " 416,\n",
+ " 421,\n",
+ " 423,\n",
+ " 424,\n",
+ " 425,\n",
+ " 428,\n",
+ " 430,\n",
+ " 431,\n",
+ " 432,\n",
+ " 433,\n",
+ " 437,\n",
+ " 439,\n",
+ " 440,\n",
+ " 441,\n",
+ " 442,\n",
+ " 443,\n",
+ " 444,\n",
+ " 445,\n",
+ " 448,\n",
+ " 450,\n",
+ " 451,\n",
+ " 452,\n",
+ " 457,\n",
+ " 459,\n",
+ " 460,\n",
+ " 461,\n",
+ " 462,\n",
+ " 465,\n",
+ " 467,\n",
+ " 470,\n",
+ " 472,\n",
+ " 475,\n",
+ " 477,\n",
+ " 478,\n",
+ " 479,\n",
+ " 484,\n",
+ " 486,\n",
+ " 487,\n",
+ " 492,\n",
+ " 494,\n",
+ " 497,\n",
+ " 499,\n",
+ " 500,\n",
+ " 501,\n",
+ " 502,\n",
+ " 505,\n",
+ " 507,\n",
+ " 509,\n",
+ " 512,\n",
+ " 514,\n",
+ " 515,\n",
+ " 516,\n",
+ " 518,\n",
+ " 523,\n",
+ " 525,\n",
+ " 529,\n",
+ " 533,\n",
+ " 535,\n",
+ " 538,\n",
+ " 540,\n",
+ " 541,\n",
+ " 542,\n",
+ " 543,\n",
+ " 544,\n",
+ " 545,\n",
+ " 546,\n",
+ " 549,\n",
+ " 551,\n",
+ " 553,\n",
+ " 556,\n",
+ " 560,\n",
+ " 562,\n",
+ " 563,\n",
+ " 564,\n",
+ " 569,\n",
+ " 571,\n",
+ " 572,\n",
+ " 573,\n",
+ " 576,\n",
+ " 578,\n",
+ " 582,\n",
+ " 584,\n",
+ " 585,\n",
+ " 586,\n",
+ " 587,\n",
+ " 590,\n",
+ " 592,\n",
+ " 593,\n",
+ " 594,\n",
+ " 599,\n",
+ " 601,\n",
+ " 602,\n",
+ " 603,\n",
+ " 604,\n",
+ " 607,\n",
+ " 609,\n",
+ " 610,\n",
+ " 611,\n",
+ " 612,\n",
+ " 615,\n",
+ " 617,\n",
+ " 618,\n",
+ " 619,\n",
+ " 620,\n",
+ " 624,\n",
+ " 626,\n",
+ " 627,\n",
+ " 632,\n",
+ " 634,\n",
+ " 635,\n",
+ " 636,\n",
+ " 637,\n",
+ " 638,\n",
+ " 639,\n",
+ " 640,\n",
+ " 644,\n",
+ " 648,\n",
+ " 650,\n",
+ " 651,\n",
+ " 652,\n",
+ " 653,\n",
+ " 656,\n",
+ " 658,\n",
+ " 662,\n",
+ " 664,\n",
+ " 665,\n",
+ " 666,\n",
+ " 667,\n",
+ " 669,\n",
+ " 670,\n",
+ " 671,\n",
+ " 672,\n",
+ " 673,\n",
+ " 676,\n",
+ " 678,\n",
+ " 679,\n",
+ " 680,\n",
+ " 683,\n",
+ " 685,\n",
+ " 686,\n",
+ " 687,\n",
+ " 690,\n",
+ " 692,\n",
+ " 693,\n",
+ " 694,\n",
+ " 695,\n",
+ " 698,\n",
+ " 702,\n",
+ " 704,\n",
+ " 705,\n",
+ " 707,\n",
+ " 708,\n",
+ " 712,\n",
+ " 714,\n",
+ " 718,\n",
+ " 720,\n",
+ " 721,\n",
+ " 722,\n",
+ " 727,\n",
+ " 729,\n",
+ " 730,\n",
+ " 731,\n",
+ " 733,\n",
+ " 738,\n",
+ " 740,\n",
+ " 741,\n",
+ " 742,\n",
+ " 744,\n",
+ " 749,\n",
+ " 751,\n",
+ " 752,\n",
+ " 753,\n",
+ " 754,\n",
+ " 757,\n",
+ " 759,\n",
+ " 760,\n",
+ " 761,\n",
+ " 762,\n",
+ " 763,\n",
+ " 764,\n",
+ " 765,\n",
+ " 769,\n",
+ " 771,\n",
+ " 772,\n",
+ " 773,\n",
+ " 774,\n",
+ " 775,\n",
+ " 776,\n",
+ " 777,\n",
+ " 781,\n",
+ " 785,\n",
+ " 787,\n",
+ " 788,\n",
+ " 789,\n",
+ " 794,\n",
+ " 796,\n",
+ " 798,\n",
+ " 801,\n",
+ " 803,\n",
+ " 804,\n",
+ " 809,\n",
+ " 811,\n",
+ " 812,\n",
+ " 813,\n",
+ " 818,\n",
+ " 820,\n",
+ " 821,\n",
+ " 822,\n",
+ " 823,\n",
+ " 826,\n",
+ " 828,\n",
+ " 829,\n",
+ " 830,\n",
+ " 833,\n",
+ " 835,\n",
+ " 838,\n",
+ " 840,\n",
+ " 841,\n",
+ " 842,\n",
+ " 847,\n",
+ " 849,\n",
+ " 850,\n",
+ " 851,\n",
+ " 852,\n",
+ " 856,\n",
+ " 858,\n",
+ " 859,\n",
+ " 860,\n",
+ " 863,\n",
+ " 865,\n",
+ " 868,\n",
+ " 870,\n",
+ " 871,\n",
+ " 872,\n",
+ " 877,\n",
+ " 879,\n",
+ " 882,\n",
+ " 884,\n",
+ " 888,\n",
+ " 890,\n",
+ " 893,\n",
+ " 895,\n",
+ " 898,\n",
+ " 902,\n",
+ " 904,\n",
+ " 905,\n",
+ " 906,\n",
+ " 907,\n",
+ " 908,\n",
+ " 909,\n",
+ " 910,\n",
+ " 913,\n",
+ " 915,\n",
+ " 916,\n",
+ " 918,\n",
+ " 919,\n",
+ " 923,\n",
+ " 925,\n",
+ " 926,\n",
+ " 927,\n",
+ " 930,\n",
+ " 932,\n",
+ " 933,\n",
+ " 934,\n",
+ " 935,\n",
+ " 938,\n",
+ " 940,\n",
+ " 941,\n",
+ " 942,\n",
+ " 945,\n",
+ " 947,\n",
+ " 951,\n",
+ " 953,\n",
+ " 954,\n",
+ " 955,\n",
+ " 958,\n",
+ " 962,\n",
+ " 964,\n",
+ " 965,\n",
+ " 966,\n",
+ " 971,\n",
+ " 973,\n",
+ " 975,\n",
+ " 978,\n",
+ " 980,\n",
+ " 981,\n",
+ " 986,\n",
+ " 988,\n",
+ " 989,\n",
+ " 990,\n",
+ " 995,\n",
+ " 997,\n",
+ " 998,\n",
+ " 999,\n",
+ " 1004,\n",
+ " 1006,\n",
+ " 1007,\n",
+ " 1008,\n",
+ " 1010,\n",
+ " 1015,\n",
+ " 1017,\n",
+ " 1018,\n",
+ " 1019,\n",
+ " 1024,\n",
+ " 1026,\n",
+ " 1029,\n",
+ " 1033,\n",
+ " 1035,\n",
+ " 1036,\n",
+ " 1037,\n",
+ " 1039,\n",
+ " 1044,\n",
+ " 1046,\n",
+ " 1048,\n",
+ " 1051,\n",
+ " 1053,\n",
+ " 1056,\n",
+ " 1058,\n",
+ " 1061,\n",
+ " 1063,\n",
+ " 1064,\n",
+ " 1065,\n",
+ " 1068,\n",
+ " 1070,\n",
+ " 1071,\n",
+ " 1072,\n",
+ " 1075,\n",
+ " 1077,\n",
+ " 1078,\n",
+ " 1079,\n",
+ " 1080,\n",
+ " 1083,\n",
+ " 1085,\n",
+ " 1087,\n",
+ " 1090,\n",
+ " 1092,\n",
+ " 1093,\n",
+ " 1094,\n",
+ " 1099,\n",
+ " 1101,\n",
+ " 1102,\n",
+ " 1103,\n",
+ " 1104,\n",
+ " 1107,\n",
+ " 1109,\n",
+ " 1112,\n",
+ " 1114,\n",
+ " 1117,\n",
+ " 1119,\n",
+ " 1120,\n",
+ " 1121,\n",
+ " 1124,\n",
+ " 1126,\n",
+ " 1129,\n",
+ " 1131,\n",
+ " 1132,\n",
+ " 1133,\n",
+ " 1138,\n",
+ " 1140,\n",
+ " 1141,\n",
+ " 1142,\n",
+ " 1143,\n",
+ " 1147,\n",
+ " 1149,\n",
+ " 1150,\n",
+ " 1151,\n",
+ " 1152,\n",
+ " 1155,\n",
+ " 1157,\n",
+ " 1161,\n",
+ " 1163,\n",
+ " 1164,\n",
+ " 1165,\n",
+ " 1166,\n",
+ " 1170,\n",
+ " 1172,\n",
+ " 1173,\n",
+ " 1174,\n",
+ " 1179,\n",
+ " 1181,\n",
+ " 1184,\n",
+ " 1186,\n",
+ " 1187,\n",
+ " 1188,\n",
+ " 1189,\n",
+ " 1191,\n",
+ " 1192,\n",
+ " 1193,\n",
+ " 1194,\n",
+ " 1195,\n",
+ " 1198,\n",
+ " 1200,\n",
+ " 1204,\n",
+ " 1206,\n",
+ " 1207,\n",
+ " 1208,\n",
+ " 1210,\n",
+ " 1215,\n",
+ " 1217,\n",
+ " 1218,\n",
+ " 1219,\n",
+ " 1222,\n",
+ " 1224,\n",
+ " 1225,\n",
+ " 1226,\n",
+ " 1229,\n",
+ " 1231,\n",
+ " 1232,\n",
+ " 1233,\n",
+ " 1234,\n",
+ " 1237,\n",
+ " 1239,\n",
+ " 1242,\n",
+ " 1244,\n",
+ " 1245,\n",
+ " 1246,\n",
+ " 1247,\n",
+ " 1248,\n",
+ " 1249,\n",
+ " 1250,\n",
+ " 1254,\n",
+ " 1256,\n",
+ " 1257,\n",
+ " 1258,\n",
+ " 1263,\n",
+ " 1265,\n",
+ " 1266,\n",
+ " 1267,\n",
+ " 1270,\n",
+ " 1272,\n",
+ " 1273,\n",
+ " 1274,\n",
+ " 1277,\n",
+ " 1279,\n",
+ " 1280,\n",
+ " 1281,\n",
+ " 1282,\n",
+ " 1284,\n",
+ " 1285,\n",
+ " 1286,\n",
+ " 1287,\n",
+ " 1288,\n",
+ " 1291,\n",
+ " 1293,\n",
+ " 1296,\n",
+ " 1298,\n",
+ " 1299,\n",
+ " 1300,\n",
+ " 1301,\n",
+ " 1304,\n",
+ " 1308,\n",
+ " 1310,\n",
+ " 1312,\n",
+ " 1315,\n",
+ " 1319,\n",
+ " 1321,\n",
+ " 1322,\n",
+ " 1323,\n",
+ " 1324,\n",
+ " 1328,\n",
+ " 1330,\n",
+ " 1331,\n",
+ " 1332,\n",
+ " 1335,\n",
+ " 1337,\n",
+ " 1340,\n",
+ " 1342,\n",
+ " 1344,\n",
+ " 1347,\n",
+ " 1349,\n",
+ " 1350,\n",
+ " 1351,\n",
+ " 1354,\n",
+ " 1356,\n",
+ " 1357,\n",
+ " 1358,\n",
+ " 1363,\n",
+ " 1365,\n",
+ " 1366,\n",
+ " 1367,\n",
+ " 1372,\n",
+ " 1374,\n",
+ " 1377,\n",
+ " 1379,\n",
+ " 1380,\n",
+ " 1381,\n",
+ " 1386,\n",
+ " 1388,\n",
+ " 1389,\n",
+ " 1390,\n",
+ " 1395,\n",
+ " 1397,\n",
+ " 1398,\n",
+ " 1399,\n",
+ " 1402,\n",
+ " 1404,\n",
+ " 1405,\n",
+ " 1407,\n",
+ " 1408,\n",
+ " 1412,\n",
+ " 1414,\n",
+ " 1415,\n",
+ " 1416,\n",
+ " 1421,\n",
+ " 1423,\n",
+ " 1424,\n",
+ " 1425,\n",
+ " 1426,\n",
+ " 1429,\n",
+ " 1431,\n",
+ " 1432,\n",
+ " 1433,\n",
+ " 1434,\n",
+ " 1437,\n",
+ " 1439,\n",
+ " 1440,\n",
+ " 1441,\n",
+ " 1443,\n",
+ " 1448,\n",
+ " 1450,\n",
+ " 1451,\n",
+ " 1452,\n",
+ " 1454,\n",
+ " 1459,\n",
+ " 1461,\n",
+ " 1462,\n",
+ " 1463,\n",
+ " 1464,\n",
+ " 1466,\n",
+ " 1467,\n",
+ " 1468,\n",
+ " 1469,\n",
+ " 1470,\n",
+ " 1473,\n",
+ " 1475,\n",
+ " 1476,\n",
+ " 1477,\n",
+ " 1480,\n",
+ " 1482,\n",
+ " 1483,\n",
+ " 1484,\n",
+ " 1486,\n",
+ " 1491,\n",
+ " 1493,\n",
+ " 1497,\n",
+ " 1499,\n",
+ " 1500,\n",
+ " 1501,\n",
+ " 1502,\n",
+ " 1506,\n",
+ " 1508,\n",
+ " 1509,\n",
+ " 1510,\n",
+ " 1511,\n",
+ " 1514,\n",
+ " 1518,\n",
+ " 1520,\n",
+ " 1522,\n",
+ " 1525,\n",
+ " 1527,\n",
+ " 1528,\n",
+ " 1533,\n",
+ " 1535,\n",
+ " 1536,\n",
+ " 1537,\n",
+ " 1538,\n",
+ " 1541,\n",
+ " 1543,\n",
+ " 1546,\n",
+ " 1548,\n",
+ " 1551,\n",
+ " 1553,\n",
+ " 1554,\n",
+ " 1555,\n",
+ " 1560,\n",
+ " 1562,\n",
+ " 1563,\n",
+ " 1564,\n",
+ " 1565,\n",
+ " 1568,\n",
+ " 1570,\n",
+ " 1571,\n",
+ " 1572,\n",
+ " 1574,\n",
+ " 1579,\n",
+ " 1581,\n",
+ " 1582,\n",
+ " 1583,\n",
+ " 1584,\n",
+ " 1587,\n",
+ " 1589,\n",
+ " 1590,\n",
+ " 1591,\n",
+ " 1592,\n",
+ " 1595,\n",
+ " 1597,\n",
+ " 1598,\n",
+ " 1599,\n",
+ " 1600,\n",
+ " 1601,\n",
+ " 1602,\n",
+ " 1603,\n",
+ " 1607,\n",
+ " 1611,\n",
+ " 1615,\n",
+ " 1617,\n",
+ " 1621,\n",
+ " 1623,\n",
+ " 1624,\n",
+ " 1625,\n",
+ " 1628,\n",
+ " 1630,\n",
+ " 1632,\n",
+ " 1635,\n",
+ " 1637,\n",
+ " 1640,\n",
+ " 1642,\n",
+ " 1643,\n",
+ " 1644,\n",
+ " 1645,\n",
+ " 1649,\n",
+ " 1651,\n",
+ " 1652,\n",
+ " 1657,\n",
+ " 1659,\n",
+ " 1662,\n",
+ " 1664,\n",
+ " 1665,\n",
+ " 1666,\n",
+ " 1668,\n",
+ " 1673,\n",
+ " 1675,\n",
+ " 1677,\n",
+ " 1680,\n",
+ " 1682,\n",
+ " 1683,\n",
+ " 1684,\n",
+ " 1685,\n",
+ " 1688,\n",
+ " 1690,\n",
+ " 1691,\n",
+ " 1692,\n",
+ " 1693,\n",
+ " 1694,\n",
+ " 1695,\n",
+ " 1696,\n",
+ " 1700,\n",
+ " 1702,\n",
+ " 1703,\n",
+ " 1704,\n",
+ " 1709,\n",
+ " 1711,\n",
+ " 1712,\n",
+ " 1714,\n",
+ " 1717,\n",
+ " 1719,\n",
+ " 1720,\n",
+ " 1721,\n",
+ " 1723,\n",
+ " 1728,\n",
+ " 1730,\n",
+ " 1731,\n",
+ " 1736,\n",
+ " 1738,\n",
+ " 1739,\n",
+ " 1740,\n",
+ " 1741,\n",
+ " 1744,\n",
+ " 1746,\n",
+ " 1747,\n",
+ " 1752,\n",
+ " 1756,\n",
+ " 1758,\n",
+ " 1759,\n",
+ " 1760,\n",
+ " 1761,\n",
+ " 1762,\n",
+ " 1763,\n",
+ " 1764,\n",
+ " 1767,\n",
+ " 1769,\n",
+ " 1770,\n",
+ " 1771,\n",
+ " 1772,\n",
+ " 1775,\n",
+ " 1777,\n",
+ " 1778,\n",
+ " 1779,\n",
+ " 1782,\n",
+ " 1786,\n",
+ " 1790,\n",
+ " 1792,\n",
+ " 1795,\n",
+ " 1797,\n",
+ " 1801,\n",
+ " 1803,\n",
+ " 1804,\n",
+ " 1805,\n",
+ " 1806,\n",
+ " 1809,\n",
+ " 1811,\n",
+ " 1812,\n",
+ " 1813,\n",
+ " 1814,\n",
+ " 1818,\n",
+ " 1820,\n",
+ " 1821,\n",
+ " 1822,\n",
+ " 1825,\n",
+ " 1827,\n",
+ " 1828,\n",
+ " 1829,\n",
+ " 1834,\n",
+ " 1836,\n",
+ " 1837,\n",
+ " 1838,\n",
+ " 1839,\n",
+ " 1840,\n",
+ " 1841,\n",
+ " 1842,\n",
+ " 1845,\n",
+ " 1847,\n",
+ " 1848,\n",
+ " 1849,\n",
+ " 1852,\n",
+ " 1854,\n",
+ " 1855,\n",
+ " 1856,\n",
+ " 1861,\n",
+ " 1863,\n",
+ " 1864,\n",
+ " 1865,\n",
+ " 1866,\n",
+ " 1869,\n",
+ " 1871,\n",
+ " 1872,\n",
+ " 1873,\n",
+ " 1874,\n",
+ " 1877,\n",
+ " 1879,\n",
+ " 1880,\n",
+ " 1881,\n",
+ " 1886,\n",
+ " 1888,\n",
+ " 1891,\n",
+ " 1893,\n",
+ " 1895,\n",
+ " 1898,\n",
+ " 1900,\n",
+ " 1901,\n",
+ " 1902,\n",
+ " 1903,\n",
+ " 1908,\n",
+ " 1910,\n",
+ " 1914,\n",
+ " 1916,\n",
+ " 1917,\n",
+ " 1918,\n",
+ " 1919,\n",
+ " 1923,\n",
+ " 1925,\n",
+ " 1926,\n",
+ " 1927,\n",
+ " 1930,\n",
+ " 1932,\n",
+ " 1933,\n",
+ " 1934,\n",
+ " 1939,\n",
+ " 1941,\n",
+ " 1942,\n",
+ " 1943,\n",
+ " 1946,\n",
+ " 1948,\n",
+ " 1949,\n",
+ " 1950,\n",
+ " 1951,\n",
+ " 1954,\n",
+ " 1956,\n",
+ " 1959,\n",
+ " 1961,\n",
+ " 1964,\n",
+ " 1966,\n",
+ " 1969,\n",
+ " 1971,\n",
+ " 1972,\n",
+ " 1977,\n",
+ " 1979,\n",
+ " 1980,\n",
+ " ...]"
+ ]
+ },
+ "execution_count": 7,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Atoms of type C not named CA\n",
"msm.select(molecular_system, 'atom_type==\"C\" and not atom_name==\"CA\"')"
@@ -334,9 +2391,1020 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 8,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[0,\n",
+ " 3,\n",
+ " 5,\n",
+ " 6,\n",
+ " 7,\n",
+ " 8,\n",
+ " 9,\n",
+ " 12,\n",
+ " 14,\n",
+ " 15,\n",
+ " 16,\n",
+ " 19,\n",
+ " 21,\n",
+ " 22,\n",
+ " 23,\n",
+ " 24,\n",
+ " 25,\n",
+ " 28,\n",
+ " 30,\n",
+ " 31,\n",
+ " 32,\n",
+ " 35,\n",
+ " 37,\n",
+ " 38,\n",
+ " 39,\n",
+ " 40,\n",
+ " 43,\n",
+ " 45,\n",
+ " 48,\n",
+ " 50,\n",
+ " 53,\n",
+ " 55,\n",
+ " 58,\n",
+ " 60,\n",
+ " 61,\n",
+ " 62,\n",
+ " 63,\n",
+ " 66,\n",
+ " 68,\n",
+ " 69,\n",
+ " 70,\n",
+ " 71,\n",
+ " 72,\n",
+ " 73,\n",
+ " 74,\n",
+ " 75,\n",
+ " 76,\n",
+ " 77,\n",
+ " 80,\n",
+ " 82,\n",
+ " 83,\n",
+ " 84,\n",
+ " 85,\n",
+ " 86,\n",
+ " 89,\n",
+ " 91,\n",
+ " 92,\n",
+ " 95,\n",
+ " 97,\n",
+ " 98,\n",
+ " 99,\n",
+ " 100,\n",
+ " 103,\n",
+ " 104,\n",
+ " 107,\n",
+ " 109,\n",
+ " 110,\n",
+ " 113,\n",
+ " 115,\n",
+ " 116,\n",
+ " 117,\n",
+ " 118,\n",
+ " 119,\n",
+ " 122,\n",
+ " 124,\n",
+ " 125,\n",
+ " 128,\n",
+ " 130,\n",
+ " 131,\n",
+ " 132,\n",
+ " 133,\n",
+ " 136,\n",
+ " 138,\n",
+ " 139,\n",
+ " 140,\n",
+ " 141,\n",
+ " 144,\n",
+ " 146,\n",
+ " 147,\n",
+ " 148,\n",
+ " 151,\n",
+ " 153,\n",
+ " 154,\n",
+ " 155,\n",
+ " 158,\n",
+ " 160,\n",
+ " 161,\n",
+ " 162,\n",
+ " 163,\n",
+ " 166,\n",
+ " 168,\n",
+ " 169,\n",
+ " 170,\n",
+ " 171,\n",
+ " 174,\n",
+ " 176,\n",
+ " 177,\n",
+ " 178,\n",
+ " 179,\n",
+ " 180,\n",
+ " 183,\n",
+ " 185,\n",
+ " 186,\n",
+ " 187,\n",
+ " 190,\n",
+ " 192,\n",
+ " 193,\n",
+ " 194,\n",
+ " 195,\n",
+ " 198,\n",
+ " 200,\n",
+ " 201,\n",
+ " 202,\n",
+ " 203,\n",
+ " 206,\n",
+ " 208,\n",
+ " 211,\n",
+ " 213,\n",
+ " 216,\n",
+ " 218,\n",
+ " 219,\n",
+ " 220,\n",
+ " 223,\n",
+ " 225,\n",
+ " 226,\n",
+ " 227,\n",
+ " 228,\n",
+ " 229,\n",
+ " 230,\n",
+ " 231,\n",
+ " 234,\n",
+ " 236,\n",
+ " 237,\n",
+ " 238,\n",
+ " 239,\n",
+ " 242,\n",
+ " 244,\n",
+ " 245,\n",
+ " 246,\n",
+ " 247,\n",
+ " 248,\n",
+ " 249,\n",
+ " 252,\n",
+ " 254,\n",
+ " 255,\n",
+ " 256,\n",
+ " 257,\n",
+ " 260,\n",
+ " 262,\n",
+ " 263,\n",
+ " 264,\n",
+ " 267,\n",
+ " 269,\n",
+ " 270,\n",
+ " 271,\n",
+ " 272,\n",
+ " 273,\n",
+ " 276,\n",
+ " 278,\n",
+ " 279,\n",
+ " 282,\n",
+ " 284,\n",
+ " 285,\n",
+ " 286,\n",
+ " 289,\n",
+ " 291,\n",
+ " 292,\n",
+ " 293,\n",
+ " 296,\n",
+ " 298,\n",
+ " 301,\n",
+ " 303,\n",
+ " 304,\n",
+ " 305,\n",
+ " 308,\n",
+ " 310,\n",
+ " 311,\n",
+ " 312,\n",
+ " 315,\n",
+ " 317,\n",
+ " 318,\n",
+ " 319,\n",
+ " 320,\n",
+ " 321,\n",
+ " 322,\n",
+ " 323,\n",
+ " 326,\n",
+ " 328,\n",
+ " 329,\n",
+ " 330,\n",
+ " 331,\n",
+ " 334,\n",
+ " 336,\n",
+ " 337,\n",
+ " 338,\n",
+ " 339,\n",
+ " 340,\n",
+ " 341,\n",
+ " 344,\n",
+ " 346,\n",
+ " 347,\n",
+ " 348,\n",
+ " 349,\n",
+ " 352,\n",
+ " 354,\n",
+ " 355,\n",
+ " 356,\n",
+ " 359,\n",
+ " 361,\n",
+ " 362,\n",
+ " 363,\n",
+ " 364,\n",
+ " 367,\n",
+ " 369,\n",
+ " 370,\n",
+ " 371,\n",
+ " 374,\n",
+ " 376,\n",
+ " 377,\n",
+ " 378,\n",
+ " 379,\n",
+ " 380,\n",
+ " 383,\n",
+ " 385,\n",
+ " 388,\n",
+ " 390,\n",
+ " 391,\n",
+ " 392,\n",
+ " 393,\n",
+ " 394,\n",
+ " 395,\n",
+ " 396,\n",
+ " 399,\n",
+ " 401,\n",
+ " 402,\n",
+ " 403,\n",
+ " 404,\n",
+ " 407,\n",
+ " 409,\n",
+ " 410,\n",
+ " 411,\n",
+ " 414,\n",
+ " 416,\n",
+ " 417,\n",
+ " 418,\n",
+ " 419,\n",
+ " 422,\n",
+ " 424,\n",
+ " 425,\n",
+ " 426,\n",
+ " 429,\n",
+ " 431,\n",
+ " 432,\n",
+ " 433,\n",
+ " 434,\n",
+ " 435,\n",
+ " 438,\n",
+ " 440,\n",
+ " 441,\n",
+ " 442,\n",
+ " 443,\n",
+ " 444,\n",
+ " 445,\n",
+ " 446,\n",
+ " 449,\n",
+ " 451,\n",
+ " 452,\n",
+ " 453,\n",
+ " 454,\n",
+ " 455,\n",
+ " 458,\n",
+ " 460,\n",
+ " 461,\n",
+ " 462,\n",
+ " 463,\n",
+ " 466,\n",
+ " 468,\n",
+ " 471,\n",
+ " 473,\n",
+ " 476,\n",
+ " 478,\n",
+ " 479,\n",
+ " 480,\n",
+ " 481,\n",
+ " 482,\n",
+ " 485,\n",
+ " 487,\n",
+ " 488,\n",
+ " 489,\n",
+ " 490,\n",
+ " 493,\n",
+ " 495,\n",
+ " 498,\n",
+ " 500,\n",
+ " 501,\n",
+ " 502,\n",
+ " 503,\n",
+ " 506,\n",
+ " 508,\n",
+ " 509,\n",
+ " 510,\n",
+ " 513,\n",
+ " 515,\n",
+ " 516,\n",
+ " 517,\n",
+ " 518,\n",
+ " 519,\n",
+ " 520,\n",
+ " 521,\n",
+ " 524,\n",
+ " 526,\n",
+ " 527,\n",
+ " 530,\n",
+ " 531,\n",
+ " 534,\n",
+ " 536,\n",
+ " 539,\n",
+ " 541,\n",
+ " 542,\n",
+ " 543,\n",
+ " 544,\n",
+ " 545,\n",
+ " 546,\n",
+ " 547,\n",
+ " 550,\n",
+ " 552,\n",
+ " 553,\n",
+ " 554,\n",
+ " 557,\n",
+ " 558,\n",
+ " 561,\n",
+ " 563,\n",
+ " 564,\n",
+ " 565,\n",
+ " 566,\n",
+ " 567,\n",
+ " 570,\n",
+ " 572,\n",
+ " 573,\n",
+ " 574,\n",
+ " 577,\n",
+ " 579,\n",
+ " 580,\n",
+ " 583,\n",
+ " 585,\n",
+ " 586,\n",
+ " 587,\n",
+ " 588,\n",
+ " 591,\n",
+ " 593,\n",
+ " 594,\n",
+ " 595,\n",
+ " 596,\n",
+ " 597,\n",
+ " 600,\n",
+ " 602,\n",
+ " 603,\n",
+ " 604,\n",
+ " 605,\n",
+ " 608,\n",
+ " 610,\n",
+ " 611,\n",
+ " 612,\n",
+ " 613,\n",
+ " 616,\n",
+ " 618,\n",
+ " 619,\n",
+ " 620,\n",
+ " 621,\n",
+ " 622,\n",
+ " 625,\n",
+ " 627,\n",
+ " 628,\n",
+ " 629,\n",
+ " 630,\n",
+ " 633,\n",
+ " 635,\n",
+ " 636,\n",
+ " 637,\n",
+ " 638,\n",
+ " 639,\n",
+ " 640,\n",
+ " 641,\n",
+ " 642,\n",
+ " 645,\n",
+ " 646,\n",
+ " 649,\n",
+ " 651,\n",
+ " 652,\n",
+ " 653,\n",
+ " 654,\n",
+ " 657,\n",
+ " 659,\n",
+ " 660,\n",
+ " 663,\n",
+ " 665,\n",
+ " 666,\n",
+ " 667,\n",
+ " 668,\n",
+ " 669,\n",
+ " 670,\n",
+ " 671,\n",
+ " 672,\n",
+ " 673,\n",
+ " 674,\n",
+ " 677,\n",
+ " 679,\n",
+ " 680,\n",
+ " 681,\n",
+ " 684,\n",
+ " 686,\n",
+ " 687,\n",
+ " 688,\n",
+ " 691,\n",
+ " 693,\n",
+ " 694,\n",
+ " 695,\n",
+ " 696,\n",
+ " 699,\n",
+ " 700,\n",
+ " 703,\n",
+ " 705,\n",
+ " 706,\n",
+ " 707,\n",
+ " 708,\n",
+ " 709,\n",
+ " 710,\n",
+ " 713,\n",
+ " 715,\n",
+ " 716,\n",
+ " 719,\n",
+ " 721,\n",
+ " 722,\n",
+ " 723,\n",
+ " 724,\n",
+ " 725,\n",
+ " 728,\n",
+ " 730,\n",
+ " 731,\n",
+ " 732,\n",
+ " 733,\n",
+ " 734,\n",
+ " 735,\n",
+ " 736,\n",
+ " 739,\n",
+ " 741,\n",
+ " 742,\n",
+ " 743,\n",
+ " 744,\n",
+ " 745,\n",
+ " 746,\n",
+ " 747,\n",
+ " 750,\n",
+ " 752,\n",
+ " 753,\n",
+ " 754,\n",
+ " 755,\n",
+ " 758,\n",
+ " 760,\n",
+ " 761,\n",
+ " 762,\n",
+ " 763,\n",
+ " 764,\n",
+ " 765,\n",
+ " 766,\n",
+ " 767,\n",
+ " 770,\n",
+ " 772,\n",
+ " 773,\n",
+ " 774,\n",
+ " 775,\n",
+ " 776,\n",
+ " 777,\n",
+ " 778,\n",
+ " 779,\n",
+ " 782,\n",
+ " 783,\n",
+ " 786,\n",
+ " 788,\n",
+ " 789,\n",
+ " 790,\n",
+ " 791,\n",
+ " 792,\n",
+ " 795,\n",
+ " 797,\n",
+ " 798,\n",
+ " 799,\n",
+ " 802,\n",
+ " 804,\n",
+ " 805,\n",
+ " 806,\n",
+ " 807,\n",
+ " 810,\n",
+ " 812,\n",
+ " 813,\n",
+ " 814,\n",
+ " 815,\n",
+ " 816,\n",
+ " 819,\n",
+ " 821,\n",
+ " 822,\n",
+ " 823,\n",
+ " 824,\n",
+ " 827,\n",
+ " 829,\n",
+ " 830,\n",
+ " 831,\n",
+ " 834,\n",
+ " 836,\n",
+ " 839,\n",
+ " 841,\n",
+ " 842,\n",
+ " 843,\n",
+ " 844,\n",
+ " 845,\n",
+ " 848,\n",
+ " 850,\n",
+ " 851,\n",
+ " 852,\n",
+ " 853,\n",
+ " 854,\n",
+ " 857,\n",
+ " 859,\n",
+ " 860,\n",
+ " 861,\n",
+ " 864,\n",
+ " 866,\n",
+ " 869,\n",
+ " 871,\n",
+ " 872,\n",
+ " 873,\n",
+ " 874,\n",
+ " 875,\n",
+ " 878,\n",
+ " 880,\n",
+ " 883,\n",
+ " 885,\n",
+ " 886,\n",
+ " 889,\n",
+ " 891,\n",
+ " 894,\n",
+ " 896,\n",
+ " 899,\n",
+ " 900,\n",
+ " 903,\n",
+ " 905,\n",
+ " 906,\n",
+ " 907,\n",
+ " 908,\n",
+ " 909,\n",
+ " 910,\n",
+ " 911,\n",
+ " 914,\n",
+ " 916,\n",
+ " 917,\n",
+ " 918,\n",
+ " 919,\n",
+ " 920,\n",
+ " 921,\n",
+ " 924,\n",
+ " 926,\n",
+ " 927,\n",
+ " 928,\n",
+ " 931,\n",
+ " 933,\n",
+ " 934,\n",
+ " 935,\n",
+ " 936,\n",
+ " 939,\n",
+ " 941,\n",
+ " 942,\n",
+ " 943,\n",
+ " 946,\n",
+ " 948,\n",
+ " 949,\n",
+ " 952,\n",
+ " 954,\n",
+ " 955,\n",
+ " 956,\n",
+ " 959,\n",
+ " 960,\n",
+ " 963,\n",
+ " 965,\n",
+ " 966,\n",
+ " 967,\n",
+ " 968,\n",
+ " 969,\n",
+ " 972,\n",
+ " 974,\n",
+ " 975,\n",
+ " 976,\n",
+ " 979,\n",
+ " 981,\n",
+ " 982,\n",
+ " 983,\n",
+ " 984,\n",
+ " 987,\n",
+ " 989,\n",
+ " 990,\n",
+ " 991,\n",
+ " 992,\n",
+ " 993,\n",
+ " 996,\n",
+ " 998,\n",
+ " 999,\n",
+ " 1000,\n",
+ " 1001,\n",
+ " 1002,\n",
+ " 1005,\n",
+ " 1007,\n",
+ " 1008,\n",
+ " 1009,\n",
+ " 1010,\n",
+ " 1011,\n",
+ " 1012,\n",
+ " 1013,\n",
+ " 1016,\n",
+ " 1018,\n",
+ " 1019,\n",
+ " 1020,\n",
+ " 1021,\n",
+ " 1022,\n",
+ " 1025,\n",
+ " 1027,\n",
+ " 1030,\n",
+ " 1031,\n",
+ " 1034,\n",
+ " 1036,\n",
+ " 1037,\n",
+ " 1038,\n",
+ " 1039,\n",
+ " 1040,\n",
+ " 1041,\n",
+ " 1042,\n",
+ " 1045,\n",
+ " 1047,\n",
+ " 1048,\n",
+ " 1049,\n",
+ " 1052,\n",
+ " 1054,\n",
+ " 1057,\n",
+ " 1059,\n",
+ " 1062,\n",
+ " 1064,\n",
+ " 1065,\n",
+ " 1066,\n",
+ " 1069,\n",
+ " 1071,\n",
+ " 1072,\n",
+ " 1073,\n",
+ " 1076,\n",
+ " 1078,\n",
+ " 1079,\n",
+ " 1080,\n",
+ " 1081,\n",
+ " 1084,\n",
+ " 1086,\n",
+ " 1087,\n",
+ " 1088,\n",
+ " 1091,\n",
+ " 1093,\n",
+ " 1094,\n",
+ " 1095,\n",
+ " 1096,\n",
+ " 1097,\n",
+ " 1100,\n",
+ " 1102,\n",
+ " 1103,\n",
+ " 1104,\n",
+ " 1105,\n",
+ " 1108,\n",
+ " 1110,\n",
+ " 1113,\n",
+ " 1115,\n",
+ " 1118,\n",
+ " 1120,\n",
+ " 1121,\n",
+ " 1122,\n",
+ " 1125,\n",
+ " 1127,\n",
+ " 1130,\n",
+ " 1132,\n",
+ " 1133,\n",
+ " 1134,\n",
+ " 1135,\n",
+ " 1136,\n",
+ " 1139,\n",
+ " 1141,\n",
+ " 1142,\n",
+ " 1143,\n",
+ " 1144,\n",
+ " 1145,\n",
+ " 1148,\n",
+ " 1150,\n",
+ " 1151,\n",
+ " 1152,\n",
+ " 1153,\n",
+ " 1156,\n",
+ " 1158,\n",
+ " 1159,\n",
+ " 1162,\n",
+ " 1164,\n",
+ " 1165,\n",
+ " 1166,\n",
+ " 1167,\n",
+ " 1168,\n",
+ " 1171,\n",
+ " 1173,\n",
+ " 1174,\n",
+ " 1175,\n",
+ " 1176,\n",
+ " 1177,\n",
+ " 1180,\n",
+ " 1182,\n",
+ " 1185,\n",
+ " 1187,\n",
+ " 1188,\n",
+ " 1189,\n",
+ " 1190,\n",
+ " 1191,\n",
+ " 1192,\n",
+ " 1193,\n",
+ " 1194,\n",
+ " 1195,\n",
+ " 1196,\n",
+ " 1199,\n",
+ " 1201,\n",
+ " 1202,\n",
+ " 1205,\n",
+ " 1207,\n",
+ " 1208,\n",
+ " 1209,\n",
+ " 1210,\n",
+ " 1211,\n",
+ " 1212,\n",
+ " 1213,\n",
+ " 1216,\n",
+ " 1218,\n",
+ " 1219,\n",
+ " 1220,\n",
+ " 1223,\n",
+ " 1225,\n",
+ " 1226,\n",
+ " 1227,\n",
+ " 1230,\n",
+ " 1232,\n",
+ " 1233,\n",
+ " 1234,\n",
+ " 1235,\n",
+ " 1238,\n",
+ " 1240,\n",
+ " 1243,\n",
+ " 1245,\n",
+ " 1246,\n",
+ " 1247,\n",
+ " 1248,\n",
+ " 1249,\n",
+ " 1250,\n",
+ " 1251,\n",
+ " 1252,\n",
+ " 1255,\n",
+ " 1257,\n",
+ " 1258,\n",
+ " 1259,\n",
+ " 1260,\n",
+ " 1261,\n",
+ " 1264,\n",
+ " 1266,\n",
+ " 1267,\n",
+ " 1268,\n",
+ " 1271,\n",
+ " 1273,\n",
+ " 1274,\n",
+ " 1275,\n",
+ " 1278,\n",
+ " 1280,\n",
+ " 1281,\n",
+ " 1282,\n",
+ " 1283,\n",
+ " 1284,\n",
+ " 1285,\n",
+ " 1286,\n",
+ " 1287,\n",
+ " 1288,\n",
+ " 1289,\n",
+ " 1292,\n",
+ " 1294,\n",
+ " 1297,\n",
+ " 1299,\n",
+ " 1300,\n",
+ " 1301,\n",
+ " 1302,\n",
+ " 1305,\n",
+ " 1306,\n",
+ " 1309,\n",
+ " 1311,\n",
+ " 1312,\n",
+ " 1313,\n",
+ " 1316,\n",
+ " 1317,\n",
+ " 1320,\n",
+ " 1322,\n",
+ " 1323,\n",
+ " 1324,\n",
+ " 1325,\n",
+ " 1326,\n",
+ " 1329,\n",
+ " 1331,\n",
+ " 1332,\n",
+ " 1333,\n",
+ " 1336,\n",
+ " 1338,\n",
+ " 1341,\n",
+ " 1343,\n",
+ " 1344,\n",
+ " 1345,\n",
+ " 1348,\n",
+ " 1350,\n",
+ " 1351,\n",
+ " 1352,\n",
+ " 1355,\n",
+ " 1357,\n",
+ " 1358,\n",
+ " 1359,\n",
+ " 1360,\n",
+ " 1361,\n",
+ " 1364,\n",
+ " 1366,\n",
+ " 1367,\n",
+ " 1368,\n",
+ " 1369,\n",
+ " 1370,\n",
+ " 1373,\n",
+ " 1375,\n",
+ " 1378,\n",
+ " 1380,\n",
+ " 1381,\n",
+ " 1382,\n",
+ " 1383,\n",
+ " 1384,\n",
+ " 1387,\n",
+ " 1389,\n",
+ " 1390,\n",
+ " 1391,\n",
+ " 1392,\n",
+ " 1393,\n",
+ " 1396,\n",
+ " 1398,\n",
+ " 1399,\n",
+ " 1400,\n",
+ " 1403,\n",
+ " 1405,\n",
+ " 1406,\n",
+ " 1407,\n",
+ " 1408,\n",
+ " 1409,\n",
+ " 1410,\n",
+ " 1413,\n",
+ " 1415,\n",
+ " 1416,\n",
+ " 1417,\n",
+ " 1418,\n",
+ " 1419,\n",
+ " 1422,\n",
+ " 1424,\n",
+ " 1425,\n",
+ " 1426,\n",
+ " 1427,\n",
+ " 1430,\n",
+ " 1432,\n",
+ " 1433,\n",
+ " 1434,\n",
+ " 1435,\n",
+ " 1438,\n",
+ " 1440,\n",
+ " 1441,\n",
+ " 1442,\n",
+ " 1443,\n",
+ " 1444,\n",
+ " 1445,\n",
+ " 1446,\n",
+ " 1449,\n",
+ " 1451,\n",
+ " 1452,\n",
+ " 1453,\n",
+ " 1454,\n",
+ " 1455,\n",
+ " 1456,\n",
+ " 1457,\n",
+ " 1460,\n",
+ " 1462,\n",
+ " 1463,\n",
+ " 1464,\n",
+ " 1465,\n",
+ " 1466,\n",
+ " 1467,\n",
+ " 1468,\n",
+ " 1469,\n",
+ " 1470,\n",
+ " 1471,\n",
+ " 1474,\n",
+ " 1476,\n",
+ " 1477,\n",
+ " 1478,\n",
+ " 1481,\n",
+ " 1483,\n",
+ " 1484,\n",
+ " 1485,\n",
+ " 1486,\n",
+ " 1487,\n",
+ " 1488,\n",
+ " 1489,\n",
+ " 1492,\n",
+ " 1494,\n",
+ " 1495,\n",
+ " 1498,\n",
+ " 1500,\n",
+ " 1501,\n",
+ " 1502,\n",
+ " 1503,\n",
+ " 1504,\n",
+ " 1507,\n",
+ " 1509,\n",
+ " 1510,\n",
+ " 1511,\n",
+ " 1512,\n",
+ " 1515,\n",
+ " 1516,\n",
+ " 1519,\n",
+ " 1521,\n",
+ " 1522,\n",
+ " 1523,\n",
+ " 1526,\n",
+ " 1528,\n",
+ " 1529,\n",
+ " 1530,\n",
+ " 1531,\n",
+ " 1534,\n",
+ " 1536,\n",
+ " 1537,\n",
+ " 1538,\n",
+ " 1539,\n",
+ " 1542,\n",
+ " 1544,\n",
+ " 1547,\n",
+ " 1549,\n",
+ " 1552,\n",
+ " 1554,\n",
+ " 1555,\n",
+ " 1556,\n",
+ " 1557,\n",
+ " 1558,\n",
+ " 1561,\n",
+ " 1563,\n",
+ " 1564,\n",
+ " 1565,\n",
+ " 1566,\n",
+ " 1569,\n",
+ " 1571,\n",
+ " 1572,\n",
+ " 1573,\n",
+ " 1574,\n",
+ " 1575,\n",
+ " 1576,\n",
+ " 1577,\n",
+ " 1580,\n",
+ " 1582,\n",
+ " 1583,\n",
+ " 1584,\n",
+ " 1585,\n",
+ " 1588,\n",
+ " 1590,\n",
+ " 1591,\n",
+ " 1592,\n",
+ " 1593,\n",
+ " 1596,\n",
+ " 1598,\n",
+ " 1599,\n",
+ " 1600,\n",
+ " 1601,\n",
+ " 1602,\n",
+ " 1603,\n",
+ " 1604,\n",
+ " 1605,\n",
+ " 1608,\n",
+ " 1609,\n",
+ " 1612,\n",
+ " 1613,\n",
+ " 1616,\n",
+ " 1618,\n",
+ " ...]"
+ ]
+ },
+ "execution_count": 8,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Atoms not named CA, CB or C\n",
"msm.select(molecular_system, 'atom_name!=[\"CA\",\"CB\",\"C\"]')"
@@ -351,13 +3419,188 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 9,
"metadata": {
"tags": [
"scroll-output"
]
},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[3818,\n",
+ " 3819,\n",
+ " 3820,\n",
+ " 3821,\n",
+ " 3822,\n",
+ " 3823,\n",
+ " 3824,\n",
+ " 3825,\n",
+ " 3826,\n",
+ " 3827,\n",
+ " 3828,\n",
+ " 3829,\n",
+ " 3830,\n",
+ " 3831,\n",
+ " 3832,\n",
+ " 3833,\n",
+ " 3834,\n",
+ " 3835,\n",
+ " 3836,\n",
+ " 3837,\n",
+ " 3838,\n",
+ " 3839,\n",
+ " 3840,\n",
+ " 3841,\n",
+ " 3842,\n",
+ " 3843,\n",
+ " 3844,\n",
+ " 3845,\n",
+ " 3846,\n",
+ " 3847,\n",
+ " 3848,\n",
+ " 3849,\n",
+ " 3850,\n",
+ " 3851,\n",
+ " 3852,\n",
+ " 3853,\n",
+ " 3854,\n",
+ " 3855,\n",
+ " 3856,\n",
+ " 3857,\n",
+ " 3858,\n",
+ " 3859,\n",
+ " 3860,\n",
+ " 3861,\n",
+ " 3862,\n",
+ " 3863,\n",
+ " 3864,\n",
+ " 3865,\n",
+ " 3866,\n",
+ " 3867,\n",
+ " 3868,\n",
+ " 3869,\n",
+ " 3870,\n",
+ " 3871,\n",
+ " 3872,\n",
+ " 3873,\n",
+ " 3874,\n",
+ " 3875,\n",
+ " 3876,\n",
+ " 3877,\n",
+ " 3878,\n",
+ " 3879,\n",
+ " 3880,\n",
+ " 3881,\n",
+ " 3882,\n",
+ " 3883,\n",
+ " 3884,\n",
+ " 3885,\n",
+ " 3886,\n",
+ " 3887,\n",
+ " 3888,\n",
+ " 3889,\n",
+ " 3890,\n",
+ " 3891,\n",
+ " 3892,\n",
+ " 3893,\n",
+ " 3894,\n",
+ " 3895,\n",
+ " 3896,\n",
+ " 3897,\n",
+ " 3898,\n",
+ " 3899,\n",
+ " 3900,\n",
+ " 3901,\n",
+ " 3902,\n",
+ " 3903,\n",
+ " 3904,\n",
+ " 3905,\n",
+ " 3906,\n",
+ " 3907,\n",
+ " 3908,\n",
+ " 3909,\n",
+ " 3910,\n",
+ " 3911,\n",
+ " 3912,\n",
+ " 3913,\n",
+ " 3914,\n",
+ " 3915,\n",
+ " 3916,\n",
+ " 3917,\n",
+ " 3918,\n",
+ " 3919,\n",
+ " 3920,\n",
+ " 3921,\n",
+ " 3922,\n",
+ " 3923,\n",
+ " 3924,\n",
+ " 3925,\n",
+ " 3926,\n",
+ " 3927,\n",
+ " 3928,\n",
+ " 3929,\n",
+ " 3930,\n",
+ " 3931,\n",
+ " 3932,\n",
+ " 3933,\n",
+ " 3934,\n",
+ " 3935,\n",
+ " 3936,\n",
+ " 3937,\n",
+ " 3938,\n",
+ " 3939,\n",
+ " 3940,\n",
+ " 3941,\n",
+ " 3942,\n",
+ " 3943,\n",
+ " 3944,\n",
+ " 3945,\n",
+ " 3946,\n",
+ " 3947,\n",
+ " 3948,\n",
+ " 3949,\n",
+ " 3950,\n",
+ " 3951,\n",
+ " 3952,\n",
+ " 3953,\n",
+ " 3954,\n",
+ " 3955,\n",
+ " 3956,\n",
+ " 3957,\n",
+ " 3958,\n",
+ " 3959,\n",
+ " 3960,\n",
+ " 3961,\n",
+ " 3962,\n",
+ " 3963,\n",
+ " 3964,\n",
+ " 3965,\n",
+ " 3966,\n",
+ " 3967,\n",
+ " 3968,\n",
+ " 3969,\n",
+ " 3970,\n",
+ " 3971,\n",
+ " 3972,\n",
+ " 3973,\n",
+ " 3974,\n",
+ " 3975,\n",
+ " 3976,\n",
+ " 3977,\n",
+ " 3978,\n",
+ " 3979,\n",
+ " 3980,\n",
+ " 3981,\n",
+ " 3982]"
+ ]
+ },
+ "execution_count": 9,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Atoms belonging to molecules of type water.\n",
"msm.select(molecular_system, 'molecule_type==\"water\"')"
@@ -365,9 +3608,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 10,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[25, 26, 27, 28, 29, 30, 31]"
+ ]
+ },
+ "execution_count": 10,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Heavy atoms belonging to molecules of type protein.\n",
"msm.select(molecular_system, 'molecule_type==\"protein\" and atom_type!=\"H\" and group_index==3')"
@@ -375,13 +3629,424 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 11,
"metadata": {
"tags": [
"scroll-output"
]
},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[40,\n",
+ " 41,\n",
+ " 42,\n",
+ " 43,\n",
+ " 44,\n",
+ " 45,\n",
+ " 46,\n",
+ " 47,\n",
+ " 48,\n",
+ " 49,\n",
+ " 50,\n",
+ " 51,\n",
+ " 52,\n",
+ " 53,\n",
+ " 54,\n",
+ " 100,\n",
+ " 101,\n",
+ " 102,\n",
+ " 103,\n",
+ " 141,\n",
+ " 142,\n",
+ " 143,\n",
+ " 144,\n",
+ " 145,\n",
+ " 146,\n",
+ " 147,\n",
+ " 203,\n",
+ " 204,\n",
+ " 205,\n",
+ " 206,\n",
+ " 207,\n",
+ " 208,\n",
+ " 209,\n",
+ " 210,\n",
+ " 211,\n",
+ " 212,\n",
+ " 257,\n",
+ " 258,\n",
+ " 259,\n",
+ " 260,\n",
+ " 261,\n",
+ " 262,\n",
+ " 263,\n",
+ " 279,\n",
+ " 280,\n",
+ " 281,\n",
+ " 282,\n",
+ " 283,\n",
+ " 284,\n",
+ " 285,\n",
+ " 286,\n",
+ " 287,\n",
+ " 288,\n",
+ " 289,\n",
+ " 290,\n",
+ " 291,\n",
+ " 292,\n",
+ " 293,\n",
+ " 294,\n",
+ " 295,\n",
+ " 296,\n",
+ " 297,\n",
+ " 380,\n",
+ " 381,\n",
+ " 382,\n",
+ " 383,\n",
+ " 384,\n",
+ " 463,\n",
+ " 464,\n",
+ " 465,\n",
+ " 466,\n",
+ " 467,\n",
+ " 468,\n",
+ " 469,\n",
+ " 470,\n",
+ " 471,\n",
+ " 472,\n",
+ " 490,\n",
+ " 491,\n",
+ " 492,\n",
+ " 493,\n",
+ " 494,\n",
+ " 527,\n",
+ " 528,\n",
+ " 529,\n",
+ " 530,\n",
+ " 531,\n",
+ " 532,\n",
+ " 533,\n",
+ " 534,\n",
+ " 535,\n",
+ " 554,\n",
+ " 555,\n",
+ " 556,\n",
+ " 557,\n",
+ " 567,\n",
+ " 568,\n",
+ " 569,\n",
+ " 570,\n",
+ " 571,\n",
+ " 572,\n",
+ " 573,\n",
+ " 642,\n",
+ " 643,\n",
+ " 644,\n",
+ " 645,\n",
+ " 674,\n",
+ " 675,\n",
+ " 676,\n",
+ " 677,\n",
+ " 678,\n",
+ " 679,\n",
+ " 680,\n",
+ " 681,\n",
+ " 682,\n",
+ " 683,\n",
+ " 684,\n",
+ " 685,\n",
+ " 686,\n",
+ " 687,\n",
+ " 696,\n",
+ " 697,\n",
+ " 698,\n",
+ " 699,\n",
+ " 779,\n",
+ " 780,\n",
+ " 781,\n",
+ " 782,\n",
+ " 824,\n",
+ " 825,\n",
+ " 826,\n",
+ " 827,\n",
+ " 828,\n",
+ " 829,\n",
+ " 830,\n",
+ " 831,\n",
+ " 832,\n",
+ " 833,\n",
+ " 834,\n",
+ " 835,\n",
+ " 854,\n",
+ " 855,\n",
+ " 856,\n",
+ " 857,\n",
+ " 858,\n",
+ " 859,\n",
+ " 860,\n",
+ " 861,\n",
+ " 862,\n",
+ " 863,\n",
+ " 864,\n",
+ " 865,\n",
+ " 875,\n",
+ " 876,\n",
+ " 877,\n",
+ " 878,\n",
+ " 879,\n",
+ " 886,\n",
+ " 887,\n",
+ " 888,\n",
+ " 889,\n",
+ " 890,\n",
+ " 891,\n",
+ " 892,\n",
+ " 893,\n",
+ " 894,\n",
+ " 895,\n",
+ " 896,\n",
+ " 897,\n",
+ " 898,\n",
+ " 899,\n",
+ " 921,\n",
+ " 922,\n",
+ " 923,\n",
+ " 924,\n",
+ " 925,\n",
+ " 926,\n",
+ " 927,\n",
+ " 936,\n",
+ " 937,\n",
+ " 938,\n",
+ " 939,\n",
+ " 940,\n",
+ " 941,\n",
+ " 942,\n",
+ " 949,\n",
+ " 950,\n",
+ " 951,\n",
+ " 952,\n",
+ " 953,\n",
+ " 954,\n",
+ " 955,\n",
+ " 956,\n",
+ " 957,\n",
+ " 958,\n",
+ " 959,\n",
+ " 1022,\n",
+ " 1023,\n",
+ " 1024,\n",
+ " 1025,\n",
+ " 1026,\n",
+ " 1027,\n",
+ " 1028,\n",
+ " 1029,\n",
+ " 1030,\n",
+ " 1049,\n",
+ " 1050,\n",
+ " 1051,\n",
+ " 1052,\n",
+ " 1053,\n",
+ " 1054,\n",
+ " 1055,\n",
+ " 1056,\n",
+ " 1057,\n",
+ " 1058,\n",
+ " 1059,\n",
+ " 1060,\n",
+ " 1061,\n",
+ " 1062,\n",
+ " 1063,\n",
+ " 1064,\n",
+ " 1065,\n",
+ " 1066,\n",
+ " 1067,\n",
+ " 1068,\n",
+ " 1069,\n",
+ " 1070,\n",
+ " 1071,\n",
+ " 1072,\n",
+ " 1105,\n",
+ " 1106,\n",
+ " 1107,\n",
+ " 1108,\n",
+ " 1109,\n",
+ " 1110,\n",
+ " 1111,\n",
+ " 1112,\n",
+ " 1113,\n",
+ " 1114,\n",
+ " 1115,\n",
+ " 1116,\n",
+ " 1117,\n",
+ " 1118,\n",
+ " 1119,\n",
+ " 1120,\n",
+ " 1121,\n",
+ " 1122,\n",
+ " 1123,\n",
+ " 1124,\n",
+ " 1125,\n",
+ " 1126,\n",
+ " 1177,\n",
+ " 1178,\n",
+ " 1179,\n",
+ " 1180,\n",
+ " 1181,\n",
+ " 1213,\n",
+ " 1214,\n",
+ " 1215,\n",
+ " 1216,\n",
+ " 1217,\n",
+ " 1218,\n",
+ " 1219,\n",
+ " 1220,\n",
+ " 1221,\n",
+ " 1222,\n",
+ " 1223,\n",
+ " 1224,\n",
+ " 1225,\n",
+ " 1226,\n",
+ " 1235,\n",
+ " 1236,\n",
+ " 1237,\n",
+ " 1238,\n",
+ " 1239,\n",
+ " 1268,\n",
+ " 1269,\n",
+ " 1270,\n",
+ " 1271,\n",
+ " 1272,\n",
+ " 1273,\n",
+ " 1274,\n",
+ " 1289,\n",
+ " 1290,\n",
+ " 1291,\n",
+ " 1292,\n",
+ " 1293,\n",
+ " 1302,\n",
+ " 1303,\n",
+ " 1304,\n",
+ " 1305,\n",
+ " 1313,\n",
+ " 1314,\n",
+ " 1315,\n",
+ " 1316,\n",
+ " 1326,\n",
+ " 1327,\n",
+ " 1328,\n",
+ " 1329,\n",
+ " 1330,\n",
+ " 1331,\n",
+ " 1332,\n",
+ " 1333,\n",
+ " 1334,\n",
+ " 1335,\n",
+ " 1336,\n",
+ " 1337,\n",
+ " 1370,\n",
+ " 1371,\n",
+ " 1372,\n",
+ " 1373,\n",
+ " 1374,\n",
+ " 1393,\n",
+ " 1394,\n",
+ " 1395,\n",
+ " 1396,\n",
+ " 1397,\n",
+ " 1398,\n",
+ " 1399,\n",
+ " 1471,\n",
+ " 1472,\n",
+ " 1473,\n",
+ " 1474,\n",
+ " 1475,\n",
+ " 1476,\n",
+ " 1477,\n",
+ " 1512,\n",
+ " 1513,\n",
+ " 1514,\n",
+ " 1515,\n",
+ " 1539,\n",
+ " 1540,\n",
+ " 1541,\n",
+ " 1542,\n",
+ " 1543,\n",
+ " 1544,\n",
+ " 1545,\n",
+ " 1546,\n",
+ " 1547,\n",
+ " 1548,\n",
+ " 1605,\n",
+ " 1606,\n",
+ " 1607,\n",
+ " 1608,\n",
+ " 1609,\n",
+ " 1610,\n",
+ " 1611,\n",
+ " 1612,\n",
+ " 1619,\n",
+ " 1620,\n",
+ " 1621,\n",
+ " 1622,\n",
+ " 1623,\n",
+ " 1624,\n",
+ " 1625,\n",
+ " 1633,\n",
+ " 1634,\n",
+ " 1635,\n",
+ " 1636,\n",
+ " 1637,\n",
+ " 1655,\n",
+ " 1656,\n",
+ " 1657,\n",
+ " 1658,\n",
+ " 1659,\n",
+ " 1750,\n",
+ " 1751,\n",
+ " 1752,\n",
+ " 1753,\n",
+ " 1773,\n",
+ " 1774,\n",
+ " 1775,\n",
+ " 1776,\n",
+ " 1777,\n",
+ " 1778,\n",
+ " 1779,\n",
+ " 1780,\n",
+ " 1781,\n",
+ " 1782,\n",
+ " 1783,\n",
+ " 1784,\n",
+ " 1785,\n",
+ " 1786,\n",
+ " 1787,\n",
+ " 1788,\n",
+ " 1789,\n",
+ " 1790,\n",
+ " 1791,\n",
+ " 1792,\n",
+ " 1843,\n",
+ " 1844,\n",
+ " 1845,\n",
+ " 1846,\n",
+ " 1847,\n",
+ " 1848,\n",
+ " 1849,\n",
+ " 1884,\n",
+ " 1885,\n",
+ " 1886,\n",
+ " 1887,\n",
+ " 1888]"
+ ]
+ },
+ "execution_count": 11,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Atoms belonging to residues named GLY, ALA or VAL in chain id A.\n",
"msm.select(molecular_system, 'group_name==[\"GLY\",\"ALA\",\"VAL\"] and chain_name==\"A\"')"
@@ -396,9 +4061,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 12,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[10, 11, 12, 13]"
+ ]
+ },
+ "execution_count": 12,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, selection=[10,11,12,13])"
]
@@ -414,9 +4090,85 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 13,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[5,\n",
+ " 6,\n",
+ " 7,\n",
+ " 27,\n",
+ " 28,\n",
+ " 39,\n",
+ " 50,\n",
+ " 60,\n",
+ " 61,\n",
+ " 64,\n",
+ " 70,\n",
+ " 107,\n",
+ " 111,\n",
+ " 113,\n",
+ " 115,\n",
+ " 116,\n",
+ " 133,\n",
+ " 137,\n",
+ " 138,\n",
+ " 145,\n",
+ " 146,\n",
+ " 148,\n",
+ " 155,\n",
+ " 162,\n",
+ " 168,\n",
+ " 175,\n",
+ " 180,\n",
+ " 200,\n",
+ " 201,\n",
+ " 213,\n",
+ " 216,\n",
+ " 233,\n",
+ " 245,\n",
+ " 254,\n",
+ " 255,\n",
+ " 256,\n",
+ " 276,\n",
+ " 277,\n",
+ " 288,\n",
+ " 299,\n",
+ " 309,\n",
+ " 310,\n",
+ " 313,\n",
+ " 319,\n",
+ " 356,\n",
+ " 360,\n",
+ " 362,\n",
+ " 364,\n",
+ " 365,\n",
+ " 382,\n",
+ " 386,\n",
+ " 387,\n",
+ " 394,\n",
+ " 395,\n",
+ " 397,\n",
+ " 404,\n",
+ " 411,\n",
+ " 417,\n",
+ " 424,\n",
+ " 429,\n",
+ " 449,\n",
+ " 450,\n",
+ " 462,\n",
+ " 465,\n",
+ " 482,\n",
+ " 494]"
+ ]
+ },
+ "execution_count": 13,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Groups with name \"ALA\"\n",
"msm.select(molecular_system, element='group', selection='group_name==\"ALA\"')"
@@ -424,9 +4176,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 14,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[4, 5, 9]"
+ ]
+ },
+ "execution_count": 14,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Groups of atoms index 34, 44 or 64\n",
"msm.select(molecular_system, element='group', selection='atom_index==[34,44,64]')"
@@ -434,13 +4197,271 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 15,
"metadata": {
"tags": [
"scroll-output"
]
},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[0,\n",
+ " 1,\n",
+ " 2,\n",
+ " 3,\n",
+ " 4,\n",
+ " 5,\n",
+ " 6,\n",
+ " 7,\n",
+ " 8,\n",
+ " 9,\n",
+ " 10,\n",
+ " 11,\n",
+ " 12,\n",
+ " 13,\n",
+ " 14,\n",
+ " 15,\n",
+ " 16,\n",
+ " 17,\n",
+ " 18,\n",
+ " 19,\n",
+ " 20,\n",
+ " 21,\n",
+ " 22,\n",
+ " 23,\n",
+ " 24,\n",
+ " 25,\n",
+ " 26,\n",
+ " 27,\n",
+ " 28,\n",
+ " 29,\n",
+ " 30,\n",
+ " 31,\n",
+ " 32,\n",
+ " 33,\n",
+ " 34,\n",
+ " 35,\n",
+ " 36,\n",
+ " 37,\n",
+ " 38,\n",
+ " 39,\n",
+ " 40,\n",
+ " 41,\n",
+ " 42,\n",
+ " 43,\n",
+ " 44,\n",
+ " 45,\n",
+ " 46,\n",
+ " 47,\n",
+ " 48,\n",
+ " 49,\n",
+ " 50,\n",
+ " 51,\n",
+ " 52,\n",
+ " 53,\n",
+ " 54,\n",
+ " 55,\n",
+ " 56,\n",
+ " 57,\n",
+ " 58,\n",
+ " 59,\n",
+ " 60,\n",
+ " 61,\n",
+ " 62,\n",
+ " 63,\n",
+ " 64,\n",
+ " 65,\n",
+ " 66,\n",
+ " 67,\n",
+ " 68,\n",
+ " 69,\n",
+ " 70,\n",
+ " 71,\n",
+ " 72,\n",
+ " 73,\n",
+ " 74,\n",
+ " 75,\n",
+ " 76,\n",
+ " 77,\n",
+ " 78,\n",
+ " 79,\n",
+ " 80,\n",
+ " 81,\n",
+ " 82,\n",
+ " 83,\n",
+ " 84,\n",
+ " 85,\n",
+ " 86,\n",
+ " 87,\n",
+ " 88,\n",
+ " 89,\n",
+ " 90,\n",
+ " 91,\n",
+ " 92,\n",
+ " 93,\n",
+ " 94,\n",
+ " 95,\n",
+ " 96,\n",
+ " 97,\n",
+ " 98,\n",
+ " 99,\n",
+ " 100,\n",
+ " 101,\n",
+ " 102,\n",
+ " 103,\n",
+ " 104,\n",
+ " 105,\n",
+ " 106,\n",
+ " 107,\n",
+ " 108,\n",
+ " 109,\n",
+ " 110,\n",
+ " 111,\n",
+ " 112,\n",
+ " 113,\n",
+ " 114,\n",
+ " 115,\n",
+ " 116,\n",
+ " 117,\n",
+ " 118,\n",
+ " 119,\n",
+ " 120,\n",
+ " 121,\n",
+ " 122,\n",
+ " 123,\n",
+ " 124,\n",
+ " 125,\n",
+ " 126,\n",
+ " 127,\n",
+ " 128,\n",
+ " 129,\n",
+ " 130,\n",
+ " 131,\n",
+ " 132,\n",
+ " 133,\n",
+ " 134,\n",
+ " 135,\n",
+ " 136,\n",
+ " 137,\n",
+ " 138,\n",
+ " 139,\n",
+ " 140,\n",
+ " 141,\n",
+ " 142,\n",
+ " 143,\n",
+ " 144,\n",
+ " 145,\n",
+ " 146,\n",
+ " 147,\n",
+ " 148,\n",
+ " 149,\n",
+ " 150,\n",
+ " 151,\n",
+ " 152,\n",
+ " 153,\n",
+ " 154,\n",
+ " 155,\n",
+ " 156,\n",
+ " 157,\n",
+ " 158,\n",
+ " 159,\n",
+ " 160,\n",
+ " 161,\n",
+ " 162,\n",
+ " 163,\n",
+ " 164,\n",
+ " 165,\n",
+ " 166,\n",
+ " 167,\n",
+ " 168,\n",
+ " 169,\n",
+ " 170,\n",
+ " 171,\n",
+ " 172,\n",
+ " 173,\n",
+ " 174,\n",
+ " 175,\n",
+ " 176,\n",
+ " 177,\n",
+ " 178,\n",
+ " 179,\n",
+ " 180,\n",
+ " 181,\n",
+ " 182,\n",
+ " 183,\n",
+ " 184,\n",
+ " 185,\n",
+ " 186,\n",
+ " 187,\n",
+ " 188,\n",
+ " 189,\n",
+ " 190,\n",
+ " 191,\n",
+ " 192,\n",
+ " 193,\n",
+ " 194,\n",
+ " 195,\n",
+ " 196,\n",
+ " 197,\n",
+ " 198,\n",
+ " 199,\n",
+ " 200,\n",
+ " 201,\n",
+ " 202,\n",
+ " 203,\n",
+ " 204,\n",
+ " 205,\n",
+ " 206,\n",
+ " 207,\n",
+ " 208,\n",
+ " 209,\n",
+ " 210,\n",
+ " 211,\n",
+ " 212,\n",
+ " 213,\n",
+ " 214,\n",
+ " 215,\n",
+ " 216,\n",
+ " 217,\n",
+ " 218,\n",
+ " 219,\n",
+ " 220,\n",
+ " 221,\n",
+ " 222,\n",
+ " 223,\n",
+ " 224,\n",
+ " 225,\n",
+ " 226,\n",
+ " 227,\n",
+ " 228,\n",
+ " 229,\n",
+ " 230,\n",
+ " 231,\n",
+ " 232,\n",
+ " 233,\n",
+ " 234,\n",
+ " 235,\n",
+ " 236,\n",
+ " 237,\n",
+ " 238,\n",
+ " 239,\n",
+ " 240,\n",
+ " 241,\n",
+ " 242,\n",
+ " 243,\n",
+ " 244,\n",
+ " 245,\n",
+ " 246,\n",
+ " 247]"
+ ]
+ },
+ "execution_count": 15,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Groups belonging to chain id A or C and molecule of type anything but water\n",
"msm.select(molecular_system, element='group', selection='chain_name in [\"A\", \"C\"] and molecule_type!=\"water\"')"
@@ -448,13 +4469,188 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 16,
"metadata": {
"tags": [
"scroll-output"
]
},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[2,\n",
+ " 3,\n",
+ " 4,\n",
+ " 5,\n",
+ " 6,\n",
+ " 7,\n",
+ " 8,\n",
+ " 9,\n",
+ " 10,\n",
+ " 11,\n",
+ " 12,\n",
+ " 13,\n",
+ " 14,\n",
+ " 15,\n",
+ " 16,\n",
+ " 17,\n",
+ " 18,\n",
+ " 19,\n",
+ " 20,\n",
+ " 21,\n",
+ " 22,\n",
+ " 23,\n",
+ " 24,\n",
+ " 25,\n",
+ " 26,\n",
+ " 27,\n",
+ " 28,\n",
+ " 29,\n",
+ " 30,\n",
+ " 31,\n",
+ " 32,\n",
+ " 33,\n",
+ " 34,\n",
+ " 35,\n",
+ " 36,\n",
+ " 37,\n",
+ " 38,\n",
+ " 39,\n",
+ " 40,\n",
+ " 41,\n",
+ " 42,\n",
+ " 43,\n",
+ " 44,\n",
+ " 45,\n",
+ " 46,\n",
+ " 47,\n",
+ " 48,\n",
+ " 49,\n",
+ " 50,\n",
+ " 51,\n",
+ " 52,\n",
+ " 53,\n",
+ " 54,\n",
+ " 55,\n",
+ " 56,\n",
+ " 57,\n",
+ " 58,\n",
+ " 59,\n",
+ " 60,\n",
+ " 61,\n",
+ " 62,\n",
+ " 63,\n",
+ " 64,\n",
+ " 65,\n",
+ " 66,\n",
+ " 67,\n",
+ " 68,\n",
+ " 69,\n",
+ " 70,\n",
+ " 71,\n",
+ " 72,\n",
+ " 73,\n",
+ " 74,\n",
+ " 75,\n",
+ " 76,\n",
+ " 77,\n",
+ " 78,\n",
+ " 79,\n",
+ " 80,\n",
+ " 81,\n",
+ " 82,\n",
+ " 83,\n",
+ " 84,\n",
+ " 85,\n",
+ " 86,\n",
+ " 87,\n",
+ " 88,\n",
+ " 89,\n",
+ " 90,\n",
+ " 91,\n",
+ " 92,\n",
+ " 93,\n",
+ " 94,\n",
+ " 95,\n",
+ " 96,\n",
+ " 97,\n",
+ " 98,\n",
+ " 99,\n",
+ " 100,\n",
+ " 101,\n",
+ " 102,\n",
+ " 103,\n",
+ " 104,\n",
+ " 105,\n",
+ " 106,\n",
+ " 107,\n",
+ " 108,\n",
+ " 109,\n",
+ " 110,\n",
+ " 111,\n",
+ " 112,\n",
+ " 113,\n",
+ " 114,\n",
+ " 115,\n",
+ " 116,\n",
+ " 117,\n",
+ " 118,\n",
+ " 119,\n",
+ " 120,\n",
+ " 121,\n",
+ " 122,\n",
+ " 123,\n",
+ " 124,\n",
+ " 125,\n",
+ " 126,\n",
+ " 127,\n",
+ " 128,\n",
+ " 129,\n",
+ " 130,\n",
+ " 131,\n",
+ " 132,\n",
+ " 133,\n",
+ " 134,\n",
+ " 135,\n",
+ " 136,\n",
+ " 137,\n",
+ " 138,\n",
+ " 139,\n",
+ " 140,\n",
+ " 141,\n",
+ " 142,\n",
+ " 143,\n",
+ " 144,\n",
+ " 145,\n",
+ " 146,\n",
+ " 147,\n",
+ " 148,\n",
+ " 149,\n",
+ " 150,\n",
+ " 151,\n",
+ " 152,\n",
+ " 153,\n",
+ " 154,\n",
+ " 155,\n",
+ " 156,\n",
+ " 157,\n",
+ " 158,\n",
+ " 159,\n",
+ " 160,\n",
+ " 161,\n",
+ " 162,\n",
+ " 163,\n",
+ " 164,\n",
+ " 165,\n",
+ " 166]"
+ ]
+ },
+ "execution_count": 16,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Molecules of type water\n",
"msm.select(molecular_system, 'molecule_type==\"water\"', element='molecule')"
@@ -462,9 +4658,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 17,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[2, 3]"
+ ]
+ },
+ "execution_count": 17,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Chains with molecules of type water\n",
"msm.select(molecular_system, 'molecule_type==\"water\"', element='chain')"
@@ -472,9 +4679,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 18,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[42, 43, 44, 45]"
+ ]
+ },
+ "execution_count": 18,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Bonds in group index 5\n",
"msm.select(molecular_system, 'group_index==5', element='bond')"
@@ -489,18 +4707,40 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 19,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]"
+ ]
+ },
+ "execution_count": 19,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, element='group', selection=[0,1,2,3,4,5,6,7,8,9,10,11])"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 20,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[3900, 3910, 3920]"
+ ]
+ },
+ "execution_count": 20,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, element='molecule', selection=[3900, 3910, 3920])"
]
@@ -516,9 +4756,42 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 21,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[77,\n",
+ " 78,\n",
+ " 79,\n",
+ " 80,\n",
+ " 81,\n",
+ " 82,\n",
+ " 83,\n",
+ " 84,\n",
+ " 85,\n",
+ " 86,\n",
+ " 87,\n",
+ " 88,\n",
+ " 89,\n",
+ " 90,\n",
+ " 91,\n",
+ " 92,\n",
+ " 93,\n",
+ " 94,\n",
+ " 95,\n",
+ " 96,\n",
+ " 97,\n",
+ " 98,\n",
+ " 99]"
+ ]
+ },
+ "execution_count": 21,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Atoms in groups with indices 10, 11 or 12.\n",
"indices = [10,11,12]\n",
@@ -527,9 +4800,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 22,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[10, 11, 12, 16, 17, 18, 19, 25, 26, 27, 28]"
+ ]
+ },
+ "execution_count": 22,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Atoms named CA, C, O or N in groups with indices 10 to 29.\n",
"indices = list(range(10,30))\n",
@@ -539,9 +4823,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 23,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[0, 100, 200]"
+ ]
+ },
+ "execution_count": 23,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Groups with indices equal to 0, 100 or 200\n",
"indices = [0,100,200]\n",
@@ -559,27 +4854,81 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 24,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[89,\n",
+ " 480,\n",
+ " 489,\n",
+ " 527,\n",
+ " 547,\n",
+ " 550,\n",
+ " 552,\n",
+ " 554,\n",
+ " 557,\n",
+ " 566,\n",
+ " 600,\n",
+ " 723,\n",
+ " 734,\n",
+ " 3818,\n",
+ " 3819,\n",
+ " 3820,\n",
+ " 3833,\n",
+ " 3836,\n",
+ " 3854,\n",
+ " 3866,\n",
+ " 3870,\n",
+ " 3872]"
+ ]
+ },
+ "execution_count": 24,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, 'chain_name==\"A\" within 0.3 nm of chain_name==\"B\"')"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 25,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[119, 213, 473, 531, 654, 696, 799, 1049]"
+ ]
+ },
+ "execution_count": 25,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, '(atom_name==\"N\" and chain_name==\"A\") within 3 angstroms of (atom_type==\"O\" and molecule_type==\"water\")')"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 26,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[10, 42, 62, 72, 73]"
+ ]
+ },
+ "execution_count": 26,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, '(atom_name==\"CA\" and chain_name==\"A\") within 0.5 nm of (atom_name==\"CA\" and chain_name==\"B\")',\n",
" element='group')"
@@ -594,9 +4943,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 27,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[1521, 1522, 1723, 1724, 3882]"
+ ]
+ },
+ "execution_count": 27,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, 'chain_name==\"A\" not within 7.8 nanometers of chain_name==\"B\"')"
]
@@ -610,18 +4970,82 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 28,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[89,\n",
+ " 480,\n",
+ " 489,\n",
+ " 527,\n",
+ " 547,\n",
+ " 550,\n",
+ " 552,\n",
+ " 554,\n",
+ " 557,\n",
+ " 566,\n",
+ " 600,\n",
+ " 723,\n",
+ " 734,\n",
+ " 3818,\n",
+ " 3819,\n",
+ " 3820,\n",
+ " 3833,\n",
+ " 3836,\n",
+ " 3854,\n",
+ " 3866,\n",
+ " 3870,\n",
+ " 3872]"
+ ]
+ },
+ "execution_count": 28,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, 'chain_name==\"A\" within 0.3 nm without pbc of chain_name==\"B\"')"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 29,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[89,\n",
+ " 480,\n",
+ " 489,\n",
+ " 527,\n",
+ " 547,\n",
+ " 550,\n",
+ " 552,\n",
+ " 554,\n",
+ " 557,\n",
+ " 566,\n",
+ " 600,\n",
+ " 723,\n",
+ " 734,\n",
+ " 3818,\n",
+ " 3819,\n",
+ " 3820,\n",
+ " 3833,\n",
+ " 3836,\n",
+ " 3854,\n",
+ " 3866,\n",
+ " 3870,\n",
+ " 3872]"
+ ]
+ },
+ "execution_count": 29,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, 'chain_name==\"A\" within 0.3 nm with pbc of chain_name==\"B\"')"
]
@@ -637,26 +5061,894 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 30,
"metadata": {
"tags": [
"scroll-output"
]
},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[0,\n",
+ " 9,\n",
+ " 16,\n",
+ " 25,\n",
+ " 32,\n",
+ " 40,\n",
+ " 45,\n",
+ " 50,\n",
+ " 55,\n",
+ " 63,\n",
+ " 77,\n",
+ " 86,\n",
+ " 92,\n",
+ " 100,\n",
+ " 104,\n",
+ " 110,\n",
+ " 119,\n",
+ " 125,\n",
+ " 133,\n",
+ " 141,\n",
+ " 148,\n",
+ " 155,\n",
+ " 163,\n",
+ " 171,\n",
+ " 180,\n",
+ " 187,\n",
+ " 195,\n",
+ " 203,\n",
+ " 208,\n",
+ " 213,\n",
+ " 220,\n",
+ " 231,\n",
+ " 239,\n",
+ " 249,\n",
+ " 257,\n",
+ " 264,\n",
+ " 273,\n",
+ " 279,\n",
+ " 286,\n",
+ " 293,\n",
+ " 298,\n",
+ " 305,\n",
+ " 312,\n",
+ " 323,\n",
+ " 331,\n",
+ " 341,\n",
+ " 349,\n",
+ " 356,\n",
+ " 364,\n",
+ " 371,\n",
+ " 380,\n",
+ " 385,\n",
+ " 396,\n",
+ " 404,\n",
+ " 411,\n",
+ " 419,\n",
+ " 426,\n",
+ " 435,\n",
+ " 446,\n",
+ " 455,\n",
+ " 463,\n",
+ " 468,\n",
+ " 473,\n",
+ " 482,\n",
+ " 490,\n",
+ " 495,\n",
+ " 503,\n",
+ " 510,\n",
+ " 521,\n",
+ " 527,\n",
+ " 531,\n",
+ " 536,\n",
+ " 547,\n",
+ " 554,\n",
+ " 558,\n",
+ " 567,\n",
+ " 574,\n",
+ " 580,\n",
+ " 588,\n",
+ " 597,\n",
+ " 605,\n",
+ " 613,\n",
+ " 622,\n",
+ " 630,\n",
+ " 642,\n",
+ " 646,\n",
+ " 654,\n",
+ " 660,\n",
+ " 674,\n",
+ " 681,\n",
+ " 688,\n",
+ " 696,\n",
+ " 700,\n",
+ " 710,\n",
+ " 716,\n",
+ " 725,\n",
+ " 736,\n",
+ " 747,\n",
+ " 755,\n",
+ " 767,\n",
+ " 779,\n",
+ " 783,\n",
+ " 792,\n",
+ " 799,\n",
+ " 807,\n",
+ " 816,\n",
+ " 824,\n",
+ " 831,\n",
+ " 836,\n",
+ " 845,\n",
+ " 854,\n",
+ " 861,\n",
+ " 866,\n",
+ " 875,\n",
+ " 880,\n",
+ " 886,\n",
+ " 891,\n",
+ " 896,\n",
+ " 900,\n",
+ " 911,\n",
+ " 921,\n",
+ " 928,\n",
+ " 936,\n",
+ " 943,\n",
+ " 949,\n",
+ " 956,\n",
+ " 960,\n",
+ " 969,\n",
+ " 976,\n",
+ " 984,\n",
+ " 993,\n",
+ " 1002,\n",
+ " 1013,\n",
+ " 1022,\n",
+ " 1027,\n",
+ " 1031,\n",
+ " 1042,\n",
+ " 1049,\n",
+ " 1054,\n",
+ " 1059,\n",
+ " 1066,\n",
+ " 1073,\n",
+ " 1081,\n",
+ " 1088,\n",
+ " 1097,\n",
+ " 1105,\n",
+ " 1110,\n",
+ " 1115,\n",
+ " 1122,\n",
+ " 1127,\n",
+ " 1136,\n",
+ " 1145,\n",
+ " 1153,\n",
+ " 1159,\n",
+ " 1168,\n",
+ " 1177,\n",
+ " 1182,\n",
+ " 1196,\n",
+ " 1202,\n",
+ " 1213,\n",
+ " 1220,\n",
+ " 1227,\n",
+ " 1235,\n",
+ " 1240,\n",
+ " 1252,\n",
+ " 1261,\n",
+ " 1268,\n",
+ " 1275,\n",
+ " 1289,\n",
+ " 1294,\n",
+ " 1302,\n",
+ " 1306,\n",
+ " 1313,\n",
+ " 1317,\n",
+ " 1326,\n",
+ " 1333,\n",
+ " 1338,\n",
+ " 1345,\n",
+ " 1352,\n",
+ " 1361,\n",
+ " 1370,\n",
+ " 1375,\n",
+ " 1384,\n",
+ " 1393,\n",
+ " 1400,\n",
+ " 1410,\n",
+ " 1419,\n",
+ " 1427,\n",
+ " 1435,\n",
+ " 1446,\n",
+ " 1457,\n",
+ " 1471,\n",
+ " 1478,\n",
+ " 1489,\n",
+ " 1495,\n",
+ " 1504,\n",
+ " 1512,\n",
+ " 1516,\n",
+ " 1523,\n",
+ " 1531,\n",
+ " 1539,\n",
+ " 1544,\n",
+ " 1549,\n",
+ " 1558,\n",
+ " 1566,\n",
+ " 1577,\n",
+ " 1585,\n",
+ " 1593,\n",
+ " 1605,\n",
+ " 1609,\n",
+ " 1613,\n",
+ " 1619,\n",
+ " 1626,\n",
+ " 1633,\n",
+ " 1638,\n",
+ " 1647,\n",
+ " 1655,\n",
+ " 1660,\n",
+ " 1671,\n",
+ " 1678,\n",
+ " 1686,\n",
+ " 1698,\n",
+ " 1707,\n",
+ " 1715,\n",
+ " 1726,\n",
+ " 1734,\n",
+ " 1742,\n",
+ " 1750,\n",
+ " 1754,\n",
+ " 1765,\n",
+ " 1773,\n",
+ " 1780,\n",
+ " 1784,\n",
+ " 1788,\n",
+ " 1793,\n",
+ " 1799,\n",
+ " 1807,\n",
+ " 1816,\n",
+ " 1823,\n",
+ " 1832,\n",
+ " 1843,\n",
+ " 1850,\n",
+ " 1859,\n",
+ " 1867,\n",
+ " 1875,\n",
+ " 1884,\n",
+ " 1889,\n",
+ " 1896,\n",
+ " 1906,\n",
+ " 1912,\n",
+ " 1921,\n",
+ " 1928,\n",
+ " 1937,\n",
+ " 1944,\n",
+ " 1952,\n",
+ " 1957,\n",
+ " 1962,\n",
+ " 1967,\n",
+ " 1975,\n",
+ " 1989,\n",
+ " 1998,\n",
+ " 2004,\n",
+ " 2012,\n",
+ " 2016,\n",
+ " 2022,\n",
+ " 2031,\n",
+ " 2037,\n",
+ " 2045,\n",
+ " 2053,\n",
+ " 2060,\n",
+ " 2067,\n",
+ " 2075,\n",
+ " 2083,\n",
+ " 2092,\n",
+ " 2099,\n",
+ " 2107,\n",
+ " 2115,\n",
+ " 2120,\n",
+ " 2125,\n",
+ " 2132,\n",
+ " 2143,\n",
+ " 2151,\n",
+ " 2161,\n",
+ " 2169,\n",
+ " 2176,\n",
+ " 2185,\n",
+ " 2191,\n",
+ " 2198,\n",
+ " 2205,\n",
+ " 2210,\n",
+ " 2217,\n",
+ " 2224,\n",
+ " 2235,\n",
+ " 2243,\n",
+ " 2253,\n",
+ " 2261,\n",
+ " 2268,\n",
+ " 2276,\n",
+ " 2283,\n",
+ " 2292,\n",
+ " 2297,\n",
+ " 2308,\n",
+ " 2316,\n",
+ " 2323,\n",
+ " 2331,\n",
+ " 2338,\n",
+ " 2347,\n",
+ " 2358,\n",
+ " 2367,\n",
+ " 2375,\n",
+ " 2380,\n",
+ " 2385,\n",
+ " 2394,\n",
+ " 2402,\n",
+ " 2407,\n",
+ " 2415,\n",
+ " 2422,\n",
+ " 2433,\n",
+ " 2439,\n",
+ " 2443,\n",
+ " 2448,\n",
+ " 2459,\n",
+ " 2466,\n",
+ " 2470,\n",
+ " 2479,\n",
+ " 2486,\n",
+ " 2492,\n",
+ " 2500,\n",
+ " 2509,\n",
+ " 2517,\n",
+ " 2525,\n",
+ " 2534,\n",
+ " 2542,\n",
+ " 2554,\n",
+ " 2558,\n",
+ " 2566,\n",
+ " 2572,\n",
+ " 2586,\n",
+ " 2593,\n",
+ " 2600,\n",
+ " 2608,\n",
+ " 2612,\n",
+ " 2622,\n",
+ " 2628,\n",
+ " 2637,\n",
+ " 2648,\n",
+ " 2659,\n",
+ " 2667,\n",
+ " 2679,\n",
+ " 2691,\n",
+ " 2695,\n",
+ " 2704,\n",
+ " 2711,\n",
+ " 2719,\n",
+ " 2728,\n",
+ " 2736,\n",
+ " 2743,\n",
+ " 2748,\n",
+ " 2757,\n",
+ " 2766,\n",
+ " 2773,\n",
+ " 2778,\n",
+ " 2787,\n",
+ " 2792,\n",
+ " 2798,\n",
+ " 2803,\n",
+ " 2808,\n",
+ " 2812,\n",
+ " 2823,\n",
+ " 2833,\n",
+ " 2840,\n",
+ " 2848,\n",
+ " 2855,\n",
+ " 2861,\n",
+ " 2868,\n",
+ " 2872,\n",
+ " 2881,\n",
+ " 2888,\n",
+ " 2896,\n",
+ " 2905,\n",
+ " 2914,\n",
+ " 2925,\n",
+ " 2934,\n",
+ " 2939,\n",
+ " 2943,\n",
+ " 2954,\n",
+ " 2961,\n",
+ " 2966,\n",
+ " 2971,\n",
+ " 2978,\n",
+ " 2985,\n",
+ " 2993,\n",
+ " 3000,\n",
+ " 3009,\n",
+ " 3017,\n",
+ " 3022,\n",
+ " 3027,\n",
+ " 3034,\n",
+ " 3039,\n",
+ " 3048,\n",
+ " 3057,\n",
+ " 3065,\n",
+ " 3071,\n",
+ " 3080,\n",
+ " 3089,\n",
+ " 3094,\n",
+ " 3108,\n",
+ " 3114,\n",
+ " 3125,\n",
+ " 3132,\n",
+ " 3139,\n",
+ " 3147,\n",
+ " 3152,\n",
+ " 3164,\n",
+ " 3173,\n",
+ " 3180,\n",
+ " 3187,\n",
+ " 3201,\n",
+ " 3206,\n",
+ " 3214,\n",
+ " 3218,\n",
+ " 3225,\n",
+ " 3229,\n",
+ " 3238,\n",
+ " 3245,\n",
+ " 3250,\n",
+ " 3257,\n",
+ " 3264,\n",
+ " 3273,\n",
+ " 3282,\n",
+ " 3287,\n",
+ " 3296,\n",
+ " 3305,\n",
+ " 3312,\n",
+ " 3322,\n",
+ " 3331,\n",
+ " 3339,\n",
+ " 3347,\n",
+ " 3358,\n",
+ " 3369,\n",
+ " 3383,\n",
+ " 3390,\n",
+ " 3401,\n",
+ " 3407,\n",
+ " 3416,\n",
+ " 3424,\n",
+ " 3428,\n",
+ " 3435,\n",
+ " 3443,\n",
+ " 3451,\n",
+ " 3456,\n",
+ " 3461,\n",
+ " 3470,\n",
+ " 3478,\n",
+ " 3489,\n",
+ " 3497,\n",
+ " 3505,\n",
+ " 3517,\n",
+ " 3521,\n",
+ " 3525,\n",
+ " 3531,\n",
+ " 3538,\n",
+ " 3545,\n",
+ " 3550,\n",
+ " 3559,\n",
+ " 3567,\n",
+ " 3572,\n",
+ " 3583,\n",
+ " 3590,\n",
+ " 3598,\n",
+ " 3610,\n",
+ " 3619,\n",
+ " 3627,\n",
+ " 3638,\n",
+ " 3646,\n",
+ " 3654,\n",
+ " 3662,\n",
+ " 3666,\n",
+ " 3677,\n",
+ " 3685,\n",
+ " 3692,\n",
+ " 3696,\n",
+ " 3700,\n",
+ " 3705,\n",
+ " 3711,\n",
+ " 3719,\n",
+ " 3728,\n",
+ " 3735,\n",
+ " 3744,\n",
+ " 3755,\n",
+ " 3762,\n",
+ " 3771,\n",
+ " 3779,\n",
+ " 3787,\n",
+ " 3796,\n",
+ " 3801,\n",
+ " 3808]"
+ ]
+ },
+ "execution_count": 30,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, 'atom_name==\"N\" bonded to atom_type==\"C\"')"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 31,
"metadata": {
"tags": [
"scroll-output"
]
},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[3,\n",
+ " 12,\n",
+ " 19,\n",
+ " 23,\n",
+ " 28,\n",
+ " 35,\n",
+ " 43,\n",
+ " 48,\n",
+ " 53,\n",
+ " 58,\n",
+ " 61,\n",
+ " 66,\n",
+ " 80,\n",
+ " 89,\n",
+ " 95,\n",
+ " 98,\n",
+ " 103,\n",
+ " 107,\n",
+ " 109,\n",
+ " 113,\n",
+ " 117,\n",
+ " 118,\n",
+ " 122,\n",
+ " 124,\n",
+ " 128,\n",
+ " 136,\n",
+ " 144,\n",
+ " 151,\n",
+ " 158,\n",
+ " 166,\n",
+ " 174,\n",
+ " 178,\n",
+ " 179,\n",
+ " 183,\n",
+ " 185,\n",
+ " 190,\n",
+ " 198,\n",
+ " 201,\n",
+ " 206,\n",
+ " 211,\n",
+ " 216,\n",
+ " 218,\n",
+ " 223,\n",
+ " 234,\n",
+ " 237,\n",
+ " 238,\n",
+ " 242,\n",
+ " 252,\n",
+ " 255,\n",
+ " 256,\n",
+ " 260,\n",
+ " 267,\n",
+ " 271,\n",
+ " 276,\n",
+ " 282,\n",
+ " 289,\n",
+ " 296,\n",
+ " 301,\n",
+ " 308,\n",
+ " 310,\n",
+ " 315,\n",
+ " 326,\n",
+ " 334,\n",
+ " 344,\n",
+ " 352,\n",
+ " 359,\n",
+ " 367,\n",
+ " 369,\n",
+ " 374,\n",
+ " 383,\n",
+ " 388,\n",
+ " 399,\n",
+ " 407,\n",
+ " 409,\n",
+ " 414,\n",
+ " 417,\n",
+ " 422,\n",
+ " 429,\n",
+ " 438,\n",
+ " 449,\n",
+ " 453,\n",
+ " 458,\n",
+ " 466,\n",
+ " 471,\n",
+ " 476,\n",
+ " 480,\n",
+ " 485,\n",
+ " 488,\n",
+ " 493,\n",
+ " 498,\n",
+ " 506,\n",
+ " 508,\n",
+ " 513,\n",
+ " 524,\n",
+ " 526,\n",
+ " 530,\n",
+ " 534,\n",
+ " 539,\n",
+ " 550,\n",
+ " 552,\n",
+ " 557,\n",
+ " 561,\n",
+ " 565,\n",
+ " 566,\n",
+ " 570,\n",
+ " 577,\n",
+ " 579,\n",
+ " 583,\n",
+ " 591,\n",
+ " 595,\n",
+ " 600,\n",
+ " 608,\n",
+ " 616,\n",
+ " 625,\n",
+ " 628,\n",
+ " 629,\n",
+ " 633,\n",
+ " 641,\n",
+ " 645,\n",
+ " 649,\n",
+ " 657,\n",
+ " 659,\n",
+ " 663,\n",
+ " 677,\n",
+ " 684,\n",
+ " 691,\n",
+ " 699,\n",
+ " 703,\n",
+ " 713,\n",
+ " 715,\n",
+ " 719,\n",
+ " 723,\n",
+ " 724,\n",
+ " 728,\n",
+ " 739,\n",
+ " 750,\n",
+ " 758,\n",
+ " 766,\n",
+ " 770,\n",
+ " 778,\n",
+ " 782,\n",
+ " 786,\n",
+ " 790,\n",
+ " 791,\n",
+ " 795,\n",
+ " 797,\n",
+ " 802,\n",
+ " 805,\n",
+ " 810,\n",
+ " 814,\n",
+ " 815,\n",
+ " 819,\n",
+ " 827,\n",
+ " 834,\n",
+ " 839,\n",
+ " 843,\n",
+ " 844,\n",
+ " 848,\n",
+ " 857,\n",
+ " 864,\n",
+ " 869,\n",
+ " 873,\n",
+ " 878,\n",
+ " 883,\n",
+ " 889,\n",
+ " 894,\n",
+ " 899,\n",
+ " 903,\n",
+ " 914,\n",
+ " 924,\n",
+ " 931,\n",
+ " 939,\n",
+ " 946,\n",
+ " 952,\n",
+ " 959,\n",
+ " 963,\n",
+ " 967,\n",
+ " 968,\n",
+ " 972,\n",
+ " 974,\n",
+ " 979,\n",
+ " 982,\n",
+ " 987,\n",
+ " 991,\n",
+ " 992,\n",
+ " 996,\n",
+ " 1000,\n",
+ " 1001,\n",
+ " 1005,\n",
+ " 1016,\n",
+ " 1020,\n",
+ " 1021,\n",
+ " 1025,\n",
+ " 1030,\n",
+ " 1034,\n",
+ " 1045,\n",
+ " 1047,\n",
+ " 1052,\n",
+ " 1057,\n",
+ " 1062,\n",
+ " 1069,\n",
+ " 1076,\n",
+ " 1084,\n",
+ " 1086,\n",
+ " 1091,\n",
+ " 1095,\n",
+ " 1100,\n",
+ " 1108,\n",
+ " 1113,\n",
+ " 1118,\n",
+ " 1125,\n",
+ " 1130,\n",
+ " 1134,\n",
+ " 1139,\n",
+ " 1148,\n",
+ " 1156,\n",
+ " 1158,\n",
+ " 1162,\n",
+ " 1171,\n",
+ " 1175,\n",
+ " 1176,\n",
+ " 1180,\n",
+ " 1185,\n",
+ " 1199,\n",
+ " 1201,\n",
+ " 1205,\n",
+ " 1216,\n",
+ " 1223,\n",
+ " 1230,\n",
+ " 1238,\n",
+ " 1243,\n",
+ " 1251,\n",
+ " 1255,\n",
+ " 1259,\n",
+ " 1260,\n",
+ " 1264,\n",
+ " 1271,\n",
+ " 1278,\n",
+ " 1292,\n",
+ " 1297,\n",
+ " 1305,\n",
+ " 1309,\n",
+ " 1311,\n",
+ " 1316,\n",
+ " 1320,\n",
+ " 1329,\n",
+ " 1336,\n",
+ " 1341,\n",
+ " 1343,\n",
+ " 1348,\n",
+ " 1355,\n",
+ " 1359,\n",
+ " 1364,\n",
+ " 1368,\n",
+ " 1373,\n",
+ " 1378,\n",
+ " 1382,\n",
+ " 1387,\n",
+ " 1391,\n",
+ " 1392,\n",
+ " 1396,\n",
+ " 1403,\n",
+ " 1413,\n",
+ " 1417,\n",
+ " 1418,\n",
+ " 1422,\n",
+ " 1430,\n",
+ " 1438,\n",
+ " 1449,\n",
+ " 1460,\n",
+ " 1474,\n",
+ " 1481,\n",
+ " 1492,\n",
+ " 1494,\n",
+ " 1498,\n",
+ " 1507,\n",
+ " 1515,\n",
+ " 1519,\n",
+ " 1521,\n",
+ " 1526,\n",
+ " 1529,\n",
+ " 1530,\n",
+ " 1534,\n",
+ " 1542,\n",
+ " 1547,\n",
+ " 1552,\n",
+ " 1556,\n",
+ " 1561,\n",
+ " 1569,\n",
+ " 1580,\n",
+ " 1588,\n",
+ " 1596,\n",
+ " 1604,\n",
+ " 1608,\n",
+ " 1612,\n",
+ " 1616,\n",
+ " 1618,\n",
+ " 1622,\n",
+ " 1629,\n",
+ " 1631,\n",
+ " 1636,\n",
+ " 1641,\n",
+ " 1650,\n",
+ " 1653,\n",
+ " 1658,\n",
+ " 1663,\n",
+ " 1674,\n",
+ " 1676,\n",
+ " 1681,\n",
+ " 1689,\n",
+ " 1697,\n",
+ " 1701,\n",
+ " 1705,\n",
+ " 1710,\n",
+ " 1718,\n",
+ " 1729,\n",
+ " 1732,\n",
+ " 1733,\n",
+ " 1737,\n",
+ " 1745,\n",
+ " 1748,\n",
+ " 1753,\n",
+ " 1757,\n",
+ " 1768,\n",
+ " 1776,\n",
+ " 1783,\n",
+ " 1787,\n",
+ " 1791,\n",
+ " 1796,\n",
+ " 1798,\n",
+ " 1802,\n",
+ " 1810,\n",
+ " 1819,\n",
+ " 1826,\n",
+ " 1830,\n",
+ " 1831,\n",
+ " 1835,\n",
+ " 1846,\n",
+ " 1853,\n",
+ " 1857,\n",
+ " 1858,\n",
+ " 1862,\n",
+ " 1870,\n",
+ " 1878,\n",
+ " 1882,\n",
+ " 1883,\n",
+ " 1887,\n",
+ " 1892,\n",
+ " 1894,\n",
+ " 1899,\n",
+ " 1905]"
+ ]
+ },
+ "execution_count": 31,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, '(atom_type==\"O\" and chain_name==\"A\") bonded to (atom_type==\"C\" and chain_name==\"A\")')"
]
@@ -670,9 +5962,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 32,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[363, 1714, 2275, 3626]"
+ ]
+ },
+ "execution_count": 32,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, '(all not bonded to atom_type==[\"H\",\"N\",\"C\",\"O\"]) and molecule_type==\"protein\"')"
]
@@ -686,9 +5989,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 33,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[119, 213, 473, 531, 654, 696, 799, 1049]"
+ ]
+ },
+ "execution_count": 33,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, '((atom_name==\"N\" and chain_name==\"A\") bonded to atom_type==\"C\") within 3 angstroms of (atom_type==\"O\" and molecule_type==\"water\")')"
]
@@ -706,9 +6020,23 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 34,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[[86, 87, 88, 89, 90, 91],\n",
+ " [273, 274, 275, 276, 277, 278],\n",
+ " [880, 881, 882, 883, 884, 885],\n",
+ " [943, 944, 945, 946, 947, 948]]"
+ ]
+ },
+ "execution_count": 34,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, 'all in groups of molecule_index==0 and group_name==\"CYS\"')"
]
@@ -722,9 +6050,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 35,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[[87, 88, 90], [274, 275, 277], [881, 882, 884], [944, 945, 947]]"
+ ]
+ },
+ "execution_count": 35,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, 'atom_type==\"C\" in groups of molecule_index==0 and group_name==\"CYS\"')"
]
@@ -738,9 +6077,85 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 36,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[[5,\n",
+ " 6,\n",
+ " 7,\n",
+ " 27,\n",
+ " 28,\n",
+ " 39,\n",
+ " 50,\n",
+ " 60,\n",
+ " 61,\n",
+ " 64,\n",
+ " 70,\n",
+ " 107,\n",
+ " 111,\n",
+ " 113,\n",
+ " 115,\n",
+ " 116,\n",
+ " 133,\n",
+ " 137,\n",
+ " 138,\n",
+ " 145,\n",
+ " 146,\n",
+ " 148,\n",
+ " 155,\n",
+ " 162,\n",
+ " 168,\n",
+ " 175,\n",
+ " 180,\n",
+ " 200,\n",
+ " 201,\n",
+ " 213,\n",
+ " 216,\n",
+ " 233,\n",
+ " 245],\n",
+ " [254,\n",
+ " 255,\n",
+ " 256,\n",
+ " 276,\n",
+ " 277,\n",
+ " 288,\n",
+ " 299,\n",
+ " 309,\n",
+ " 310,\n",
+ " 313,\n",
+ " 319,\n",
+ " 356,\n",
+ " 360,\n",
+ " 362,\n",
+ " 364,\n",
+ " 365,\n",
+ " 382,\n",
+ " 386,\n",
+ " 387,\n",
+ " 394,\n",
+ " 395,\n",
+ " 397,\n",
+ " 404,\n",
+ " 411,\n",
+ " 417,\n",
+ " 424,\n",
+ " 429,\n",
+ " 449,\n",
+ " 450,\n",
+ " 462,\n",
+ " 465,\n",
+ " 482,\n",
+ " 494]]"
+ ]
+ },
+ "execution_count": 36,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, element='group',\n",
" selection='group_name==\"ALA\" in components of molecule_name==\"TRIOSEPHOSPHATE ISOMERASE\"')"
@@ -748,9 +6163,184 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 37,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[[2,\n",
+ " 3,\n",
+ " 4,\n",
+ " 5,\n",
+ " 6,\n",
+ " 7,\n",
+ " 8,\n",
+ " 9,\n",
+ " 10,\n",
+ " 11,\n",
+ " 12,\n",
+ " 13,\n",
+ " 14,\n",
+ " 15,\n",
+ " 16,\n",
+ " 17,\n",
+ " 18,\n",
+ " 19,\n",
+ " 20,\n",
+ " 21,\n",
+ " 22,\n",
+ " 23,\n",
+ " 24,\n",
+ " 25,\n",
+ " 26,\n",
+ " 27,\n",
+ " 28,\n",
+ " 29,\n",
+ " 30,\n",
+ " 31,\n",
+ " 32,\n",
+ " 33,\n",
+ " 34,\n",
+ " 35,\n",
+ " 36,\n",
+ " 37,\n",
+ " 38,\n",
+ " 39,\n",
+ " 40,\n",
+ " 41,\n",
+ " 42,\n",
+ " 43,\n",
+ " 44,\n",
+ " 45,\n",
+ " 46,\n",
+ " 47,\n",
+ " 48,\n",
+ " 49,\n",
+ " 50,\n",
+ " 51,\n",
+ " 52,\n",
+ " 53,\n",
+ " 54,\n",
+ " 55,\n",
+ " 56,\n",
+ " 57,\n",
+ " 58,\n",
+ " 59,\n",
+ " 60,\n",
+ " 61,\n",
+ " 62,\n",
+ " 63,\n",
+ " 64,\n",
+ " 65,\n",
+ " 66,\n",
+ " 67,\n",
+ " 68,\n",
+ " 69,\n",
+ " 70,\n",
+ " 71,\n",
+ " 72,\n",
+ " 73,\n",
+ " 74],\n",
+ " [75,\n",
+ " 76,\n",
+ " 77,\n",
+ " 78,\n",
+ " 79,\n",
+ " 80,\n",
+ " 81,\n",
+ " 82,\n",
+ " 83,\n",
+ " 84,\n",
+ " 85,\n",
+ " 86,\n",
+ " 87,\n",
+ " 88,\n",
+ " 89,\n",
+ " 90,\n",
+ " 91,\n",
+ " 92,\n",
+ " 93,\n",
+ " 94,\n",
+ " 95,\n",
+ " 96,\n",
+ " 97,\n",
+ " 98,\n",
+ " 99,\n",
+ " 100,\n",
+ " 101,\n",
+ " 102,\n",
+ " 103,\n",
+ " 104,\n",
+ " 105,\n",
+ " 106,\n",
+ " 107,\n",
+ " 108,\n",
+ " 109,\n",
+ " 110,\n",
+ " 111,\n",
+ " 112,\n",
+ " 113,\n",
+ " 114,\n",
+ " 115,\n",
+ " 116,\n",
+ " 117,\n",
+ " 118,\n",
+ " 119,\n",
+ " 120,\n",
+ " 121,\n",
+ " 122,\n",
+ " 123,\n",
+ " 124,\n",
+ " 125,\n",
+ " 126,\n",
+ " 127,\n",
+ " 128,\n",
+ " 129,\n",
+ " 130,\n",
+ " 131,\n",
+ " 132,\n",
+ " 133,\n",
+ " 134,\n",
+ " 135,\n",
+ " 136,\n",
+ " 137,\n",
+ " 138,\n",
+ " 139,\n",
+ " 140,\n",
+ " 141,\n",
+ " 142,\n",
+ " 143,\n",
+ " 144,\n",
+ " 145,\n",
+ " 146,\n",
+ " 147,\n",
+ " 148,\n",
+ " 149,\n",
+ " 150,\n",
+ " 151,\n",
+ " 152,\n",
+ " 153,\n",
+ " 154,\n",
+ " 155,\n",
+ " 156,\n",
+ " 157,\n",
+ " 158,\n",
+ " 159,\n",
+ " 160,\n",
+ " 161,\n",
+ " 162,\n",
+ " 163,\n",
+ " 164,\n",
+ " 165,\n",
+ " 166]]"
+ ]
+ },
+ "execution_count": 37,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, element='molecule',\n",
" selection='entity_name==\"water\" in chains of chain_name==[\"A\",\"B\"]')"
@@ -765,9 +6355,27 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 38,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[[[86, 87, 88, 89, 90, 91],\n",
+ " [273, 274, 275, 276, 277, 278],\n",
+ " [880, 881, 882, 883, 884, 885],\n",
+ " [943, 944, 945, 946, 947, 948]],\n",
+ " [[1998, 1999, 2000, 2001, 2002, 2003],\n",
+ " [2185, 2186, 2187, 2188, 2189, 2190],\n",
+ " [2792, 2793, 2794, 2795, 2796, 2797],\n",
+ " [2855, 2856, 2857, 2858, 2859, 2860]]]"
+ ]
+ },
+ "execution_count": 38,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, 'all in groups of group_name==\"CYS\" in components of component_index==[0,1]')"
]
@@ -783,31 +6391,51 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 41,
"metadata": {},
"outputs": [],
"source": [
"sel1 = msm.select(molecular_system, 'all in groups of all in components of all')\n",
"sel2 = msm.select(molecular_system, 'all in groups of all in components')\n",
"sel3 = msm.select(molecular_system, 'all in groups in components of all')\n",
- "sel4 = msm.select(molecular_system, 'all in groups in components')"
+ "sel4 = msm.select(molecular_system, 'all in groups in components')\n",
+ "sel5 = msm.select(molecular_system, 'in groups in components')"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 46,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Are \"sel1\" and \"sel3\" equivalent selections?: True\n",
+ "Are \"sel3\" and \"sel5\" equivalent selections?: True\n"
+ ]
+ }
+ ],
"source": [
"equal = True\n",
- "for component1, component4 in zip(sel1, sel4):\n",
- " for group1, group4 in zip(component1, component4):\n",
- " for atom1, atom4 in zip(group1, group4):\n",
- " if atom1!=atom4:\n",
+ "for component1, component3 in zip(sel1, sel3):\n",
+ " for group1, group3 in zip(component1, component3):\n",
+ " for atom1, atom3 in zip(group1, group3):\n",
+ " if atom1!=atom3:\n",
" equal = False\n",
" break\n",
"\n",
- "print(f'Are \"sel1\" and \"sel4\" equivalent selections?: {equal}')"
+ "print(f'Are \"sel1\" and \"sel3\" equivalent selections?: {equal}')\n",
+ "\n",
+ "equal = True\n",
+ "for component3, component5 in zip(sel3, sel5):\n",
+ " for group3, group5 in zip(component3, component5):\n",
+ " for atom3, atom5 in zip(group3, group5):\n",
+ " if atom3!=atom5:\n",
+ " equal = False\n",
+ " break\n",
+ "\n",
+ "print(f'Are \"sel3\" and \"sel5\" equivalent selections?: {equal}')"
]
},
{
@@ -821,9 +6449,55 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 47,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[[240, 332, 701, 912, 1401, 2152, 2244, 2613, 2824, 3313],\n",
+ " [181,\n",
+ " 214,\n",
+ " 306,\n",
+ " 365,\n",
+ " 405,\n",
+ " 504,\n",
+ " 548,\n",
+ " 793,\n",
+ " 970,\n",
+ " 1043,\n",
+ " 1082,\n",
+ " 1307,\n",
+ " 1339,\n",
+ " 1517,\n",
+ " 1627,\n",
+ " 1672,\n",
+ " 1890,\n",
+ " 2093,\n",
+ " 2126,\n",
+ " 2218,\n",
+ " 2277,\n",
+ " 2317,\n",
+ " 2416,\n",
+ " 2460,\n",
+ " 2705,\n",
+ " 2882,\n",
+ " 2955,\n",
+ " 2994,\n",
+ " 3219,\n",
+ " 3251,\n",
+ " 3429,\n",
+ " 3539,\n",
+ " 3584,\n",
+ " 3802],\n",
+ " [64, 661, 1183, 1276, 1458, 1976, 2573, 3095, 3188, 3370]]"
+ ]
+ },
+ "execution_count": 47,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, ['group_name==\"HIS\" and atom_name==\"CA\"',\n",
" 'group_name==\"THR\" and atom_name==\"CA\"',\n",
@@ -839,9 +6513,23 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 48,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[[240, 332, 701, 912, 1401, 2152, 2244, 2613, 2824, 3313],\n",
+ " [78, 79, 81, 82, 83, 84, 87, 88, 90, 93, 94, 96, 97],\n",
+ " [3],\n",
+ " [4, 5, 6]]"
+ ]
+ },
+ "execution_count": 48,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"group_indices=[10,11,12]\n",
"msm.select(molecular_system, ['group_name==\"HIS\" and atom_name==\"CA\"',\n",
@@ -861,9 +6549,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 49,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "array([10, 13, 17, 20, 26, 29])"
+ ]
+ },
+ "execution_count": 49,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, selection='(name =~ \"C[A-B]\") and (resid 1 to 3)', syntax='MDTraj')"
]
@@ -879,18 +6578,40 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 50,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'@25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44'"
+ ]
+ },
+ "execution_count": 50,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, selection='group_index==[3,4,5]', to_syntax='NGLView')"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 51,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'index 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44'"
+ ]
+ },
+ "execution_count": 51,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, selection='group_index==[3,4,5]', to_syntax='MDTraj')"
]
@@ -904,18 +6625,40 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 52,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'7:A 8:A 9:A'"
+ ]
+ },
+ "execution_count": 52,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, element='group', selection='group_index==[3,4,5]', to_syntax='NGLView')"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 53,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'resid 3 4 5'"
+ ]
+ },
+ "execution_count": 53,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"msm.select(molecular_system, element='group', selection='group_index==[3,4,5]', to_syntax='MDTraj')"
]
diff --git a/molsysmt/_private/common_get.py b/molsysmt/_private/common_get.py
index a56fceedc..a47195ede 100644
--- a/molsysmt/_private/common_get.py
+++ b/molsysmt/_private/common_get.py
@@ -17,7 +17,7 @@ def get_atom_index_from_atom(item, indices='all'):
else:
output = np.array(indices, dtype=int)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_id_from_atom(item, indices='all'):
@@ -32,7 +32,7 @@ def get_group_id_from_atom(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_name_from_atom(item, indices='all'):
@@ -48,7 +48,7 @@ def get_group_name_from_atom(item, indices='all'):
output = output.astype(object)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_type_from_atom(item, indices='all'):
@@ -64,7 +64,7 @@ def get_group_type_from_atom(item, indices='all'):
output = output.astype(object)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_id_from_atom(item, indices='all'):
@@ -79,7 +79,7 @@ def get_component_id_from_atom(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_name_from_atom(item, indices='all'):
@@ -95,7 +95,7 @@ def get_component_name_from_atom(item, indices='all'):
output = output.astype(object)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_type_from_atom(item, indices='all'):
@@ -111,7 +111,7 @@ def get_component_type_from_atom(item, indices='all'):
output = output.astype(object)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_id_from_atom(item, indices='all'):
@@ -126,7 +126,7 @@ def get_chain_id_from_atom(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_name_from_atom(item, indices='all'):
@@ -142,7 +142,7 @@ def get_chain_name_from_atom(item, indices='all'):
output = output.astype(object)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_type_from_atom(item, indices='all'):
@@ -158,7 +158,7 @@ def get_chain_type_from_atom(item, indices='all'):
output = output.astype(object)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_id_from_atom(item, indices='all'):
@@ -173,7 +173,7 @@ def get_molecule_id_from_atom(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_name_from_atom(item, indices='all'):
@@ -189,7 +189,7 @@ def get_molecule_name_from_atom(item, indices='all'):
output = output.astype(object)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_type_from_atom(item, indices='all'):
@@ -205,7 +205,7 @@ def get_molecule_type_from_atom(item, indices='all'):
output = output.astype(object)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_id_from_atom(item, indices='all'):
@@ -220,7 +220,7 @@ def get_entity_id_from_atom(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_name_from_atom(item, indices='all'):
@@ -236,7 +236,7 @@ def get_entity_name_from_atom(item, indices='all'):
output = output.astype(object)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_type_from_atom(item, indices='all'):
@@ -252,7 +252,7 @@ def get_entity_type_from_atom(item, indices='all'):
output = output.astype(object)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_n_atoms_from_atom(item, indices='all'):
@@ -368,7 +368,7 @@ def get_bonded_atoms_from_atom(item, indices='all'):
del(G, edges)
- return output
+ return output.tolist()
@digest(form=form)
def get_bond_index_from_atom(item, indices='all'):
@@ -392,11 +392,9 @@ def get_bond_index_from_atom(item, indices='all'):
for ii in indices:
if ii in G:
- output.append(np.array([n['index'] for n in G[ii].values()]))
+ output.append(np.array([n['index'] for n in G[ii].values()]).tolist())
else:
- output.append(np.array([]))
-
- output = np.array(output, dtype=object)
+ output.append(np.array([]).tolist())
del(G, edges, edge_indices)
@@ -426,8 +424,6 @@ def get_n_bonds_from_atom(item, indices='all'):
else:
output.append(0)
- output = np.array(output)
-
del(G, edges)
return output
@@ -441,13 +437,13 @@ def get_inner_bond_index_from_atom(item, indices='all'):
raise _NotImplementedMethodError
@digest(form=form)
-def get_n_aminoacids_from_atom(item, indices='all'):
+def get_n_amino_acids_from_atom(item, indices='all'):
group_indices = get_group_index_from_atom(item, indices=indices)
group_indices = np.unique(group_indices)
group_types = get_group_type_from_group(item, indices=group_indices)
- return (group_types=='aminoacid').sum()
+ return sum([ii=='amino acid' for ii in group_types])
@digest(form=form)
def get_n_nucleotides_from_atom(item, indices='all'):
@@ -456,7 +452,7 @@ def get_n_nucleotides_from_atom(item, indices='all'):
group_indices = np.unique(group_indices)
group_types = get_group_type_from_group(item, indices=group_indices)
- return (group_types=='nucleotide').sum()
+ return sum([ii=='nucleotide' for ii in group_types])
@digest(form=form)
def get_n_ions_from_atom(item, indices='all'):
@@ -465,7 +461,7 @@ def get_n_ions_from_atom(item, indices='all'):
molecule_indices = np.unique(molecule_indices)
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='ion').sum()
+ return sum([ii=='ion' for ii in molecule_types])
@digest(form=form)
def get_n_waters_from_atom(item, indices='all'):
@@ -474,7 +470,7 @@ def get_n_waters_from_atom(item, indices='all'):
molecule_indices = np.unique(molecule_indices)
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='water').sum()
+ return sum([ii=='water' for ii in molecule_types])
@digest(form=form)
def get_n_small_molecules_from_atom(item, indices='all'):
@@ -483,7 +479,7 @@ def get_n_small_molecules_from_atom(item, indices='all'):
molecule_indices = np.unique(molecule_indices)
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='small molecule').sum()
+ return sum([ii=='small molecule' for ii in molecule_types])
@digest(form=form)
def get_n_peptides_from_atom(item, indices='all'):
@@ -492,7 +488,7 @@ def get_n_peptides_from_atom(item, indices='all'):
molecule_indices = np.unique(molecule_indices)
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='peptide').sum()
+ return sum([ii=='peptide' for ii in molecule_types])
@digest(form=form)
def get_n_proteins_from_atom(item, indices='all'):
@@ -501,7 +497,7 @@ def get_n_proteins_from_atom(item, indices='all'):
molecule_indices = np.unique(molecule_indices)
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='protein').sum()
+ return sum([ii=='protein' for ii in molecule_types])
@digest(form=form)
def get_n_dnas_from_atom(item, indices='all'):
@@ -510,7 +506,7 @@ def get_n_dnas_from_atom(item, indices='all'):
molecule_indices = np.unique(molecule_indices)
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='dna').sum()
+ return sum([ii=='dna' for ii in molecule_types])
@digest(form=form)
def get_n_rnas_from_atom(item, indices='all'):
@@ -519,7 +515,7 @@ def get_n_rnas_from_atom(item, indices='all'):
molecule_indices = np.unique(molecule_indices)
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='rna').sum()
+ return sum([ii=='rna' for ii in molecule_types])
@digest(form=form)
def get_n_lipids_from_atom(item, indices='all'):
@@ -528,7 +524,7 @@ def get_n_lipids_from_atom(item, indices='all'):
molecule_indices = np.unique(molecule_indices)
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='lipid').sum()
+ return sum([ii=='lipid' for ii in molecule_types])
@digest(form=form)
def get_n_oligosaccharides_from_atom(item, indices='all'):
@@ -537,7 +533,7 @@ def get_n_oligosaccharides_from_atom(item, indices='all'):
molecule_indices = np.unique(molecule_indices)
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='oligosaccharide').sum()
+ return sum([ii=='oligosaccharide' for ii in molecule_types])
@digest(form=form)
def get_n_saccharides_from_atom(item, indices='all'):
@@ -546,7 +542,7 @@ def get_n_saccharides_from_atom(item, indices='all'):
molecule_indices = np.unique(molecule_indices)
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='saccharide').sum()
+ return sum([ii=='saccharide' for ii in molecule_types])
## From group
@@ -565,7 +561,7 @@ def get_atom_index_from_group(item, indices='all'):
for ii in indices_aux:
mask = (target_index_from_atom==ii)
- output.append(np.unique(attribute_from_atom[mask]))
+ output.append(np.unique(attribute_from_atom[mask]).tolist())
del(indices_aux, attribute_from_atom, target_index_from_atom)
@@ -574,7 +570,7 @@ def get_atom_index_from_group(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_id_from_group(item, indices='all'):
@@ -596,7 +592,7 @@ def get_atom_id_from_group(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_name_from_group(item, indices='all'):
@@ -618,7 +614,7 @@ def get_atom_name_from_group(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_type_from_group(item, indices='all'):
@@ -640,7 +636,7 @@ def get_atom_type_from_group(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_index_from_group(item, indices='all'):
@@ -654,7 +650,7 @@ def get_group_index_from_group(item, indices='all'):
else:
output = np.array(indices, dtype=int)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_index_from_group(item, indices='all'):
@@ -668,7 +664,7 @@ def get_component_index_from_group(item, indices='all'):
del(atom_index_from_target, first_atom_index_from_target)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_id_from_group(item, indices='all'):
@@ -682,7 +678,7 @@ def get_component_id_from_group(item, indices='all'):
aux_dict = dict(zip(aux_unique_indices, aux_vals))
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_name_from_group(item, indices='all'):
@@ -696,7 +692,7 @@ def get_component_name_from_group(item, indices='all'):
aux_dict = dict(zip(aux_unique_indices, aux_vals))
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_type_from_group(item, indices='all'):
@@ -710,7 +706,7 @@ def get_component_type_from_group(item, indices='all'):
aux_dict = dict(zip(aux_unique_indices, aux_vals))
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_index_from_group(item, indices='all'):
@@ -724,7 +720,7 @@ def get_chain_index_from_group(item, indices='all'):
del(atom_index_from_target, first_atom_index_from_target)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_id_from_group(item, indices='all'):
@@ -738,7 +734,7 @@ def get_chain_id_from_group(item, indices='all'):
aux_dict = dict(zip(aux_unique_indices, aux_vals))
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_name_from_group(item, indices='all'):
@@ -752,7 +748,7 @@ def get_chain_name_from_group(item, indices='all'):
aux_dict = dict(zip(aux_unique_indices, aux_vals))
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_type_from_group(item, indices='all'):
@@ -766,7 +762,7 @@ def get_chain_type_from_group(item, indices='all'):
aux_dict = dict(zip(aux_unique_indices, aux_vals))
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_index_from_group(item, indices='all'):
@@ -780,7 +776,7 @@ def get_molecule_index_from_group(item, indices='all'):
del(atom_index_from_target, first_atom_index_from_target)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_id_from_group(item, indices='all'):
@@ -794,7 +790,7 @@ def get_molecule_id_from_group(item, indices='all'):
aux_dict = dict(zip(aux_unique_indices, aux_vals))
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_name_from_group(item, indices='all'):
@@ -808,7 +804,7 @@ def get_molecule_name_from_group(item, indices='all'):
aux_dict = dict(zip(aux_unique_indices, aux_vals))
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_type_from_group(item, indices='all'):
@@ -822,7 +818,7 @@ def get_molecule_type_from_group(item, indices='all'):
aux_dict = dict(zip(aux_unique_indices, aux_vals))
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_index_from_group(item, indices='all'):
@@ -836,7 +832,7 @@ def get_entity_index_from_group(item, indices='all'):
del(atom_index_from_target, first_atom_index_from_target)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_id_from_group(item, indices='all'):
@@ -850,7 +846,7 @@ def get_entity_id_from_group(item, indices='all'):
aux_dict = dict(zip(aux_unique_indices, aux_vals))
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_name_from_group(item, indices='all'):
@@ -864,7 +860,7 @@ def get_entity_name_from_group(item, indices='all'):
aux_dict = dict(zip(aux_unique_indices, aux_vals))
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_type_from_group(item, indices='all'):
@@ -878,7 +874,7 @@ def get_entity_type_from_group(item, indices='all'):
aux_dict = dict(zip(aux_unique_indices, aux_vals))
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_n_atoms_from_group(item, indices='all'):
@@ -974,7 +970,7 @@ def get_n_bonds_from_group(item, indices='all'):
for aux_indices in atom_indices:
aux_val = get_n_bonds_from_atom(item, indices=aux_indices)
output.append(np.sum(aux_val))
- return np.array(output)
+ return output
@digest(form=form)
def get_n_inner_bonds_from_group(item, indices='all'):
@@ -987,7 +983,7 @@ def get_n_inner_bonds_from_group(item, indices='all'):
for aux_indices in atom_indices:
aux_val = get_n_inner_bonds_from_atom(item, indices=aux_indices)
output.append(np.sum(aux_val))
- return np.array(output)
+ return output
@digest(form=form)
def get_formal_charge_from_group(item, indices='all'):
@@ -1020,23 +1016,21 @@ def get_partial_charge_from_group(item, indices='all'):
charges = get_partial_charge_from_atom(item, atom_indices)
output.append(np.sum(charges))
- output = np.array(output)
-
return output
@digest(form=form)
-def get_n_aminoacids_from_group(item, indices='all'):
+def get_n_amino_acids_from_group(item, indices='all'):
group_types = get_group_type_from_group(item, indices=indices)
- return (group_types=='aminoacid').sum()
+ return sum([ii=='amino acid' for ii in group_types])
@digest(form=form)
def get_n_nucleotides_from_group(item, indices='all'):
group_types = get_group_type_from_group(item, indices=indices)
- return (group_types=='nucleotide').sum()
+ return sum([ii=='nucleotide' for ii in group_types])
@digest(form=form)
def get_n_ions_from_group(item, indices='all'):
@@ -1045,7 +1039,7 @@ def get_n_ions_from_group(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='ion').sum()
+ return sum([ii=='ion' for ii in molecule_types])
@digest(form=form)
def get_n_waters_from_group(item, indices='all'):
@@ -1054,7 +1048,7 @@ def get_n_waters_from_group(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='water').sum()
+ return sum([ii=='water' for ii in molecule_types])
@digest(form=form)
def get_n_small_molecules_from_group(item, indices='all'):
@@ -1063,7 +1057,7 @@ def get_n_small_molecules_from_group(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='small molecule').sum()
+ return sum([ii=='small molecule' for ii in molecule_types])
@digest(form=form)
def get_n_peptides_from_group(item, indices='all'):
@@ -1072,7 +1066,7 @@ def get_n_peptides_from_group(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='peptide').sum()
+ return sum([ii=='peptide' for ii in molecule_types])
@digest(form=form)
def get_n_proteins_from_group(item, indices='all'):
@@ -1081,7 +1075,7 @@ def get_n_proteins_from_group(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='protein').sum()
+ return sum([ii=='protein' for ii in molecule_types])
@digest(form=form)
def get_n_dnas_from_group(item, indices='all'):
@@ -1090,7 +1084,7 @@ def get_n_dnas_from_group(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='dna').sum()
+ return sum([ii=='dna' for ii in molecule_types])
@digest(form=form)
def get_n_rnas_from_group(item, indices='all'):
@@ -1099,7 +1093,7 @@ def get_n_rnas_from_group(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='rna').sum()
+ return sum([ii=='rna' for ii in molecule_types])
@digest(form=form)
def get_n_lipids_from_group(item, indices='all'):
@@ -1108,7 +1102,7 @@ def get_n_lipids_from_group(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='lipid').sum()
+ return sum([ii=='lipid' for ii in molecule_types])
@digest(form=form)
def get_n_oligosaccharides_from_group(item, indices='all'):
@@ -1117,7 +1111,7 @@ def get_n_oligosaccharides_from_group(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='oligosaccharide').sum()
+ return sum([ii=='oligosaccharide' for ii in molecule_types])
@digest(form=form)
def get_n_saccharides_from_group(item, indices='all'):
@@ -1126,7 +1120,7 @@ def get_n_saccharides_from_group(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='saccharide').sum()
+ return sum([ii=='saccharide' for ii in molecule_types])
## From component
@@ -1154,7 +1148,7 @@ def get_atom_index_from_component(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_id_from_component(item, indices='all'):
@@ -1176,7 +1170,7 @@ def get_atom_id_from_component(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_name_from_component(item, indices='all'):
@@ -1198,7 +1192,7 @@ def get_atom_name_from_component(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_type_from_component(item, indices='all'):
@@ -1220,7 +1214,7 @@ def get_atom_type_from_component(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_index_from_component(item, indices='all'):
@@ -1245,7 +1239,7 @@ def get_group_index_from_component(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_id_from_component(item, indices='all'):
@@ -1267,7 +1261,7 @@ def get_group_id_from_component(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_name_from_component(item, indices='all'):
@@ -1289,7 +1283,7 @@ def get_group_name_from_component(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_type_from_component(item, indices='all'):
@@ -1311,7 +1305,7 @@ def get_group_type_from_component(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_index_from_component(item, indices='all'):
@@ -1325,7 +1319,7 @@ def get_component_index_from_component(item, indices='all'):
else:
output = np.array(indices, dtype=int)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_index_from_component(item, indices='all'):
@@ -1339,7 +1333,7 @@ def get_chain_index_from_component(item, indices='all'):
del(atom_index_from_target, first_atom_index_from_target)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_id_from_component(item, indices='all'):
@@ -1354,7 +1348,7 @@ def get_chain_id_from_component(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_name_from_component(item, indices='all'):
@@ -1369,7 +1363,7 @@ def get_chain_name_from_component(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_type_from_component(item, indices='all'):
@@ -1384,7 +1378,7 @@ def get_chain_type_from_component(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_index_from_component(item, indices='all'):
@@ -1398,7 +1392,7 @@ def get_molecule_index_from_component(item, indices='all'):
del(atom_index_from_target, first_atom_index_from_target)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_id_from_component(item, indices='all'):
@@ -1413,7 +1407,7 @@ def get_molecule_id_from_component(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_name_from_component(item, indices='all'):
@@ -1428,7 +1422,7 @@ def get_molecule_name_from_component(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_type_from_component(item, indices='all'):
@@ -1443,7 +1437,7 @@ def get_molecule_type_from_component(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_index_from_component(item, indices='all'):
@@ -1457,7 +1451,7 @@ def get_entity_index_from_component(item, indices='all'):
del(atom_index_from_target, first_atom_index_from_target)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_id_from_component(item, indices='all'):
@@ -1472,7 +1466,7 @@ def get_entity_id_from_component(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_name_from_component(item, indices='all'):
@@ -1487,7 +1481,7 @@ def get_entity_name_from_component(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_type_from_component(item, indices='all'):
@@ -1502,7 +1496,7 @@ def get_entity_type_from_component(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_n_atoms_from_component(item, indices='all'):
@@ -1512,7 +1506,6 @@ def get_n_atoms_from_component(item, indices='all'):
output = get_atom_index_from_component(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -1523,7 +1516,6 @@ def get_n_groups_from_component(item, indices='all'):
output = get_group_index_from_component(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -1595,7 +1587,7 @@ def get_n_bonds_from_component(item, indices='all'):
for aux_indices in atom_indices:
aux_val = get_n_bonds_from_atom(item, indices=aux_indices)
output.append(np.sum(aux_val))
- return np.array(output)
+ return output
@digest(form=form)
def get_n_inner_bonds_from_component(item, indices='all'):
@@ -1608,7 +1600,7 @@ def get_n_inner_bonds_from_component(item, indices='all'):
for aux_indices in atom_indices:
aux_val = get_n_inner_bonds_from_atom(item, indices=aux_indices)
output.append(np.sum(aux_val))
- return np.array(output)
+ return output
@digest(form=form)
def get_formal_charge_from_component(item, indices='all'):
@@ -1643,13 +1635,13 @@ def get_partial_charge_from_group(item, indices='all'):
return output
@digest(form=form)
-def get_n_aminoacids_from_component(item, indices='all'):
+def get_n_amino_acids_from_component(item, indices='all'):
group_indices = get_group_index_from_component(item, indices=indices)
group_indices = np.unique(group_indices).shape[0]
group_types = get_group_type_from_group(item, indices=group_indices)
- return (group_types=='aminoacid').sum()
+ return sum([ii=='amino acid' for ii in group_types])
@digest(form=form)
def get_n_nucleotides_from_component(item, indices='all'):
@@ -1658,7 +1650,7 @@ def get_n_nucleotides_from_component(item, indices='all'):
group_indices = np.unique(group_indices).shape[0]
group_types = get_group_type_from_group(item, indices=group_indices)
- return (group_types=='nucleotide').sum()
+ return sum([ii=='nucleotide' for ii in group_types])
@digest(form=form)
def get_n_ions_from_component(item, indices='all'):
@@ -1667,7 +1659,7 @@ def get_n_ions_from_component(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='ion').sum()
+ return sum([ii=='ion' for ii in molecule_types])
@digest(form=form)
def get_n_waters_from_component(item, indices='all'):
@@ -1676,7 +1668,7 @@ def get_n_waters_from_component(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='water').sum()
+ return sum([ii=='water' for ii in molecule_types])
@digest(form=form)
def get_n_small_molecules_from_component(item, indices='all'):
@@ -1685,7 +1677,7 @@ def get_n_small_molecules_from_component(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='small molecule').sum()
+ return sum([ii=='small molecule' for ii in molecule_types])
@digest(form=form)
def get_n_peptides_from_component(item, indices='all'):
@@ -1694,7 +1686,7 @@ def get_n_peptides_from_component(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='peptide').sum()
+ return sum([ii=='peptide' for ii in molecule_types])
@digest(form=form)
def get_n_proteins_from_component(item, indices='all'):
@@ -1703,7 +1695,7 @@ def get_n_proteins_from_component(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='protein').sum()
+ return sum([ii=='protein' for ii in molecule_types])
@digest(form=form)
def get_n_dnas_from_component(item, indices='all'):
@@ -1712,7 +1704,7 @@ def get_n_dnas_from_component(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='dna').sum()
+ return sum([ii=='dna' for ii in molecule_types])
@digest(form=form)
def get_n_rnas_from_component(item, indices='all'):
@@ -1721,7 +1713,7 @@ def get_n_rnas_from_component(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='rna').sum()
+ return sum([ii=='rna' for ii in molecule_types])
@digest(form=form)
def get_n_lipids_from_component(item, indices='all'):
@@ -1730,7 +1722,7 @@ def get_n_lipids_from_component(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='lipid').sum()
+ return sum([ii=='lipid' for ii in molecule_types])
@digest(form=form)
def get_n_oligosaccharides_from_component(item, indices='all'):
@@ -1739,7 +1731,7 @@ def get_n_oligosaccharides_from_component(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='oligosaccharide').sum()
+ return sum([ii=='oligosaccharide' for ii in molecule_types])
@digest(form=form)
def get_n_saccharides_from_component(item, indices='all'):
@@ -1748,7 +1740,7 @@ def get_n_saccharides_from_component(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='saccharide').sum()
+ return sum([ii=='saccharide' for ii in molecule_types])
## molecule
@@ -1776,7 +1768,7 @@ def get_atom_index_from_molecule(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_id_from_molecule(item, indices='all'):
@@ -1798,7 +1790,7 @@ def get_atom_id_from_molecule(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_name_from_molecule(item, indices='all'):
@@ -1820,7 +1812,7 @@ def get_atom_name_from_molecule(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_type_from_molecule(item, indices='all'):
@@ -1842,7 +1834,7 @@ def get_atom_type_from_molecule(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_index_from_molecule(item, indices='all'):
@@ -1867,7 +1859,7 @@ def get_group_index_from_molecule(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_id_from_molecule(item, indices='all'):
@@ -1889,7 +1881,7 @@ def get_group_id_from_molecule(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_name_from_molecule(item, indices='all'):
@@ -1911,7 +1903,7 @@ def get_group_name_from_molecule(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_type_from_molecule(item, indices='all'):
@@ -1933,7 +1925,7 @@ def get_group_type_from_molecule(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_index_from_molecule(item, indices='all'):
@@ -1958,7 +1950,7 @@ def get_component_index_from_molecule(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_id_from_molecule(item, indices='all'):
@@ -1980,7 +1972,7 @@ def get_component_id_from_molecule(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_name_from_molecule(item, indices='all'):
@@ -2002,7 +1994,7 @@ def get_component_name_from_molecule(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_type_from_molecule(item, indices='all'):
@@ -2024,7 +2016,7 @@ def get_component_type_from_molecule(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_index_from_molecule(item, indices='all'):
@@ -2049,7 +2041,7 @@ def get_chain_index_from_molecule(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_id_from_molecule(item, indices='all'):
@@ -2071,7 +2063,7 @@ def get_chain_id_from_molecule(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_name_from_molecule(item, indices='all'):
@@ -2093,7 +2085,7 @@ def get_chain_name_from_molecule(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_type_from_molecule(item, indices='all'):
@@ -2115,7 +2107,7 @@ def get_chain_type_from_molecule(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_index_from_molecule(item, indices='all'):
@@ -2129,7 +2121,7 @@ def get_molecule_index_from_molecule(item, indices='all'):
else:
output = np.array(indices, dtype=int)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_index_from_molecule(item, indices='all'):
@@ -2158,7 +2150,7 @@ def get_entity_id_from_molecule(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_name_from_molecule(item, indices='all'):
@@ -2173,7 +2165,7 @@ def get_entity_name_from_molecule(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_type_from_molecule(item, indices='all'):
@@ -2188,7 +2180,7 @@ def get_entity_type_from_molecule(item, indices='all'):
output = np.vectorize(aux_dict.__getitem__)(aux_indices)
del(aux_indices, aux_unique_indices, aux_vals, aux_dict)
- return output
+ return output.tolist()
@digest(form=form)
def get_n_atoms_from_molecule(item, indices='all'):
@@ -2198,7 +2190,6 @@ def get_n_atoms_from_molecule(item, indices='all'):
output = get_atom_index_from_molecule(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -2209,7 +2200,6 @@ def get_n_groups_from_molecule(item, indices='all'):
output = get_group_index_from_molecule(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -2220,7 +2210,6 @@ def get_n_components_from_molecule(item, indices='all'):
output = get_component_index_from_molecule(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -2244,7 +2233,6 @@ def get_n_chains_from_molecule(item, indices='all'):
output = get_chain_index_from_molecule(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -2275,7 +2263,7 @@ def get_n_bonds_from_molecule(item, indices='all'):
for aux_indices in atom_indices:
aux_val = get_n_bonds_from_atom(item, indices=aux_indices)
output.append(np.sum(aux_val))
- return np.array(output)
+ return output
@digest(form=form)
def get_n_inner_bonds_from_molecule(item, indices='all'):
@@ -2288,7 +2276,7 @@ def get_n_inner_bonds_from_molecule(item, indices='all'):
for aux_indices in atom_indices:
aux_val = get_n_inner_bonds_from_atom(item, indices=aux_indices)
output.append(np.sum(aux_val))
- return np.array(output)
+ return output
@digest(form=form)
def get_formal_charge_from_molecule(item, indices='all'):
@@ -2302,8 +2290,6 @@ def get_formal_charge_from_molecule(item, indices='all'):
charges = get_formal_charge_from_atom(item, atom_indices)
output.append(np.sum(charges))
- output = np.array(output)
-
return output
@digest(form=form)
@@ -2318,18 +2304,16 @@ def get_partial_charge_from_molecule(item, indices='all'):
charges = get_partial_charge_from_atom(item, atom_indices)
output.append(np.sum(charges))
- output = np.array(output)
-
return output
@digest(form=form)
-def get_n_aminoacids_from_molecule(item, indices='all'):
+def get_n_amino_acids_from_molecule(item, indices='all'):
group_indices = get_group_index_from_molecule(item, indices=indices)
group_indices = np.unique(group_indices).shape[0]
group_types = get_group_type_from_group(item, indices=group_indices)
- return (group_types=='aminoacid').sum()
+ return sum([ii=='amino acid' for ii in group_types])
@digest(form=form)
def get_n_nucleotides_from_molecule(item, indices='all'):
@@ -2338,77 +2322,77 @@ def get_n_nucleotides_from_molecule(item, indices='all'):
group_indices = np.unique(group_indices).shape[0]
group_types = get_group_type_from_group(item, indices=group_indices)
- return (group_types=='nucleotide').sum()
+ return sum([ii=='nucleotide' for ii in group_types])
@digest(form=form)
def get_n_ions_from_molecule(item, indices='all'):
molecule_types = get_molecule_type_from_molecule(item, indices=indices)
- return (molecule_types=='ion').sum()
+ return sum([ii=='ion' for ii in molecule_types])
@digest(form=form)
def get_n_waters_from_molecule(item, indices='all'):
molecule_types = get_molecule_type_from_molecule(item, indices=indices)
- return (molecule_types=='water').sum()
+ return sum([ii=='water' for ii in molecule_types])
@digest(form=form)
def get_n_small_molecules_from_molecule(item, indices='all'):
molecule_types = get_molecule_type_from_molecule(item, indices=indices)
- return (molecule_types=='small molecule').sum()
+ return sum([ii=='small molecule' for ii in molecule_types])
@digest(form=form)
def get_n_peptides_from_molecule(item, indices='all'):
molecule_types = get_molecule_type_from_molecule(item, indices=indices)
- return (molecule_types=='peptide').sum()
+ return sum([ii=='peptide' for ii in molecule_types])
@digest(form=form)
def get_n_proteins_from_molecule(item, indices='all'):
molecule_types = get_molecule_type_from_molecule(item, indices=indices)
- return (molecule_types=='protein').sum()
+ return sum([ii=='protein' for ii in molecule_types])
@digest(form=form)
def get_n_dnas_from_molecule(item, indices='all'):
molecule_types = get_molecule_type_from_molecule(item, indices=indices)
- return (molecule_types=='dna').sum()
+ return sum([ii=='dna' for ii in molecule_types])
@digest(form=form)
def get_n_rnas_from_molecule(item, indices='all'):
molecule_types = get_molecule_type_from_molecule(item, indices=indices)
- return (molecule_types=='rna').sum()
+ return sum([ii=='rna' for ii in molecule_types])
@digest(form=form)
def get_n_lipids_from_molecule(item, indices='all'):
molecule_types = get_molecule_type_from_molecule(item, indices=indices)
- return (molecule_types=='lipid').sum()
+ return sum([ii=='lipid' for ii in molecule_types])
@digest(form=form)
def get_n_oligosaccharides_from_molecule(item, indices='all'):
molecule_types = get_molecule_type_from_molecule(item, indices=indices)
- return (molecule_types=='oligosaccharide').sum()
+ return sum([ii=='oligosaccharide' for ii in molecule_types])
@digest(form=form)
def get_n_saccharides_from_molecule(item, indices='all'):
molecule_types = get_molecule_type_from_molecule(item, indices=indices)
- return (molecule_types=='saccharide').sum()
+ return sum([ii=='saccharide' for ii in molecule_types])
## chain
@@ -2436,7 +2420,7 @@ def get_atom_index_from_chain(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_id_from_chain(item, indices='all'):
@@ -2458,7 +2442,7 @@ def get_atom_id_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_name_from_chain(item, indices='all'):
@@ -2480,7 +2464,7 @@ def get_atom_name_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_type_from_chain(item, indices='all'):
@@ -2502,7 +2486,7 @@ def get_atom_type_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_index_from_chain(item, indices='all'):
@@ -2527,7 +2511,7 @@ def get_group_index_from_chain(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_id_from_chain(item, indices='all'):
@@ -2549,7 +2533,7 @@ def get_group_id_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_name_from_chain(item, indices='all'):
@@ -2571,7 +2555,7 @@ def get_group_name_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_group_type_from_chain(item, indices='all'):
@@ -2593,7 +2577,7 @@ def get_group_type_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_index_from_chain(item, indices='all'):
@@ -2618,7 +2602,7 @@ def get_component_index_from_chain(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_id_from_chain(item, indices='all'):
@@ -2640,7 +2624,7 @@ def get_component_id_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_name_from_chain(item, indices='all'):
@@ -2662,7 +2646,7 @@ def get_component_name_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_component_type_from_chain(item, indices='all'):
@@ -2684,7 +2668,7 @@ def get_component_type_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_chain_index_from_chain(item, indices='all'):
@@ -2698,7 +2682,7 @@ def get_chain_index_from_chain(item, indices='all'):
else:
output = np.array(indices, dtype=int)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_index_from_chain(item, indices='all'):
@@ -2723,7 +2707,7 @@ def get_molecule_index_from_chain(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_id_from_chain(item, indices='all'):
@@ -2745,7 +2729,7 @@ def get_molecule_id_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_name_from_chain(item, indices='all'):
@@ -2767,7 +2751,7 @@ def get_molecule_name_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_molecule_type_from_chain(item, indices='all'):
@@ -2789,7 +2773,7 @@ def get_molecule_type_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_index_from_chain(item, indices='all'):
@@ -2814,7 +2798,7 @@ def get_entity_index_from_chain(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_id_from_chain(item, indices='all'):
@@ -2836,7 +2820,7 @@ def get_entity_id_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_name_from_chain(item, indices='all'):
@@ -2858,7 +2842,7 @@ def get_entity_name_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_entity_type_from_chain(item, indices='all'):
@@ -2880,7 +2864,7 @@ def get_entity_type_from_chain(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
@digest(form=form)
def get_n_atoms_from_chain(item, indices='all'):
@@ -2890,7 +2874,6 @@ def get_n_atoms_from_chain(item, indices='all'):
output = get_atom_index_from_chain(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -2901,7 +2884,6 @@ def get_n_groups_from_chain(item, indices='all'):
output = get_group_index_from_chain(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -2912,7 +2894,6 @@ def get_n_components_from_chain(item, indices='all'):
output = get_component_index_from_chain(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -2923,7 +2904,6 @@ def get_n_molecules_from_chain(item, indices='all'):
output = get_molecule_index_from_chain(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -2967,7 +2947,7 @@ def get_n_bonds_from_chain(item, indices='all'):
for aux_indices in atom_indices:
aux_val = get_n_bonds_from_atom(item, indices=aux_indices)
output.append(np.sum(aux_val))
- return np.array(output)
+ return output
@digest(form=form)
def get_n_inner_bonds_from_chain(item, indices='all'):
@@ -2980,7 +2960,7 @@ def get_n_inner_bonds_from_chain(item, indices='all'):
for aux_indices in atom_indices:
aux_val = get_n_inner_bonds_from_atom(item, indices=aux_indices)
output.append(np.sum(aux_val))
- return np.array(output)
+ return output
@digest(form=form)
def get_formal_charge_from_chain(item, indices='all'):
@@ -3015,13 +2995,13 @@ def get_partial_charge_from_chain(item, indices='all'):
return output
@digest(form=form)
-def get_n_aminoacids_from_chain(item, indices='all'):
+def get_n_amino_acids_from_chain(item, indices='all'):
group_indices = get_group_index_from_chain(item, indices=indices)
group_indices = np.unique(group_indices).shape[0]
group_types = get_group_type_from_group(item, indices=group_indices)
- return (group_types=='aminoacid').sum()
+ return sum([ii=='amino acid' for ii in group_types])
@digest(form=form)
def get_n_nucleotides_from_chain(item, indices='all'):
@@ -3030,7 +3010,7 @@ def get_n_nucleotides_from_chain(item, indices='all'):
group_indices = np.unique(group_indices).shape[0]
group_types = get_group_type_from_group(item, indices=group_indices)
- return (group_types=='nucleotide').sum()
+ return sum([ii=='nucleotide' for ii in group_types])
@digest(form=form)
def get_n_ions_from_chain(item, indices='all'):
@@ -3039,7 +3019,7 @@ def get_n_ions_from_chain(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='ion').sum()
+ return sum([ii=='ion' for ii in molecule_types])
@digest(form=form)
def get_n_waters_from_chain(item, indices='all'):
@@ -3048,7 +3028,7 @@ def get_n_waters_from_chain(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='water').sum()
+ return sum([ii=='water' for ii in molecule_types])
@digest(form=form)
def get_n_small_molecules_from_chain(item, indices='all'):
@@ -3057,7 +3037,7 @@ def get_n_small_molecules_from_chain(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='small molecule').sum()
+ return sum([ii=='small molecule' for ii in molecule_types])
@digest(form=form)
def get_n_peptides_from_chain(item, indices='all'):
@@ -3066,7 +3046,7 @@ def get_n_peptides_from_chain(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='peptide').sum()
+ return sum([ii=='peptide' for ii in molecule_types])
@digest(form=form)
def get_n_proteins_from_chain(item, indices='all'):
@@ -3075,7 +3055,7 @@ def get_n_proteins_from_chain(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='protein').sum()
+ return sum([ii=='protein' for ii in molecule_types])
@digest(form=form)
def get_n_dnas_from_chain(item, indices='all'):
@@ -3084,7 +3064,7 @@ def get_n_dnas_from_chain(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='dna').sum()
+ return sum([ii=='dna' for ii in molecule_types])
@digest(form=form)
def get_n_rnas_from_chain(item, indices='all'):
@@ -3093,7 +3073,7 @@ def get_n_rnas_from_chain(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='rna').sum()
+ return sum([ii=='rna' for ii in molecule_types])
@digest(form=form)
def get_n_lipids_from_chain(item, indices='all'):
@@ -3102,7 +3082,7 @@ def get_n_lipids_from_chain(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='lipid').sum()
+ return sum([ii=='lipid' for ii in molecule_types])
@digest(form=form)
def get_n_oligosaccharides_from_chain(item, indices='all'):
@@ -3111,7 +3091,7 @@ def get_n_oligosaccharides_from_chain(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='oligosaccharide').sum()
+ return sum([ii=='oligosaccharide' for ii in molecule_types])
@digest(form=form)
def get_n_saccharides_from_chain(item, indices='all'):
@@ -3120,7 +3100,7 @@ def get_n_saccharides_from_chain(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='saccharide').sum()
+ return sum([ii=='saccharide' for ii in molecule_types])
## From entity
@@ -3148,7 +3128,7 @@ def get_atom_index_from_entity(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
@digest(form=form)
def get_atom_id_from_entity(item, indices='all'):
@@ -3170,7 +3150,8 @@ def get_atom_id_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_atom_name_from_entity(item, indices='all'):
@@ -3192,7 +3173,8 @@ def get_atom_name_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_atom_type_from_entity(item, indices='all'):
@@ -3214,7 +3196,8 @@ def get_atom_type_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_group_index_from_entity(item, indices='all'):
@@ -3239,7 +3222,8 @@ def get_group_index_from_entity(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_group_id_from_entity(item, indices='all'):
@@ -3261,7 +3245,8 @@ def get_group_id_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_group_name_from_entity(item, indices='all'):
@@ -3283,7 +3268,8 @@ def get_group_name_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_group_type_from_entity(item, indices='all'):
@@ -3305,7 +3291,8 @@ def get_group_type_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_component_index_from_entity(item, indices='all'):
@@ -3330,7 +3317,8 @@ def get_component_index_from_entity(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_component_id_from_entity(item, indices='all'):
@@ -3352,7 +3340,8 @@ def get_component_id_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_component_name_from_entity(item, indices='all'):
@@ -3374,7 +3363,8 @@ def get_component_name_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_component_type_from_entity(item, indices='all'):
@@ -3396,7 +3386,8 @@ def get_component_type_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_chain_index_from_entity(item, indices='all'):
@@ -3421,7 +3412,8 @@ def get_chain_index_from_entity(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_chain_id_from_entity(item, indices='all'):
@@ -3443,7 +3435,8 @@ def get_chain_id_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_chain_name_from_entity(item, indices='all'):
@@ -3465,7 +3458,8 @@ def get_chain_name_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_chain_type_from_entity(item, indices='all'):
@@ -3487,7 +3481,8 @@ def get_chain_type_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_molecule_index_from_entity(item, indices='all'):
@@ -3512,7 +3507,8 @@ def get_molecule_index_from_entity(item, indices='all'):
else:
output = np.array(output, dtype=object)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_molecule_id_from_entity(item, indices='all'):
@@ -3534,7 +3530,8 @@ def get_molecule_id_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_molecule_name_from_entity(item, indices='all'):
@@ -3556,7 +3553,8 @@ def get_molecule_name_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_molecule_type_from_entity(item, indices='all'):
@@ -3578,7 +3576,8 @@ def get_molecule_type_from_entity(item, indices='all'):
del(aux_indices)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_entity_index_from_entity(item, indices='all'):
@@ -3592,7 +3591,8 @@ def get_entity_index_from_entity(item, indices='all'):
else:
output = np.array(indices, dtype=int)
- return output
+ return output.tolist()
+
@digest(form=form)
def get_n_atoms_from_entity(item, indices='all'):
@@ -3602,7 +3602,6 @@ def get_n_atoms_from_entity(item, indices='all'):
output = get_atom_index_from_entity(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -3613,7 +3612,6 @@ def get_n_groups_from_entity(item, indices='all'):
output = get_group_index_from_entity(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -3624,7 +3622,6 @@ def get_n_components_from_entity(item, indices='all'):
output = get_component_index_from_entity(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -3635,7 +3632,6 @@ def get_n_molecules_from_entity(item, indices='all'):
output = get_molecule_index_from_entity(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -3646,7 +3642,6 @@ def get_n_chains_from_entity(item, indices='all'):
output = get_chain_index_from_entity(item, indices=indices)
output = [ii.shape[0] for ii in output]
- output = np.array(output)
return output
@digest(form=form)
@@ -3676,7 +3671,7 @@ def get_n_bonds_from_entity(item, indices='all'):
for aux_indices in atom_indices:
aux_val = get_n_bonds_from_atom(item, indices=aux_indices)
output.append(np.sum(aux_val))
- return np.array(output)
+ return output
@digest(form=form)
def get_n_inner_bonds_from_entity(item, indices='all'):
@@ -3689,7 +3684,7 @@ def get_n_inner_bonds_from_entity(item, indices='all'):
for aux_indices in atom_indices:
aux_val = get_n_inner_bonds_from_atom(item, indices=aux_indices)
output.append(np.sum(aux_val))
- return np.array(output)
+ return output
@digest(form=form)
def get_formal_charge_from_entity(item, indices='all'):
@@ -3724,13 +3719,13 @@ def get_partial_charge_from_entity(item, indices='all'):
return output
@digest(form=form)
-def get_n_aminoacids_from_entity(item, indices='all'):
+def get_n_amino_acids_from_entity(item, indices='all'):
group_indices = get_group_index_from_entity(item, indices=indices)
group_indices = np.unique(group_indices).shape[0]
group_types = get_group_type_from_group(item, indices=group_indices)
- return (group_types=='aminoacid').sum()
+ return sum([ii=='amino acid' for ii in molecule_types])
@digest(form=form)
def get_n_nucleotides_from_entity(item, indices='all'):
@@ -3739,7 +3734,7 @@ def get_n_nucleotides_from_entity(item, indices='all'):
group_indices = np.unique(group_indices).shape[0]
group_types = get_group_type_from_group(item, indices=group_indices)
- return (group_types=='nucleotide').sum()
+ return sum([ii=='nucleotide' for ii in molecule_types])
@digest(form=form)
def get_n_ions_from_entity(item, indices='all'):
@@ -3748,7 +3743,7 @@ def get_n_ions_from_entity(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='ion').sum()
+ return sum([ii=='ion' for ii in molecule_types])
@digest(form=form)
def get_n_waters_from_entity(item, indices='all'):
@@ -3757,7 +3752,7 @@ def get_n_waters_from_entity(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='water').sum()
+ return sum([ii=='water' for ii in molecule_types])
@digest(form=form)
def get_n_small_molecules_from_entity(item, indices='all'):
@@ -3766,7 +3761,7 @@ def get_n_small_molecules_from_entity(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='small molecule').sum()
+ return sum([ii=='small molecule' for ii in molecule_types])
@digest(form=form)
def get_n_peptides_from_entity(item, indices='all'):
@@ -3775,7 +3770,7 @@ def get_n_peptides_from_entity(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='peptide').sum()
+ return sum([ii=='peptide' for ii in molecule_types])
@digest(form=form)
def get_n_proteins_from_entity(item, indices='all'):
@@ -3784,7 +3779,7 @@ def get_n_proteins_from_entity(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='protein').sum()
+ return sum([ii=='protein' for ii in molecule_types])
@digest(form=form)
def get_n_dnas_from_entity(item, indices='all'):
@@ -3793,7 +3788,7 @@ def get_n_dnas_from_entity(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='dna').sum()
+ return sum([ii=='dna' for ii in molecule_types])
@digest(form=form)
def get_n_rnas_from_entity(item, indices='all'):
@@ -3802,7 +3797,7 @@ def get_n_rnas_from_entity(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='rna').sum()
+ return sum([ii=='rna' for ii in molecule_types])
@digest(form=form)
def get_n_lipids_from_entity(item, indices='all'):
@@ -3811,7 +3806,7 @@ def get_n_lipids_from_entity(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='lipid').sum()
+ return sum([ii=='lipid' for ii in molecule_types])
@digest(form=form)
def get_n_oligosaccharides_from_entity(item, indices='all'):
@@ -3820,7 +3815,7 @@ def get_n_oligosaccharides_from_entity(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='oligosaccharide').sum()
+ return sum([ii=='oligosaccharide' for ii in molecule_types])
@digest(form=form)
def get_n_saccharides_from_entity(item, indices='all'):
@@ -3829,82 +3824,82 @@ def get_n_saccharides_from_entity(item, indices='all'):
molecule_indices = np.unique(molecule_indices).shape[0]
molecule_types = get_molecule_type_from_molecule(item, indices=molecule_indices)
- return (molecule_types=='saccharide').sum()
+ return sum([ii=='saccharide' for ii in molecule_types])
## system
@digest(form=form)
-def get_n_aminoacids_from_system(item):
+def get_n_amino_acids_from_system(item):
group_types = get_group_type_from_group(item)
- return (group_types=='aminoacid').sum()
+ return sum([ii=='amino acid' for ii in group_types])
@digest(form=form)
def get_n_nucleotides_from_system(item):
group_types = get_group_type_from_group(item)
- return (group_types=='nucleotide').sum()
+ return sum([ii=='nucleotide' for ii in group_types])
@digest(form=form)
def get_n_ions_from_system(item):
-
- molecule_types = get_group_type_from_group(item)
- return (molecule_types=='ion').sum()
+
+ group_types = get_group_type_from_group(item)
+ return sum([ii=='ion' for ii in group_types])
@digest(form=form)
def get_n_waters_from_system(item):
- molecule_types = get_group_type_from_group(item)
- return (molecule_types=='water').sum()
+ group_types = get_group_type_from_group(item)
+ return sum([ii=='water' for ii in group_types])
@digest(form=form)
def get_n_small_molecules_from_system(item):
- molecule_types = get_group_type_from_group(item)
- return (molecule_types=='small molecule').sum()
+ group_types = get_group_type_from_group(item)
+ return sum([ii=='small molecule' for ii in group_types])
@digest(form=form)
def get_n_peptides_from_system(item):
molecule_types = get_molecule_type_from_molecule(item)
- return (molecule_types=='peptide').sum()
+ return sum([ii=='peptide' for ii in molecule_types])
@digest(form=form)
def get_n_proteins_from_system(item):
molecule_types = get_molecule_type_from_molecule(item)
- return (molecule_types=='protein').sum()
+ return sum([ii=='protein' for ii in molecule_types])
@digest(form=form)
def get_n_dnas_from_system(item):
molecule_types = get_molecule_type_from_molecule(item)
- return (molecule_types=='dna').sum()
+ return sum([ii=='dna' for ii in molecule_types])
@digest(form=form)
def get_n_rnas_from_system(item):
molecule_types = get_molecule_type_from_molecule(item)
- return (molecule_types=='rna').sum()
+ return sum([ii=='rna' for ii in molecule_types])
@digest(form=form)
def get_n_lipids_from_system(item):
molecule_types = get_molecule_type_from_molecule(item)
- return (molecule_types=='lipid').sum()
+ return sum([ii=='lipid' for ii in molecule_types])
@digest(form=form)
def get_n_oligosaccharides_from_system(item):
molecule_types = get_molecule_type_from_molecule(item)
- return (molecule_types=='oligosaccharide').sum()
+ return sum([ii=='oligosaccharide' for ii in molecule_types])
@digest(form=form)
def get_n_saccharides_from_system(item):
molecule_types = get_molecule_type_from_molecule(item)
- return (molecule_types=='saccharide').sum()
+ return sum([ii=='saccharide' for ii in molecule_types])
@digest(form=form)
def get_coordinates_from_system(item, structure_indices='all'):
@@ -4059,7 +4054,7 @@ def get_bond_index_from_bond(item, indices='all'):
else:
output = np.array(indices, dtype=int)
- return output
+ return output.tolist()
@digest(form=form)
def get_n_bonds_from_bond(item, indices='all'):
diff --git a/molsysmt/basic/selector/molsysmt.py b/molsysmt/basic/selector/molsysmt.py
index 891b20ffa..603611a9e 100644
--- a/molsysmt/basic/selector/molsysmt.py
+++ b/molsysmt/basic/selector/molsysmt.py
@@ -326,6 +326,20 @@ def select_bonded_to(molecular_system, selection):
'entities': [],
}
+#_aux_dict_in_elements_in = {
+# 'entities': [],
+# 'chains': ['molecules',
+# 'entities'],
+# 'molecules': ['chains',
+# 'entities'],
+# 'components': ['molecules',
+# 'chains',
+# 'entities'],
+# 'groups': ['components',
+# 'molecules',
+# 'chains',
+# 'entities'],
+# }
def select_in_elements_of(molecular_system, selection):
@@ -366,25 +380,36 @@ def select_in_elements_of(molecular_system, selection):
kwarg = {_element_index[element_1]: True}
pre_output = get(molecular_system, element=element_2, selection=aafter, skip_digestion=True,
**kwarg)
- mask = get(molecular_system, element=element_1, selection=bbefore, skip_digestion=True,
- **kwarg)
- output_2 = [np.intersect1d(ii, mask) for ii in pre_output]
- output_2 = [ii for ii in output_2 if ii.shape[0] > 0]
-
- if before == '':
- before = 'all'
-
- mask = select(molecular_system, selection=before)
+ if is_all(bbefore):
+ output_2 = pre_output
+ else:
+ mask = get(molecular_system, element=element_1, selection=bbefore, skip_digestion=True,
+ **kwarg)
+ output_2 = [np.intersect1d(ii, mask).tolist() for ii in pre_output]
+ output_2 = [ii for ii in output_2 if len(ii) > 0]
output = []
- for aux_after in output_2:
+ aux_output_2 = np.concatenate(output_2).tolist()
+ pre_output = get(molecular_system, element=element_1, selection=aux_output_2, skip_digestion=True,
+ atom_index=True)
+ aux_dict = {ii:jj for ii,jj in zip(aux_output_2, pre_output)}
- pre_output = get(molecular_system, element=element_1, selection=aux_after, skip_digestion=True,
- atom_index=True)
- aux_output = [np.intersect1d(ii, mask).tolist() for ii in pre_output]
- aux_output = [ii for ii in aux_output if len(ii) > 0]
- output.append(aux_output)
+ if before == '':
+ before = 'all'
+
+ if is_all(before):
+ for aux_after in output_2:
+ pre_output = [aux_dict[ii] for ii in aux_after]
+ aux_output = [ii for ii in pre_output if len(ii) > 0]
+ output.append(aux_output)
+ else:
+ mask = select(molecular_system, selection=before)
+ for aux_after in output_2:
+ pre_output = [aux_dict[ii] for ii in aux_after]
+ aux_output = [np.intersect1d(ii, mask).tolist() for ii in pre_output]
+ aux_output = [ii for ii in aux_output if len(ii) > 0]
+ output.append(aux_output)
return output
@@ -402,7 +427,7 @@ def select_in_elements_of(molecular_system, selection):
pre_output = get(molecular_system, element=element_1, selection=after, skip_digestion=True,
atom_index=True)
- mask = select(molecular_system, selection=before, skip_digestion=True)
+ mask = select(molecular_system, selection=before)
output = [np.intersect1d(ii, mask).tolist() for ii in pre_output]
output = [ii for ii in output if len(ii) > 0]
@@ -411,27 +436,27 @@ def select_in_elements_of(molecular_system, selection):
raise NotImplementedError
-def select_in_groups_of(molecular_system, selection):
-
- from molsysmt.basic import get
-
- before, after = selection.split('in groups of')
- before = before.strip()
- after = after.strip()
-
- if before == '' or is_all(before):
-
- output = get(molecular_system, element='group', selection=after, atom_index=True)
- output = [ii for ii in output]
-
- else:
-
- pre_output = get(molecular_system, element='group', selection=after, atom_index=True)
- mask = select(molecular_system, selection=before)
- output = [np.intersect1d(ii, mask) for ii in pre_output]
- output = [ii for ii in output if ii.shape[0] > 0]
-
- return output
+#def select_in_groups_of(molecular_system, selection):
+#
+# from molsysmt.basic import get
+#
+# before, after = selection.split('in groups of')
+# before = before.strip()
+# after = after.strip()
+#
+# if before == '' or is_all(before):
+#
+# output = get(molecular_system, element='group', selection=after, atom_index=True)
+# output = [ii for ii in output]
+#
+# else:
+#
+# pre_output = get(molecular_system, element='group', selection=after, atom_index=True)
+# mask = select(molecular_system, selection=before)
+# output = [np.intersect1d(ii, mask) for ii in pre_output]
+# output = [ii for ii in output if ii.shape[0] > 0]
+#
+# return output
def selection_with_special_subsentences(selection):
diff --git a/molsysmt/element/molecule/get_molecule_type.py b/molsysmt/element/molecule/get_molecule_type.py
index 1cb503b04..33639544f 100644
--- a/molsysmt/element/molecule/get_molecule_type.py
+++ b/molsysmt/element/molecule/get_molecule_type.py
@@ -11,9 +11,10 @@ def get_molecule_type(molecular_system, element='atom', selection='all',
if redefine_indices:
-
+ print('da1')
molecule_types_from_molecule = get_component_type(molecular_system, element='component', selection=selection,
redefine_indices=True, syntax=syntax)
+ print('da2')
if element == 'atom':
aux = get(molecular_system, element='atom', selection=selection, syntax=syntax,
diff --git a/molsysmt/form/mmcif_PdbxContainers_DataContainer/to_molsysmt_MolSys.py b/molsysmt/form/mmcif_PdbxContainers_DataContainer/to_molsysmt_MolSys.py
index 5369836f9..e22a3e0a1 100644
--- a/molsysmt/form/mmcif_PdbxContainers_DataContainer/to_molsysmt_MolSys.py
+++ b/molsysmt/form/mmcif_PdbxContainers_DataContainer/to_molsysmt_MolSys.py
@@ -112,34 +112,36 @@ def to_molsysmt_MolSys(item, atom_indices='all', structure_indices='all', skip_d
atom_names = atom_name_array[aux_atom_indices]
group_name = group_name_array[group_index]
- dict_aux = {ii:jj for ii,jj in zip(atom_names,aux_atom_indices)}
- dict_mask = {ii:False for ii in atom_names}
+ if group_name in bonds_intra_group:
- aux_atom_pairs_bonded = []
+ dict_aux = {ii:jj for ii,jj in zip(atom_names,aux_atom_indices)}
+ dict_mask = {ii:False for ii in atom_names}
- for at1, at2 in bonds_intra_group[group_name]:
- try:
- aux_atom_pairs_bonded.append(sorted([dict_aux[at1],dict_aux[at2]]))
- dict_mask[at1]=True
- dict_mask[at2]=True
- except:
- pass
+ aux_atom_pairs_bonded = []
- remains = [ii for ii,jj in dict_mask.items() if not jj]
-
- if len(remains):
- if set(remains)==set(['H1','H3']):
- for at1, at2 in [['N', 'H1'], ['N', 'H3']]:
+ for at1, at2 in bonds_intra_group[group_name]:
+ try:
aux_atom_pairs_bonded.append(sorted([dict_aux[at1],dict_aux[at2]]))
- atom_pairs_bonded += aux_atom_pairs_bonded
- elif len(aux_atom_indices)==1:
- atom_pairs_bonded += []
+ dict_mask[at1]=True
+ dict_mask[at2]=True
+ except:
+ pass
+
+ remains = [ii for ii,jj in dict_mask.items() if not jj]
+
+ if len(remains):
+ if set(remains)==set(['H1','H3']):
+ for at1, at2 in [['N', 'H1'], ['N', 'H3']]:
+ aux_atom_pairs_bonded.append(sorted([dict_aux[at1],dict_aux[at2]]))
+ atom_pairs_bonded += aux_atom_pairs_bonded
+ elif len(aux_atom_indices)==1:
+ atom_pairs_bonded += []
+ else:
+ print(f'Warning! The bonds of group {group_name} were recalculated by MolSysMT.')
+ aux_pairs_bonded = get_bonded_atom_pairs(group_name, atom_names, aux_atom_indices)
+ atom_pairs_bonded += aux_atom_pairs_bonded
else:
- print(f'Warning! The bonds of group {group_name} were recalculated by MolSysMT.')
- aux_pairs_bonded = get_bonded_atom_pairs(group_name, atom_names, aux_atom_indices)
atom_pairs_bonded += aux_atom_pairs_bonded
- else:
- atom_pairs_bonded += aux_atom_pairs_bonded
else:
diff --git a/molsysmt/form/molsysmt_MolSys/__init__.py b/molsysmt/form/molsysmt_MolSys/__init__.py
index 9596478ae..7bb2ba812 100644
--- a/molsysmt/form/molsysmt_MolSys/__init__.py
+++ b/molsysmt/form/molsysmt_MolSys/__init__.py
@@ -41,6 +41,7 @@
from .to_pdbfixer_PDBFixer import to_pdbfixer_PDBFixer
from .to_biopython_Seq import to_biopython_Seq
from .to_biopython_SeqRecord import to_biopython_SeqRecord
+from .to_XYZ import to_XYZ
from .to_file_msmpk import to_file_msmpk
from .to_file_h5msm import to_file_h5msm
from .to_file_pdb import to_file_pdb
@@ -64,6 +65,7 @@
'pdbfixer.PDBFixer': to_pdbfixer_PDBFixer,
'biopython.Seq': to_biopython_Seq,
'biopython.SeqRecord': to_biopython_SeqRecord,
+ 'XYZ': to_XYZ,
'string:pdb_text': to_string_pdb_text,
'string:amino_acids_1': to_string_amino_acids_1,
'string:amino_acids_3': to_string_amino_acids_3,
diff --git a/molsysmt/form/molsysmt_MolSys/to_XYZ.py b/molsysmt/form/molsysmt_MolSys/to_XYZ.py
new file mode 100644
index 000000000..aae8c6e2e
--- /dev/null
+++ b/molsysmt/form/molsysmt_MolSys/to_XYZ.py
@@ -0,0 +1,11 @@
+from molsysmt._private.digestion import digest
+
+@digest(form='molsysmt.MolSys')
+def to_XYZ(item, atom_indices='all', structure_indices='all', skip_digestion=False):
+
+ from . import get_coordinates_from_atom
+
+ tmp_item = get_coordinates_from_atom(item, indices=atom_indices, structure_indices=structure_indices, skip_digestion=True)
+
+ return tmp_item
+
diff --git a/molsysmt/form/openmm_Topology/to_string_amino_acids_3.py b/molsysmt/form/openmm_Topology/to_string_amino_acids_3.py
index 7d501423f..58f3eac12 100644
--- a/molsysmt/form/openmm_Topology/to_string_amino_acids_3.py
+++ b/molsysmt/form/openmm_Topology/to_string_amino_acids_3.py
@@ -1,13 +1,13 @@
from molsysmt._private.digestion import digest
@digest(form='openmm.Topology')
-def to_string_amino_acids_3(item, atom_indices='all', skip_digestion=False):
+def to_string_amino_acids_3(item, group_indices='all', skip_digestion=False):
from . import to_molsysmt_Topology
from ..molsysmt_Topology import to_string_amino_acids_3 as molsysmt_Topology_to_string_amino_acids_3
tmp_item = to_molsysmt_Topology(item, skip_digestion=True)
- tmp_item = molsysmt_Topology_to_string_amino_acids_3(tmp_item, atom_indices=atom_indices, skip_digestion=True)
+ tmp_item = molsysmt_Topology_to_string_amino_acids_3(tmp_item, group_indices=group_indices, skip_digestion=True)
return tmp_item
diff --git a/molsysmt/form/string_pdb_id/to_string_pdb_text.py b/molsysmt/form/string_pdb_id/to_string_pdb_text.py
index c971578ac..df015ba7d 100644
--- a/molsysmt/form/string_pdb_id/to_string_pdb_text.py
+++ b/molsysmt/form/string_pdb_id/to_string_pdb_text.py
@@ -3,20 +3,13 @@
@digest(form='string:pdb_id')
def to_string_pdb_text(item, atom_indices='all', structure_indices='all', skip_digestion=False):
- from . import to_file_pdb
- from ..string_pdb_text import extract as extract_string_pdb_text
- from os import remove
+ from . import to_molsysmt_MolSys
+ from ..molsysmt_MolSys import to_string_pdb_text as molsysmt_MolSys_to_string_pdb_text
- tmp_item = to_file_pdb(item)
+ tmp_item = to_molsysmt_MolSys(item, atom_indices=atom_indices, structure_indices=structure_indices,
+ skip_digestion=True)
- tmp_file = tmp_item
- fff = open(tmp_item, 'r')
- tmp_item = fff.read()
- fff.close()
- remove(tmp_file)
-
- tmp_item = extract_string_pdb_text(tmp_item, atom_indices=atom_indices, structure_indices=structure_indices,
- copy_if_all=False, skip_digestion=True)
+ tmp_item = molsysmt_MolSys_to_string_pdb_text(tmp_item, skip_digestion=True)
return tmp_item
diff --git a/sandbox/Tests.ipynb b/sandbox/Tests.ipynb
index c9bac8a02..395ac4700 100644
--- a/sandbox/Tests.ipynb
+++ b/sandbox/Tests.ipynb
@@ -3,13 +3,21 @@
{
"cell_type": "markdown",
"id": "c2f52c6d-731a-4ca3-b14b-0f83beafe76c",
- "metadata": {},
+ "metadata": {
+ "jp-MarkdownHeadingCollapsed": true
+ },
"source": [
"# Testing basic tools in documentation\n",
"\n",
"\n",
"[x] Add \n",
- "[x] Get\n"
+ "[x] Append \n",
+ "[x] Are multiple \n",
+ "[x] Compare \n",
+ "[x] Concatenate structures \n",
+ "[x] Contains \n",
+ "\n",
+ "\n"
]
},
{
@@ -21,7 +29,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "a4e8fb7ba002470d881083ff62b26554",
+ "model_id": "0e2f0f848d2646a792332ffad5d012de",
"version_major": 2,
"version_minor": 0
},
@@ -38,66 +46,125 @@
{
"cell_type": "code",
"execution_count": 2,
- "id": "4cdc4f01-cba8-494c-b029-e3cb4e801786",
+ "id": "26a3594c-d02f-4cf5-a55d-5db661c7e635",
"metadata": {},
"outputs": [],
"source": [
- "molsys = msm.convert('1TCD')"
+ "molsys = msm.convert('181L')"
]
},
{
"cell_type": "code",
- "execution_count": 3,
- "id": "b02a20f2-e896-4f69-9075-fc92642fafb0",
+ "execution_count": 9,
+ "id": "00573488-f6c6-44f4-9734-775b1f31d889",
"metadata": {},
"outputs": [
{
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "CPU times: user 51.9 s, sys: 381 ms, total: 52.3 s\n",
- "Wall time: 52.4 s\n"
- ]
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " entity_id | \n",
+ " entity_name | \n",
+ " entity_type | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " T4 LYSOZYME | \n",
+ " protein | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 1 | \n",
+ " CHLORIDE ION | \n",
+ " ion | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 2 | \n",
+ " 2-HYDROXYETHYL DISULFIDE | \n",
+ " small molecule | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 3 | \n",
+ " BENZENE | \n",
+ " small molecule | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 4 | \n",
+ " water | \n",
+ " water | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " entity_id entity_name entity_type\n",
+ "0 0 T4 LYSOZYME protein\n",
+ "1 1 CHLORIDE ION ion\n",
+ "2 2 2-HYDROXYETHYL DISULFIDE small molecule\n",
+ "3 3 BENZENE small molecule\n",
+ "4 4 water water"
+ ]
+ },
+ "execution_count": 9,
+ "metadata": {},
+ "output_type": "execute_result"
}
],
"source": [
- "%%time\n",
- "sel1 = msm.select(molsys, 'all in groups of all in components of all')"
+ "molsys.topology.entities"
]
},
{
"cell_type": "code",
"execution_count": null,
- "id": "d2ef1e2d-a120-4ed1-82f5-c18c1a4aa30b",
+ "id": "4cdc4f01-cba8-494c-b029-e3cb4e801786",
"metadata": {},
"outputs": [],
"source": [
- "sel2 = msm.select(molsys, 'all in groups of all in components')"
+ "item = msm.convert('181L','mmcif.PdbxContainers.DataContainer')"
]
},
{
"cell_type": "code",
"execution_count": null,
- "id": "f3513c99-3b57-452b-b57d-a01b30e692bb",
+ "id": "c9b7fe10-d644-4d8d-b26c-fbcfc5d8136d",
"metadata": {},
"outputs": [],
"source": [
- "sel2"
+ "item.getObj('chem_comp_bond')"
]
},
{
"cell_type": "code",
"execution_count": null,
- "id": "5ab33dbf-a8b9-427a-969e-56bacc8a72a2",
+ "id": "6b3ace66-6693-479d-a2a1-6df688c4769f",
"metadata": {},
"outputs": [],
- "source": [
- "sel1 = msm.select(molecular_system, 'all in groups of all in components of all')\n",
- "sel2 = msm.select(molecular_system, 'all in groups of all in components')\n",
- "sel3 = msm.select(molecular_system, 'all in groups in components of all')\n",
- "sel4 = msm.select(molecular_system, 'all in groups in components')\n",
- "sel5 = msm.select(molecular_system, 'in groups in components')"
- ]
+ "source": []
}
],
"metadata": {