From 9e8f156cafaa01b09fa05721c115ba14a78f3d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Gonz=C3=A1lez-Delgado?= <jgonzalezd@laas.fr> Date: Wed, 8 Nov 2023 14:08:15 +0000 Subject: [PATCH] Add option to only analyze an arbitrary sequence subset --- wario/get_contacts.ipynb | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/wario/get_contacts.ipynb b/wario/get_contacts.ipynb index acd883a..36ffdfe 100644 --- a/wario/get_contacts.ipynb +++ b/wario/get_contacts.ipynb @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "id": "57a23fbe", "metadata": {}, "outputs": [], @@ -26,7 +26,6 @@ "def get_contacts(coor_conf, threshold_file, assort = False):\n", "\n", " L = int(0.5*(1 + np.sqrt(1 + 8*np.shape(coor_conf)[0])))\n", - " pos_pairs = np.array(list(itertools.combinations(range(L), 2)))\n", "\n", " contact_thresholds = pd.read_csv(threshold_file, sep=\" \", header=0)\n", " contact_thresholds['th11'] = np.deg2rad(contact_thresholds['th11'])\n", @@ -51,7 +50,7 @@ " contact_thresholds.delta_min = mins\n", " contact_thresholds.delta_max = maxs\n", "\n", - " coor_conf = pd.DataFrame(np.concatenate([coor_conf, pos_pairs], axis = 1),\n", + " coor_conf = pd.DataFrame(coor_conf,\n", " columns = ['coor_x','coor_y','coor_z','or1_x','or1_y','or1_z','or2_x','or2_y','or2_z','AA1','AA2','pos1','pos2'])\n", " coor_conf.range = np.abs(coor_conf['pos1'] - coor_conf['pos2'])\n", " coor_conf.range = (coor_conf.range*(coor_conf.range<5) + 5*(coor_conf.range>=5)).astype('int') \n", @@ -104,6 +103,22 @@ " else:\n", " return coor_conf.w_dis_se3" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4672ddec-7dec-4036-984c-aaaa7246ce1f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "715a891c-5221-42bb-ab86-36a6e825ed97", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -122,7 +137,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.16" + "version": "3.10.9" } }, "nbformat": 4, -- GitLab