diff --git a/docs/contents/user/tools/basic/iterator.ipynb b/docs/contents/user/tools/basic/iterator.ipynb index 8351969f9..0ede55763 100644 --- a/docs/contents/user/tools/basic/iterator.ipynb +++ b/docs/contents/user/tools/basic/iterator.ipynb @@ -68,7 +68,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "f710a3d37d3644e5ad2f18ee7ab42dc6", + "model_id": "9e23f16870f449d887ab208316501631", "version_major": 2, "version_minor": 0 }, diff --git a/docs/contents/user/tools/basic/merge.ipynb b/docs/contents/user/tools/basic/merge.ipynb index a189f2552..c4e80cf74 100644 --- a/docs/contents/user/tools/basic/merge.ipynb +++ b/docs/contents/user/tools/basic/merge.ipynb @@ -45,7 +45,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "3901d160dd23485992e32bc34cd47e36", + "model_id": "cec0845488d4439c93f49653ba211077", "version_major": 2, "version_minor": 0 }, @@ -122,37 +122,37 @@ "text/html": [ "\n", - "\n", + "
\n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", "
formn_atomsn_groupsn_componentsn_chainsn_moleculesn_entitiesn_peptidesn_structuresformn_atomsn_groupsn_componentsn_chainsn_moleculesn_entitiesn_peptidesn_structures
molsysmt.MolSys889333131molsysmt.MolSys889333131
\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 6, @@ -192,7 +192,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "af3cee061f264a69afdf00f3c47e7ec2", + "model_id": "e3f829f9407441469c336be8b090b1a4", "version_major": 2, "version_minor": 0 }, @@ -210,7 +210,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 9, "metadata": { "editable": true, "slideshow": { @@ -260,7 +260,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/remove.ipynb b/docs/contents/user/tools/basic/remove.ipynb index 27d26a142..0a4634a19 100644 --- a/docs/contents/user/tools/basic/remove.ipynb +++ b/docs/contents/user/tools/basic/remove.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": { "editable": true, "slideshow": { @@ -50,16 +50,29 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "83d0d1cddacd4aaf989ae1a28c8d6e4e", + "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": [ @@ -68,16 +81,121 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
indexidnamen atomsn groupsn componentsmolecule indexmolecule typeentity indexentity name
00A128916210protein0T4 LYSOZYME
11A1111ion1CHLORIDE ION
22A1112ion1CHLORIDE ION
33A8113small molecule22-HYDROXYETHYL DISULFIDE
44A6114small molecule3BENZENE
55A136136136[5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140]['water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water']4water
\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "msm.info(molecular_system, element='chain')" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -95,9 +213,54 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
indexidnamen atomsn groupsn componentsmolecule indexmolecule typeentity indexentity name
00A128916210protein0T4 LYSOZYME
\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "msm.info(molecular_system_trimmed, element='chain')" ] @@ -113,26 +276,67 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ - "pdbfile = msm.systems.demo['Trp-Cage']['1l2y.pdb']\n", + "pdbfile = msm.systems['Trp-Cage']['1l2y.pdb']\n", "molecular_system = msm.convert(pdbfile, to_form='molsysmt.Structures')" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
formn_atomsn_groupsn_componentsn_chainsn_moleculesn_entitiesn_structures
molsysmt.Structures304NoneNoneNoneNoneNone38
\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "msm.info(molecular_system)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -150,9 +354,50 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
formn_atomsn_groupsn_componentsn_chainsn_moleculesn_entitiesn_structures
molsysmt.Structures304NoneNoneNoneNoneNone1
\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "msm.info(molecular_system_trimmed)" ] @@ -192,7 +437,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 6202378af..1e2363cdd 100644 --- a/docs/contents/user/tools/basic/select.ipynb +++ b/docs/contents/user/tools/basic/select.ipynb @@ -239,7 +239,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "731a9befc8bb479b8b7e90df0c099219", + "model_id": "7174190f95964d919eaacf9cbd9fe139", "version_major": 2, "version_minor": 0 }, @@ -6391,7 +6391,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 39, "metadata": {}, "outputs": [], "source": [ @@ -6404,7 +6404,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 40, "metadata": {}, "outputs": [ { @@ -6449,7 +6449,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 41, "metadata": {}, "outputs": [ { @@ -6493,7 +6493,7 @@ " [64, 661, 1183, 1276, 1458, 1976, 2573, 3095, 3188, 3370]]" ] }, - "execution_count": 47, + "execution_count": 41, "metadata": {}, "output_type": "execute_result" } @@ -6513,7 +6513,7 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 42, "metadata": {}, "outputs": [ { @@ -6525,7 +6525,7 @@ " [4, 5, 6]]" ] }, - "execution_count": 48, + "execution_count": 42, "metadata": {}, "output_type": "execute_result" } @@ -6549,7 +6549,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 43, "metadata": {}, "outputs": [ { @@ -6558,7 +6558,7 @@ "array([10, 13, 17, 20, 26, 29])" ] }, - "execution_count": 49, + "execution_count": 43, "metadata": {}, "output_type": "execute_result" } @@ -6578,7 +6578,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 44, "metadata": {}, "outputs": [ { @@ -6587,7 +6587,7 @@ "'@25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44'" ] }, - "execution_count": 50, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } @@ -6598,7 +6598,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 45, "metadata": {}, "outputs": [ { @@ -6607,7 +6607,7 @@ "'index 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44'" ] }, - "execution_count": 51, + "execution_count": 45, "metadata": {}, "output_type": "execute_result" } @@ -6625,7 +6625,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 46, "metadata": {}, "outputs": [ { @@ -6634,7 +6634,7 @@ "'7:A 8:A 9:A'" ] }, - "execution_count": 52, + "execution_count": 46, "metadata": {}, "output_type": "execute_result" } @@ -6645,7 +6645,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 47, "metadata": {}, "outputs": [ { @@ -6654,7 +6654,7 @@ "'resid 3 4 5'" ] }, - "execution_count": 53, + "execution_count": 47, "metadata": {}, "output_type": "execute_result" } diff --git a/docs/contents/user/tools/basic/set.ipynb b/docs/contents/user/tools/basic/set.ipynb index 04d8adee0..9f0351f31 100644 --- a/docs/contents/user/tools/basic/set.ipynb +++ b/docs/contents/user/tools/basic/set.ipynb @@ -56,7 +56,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "d1eb5aba80c345c1a625ff96dfd76b32", + "model_id": "6e9e97634bb3444dba7687a0ef6d4c92", "version_major": 2, "version_minor": 0 }, @@ -95,43 +95,43 @@ "text/html": [ "\n", - "\n", + "
\n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", "
formn_atomsn_groupsn_componentsn_chainsn_moleculesn_entitiesn_watersn_ionsn_small_moleculesn_proteinsn_structuresformn_atomsn_groupsn_componentsn_chainsn_moleculesn_entitiesn_watersn_ionsn_small_moleculesn_proteinsn_structures
molsysmt.MolSys1441302141614141362211molsysmt.MolSys1441302141614151362211
\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 4, @@ -160,191 +160,191 @@ "text/html": [ "\n", - "\n", + "
\n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", "
indexidnametypegroup indexgroup idgroup namegroup typecomponent indexchain indexmolecule indexmolecule typeentity indexentity nameindexidnametypegroup indexgroup idgroup namegroup typecomponent indexchain indexmolecule indexmolecule typeentity indexentity name
248249NN3031HISaminoacid000protein0T4 lysozyme248249NN3031HISamino acid000protein0T4 LYSOZYME
249250CAC3031HISaminoacid000protein0T4 lysozyme249250CAC3031HISamino acid000protein0T4 LYSOZYME
250251CC3031HISaminoacid000protein0T4 lysozyme250251CC3031HISamino acid000protein0T4 LYSOZYME
251252OO3031HISaminoacid000protein0T4 lysozyme251252OO3031HISamino acid000protein0T4 LYSOZYME
252253CBC3031HISaminoacid000protein0T4 lysozyme252253CBC3031HISamino acid000protein0T4 LYSOZYME
253254CGC3031HISaminoacid000protein0T4 lysozyme253254CGC3031HISamino acid000protein0T4 LYSOZYME
254255ND1N3031HISaminoacid000protein0T4 lysozyme254255ND1N3031HISamino acid000protein0T4 LYSOZYME
255256CD2C3031HISaminoacid000protein0T4 lysozyme255256CD2C3031HISamino acid000protein0T4 LYSOZYME
256257CE1C3031HISaminoacid000protein0T4 lysozyme256257CE1C3031HISamino acid000protein0T4 LYSOZYME
257258NE2N3031HISaminoacid000protein0T4 lysozyme257258NE2N3031HISamino acid000protein0T4 LYSOZYME
\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 5, @@ -404,191 +404,191 @@ "text/html": [ "\n", - "\n", + "
\n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", "
indexidnametypegroup indexgroup idgroup namegroup typecomponent indexchain indexmolecule indexmolecule typeentity indexentity nameindexidnametypegroup indexgroup idgroup namegroup typecomponent indexchain indexmolecule indexmolecule typeentity indexentity name
248249NN3031HSDaminoacid000protein0T4 lysozyme248249NN3031HSDamino acid000protein0T4 LYSOZYME
249250CAC3031HSDaminoacid000protein0T4 lysozyme249250CAC3031HSDamino acid000protein0T4 LYSOZYME
250251CC3031HSDaminoacid000protein0T4 lysozyme250251CC3031HSDamino acid000protein0T4 LYSOZYME
251252OO3031HSDaminoacid000protein0T4 lysozyme251252OO3031HSDamino acid000protein0T4 LYSOZYME
252253CBC3031HSDaminoacid000protein0T4 lysozyme252253CBC3031HSDamino acid000protein0T4 LYSOZYME
253254CGC3031HSDaminoacid000protein0T4 lysozyme253254CGC3031HSDamino acid000protein0T4 LYSOZYME
254255ND1N3031HSDaminoacid000protein0T4 lysozyme254255ND1N3031HSDamino acid000protein0T4 LYSOZYME
255256CD2C3031HSDaminoacid000protein0T4 lysozyme255256CD2C3031HSDamino acid000protein0T4 LYSOZYME
256257CE1C3031HSDaminoacid000protein0T4 lysozyme256257CE1C3031HSDamino acid000protein0T4 LYSOZYME
257258NE2N3031HSDaminoacid000protein0T4 lysozyme257258NE2N3031HSDamino acid000protein0T4 LYSOZYME
\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 7, @@ -618,7 +618,7 @@ "
Magnitude
[[[3.7278 1.6327 1.7646999999999997]]]
Unitsnanometer
" ], "text/latex": [ - "$arr[,0,:,:] = \\begin{pmatrix}3.7278 & 1.6327 & 1.7646999999999997\\end{pmatrix}\\ \\mathrm{nanometer}$" + "$arr[,0,:,:] = \\begin{pmatrix} & & \\end{pmatrix}\\ \\mathrm{nanometer}$" ], "text/plain": [ "array([[[3.7278, 1.6327, 1.7647]]]) " @@ -667,7 +667,7 @@ "
Magnitude
[[[0.0 0.0 0.0]]]
Unitsnanometer
" ], "text/latex": [ - "$arr[,0,:,:] = \\begin{pmatrix}0.0 & 0.0 & 0.0\\end{pmatrix}\\ \\mathrm{nanometer}$" + "$arr[,0,:,:] = \\begin{pmatrix} & & \\end{pmatrix}\\ \\mathrm{nanometer}$" ], "text/plain": [ "array([[[0., 0., 0.]]]) " @@ -718,7 +718,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/view.ipynb b/docs/contents/user/tools/basic/view.ipynb index 23bb5f461..9299f6d45 100644 --- a/docs/contents/user/tools/basic/view.ipynb +++ b/docs/contents/user/tools/basic/view.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": { "tags": [ "remove-input" @@ -48,16 +48,29 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "0f4230d372c5478cb1309ae32a07e2e4", + "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": { "editable": true, "slideshow": { @@ -77,16 +90,31 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "701d031cf96541b7a979b333972e77d8", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "NGLWidget()" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "msm.view('181L', standard=True, with_water_as='licorice', viewer='NGLView')" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": { "editable": true, "slideshow": { @@ -125,7 +153,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": { "tags": [ "remove-input" @@ -141,16 +169,31 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "1fdb3ac30cf74434af6622da361369b5", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "NGLWidget()" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ - "msm.view('181L', selection='molecule_name==\"Benzene\"', standard=True, viewer='NGLView')" + "msm.view('181L', selection='molecule_name==\"BENZENE\"', standard=True, viewer='NGLView')" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": { "editable": true, "slideshow": { @@ -179,16 +222,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ - "molecular_system = msm.convert('181L', selection='molecule_type==\"protein\" or molecule_name==\"Benzene\"', to_form='openmm.Modeller')" + "molecular_system = msm.convert('181L', selection='molecule_type==\"protein\" or molecule_name==\"BENZENE\"', to_form='openmm.Modeller')" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "metadata": { "editable": true, "slideshow": { @@ -208,16 +251,31 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "ccc681f7c68040edbc7a90a331249c14", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "NGLWidget()" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "msm.view(molecular_system, selection='all within 7.0 angstroms of molecule_type==\"small molecule\"', standard=True)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "metadata": { "editable": true, "slideshow": { @@ -248,7 +306,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "metadata": { "tags": [ "remove-input" @@ -264,7 +322,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -273,9 +331,20 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "'nglview.NGLWidget'" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "msm.get_form(view)" ] @@ -289,40 +358,138 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "metadata": { "tags": [ "scroll-output" ] }, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
formn_atomsn_groupsn_componentsn_chainsn_moleculesn_entitiesn_watersn_ionsn_small_moleculesn_proteinsn_structures
nglview.NGLWidget1441302141114151362211
\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "msm.info(view)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
Magnitude
[[[6.089999999999999 0.0 0.0]
[-3.0449999999999995 5.274094699999999 0.0]
[0.0 0.0 9.7]]]
Unitsnanometer
" + ], + "text/latex": [ + "$arr[,0,:,:] = \\begin{pmatrix} & & \\\\ \n", + " & & \\\\ \n", + " & & \\end{pmatrix}\\ \\mathrm{nanometer}$" + ], + "text/plain": [ + "array([[[ 6.09 , 0. , 0. ],\n", + " [-3.045 , 5.2740947, 0. ],\n", + " [ 0. , 0. , 9.7 ]]]) " + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "msm.get(view, box=True)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "'openmm.Modeller'" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "msm.get_form(msm.convert(view, to_form='openmm.Modeller'))" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
Magnitude
[[[0.9586227516599011]]]
Unitsnanometer
" + ], + "text/latex": [ + "$arr[,0,:,:] = \\begin{pmatrix}\\end{pmatrix}\\ \\mathrm{nanometer}$" + ], + "text/plain": [ + "array([[[0.95862275]]]) " + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "msm.structure.get_distances(view, selection='atom_index==0', selection_2='atom_index==20')" ] @@ -367,7 +534,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/where_is_attribute.ipynb b/docs/contents/user/tools/basic/where_is_attribute.ipynb index 7d07913f4..2e7e1576b 100644 --- a/docs/contents/user/tools/basic/where_is_attribute.ipynb +++ b/docs/contents/user/tools/basic/where_is_attribute.ipynb @@ -45,14 +45,14 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "id": "bbecf5a9-b8d3-49ac-85e3-e7cea880c231", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "e2557f2620a54d84bcbcfaf98b02c4d6", + "model_id": "560c647d5b434346adfa25914efe605c", "version_major": 2, "version_minor": 0 }, @@ -68,18 +68,18 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "id": "83ecdd1d-aa92-443d-9fa7-dfe3adac50c2", "metadata": {}, "outputs": [], "source": [ - "structure = msm.systems.demo['pentalanine']['pentalanine.inpcrd']\n", - "topology = msm.systems.demo['pentalanine']['pentalanine.prmtop']" + "structure = msm.systems['pentalanine']['pentalanine.inpcrd']\n", + "topology = msm.systems['pentalanine']['pentalanine.prmtop']" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "id": "f4242553-453a-4f9c-9f07-64ce7c0da8d6", "metadata": {}, "outputs": [ @@ -88,42 +88,42 @@ "text/html": [ "\n", - "\n", + "
\n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", "
formn_atomsn_groupsn_componentsn_chainsn_moleculesn_entitiesn_watersn_peptidesn_structuresformn_atomsn_groupsn_componentsn_chainsn_moleculesn_entitiesn_watersn_peptidesn_structures
['file:prmtop', 'file:inpcrd']52071722171611716None171511['file:prmtop', 'file:inpcrd']520717221716117162171511
\n" ], "text/plain": [ - "" + "" ] }, - "execution_count": 3, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -142,18 +142,18 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "id": "b6813e3b-50c6-4624-bb65-3a76d3cd77dc", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "(PosixPath('/home/diego/projects@uibcdf/MolSysMT/molsysmt/data/inpcrd/pentalanine.inpcrd'),\n", + "('/home/diego/repos@uibcdf/MolSysMT/molsysmt/data/inpcrd/pentalanine.inpcrd',\n", " 'file:inpcrd')" ] }, - "execution_count": 4, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -164,18 +164,18 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "id": "c1f3bf93-9107-42e3-937f-57ddc5e5c9e2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "(PosixPath('/home/diego/projects@uibcdf/MolSysMT/molsysmt/data/prmtop/pentalanine.prmtop'),\n", + "('/home/diego/repos@uibcdf/MolSysMT/molsysmt/data/prmtop/pentalanine.prmtop',\n", " 'file:prmtop')" ] }, - "execution_count": 5, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -225,7 +225,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.11" + "version": "3.10.14" } }, "nbformat": 4, diff --git a/molsysmt/basic/convert.py b/molsysmt/basic/convert.py index 401208bce..56f7b14b9 100644 --- a/molsysmt/basic/convert.py +++ b/molsysmt/basic/convert.py @@ -140,6 +140,9 @@ def _convert_multiple_to_one_with_shortcuts(molecular_system, if 'structure_indices' in input_arguments: conversion_arguments['structure_indices']=structure_indices + if 'get_missing_bonds' in kwargs and 'get_missing_bonds' not in input_arguments: + del kwargs['get_missing_bonds'] + for element, element_index in _element_index.items(): if _element_indices[element] in input_arguments: if not is_all(selection): @@ -175,8 +178,6 @@ def _convert_multiple_to_one(molecular_system, from molsysmt.basic import has_attribute from molsysmt.attribute import attributes as _attributes - output = None - n_items = len(from_forms) # Conversion arguments @@ -502,7 +503,6 @@ def convert(molecular_system, """ - from . import get_form from molsysmt._private import _multiple_conversion_shortcuts diff --git a/molsysmt/basic/get.py b/molsysmt/basic/get.py index c2c5f0dde..14268e4b6 100644 --- a/molsysmt/basic/get.py +++ b/molsysmt/basic/get.py @@ -258,17 +258,21 @@ def _piped_molecular_system(molecular_system, element, in_attributes): if is_topological_attribute(in_attribute, skip_digestion=True): _, aux_form = where_is_attribute(molecular_system, in_attribute, skip_digestion=True) if aux_form is not None: - if piped_topological_attribute[aux_form] not in aux_piped_topological_attribute: - aux_piped_topological_attribute.append(piped_topological_attribute[aux_form]) - if piped_any_attribute[aux_form] not in aux_piped_any_attribute: - aux_piped_any_attribute.append(piped_any_attribute[aux_form]) + if piped_topological_attribute[aux_form] is not None: + if piped_topological_attribute[aux_form] not in aux_piped_topological_attribute: + aux_piped_topological_attribute.append(piped_topological_attribute[aux_form]) + if piped_any_attribute[aux_form] is not None: + if piped_any_attribute[aux_form] not in aux_piped_any_attribute: + aux_piped_any_attribute.append(piped_any_attribute[aux_form]) elif is_structural_attribute(in_attribute, skip_digestion=True): _, aux_form = where_is_attribute(molecular_system, in_attribute) if aux_form is not None: - if piped_structural_attribute[aux_form] not in aux_piped_structural_attribute: - aux_piped_structural_attribute.append(piped_structural_attribute[aux_form]) - if piped_any_attribute[aux_form] not in aux_piped_any_attribute: - aux_piped_any_attribute.append(piped_any_attribute[aux_form]) + if piped_structural_attribute[aux_form] is not None: + if piped_structural_attribute[aux_form] not in aux_piped_structural_attribute: + aux_piped_structural_attribute.append(piped_structural_attribute[aux_form]) + if piped_any_attribute[aux_form] is not None: + if piped_any_attribute[aux_form] not in aux_piped_any_attribute: + aux_piped_any_attribute.append(piped_any_attribute[aux_form]) n_top = len(aux_piped_topological_attribute) n_str = len(aux_piped_structural_attribute) diff --git a/molsysmt/basic/get_attributes.py b/molsysmt/basic/get_attributes.py index fcf671aaa..49057c730 100644 --- a/molsysmt/basic/get_attributes.py +++ b/molsysmt/basic/get_attributes.py @@ -82,7 +82,7 @@ def get_attributes(molecular_system, output_type='dictionary'): for form_in, item in zip(forms_in, molecular_system): for key, value in _dict_modules[form_in].attributes.items(): if value: - if _dict_modules[form_in].has_attribute(item, key): + if _dict_modules[form_in].has_attribute(item, key, skip_digestion=True): output[key]=value if output_type=='dictionary': diff --git a/molsysmt/build/get_missing_bonds.py b/molsysmt/build/get_missing_bonds.py index 7b25e156f..a8140eee7 100644 --- a/molsysmt/build/get_missing_bonds.py +++ b/molsysmt/build/get_missing_bonds.py @@ -88,9 +88,12 @@ def get_missing_bonds(molecular_system, threshold='2 angstroms', selection='all' sorted=False) bonds += aux_bonds + + if 'C' in atom_names: + aux_peptidic_bonds_C[group_index]=atom_indices[atom_names.index('C')] - aux_peptidic_bonds_C[group_index]=atom_indices[atom_names.index('C')] - aux_peptidic_bonds_N[group_index]=atom_indices[atom_names.index('N')] + if 'N' in atom_names: + aux_peptidic_bonds_N[group_index]=atom_indices[atom_names.index('N')] case 'terminal capping': diff --git a/molsysmt/data/h5msm/alanine_dipeptide.h5msm b/molsysmt/data/h5msm/alanine_dipeptide.h5msm index 02fbae9c4..677bfd4fa 100644 Binary files a/molsysmt/data/h5msm/alanine_dipeptide.h5msm and b/molsysmt/data/h5msm/alanine_dipeptide.h5msm differ diff --git a/molsysmt/data/h5msm/lysine_dipeptide.h5msm b/molsysmt/data/h5msm/lysine_dipeptide.h5msm index 89902eb03..8a39c024b 100644 Binary files a/molsysmt/data/h5msm/lysine_dipeptide.h5msm and b/molsysmt/data/h5msm/lysine_dipeptide.h5msm differ diff --git a/molsysmt/data/h5msm/proline_dipeptide.h5msm b/molsysmt/data/h5msm/proline_dipeptide.h5msm index 37f731641..55f897477 100644 Binary files a/molsysmt/data/h5msm/proline_dipeptide.h5msm and b/molsysmt/data/h5msm/proline_dipeptide.h5msm differ diff --git a/molsysmt/data/h5msm/valine_dipeptide.h5msm b/molsysmt/data/h5msm/valine_dipeptide.h5msm index ecf59be28..2b9acaabc 100644 Binary files a/molsysmt/data/h5msm/valine_dipeptide.h5msm and b/molsysmt/data/h5msm/valine_dipeptide.h5msm differ diff --git a/molsysmt/element/component/get_component_type.py b/molsysmt/element/component/get_component_type.py index 0d8d290b4..00ccb06e4 100644 --- a/molsysmt/element/component/get_component_type.py +++ b/molsysmt/element/component/get_component_type.py @@ -65,8 +65,9 @@ def get_component_type(molecular_system, element='atom', selection='all', redefi if is_all(selection): output = list(component_types.values()) else: - raise NotImplementedError - + component_indices = select(molecular_system, element='component', selection=selection, + syntax=syntax, skip_digestion=True) + output = [component_types[ii] for ii in component_indices] else: raise NotImplementedError diff --git a/molsysmt/element/entity/get_entity_index.py b/molsysmt/element/entity/get_entity_index.py index 767c924ce..7fdde6eb8 100644 --- a/molsysmt/element/entity/get_entity_index.py +++ b/molsysmt/element/entity/get_entity_index.py @@ -1,6 +1,5 @@ from molsysmt._private.digestion import digest - @digest() def get_entity_index(molecular_system, element='atom', selection='all', redefine_molecules=False, redefine_indices=False, syntax='MolSysMT', @@ -13,19 +12,19 @@ def get_entity_index(molecular_system, element='atom', selection='all', if redefine_molecules: molecule_name_from_molecules = get_molecule_name(molecular_system, element='molecule', - selection=selection, redefine_molecules=True, syntax=syntax, skip_digestion=True) + selection=selection, redefine_indices=True, syntax=syntax, skip_digestion=True) molecule_type_from_molecules = get_molecule_type(molecular_system, element='molecule', - selection=selection, redefine_molecules=True, syntax=syntax, skip_digestion=True) + selection=selection, redefine_indices=True, syntax=syntax, skip_digestion=True) else: molecule_name_from_molecules = get_molecule_name(molecular_system, element='molecule', - selection=selection, redefine_molecules=False, redefine_names=False, syntax=syntax, + selection=selection, redefine_indices=False, redefine_names=False, syntax=syntax, skip_digestion=True) molecule_type_from_molecules = get_molecule_type(molecular_system, element='molecule', - selection=selection, redefine_molecules=False, redefine_types=False, syntax=syntax, + selection=selection, redefine_indices=False, redefine_types=False, syntax=syntax, skip_digestion=True) count = 0 diff --git a/molsysmt/form/file_inpcrd/__init__.py b/molsysmt/form/file_inpcrd/__init__.py index ba6684437..797dcb6d2 100644 --- a/molsysmt/form/file_inpcrd/__init__.py +++ b/molsysmt/form/file_inpcrd/__init__.py @@ -4,8 +4,10 @@ "https://ambermd.org/FileFormats.php#trajectory"] piped_topological_attribute = None -piped_structural_attribute = None +piped_structural_attribute = 'molsysmt.Structures' piped_any_attribute = None +bonds_are_explicit = False +bonds_can_be_computed = False from .is_form import is_form diff --git a/molsysmt/form/openmm_Topology/has_attribute.py b/molsysmt/form/openmm_Topology/has_attribute.py index c22625426..227c125eb 100644 --- a/molsysmt/form/openmm_Topology/has_attribute.py +++ b/molsysmt/form/openmm_Topology/has_attribute.py @@ -1,7 +1,7 @@ from molsysmt._private.digestion import digest @digest(form='openmm.Topology') -def has_attribute(molecular_system, attribute): +def has_attribute(molecular_system, attribute, skip_digestion=False): from . import attributes diff --git a/molsysmt/tests/basic/view/test_view_molsysmt_MolSys_with_NGLView.py b/molsysmt/tests/basic/view/test_view_molsysmt_MolSys_with_NGLView.py index bfee5887e..5a1c5d58d 100644 --- a/molsysmt/tests/basic/view/test_view_molsysmt_MolSys_with_NGLView.py +++ b/molsysmt/tests/basic/view/test_view_molsysmt_MolSys_with_NGLView.py @@ -37,8 +37,7 @@ def test_view_molsyst_MolSys_with_NGLView_3(): molsys_merged = msm.merge([molsys_1, molsys_2], keep_ids=False) view = msm.view(molsys_merged, viewer='NGLView') comparison = msm.compare(view, molsys_merged, attribute_type='topological', - coordinates=True, box=True, chain_index=False, chain_id=False, chain_name=False, chain_type=False, - n_chains=False) + coordinates=True) assert comparison def test_view_molsyst_MolSys_with_NGLView_4(): diff --git a/sandbox/Tests.ipynb b/sandbox/Tests.ipynb index 46947171c..31cfbf8f7 100644 --- a/sandbox/Tests.ipynb +++ b/sandbox/Tests.ipynb @@ -8,171 +8,26 @@ "# Testing basic tools in documentation\n", "\n", "\n", - "[x] Add \n", - "[x] Append \n", - "[x] Are multiple \n", - "[x] Compare \n", - "[x] Concatenate structures \n", - "[x] Contains \n", - "[x] Convert\n", - "[x] Copy\n", - "[x] Extract\n", - "[x] Get form\n", - "[x] Get label\n", - "[x] Has attribute\n", - "[x] Info\n", - "[x] Is a molecular system\n", - "[x] Is composed of\n", - "\n", - "\n", - "\n", - "[x] Get\n", + "[x] \n", "\n", "\n" ] }, - { - "cell_type": "code", - "execution_count": 1, - "id": "89627ab5-532e-4815-ac94-3c3295fb685c", - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "0e2f0f848d2646a792332ffad5d012de", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "import molsysmt as msm" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "26a3594c-d02f-4cf5-a55d-5db661c7e635", - "metadata": {}, - "outputs": [], - "source": [ - "molsys = msm.convert('181L')" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "00573488-f6c6-44f4-9734-775b1f31d889", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
entity_identity_nameentity_type
00T4 LYSOZYMEprotein
11CHLORIDE IONion
222-HYDROXYETHYL DISULFIDEsmall molecule
33BENZENEsmall molecule
44waterwater
\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": [ - "molsys.topology.entities" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4cdc4f01-cba8-494c-b029-e3cb4e801786", - "metadata": {}, - "outputs": [], - "source": [ - "item = msm.convert('181L','mmcif.PdbxContainers.DataContainer')" - ] - }, { "cell_type": "code", "execution_count": null, - "id": "c9b7fe10-d644-4d8d-b26c-fbcfc5d8136d", + "id": "89627ab5-532e-4815-ac94-3c3295fb685c", "metadata": {}, "outputs": [], "source": [ - "item.getObj('chem_comp_bond')" + "import molsysmt as msm\n", + "from molsysmt import systems" ] }, { "cell_type": "code", "execution_count": null, - "id": "6b3ace66-6693-479d-a2a1-6df688c4769f", + "id": "a673846b-5259-4acc-a751-9a9df5ba7a46", "metadata": {}, "outputs": [], "source": []