diff --git a/.ipynb_checkpoints/GetCM-checkpoint.ipynb b/.ipynb_checkpoints/GetCM-checkpoint.ipynb new file mode 100644 index 0000000..a5cc204 --- /dev/null +++ b/.ipynb_checkpoints/GetCM-checkpoint.ipynb @@ -0,0 +1,310 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import qml " + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "from glob import glob\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "target_xyzs = sorted(glob(\"targets/*.xyz\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "database_xyzs = sorted(glob(\"qm7/*.xyz\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "target_mols = [qml.Compound(x) for x in target_xyzs]" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "database_mols = [qml.Compound(x) for x in database_xyzs]" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "def get_CM(mol):\n", + " ncharges = mol.nuclear_charges\n", + " coords = mol.coordinates \n", + " CM = np.zeros((len(coords), len(coords)))\n", + " for i in range(len(coords)):\n", + " for j in range(len(coords)):\n", + " if i==j:\n", + " CM[i,j] = 0.5 * ncharges[i]**2.4\n", + " else:\n", + " CM[i,j] = ncharges[i] * ncharges[j] / np.linalg.norm(coords[j] - coords[i])\n", + " \n", + " return ncharges, CM" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "mol = target_mols[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges, CM = get_CM(mol)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "target_ncharges = []\n", + "target_CMs = []\n", + "for mol in target_mols: \n", + " ncharge, CM = get_CM(mol)\n", + " target_ncharges.append(ncharge)\n", + " target_CMs.append(CM)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "database_ncharges = []\n", + "database_CMs = []\n", + "for mol in database_mols:\n", + " ncharge, CM = get_CM(mol)\n", + " database_ncharges.append(ncharge)\n", + " database_CMs.append(CM)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + ":1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " target_CMs = np.array(target_CMs)\n" + ] + } + ], + "source": [ + "target_CMs = np.array(target_CMs)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + ":1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " database_CMs = np.array(database_CMs)\n" + ] + } + ], + "source": [ + "database_CMs = np.array(database_CMs)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [], + "source": [ + "target_labels = [t.split(\"/\")[-1].split(\".xyz\")[0] for t in target_xyzs]" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [], + "source": [ + "database_labels = [t.split(\"/\")[-1].split(\".xyz\")[0] for t in database_xyzs]" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [], + "source": [ + "target_labels = np.array(target_labels)" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [], + "source": [ + "database_labels = np.array(database_labels)" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + ":1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " target_ncharges = np.array(target_ncharges)\n" + ] + } + ], + "source": [ + "target_ncharges = np.array(target_ncharges)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + ":1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " database_ncharges = np.array(database_ncharges)\n" + ] + } + ], + "source": [ + "database_ncharges = np.array(database_ncharges)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [], + "source": [ + "np.savez(\"data.npz\", \n", + " target_labels=target_labels, \n", + " target_CMs=target_CMs, \n", + " target_ncharges=target_ncharges,\n", + " database_labels=database_labels, \n", + " database_CMs=database_CMs,\n", + " database_ncharges=database_ncharges)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [], + "source": [ + "x = np.load(\"data.npz\", allow_pickle=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['target_labels',\n", + " 'target_CMs',\n", + " 'target_ncharges',\n", + " 'database_labels',\n", + " 'database_CMs',\n", + " 'database_ncharges']" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x.files" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/.ipynb_checkpoints/GetCMAmons-checkpoint.ipynb b/.ipynb_checkpoints/GetCMAmons-checkpoint.ipynb new file mode 100644 index 0000000..3613466 --- /dev/null +++ b/.ipynb_checkpoints/GetCMAmons-checkpoint.ipynb @@ -0,0 +1,312 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import qml " + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "from glob import glob\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "from rdkit import Chem" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "def read_sdf(sdf):\n", + " with open(sdf, \"r\") as f:\n", + " txt = f.read().rstrip()\n", + " return txt" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "def get_CM(sdf):\n", + " mol = Chem.MolFromMolBlock(sdf)\n", + " # rdkit molobj\n", + " ncharges = [atom.GetAtomicNum() for atom in mol.GetAtoms()]\n", + " conf = mol.GetConformer()\n", + " coords = np.asarray(conf.GetPositions())\n", + " CM = np.zeros((len(coords), len(coords)))\n", + " for i in range(len(coords)):\n", + " for j in range(len(coords)):\n", + " if i==j:\n", + " CM[i,j] = 0.5 * ncharges[i]**2.4\n", + " else:\n", + " CM[i,j] = ncharges[i] * ncharges[j] / np.linalg.norm(coords[j] - coords[i])\n", + " \n", + " return ncharges, CM" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['targets/qm9.sdf', 'targets/vitc.sdf', 'targets/vitd.sdf']" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_sdfs = sorted(glob(\"targets/*.sdf\"))\n", + "target_sdfs" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_files = sorted(glob(\"amons-qm9/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_sdfs = [read_sdf(x) for x in qm9_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_ncharges = []\n", + "qm9_amons_CMs = []\n", + "for sdf in qm9_amons_sdfs:\n", + " ncharge, CM = get_CM(sdf)\n", + " qm9_amons_ncharges.append(ncharge)\n", + " qm9_amons_CMs.append(CM)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in qm9_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_files = sorted(glob(\"amons-vitc/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_sdfs = [read_sdf(x) for x in vitc_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_ncharges = []\n", + "vitc_amons_CMs = []\n", + "for sdf in vitc_amons_sdfs:\n", + " ncharge, CM = get_CM(sdf)\n", + " vitc_amons_ncharges.append(ncharge)\n", + " vitc_amons_CMs.append(CM)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in vitc_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_files = sorted(glob(\"amons-vitd/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_sdfs = [read_sdf(x) for x in vitd_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_ncharges = []\n", + "vitd_amons_CMs = []\n", + "for sdf in vitd_amons_sdfs:\n", + " ncharge, CM = get_CM(sdf)\n", + " vitd_amons_ncharges.append(ncharge)\n", + " vitd_amons_CMs.append(CM)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in vitd_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [], + "source": [ + "# np save " + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/numpy/core/_asarray.py:136: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " return array(a, dtype, copy=False, order=order, subok=True)\n" + ] + } + ], + "source": [ + "np.savez(\"amons_data.npz\", \n", + " vitd_amons_labels=vitd_amons_labels,\n", + " vitc_amons_labels=vitc_amons_labels,\n", + " qm9_amons_labels=qm9_amons_labels,\n", + " vitd_amons_ncharges=vitd_amons_ncharges,\n", + " vitc_amons_ncharges=vitc_amons_ncharges,\n", + " qm9_amons_ncharges=qm9_amons_ncharges,\n", + " vitd_amons_CMs=vitd_amons_CMs,\n", + " vitc_amons_CMs=vitc_amons_CMs,\n", + " qm9_amons_CMs=qm9_amons_CMs)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [], + "source": [ + "x = np.load(\"amons_data.npz\", allow_pickle=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['vitd_amons_labels',\n", + " 'vitc_amons_labels',\n", + " 'qm9_amons_labels',\n", + " 'vitd_amons_ncharges',\n", + " 'vitc_amons_ncharges',\n", + " 'qm9_amons_ncharges',\n", + " 'vitd_amons_CMs',\n", + " 'vitc_amons_CMs',\n", + " 'qm9_amons_CMs']" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x.files" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/.ipynb_checkpoints/GetFCHL-checkpoint.ipynb b/.ipynb_checkpoints/GetFCHL-checkpoint.ipynb new file mode 100644 index 0000000..6ff797a --- /dev/null +++ b/.ipynb_checkpoints/GetFCHL-checkpoint.ipynb @@ -0,0 +1,257 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [], + "source": [ + "import qml " + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [], + "source": [ + "from glob import glob\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [], + "source": [ + "from rdkit import Chem" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [], + "source": [ + "target_xyzs = sorted(glob(\"targets/*.xyz\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [], + "source": [ + "def read_sdf(sdf):\n", + " with open(sdf, \"r\") as f:\n", + " txt = f.read().rstrip()\n", + " return txt" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [], + "source": [ + "def get_ncharges_coords(sdf):\n", + " mol = Chem.MolFromMolBlock(sdf)\n", + " #mol = Chem.AddHs(mol)\n", + " # rdkit molobj\n", + " ncharges = [atom.GetAtomicNum() for atom in mol.GetAtoms()]\n", + " conf = mol.GetConformer()\n", + " coords = np.asarray(conf.GetPositions())\n", + " return ncharges, coords" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['targets/qm9.sdf', 'targets/vitc.sdf', 'targets/vitd.sdf']" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_files = sorted(glob(\"targets/*.sdf\"))\n", + "target_files" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [], + "source": [ + "target_sdfs = [read_sdf(x) for x in target_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in target_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[9, 12, 28]" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sizes = [len(x) for x in ncharges_list]\n", + "sizes" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[array([6, 7, 8]), array([6, 8]), array([6, 8])]" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "elements_list = [np.unique(x) for x in ncharges_list]\n", + "elements_list" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/aqml/lib/python3.7/site-packages/ipykernel_launcher.py:5: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"\n" + ] + } + ], + "source": [ + "target_reps = np.array(\n", + "[np.array(qml.representations.generate_fchl_acsf(ncharges_list[i],\n", + " coords_list[i],\n", + " elements=elements_list[i]))\n", + "for i in range(len(ncharges_list))])" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(28, 168)" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_reps[2].shape" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [], + "source": [ + "target_labels = [t.split(\"/\")[-1].split(\".xyz\")[0] for t in target_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [], + "source": [ + "np.savez(\"target_FCHL_data.npz\", \n", + " target_labels=target_labels, \n", + " target_reps=target_reps, \n", + " target_ncharges=ncharges_list,)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/.ipynb_checkpoints/GetFCHLAmons-checkpoint.ipynb b/.ipynb_checkpoints/GetFCHLAmons-checkpoint.ipynb new file mode 100644 index 0000000..ba0c80c --- /dev/null +++ b/.ipynb_checkpoints/GetFCHLAmons-checkpoint.ipynb @@ -0,0 +1,431 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [], + "source": [ + "import qml " + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [], + "source": [ + "from glob import glob\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [], + "source": [ + "from rdkit import Chem" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [], + "source": [ + "def read_sdf(sdf):\n", + " with open(sdf, \"r\") as f:\n", + " txt = f.read().rstrip()\n", + " return txt" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [], + "source": [ + "def get_ncharges_coords(sdf):\n", + " mol = Chem.MolFromMolBlock(sdf)\n", + " #mol = Chem.AddHs(mol)\n", + " # rdkit molobj\n", + " ncharges = [atom.GetAtomicNum() for atom in mol.GetAtoms()]\n", + " conf = mol.GetConformer()\n", + " coords = np.asarray(conf.GetPositions())\n", + " return ncharges, coords" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['targets/qm9.sdf', 'targets/vitc.sdf', 'targets/vitd.sdf']" + ] + }, + "execution_count": 40, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_sdfs = sorted(glob(\"targets/*.sdf\"))\n", + "target_sdfs" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_files = sorted(glob(\"amons-qm9/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_sdfs = [read_sdf(x) for x in qm9_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in qm9_amons_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_ncharges = ncharges_list" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_reps = [np.array(qml.representations.generate_fchl_acsf(\n", + " ncharges_list[i],\n", + " coords_list[i],\n", + " elements=[6,7,8])) for i in \n", + " range(len(ncharges_list))]" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/aqml/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"Entry point for launching an IPython kernel.\n" + ] + } + ], + "source": [ + "qm9_reps = np.array(qm9_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(1, 312)" + ] + }, + "execution_count": 48, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "qm9_reps[0].shape" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in qm9_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_files = sorted(glob(\"amons-vitc/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_sdfs = [read_sdf(x) for x in vitc_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in vitc_amons_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_ncharges = ncharges_list" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_reps = [np.array(qml.representations.generate_fchl_acsf(\n", + " ncharges_list[i],\n", + " coords_list[i],\n", + " elements=[6,8])) for i in \n", + " range(len(ncharges_list))]" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/aqml/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"Entry point for launching an IPython kernel.\n" + ] + } + ], + "source": [ + "vitc_reps = np.array(vitc_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in vitc_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_files = sorted(glob(\"amons-vitd/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_sdfs = [read_sdf(x) for x in vitd_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in vitd_amons_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_ncharges = ncharges_list" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_reps = [np.array(qml.representations.generate_fchl_acsf(\n", + " ncharges_list[i],\n", + " coords_list[i],\n", + " elements=[6,8])) for i \n", + " in range(len(ncharges_list))]" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/aqml/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"Entry point for launching an IPython kernel.\n" + ] + } + ], + "source": [ + "vitd_reps = np.array(vitd_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in vitd_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": {}, + "outputs": [], + "source": [ + "# np save " + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": {}, + "outputs": [], + "source": [ + "np.savez(\"amons_FCHL_data.npz\", \n", + " vitd_amons_labels=vitd_amons_labels,\n", + " vitc_amons_labels=vitc_amons_labels,\n", + " qm9_amons_labels=qm9_amons_labels,\n", + " vitd_amons_ncharges=vitd_ncharges,\n", + " vitc_amons_ncharges=vitc_ncharges,\n", + " qm9_amons_ncharges=qm9_ncharges,\n", + " vitd_amons_slatms=vitd_reps,\n", + " vitc_amons_slatms=vitc_reps,\n", + " qm9_amons_slatms=qm9_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(1, 168)" + ] + }, + "execution_count": 68, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "vitd_reps[0].shape" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/.ipynb_checkpoints/GetSLATM-checkpoint.ipynb b/.ipynb_checkpoints/GetSLATM-checkpoint.ipynb new file mode 100644 index 0000000..026e195 --- /dev/null +++ b/.ipynb_checkpoints/GetSLATM-checkpoint.ipynb @@ -0,0 +1,226 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import qml " + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "from glob import glob\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "from rdkit import Chem" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "target_xyzs = sorted(glob(\"targets/*.xyz\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "def read_sdf(sdf):\n", + " with open(sdf, \"r\") as f:\n", + " txt = f.read().rstrip()\n", + " return txt" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "def get_ncharges_coords(sdf):\n", + " mol = Chem.MolFromMolBlock(sdf)\n", + " #mol = Chem.AddHs(mol)\n", + " # rdkit molobj\n", + " ncharges = [atom.GetAtomicNum() for atom in mol.GetAtoms()]\n", + " conf = mol.GetConformer()\n", + " coords = np.asarray(conf.GetPositions())\n", + " return ncharges, coords" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['targets/qm9.sdf', 'targets/vitc.sdf', 'targets/vitd.sdf']" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_files = sorted(glob(\"targets/*.sdf\"))\n", + "target_files" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "target_sdfs = [read_sdf(x) for x in target_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in target_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "# mbtypes separate to each target" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/ipykernel_launcher.py:5: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"\n" + ] + } + ], + "source": [ + "target_reps = np.array(\n", + "[np.array(qml.representations.generate_slatm(coords_list[i], ncharges_list[i], \n", + " mbtypes=qml.representations.get_slatm_mbtypes([ncharges_list[i]]),\n", + " local=True))\n", + "for i in range(len(ncharges_list))])" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(28, 857)" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_reps[2].shape" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [], + "source": [ + "target_labels = [t.split(\"/\")[-1].split(\".xyz\")[0] for t in target_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/numpy/core/_asarray.py:136: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " return array(a, dtype, copy=False, order=order, subok=True)\n" + ] + } + ], + "source": [ + "np.savez(\"target_vector_data.npz\", \n", + " target_labels=target_labels, \n", + " target_reps=target_reps, \n", + " target_ncharges=ncharges_list,)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/.ipynb_checkpoints/GetSLATMAmons-checkpoint.ipynb b/.ipynb_checkpoints/GetSLATMAmons-checkpoint.ipynb new file mode 100644 index 0000000..386fbcf --- /dev/null +++ b/.ipynb_checkpoints/GetSLATMAmons-checkpoint.ipynb @@ -0,0 +1,461 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import qml " + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "from glob import glob\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "from rdkit import Chem" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "def read_sdf(sdf):\n", + " with open(sdf, \"r\") as f:\n", + " txt = f.read().rstrip()\n", + " return txt" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "def get_ncharges_coords(sdf):\n", + " mol = Chem.MolFromMolBlock(sdf)\n", + " #mol = Chem.AddHs(mol)\n", + " # rdkit molobj\n", + " ncharges = [atom.GetAtomicNum() for atom in mol.GetAtoms()]\n", + " conf = mol.GetConformer()\n", + " coords = np.asarray(conf.GetPositions())\n", + " return ncharges, coords" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['targets/qm9.sdf', 'targets/vitc.sdf', 'targets/vitd.sdf']" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_sdfs = sorted(glob(\"targets/*.sdf\"))\n", + "target_sdfs" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_files = sorted(glob(\"amons-qm9/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_sdfs = [read_sdf(x) for x in qm9_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in qm9_amons_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_ncharges = ncharges_list" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [], + "source": [ + "mbtypes = qml.representations.get_slatm_mbtypes(ncharges_list)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_reps = [np.array(qml.representations.generate_slatm(coords_list[i], ncharges_list[i], mbtypes,\n", + " local=True)) for i in \n", + " range(len(ncharges_list))]" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"Entry point for launching an IPython kernel.\n" + ] + } + ], + "source": [ + "qm9_reps = np.array(qm9_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(1, 3121)" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "qm9_reps[0].shape" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in qm9_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_files = sorted(glob(\"amons-vitc/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_sdfs = [read_sdf(x) for x in vitc_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in vitc_amons_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_ncharges = ncharges_list" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [], + "source": [ + "mbtypes = qml.representations.get_slatm_mbtypes(ncharges_list)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_reps = [np.array(qml.representations.generate_slatm(coords_list[i], ncharges_list[i], \n", + " mbtypes, local=True)) for i in \n", + " range(len(ncharges_list))]" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"Entry point for launching an IPython kernel.\n" + ] + } + ], + "source": [ + "vitc_reps = np.array(vitc_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in vitc_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_files = sorted(glob(\"amons-vitd/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_sdfs = [read_sdf(x) for x in vitd_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in vitd_amons_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_ncharges = ncharges_list" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [], + "source": [ + "mbtypes = qml.representations.get_slatm_mbtypes(ncharges_list)" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_reps = [np.array(qml.representations.generate_slatm(coords_list[i], ncharges_list[i], \n", + " mbtypes, local=True)) for i \n", + " in range(len(ncharges_list))]" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"Entry point for launching an IPython kernel.\n" + ] + } + ], + "source": [ + "vitd_reps = np.array(vitd_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in vitd_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [], + "source": [ + "# np save " + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/numpy/core/_asarray.py:136: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " return array(a, dtype, copy=False, order=order, subok=True)\n" + ] + } + ], + "source": [ + "np.savez(\"amons_vector_data.npz\", \n", + " vitd_amons_labels=vitd_amons_labels,\n", + " vitc_amons_labels=vitc_amons_labels,\n", + " qm9_amons_labels=qm9_amons_labels,\n", + " vitd_amons_ncharges=vitd_ncharges,\n", + " vitc_amons_ncharges=vitc_ncharges,\n", + " qm9_amons_ncharges=qm9_ncharges,\n", + " vitd_amons_slatms=vitd_reps,\n", + " vitc_amons_slatms=vitc_reps,\n", + " qm9_amons_slatms=qm9_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(1, 857)" + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "vitd_reps[0].shape" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/.ipynb_checkpoints/GetSOAP-checkpoint.ipynb b/.ipynb_checkpoints/GetSOAP-checkpoint.ipynb new file mode 100644 index 0000000..6ff797a --- /dev/null +++ b/.ipynb_checkpoints/GetSOAP-checkpoint.ipynb @@ -0,0 +1,257 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [], + "source": [ + "import qml " + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [], + "source": [ + "from glob import glob\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [], + "source": [ + "from rdkit import Chem" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [], + "source": [ + "target_xyzs = sorted(glob(\"targets/*.xyz\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [], + "source": [ + "def read_sdf(sdf):\n", + " with open(sdf, \"r\") as f:\n", + " txt = f.read().rstrip()\n", + " return txt" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [], + "source": [ + "def get_ncharges_coords(sdf):\n", + " mol = Chem.MolFromMolBlock(sdf)\n", + " #mol = Chem.AddHs(mol)\n", + " # rdkit molobj\n", + " ncharges = [atom.GetAtomicNum() for atom in mol.GetAtoms()]\n", + " conf = mol.GetConformer()\n", + " coords = np.asarray(conf.GetPositions())\n", + " return ncharges, coords" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['targets/qm9.sdf', 'targets/vitc.sdf', 'targets/vitd.sdf']" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_files = sorted(glob(\"targets/*.sdf\"))\n", + "target_files" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [], + "source": [ + "target_sdfs = [read_sdf(x) for x in target_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in target_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[9, 12, 28]" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sizes = [len(x) for x in ncharges_list]\n", + "sizes" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[array([6, 7, 8]), array([6, 8]), array([6, 8])]" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "elements_list = [np.unique(x) for x in ncharges_list]\n", + "elements_list" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/aqml/lib/python3.7/site-packages/ipykernel_launcher.py:5: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"\n" + ] + } + ], + "source": [ + "target_reps = np.array(\n", + "[np.array(qml.representations.generate_fchl_acsf(ncharges_list[i],\n", + " coords_list[i],\n", + " elements=elements_list[i]))\n", + "for i in range(len(ncharges_list))])" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(28, 168)" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_reps[2].shape" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [], + "source": [ + "target_labels = [t.split(\"/\")[-1].split(\".xyz\")[0] for t in target_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [], + "source": [ + "np.savez(\"target_FCHL_data.npz\", \n", + " target_labels=target_labels, \n", + " target_reps=target_reps, \n", + " target_ncharges=ncharges_list,)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/.ipynb_checkpoints/GetSOAPAmons-checkpoint.ipynb b/.ipynb_checkpoints/GetSOAPAmons-checkpoint.ipynb new file mode 100644 index 0000000..ba0c80c --- /dev/null +++ b/.ipynb_checkpoints/GetSOAPAmons-checkpoint.ipynb @@ -0,0 +1,431 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [], + "source": [ + "import qml " + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [], + "source": [ + "from glob import glob\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [], + "source": [ + "from rdkit import Chem" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [], + "source": [ + "def read_sdf(sdf):\n", + " with open(sdf, \"r\") as f:\n", + " txt = f.read().rstrip()\n", + " return txt" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [], + "source": [ + "def get_ncharges_coords(sdf):\n", + " mol = Chem.MolFromMolBlock(sdf)\n", + " #mol = Chem.AddHs(mol)\n", + " # rdkit molobj\n", + " ncharges = [atom.GetAtomicNum() for atom in mol.GetAtoms()]\n", + " conf = mol.GetConformer()\n", + " coords = np.asarray(conf.GetPositions())\n", + " return ncharges, coords" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['targets/qm9.sdf', 'targets/vitc.sdf', 'targets/vitd.sdf']" + ] + }, + "execution_count": 40, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_sdfs = sorted(glob(\"targets/*.sdf\"))\n", + "target_sdfs" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_files = sorted(glob(\"amons-qm9/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_sdfs = [read_sdf(x) for x in qm9_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in qm9_amons_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_ncharges = ncharges_list" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_reps = [np.array(qml.representations.generate_fchl_acsf(\n", + " ncharges_list[i],\n", + " coords_list[i],\n", + " elements=[6,7,8])) for i in \n", + " range(len(ncharges_list))]" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/aqml/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"Entry point for launching an IPython kernel.\n" + ] + } + ], + "source": [ + "qm9_reps = np.array(qm9_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(1, 312)" + ] + }, + "execution_count": 48, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "qm9_reps[0].shape" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in qm9_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_files = sorted(glob(\"amons-vitc/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_sdfs = [read_sdf(x) for x in vitc_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in vitc_amons_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_ncharges = ncharges_list" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_reps = [np.array(qml.representations.generate_fchl_acsf(\n", + " ncharges_list[i],\n", + " coords_list[i],\n", + " elements=[6,8])) for i in \n", + " range(len(ncharges_list))]" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/aqml/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"Entry point for launching an IPython kernel.\n" + ] + } + ], + "source": [ + "vitc_reps = np.array(vitc_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in vitc_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_files = sorted(glob(\"amons-vitd/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_sdfs = [read_sdf(x) for x in vitd_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in vitd_amons_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_ncharges = ncharges_list" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_reps = [np.array(qml.representations.generate_fchl_acsf(\n", + " ncharges_list[i],\n", + " coords_list[i],\n", + " elements=[6,8])) for i \n", + " in range(len(ncharges_list))]" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/aqml/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"Entry point for launching an IPython kernel.\n" + ] + } + ], + "source": [ + "vitd_reps = np.array(vitd_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in vitd_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": {}, + "outputs": [], + "source": [ + "# np save " + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": {}, + "outputs": [], + "source": [ + "np.savez(\"amons_FCHL_data.npz\", \n", + " vitd_amons_labels=vitd_amons_labels,\n", + " vitc_amons_labels=vitc_amons_labels,\n", + " qm9_amons_labels=qm9_amons_labels,\n", + " vitd_amons_ncharges=vitd_ncharges,\n", + " vitc_amons_ncharges=vitc_ncharges,\n", + " qm9_amons_ncharges=qm9_ncharges,\n", + " vitd_amons_slatms=vitd_reps,\n", + " vitc_amons_slatms=vitc_reps,\n", + " qm9_amons_slatms=qm9_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(1, 168)" + ] + }, + "execution_count": 68, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "vitd_reps[0].shape" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/.ipynb_checkpoints/GetaCM-checkpoint.ipynb b/.ipynb_checkpoints/GetaCM-checkpoint.ipynb new file mode 100644 index 0000000..bd6d2de --- /dev/null +++ b/.ipynb_checkpoints/GetaCM-checkpoint.ipynb @@ -0,0 +1,374 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "from glob import glob\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "from rdkit import Chem" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "target_xyzs = sorted(glob(\"targets/*.xyz\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "def read_sdf(sdf):\n", + " with open(sdf, \"r\") as f:\n", + " txt = f.read().rstrip()\n", + " return txt" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "def get_ncharges_coords(sdf):\n", + " mol = Chem.MolFromMolBlock(sdf)\n", + " #mol = Chem.AddHs(mol)\n", + " # rdkit molobj\n", + " ncharges = [atom.GetAtomicNum() for atom in mol.GetAtoms()]\n", + " conf = mol.GetConformer()\n", + " coords = np.asarray(conf.GetPositions())\n", + " return ncharges, coords" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [], + "source": [ + "def cutoff_func(R_ij, central_cutoff=4.8, central_decay=0.03):\n", + " if R_ij <= (central_cutoff - central_decay):\n", + " # print('1')\n", + " func = 1.\n", + " elif ((central_cutoff - central_decay) < R_ij) and (R_ij <= (central_cutoff + central_decay)):\n", + " # print('function')\n", + " func = 0.5 * (1. + np.cos((np.pi * R_ij - central_cutoff + central_decay)))\n", + " else:\n", + " # print('zero')\n", + " func = 0.\n", + " return func" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [], + "source": [ + "def get_atomic_CM(ncharges, coords, max_natoms, central_cutoff=4.8, central_decay=0.03):\n", + " size = int((max_natoms + 1)*max_natoms / 2)\n", + " rep = np.zeros((len(ncharges), size))\n", + " \n", + " # central atom loop\n", + " for k in range(len(ncharges)):\n", + " M = np.zeros((len(ncharges), len(ncharges)))\n", + " for i in range(len(ncharges)):\n", + " R_ik = np.linalg.norm(coords[i]-coords[k])\n", + " # print('R_ik', R_ik)\n", + " f_ik = cutoff_func(R_ik, central_cutoff=central_cutoff,\n", + " central_decay=central_decay)\n", + " for j in range(i):\n", + " if i == j:\n", + " M[i,j] = 0.5 * ncharges[i]**2.4 * f_ik**2\n", + " M[j,i] = M[i,j]\n", + " \n", + " else:\n", + " R_jk = np.linalg.norm(coords[j]-coords[k])\n", + " # print('R_jk', R_jk)\n", + " f_jk = cutoff_func(R_jk, central_cutoff=central_cutoff,\n", + " central_decay=central_decay)\n", + " R_ij = np.linalg.norm(coords[i]-coords[j])\n", + " # print('R_ij', R_ij)\n", + " f_ij = cutoff_func(R_ij, central_cutoff=central_cutoff,\n", + " central_decay=central_decay)\n", + " M[i,j] = (ncharges[i]*ncharges[j]/R_ij)*f_ik*f_jk*f_ij\n", + " M[j,i] = M[i,j]\n", + " \n", + " # concat upper triangular and diagonal\n", + " upper_triang = np.triu(M)\n", + " non_zero_i, non_zero_j = np.nonzero(upper_triang)\n", + " unpadded_rep = upper_triang[non_zero_i, non_zero_j]\n", + " # pad to full size\n", + " n_zeros = size - len(unpadded_rep)\n", + " zeros = np.zeros(n_zeros)\n", + " rep[k] = np.concatenate((unpadded_rep, zeros))\n", + " \n", + " return rep" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['targets/qm9.sdf', 'targets/vitc.sdf', 'targets/vitd.sdf']" + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_files = sorted(glob(\"targets/*.sdf\"))\n", + "target_files" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [], + "source": [ + "target_sdfs = [read_sdf(x) for x in target_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in target_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[9, 12, 28]" + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sizes = [len(x) for x in ncharges_list]\n", + "sizes" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/ipykernel_launcher.py:4: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " after removing the cwd from sys.path.\n" + ] + } + ], + "source": [ + "target_reps = np.array(\n", + "[np.array(get_atomic_CM(np.array(ncharges_list[i]), np.array(coords_list[i]),\n", + " max_natoms=sizes[i]))\n", + "for i in range(len(ncharges_list))])" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[39.89268481, 20.19979599, 16.0445292 , 10.27020053, 13.46303348,\n", + " 16.70306767, 23.89446837, 17.57023229, 9.7738549 , 11.22347027,\n", + " 14.10327203, 32.57835982, 15.64275949, 17.59643875, 24.93677728,\n", + " 30.00133532, 17.36551167, 17.48814725, 17.13482138, 13.22143102,\n", + " 32.63942034, 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ],\n", + " [39.89268481, 20.19979599, 16.0445292 , 10.27020053, 13.46303348,\n", + " 16.70306767, 23.89446837, 17.57023229, 9.7738549 , 10.24376593,\n", + " 11.5318783 , 11.22347027, 14.10327203, 32.57835982, 15.64275949,\n", + " 14.05740332, 18.07046347, 17.59643875, 24.93677728, 30.00133532,\n", + " 24.37881483, 23.29821822, 17.36551167, 17.48814725, 40.31759536,\n", + " 34.11172854, 17.13482138, 13.22143102, 28.78715844, 16.01650232,\n", + " 12.2823109 , 40.74474394, 21.22940297, 32.63942034, 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ],\n", + " [39.89268481, 20.19979599, 16.0445292 , 10.27020053, 13.46303348,\n", + " 16.70306767, 23.89446837, 17.57023229, 9.7738549 , 10.24376593,\n", + " 11.5318783 , 11.22347027, 14.10327203, 32.57835982, 15.64275949,\n", + " 14.05740332, 18.07046347, 17.59643875, 24.93677728, 30.00133532,\n", + " 24.37881483, 23.29821822, 17.36551167, 17.48814725, 40.31759536,\n", + " 34.11172854, 17.13482138, 13.22143102, 28.78715844, 16.01650232,\n", + " 12.2823109 , 40.74474394, 21.22940297, 32.63942034, 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ],\n", + " [39.89268481, 20.19979599, 16.0445292 , 10.27020053, 13.46303348,\n", + " 16.70306767, 23.89446837, 17.57023229, 9.7738549 , 10.24376593,\n", + " 11.5318783 , 11.22347027, 14.10327203, 32.57835982, 15.64275949,\n", + " 14.05740332, 18.07046347, 17.59643875, 24.93677728, 30.00133532,\n", + " 24.37881483, 23.29821822, 17.36551167, 17.48814725, 40.31759536,\n", + " 34.11172854, 17.13482138, 13.22143102, 28.78715844, 16.01650232,\n", + " 12.2823109 , 40.74474394, 21.22940297, 32.63942034, 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ],\n", + " [39.89268481, 20.19979599, 16.0445292 , 10.27020053, 13.46303348,\n", + " 16.70306767, 23.89446837, 17.57023229, 9.7738549 , 10.24376593,\n", + " 11.5318783 , 11.22347027, 14.10327203, 32.57835982, 15.64275949,\n", + " 14.05740332, 18.07046347, 17.59643875, 24.93677728, 30.00133532,\n", + " 24.37881483, 23.29821822, 17.36551167, 17.48814725, 40.31759536,\n", + " 34.11172854, 17.13482138, 13.22143102, 28.78715844, 16.01650232,\n", + " 12.2823109 , 40.74474394, 21.22940297, 32.63942034, 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ],\n", + " [23.89446837, 17.57023229, 9.7738549 , 10.24376593, 11.5318783 ,\n", + " 11.22347027, 14.10327203, 32.57835982, 15.64275949, 14.05740332,\n", + " 18.07046347, 17.59643875, 24.93677728, 30.00133532, 24.37881483,\n", + " 23.29821822, 17.36551167, 17.48814725, 40.31759536, 34.11172854,\n", + " 17.13482138, 13.22143102, 28.78715844, 16.01650232, 12.2823109 ,\n", + " 40.74474394, 21.22940297, 32.63942034, 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ],\n", + " [23.89446837, 17.57023229, 9.7738549 , 10.24376593, 11.5318783 ,\n", + " 11.22347027, 14.10327203, 32.57835982, 15.64275949, 14.05740332,\n", + " 18.07046347, 17.59643875, 24.93677728, 30.00133532, 24.37881483,\n", + " 23.29821822, 17.36551167, 17.48814725, 40.31759536, 34.11172854,\n", + " 17.13482138, 13.22143102, 28.78715844, 16.01650232, 12.2823109 ,\n", + " 40.74474394, 21.22940297, 32.63942034, 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ],\n", + " [39.89268481, 20.19979599, 16.0445292 , 10.27020053, 13.46303348,\n", + " 16.70306767, 23.89446837, 17.57023229, 9.7738549 , 10.24376593,\n", + " 11.5318783 , 11.22347027, 14.10327203, 32.57835982, 15.64275949,\n", + " 14.05740332, 18.07046347, 17.59643875, 24.93677728, 30.00133532,\n", + " 24.37881483, 23.29821822, 17.36551167, 17.48814725, 40.31759536,\n", + " 34.11172854, 17.13482138, 13.22143102, 28.78715844, 16.01650232,\n", + " 12.2823109 , 40.74474394, 21.22940297, 32.63942034, 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ],\n", + " [39.89268481, 20.19979599, 16.0445292 , 10.27020053, 13.46303348,\n", + " 16.70306767, 23.89446837, 17.57023229, 9.7738549 , 10.24376593,\n", + " 11.5318783 , 11.22347027, 14.10327203, 32.57835982, 15.64275949,\n", + " 14.05740332, 18.07046347, 17.59643875, 24.93677728, 30.00133532,\n", + " 24.37881483, 23.29821822, 17.36551167, 17.48814725, 40.31759536,\n", + " 34.11172854, 17.13482138, 13.22143102, 28.78715844, 16.01650232,\n", + " 12.2823109 , 40.74474394, 21.22940297, 32.63942034, 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ,\n", + " 0. , 0. , 0. , 0. , 0. ]])" + ] + }, + "execution_count": 43, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_reps[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": {}, + "outputs": [], + "source": [ + "target_labels = [t.split(\"/\")[-1].split(\".xyz\")[0] for t in target_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/numpy/core/_asarray.py:136: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " return array(a, dtype, copy=False, order=order, subok=True)\n" + ] + } + ], + "source": [ + "np.savez(\"target_aCM_data.npz\", \n", + " target_labels=target_labels, \n", + " target_reps=target_reps, \n", + " target_ncharges=ncharges_list,)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/.ipynb_checkpoints/GetaCMAmons-checkpoint.ipynb b/.ipynb_checkpoints/GetaCMAmons-checkpoint.ipynb new file mode 100644 index 0000000..01c6e0f --- /dev/null +++ b/.ipynb_checkpoints/GetaCMAmons-checkpoint.ipynb @@ -0,0 +1,490 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "from glob import glob\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "from rdkit import Chem" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "def read_sdf(sdf):\n", + " with open(sdf, \"r\") as f:\n", + " txt = f.read().rstrip()\n", + " return txt" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "def get_ncharges_coords(sdf):\n", + " mol = Chem.MolFromMolBlock(sdf)\n", + " #mol = Chem.AddHs(mol)\n", + " # rdkit molobj\n", + " ncharges = [atom.GetAtomicNum() for atom in mol.GetAtoms()]\n", + " conf = mol.GetConformer()\n", + " coords = np.asarray(conf.GetPositions())\n", + " return ncharges, coords" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "def cutoff_func(R_ij, central_cutoff=4.8, central_decay=1):\n", + " if R_ij <= (central_cutoff - central_decay):\n", + " func = 1.\n", + " elif ((central_cutoff - central_decay) < R_ij) and (R_ij <= (central_cutoff + central_decay)):\n", + " func = 0.5 * (1. + np.cos((np.pi * R_ij - central_cutoff + central_decay)/central_decay))\n", + " else:\n", + " func = 0.\n", + " return func" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [], + "source": [ + "def get_atomic_CM(ncharges, coords, max_natoms, central_cutoff=4.8, central_decay=1):\n", + " size = int((max_natoms + 1)*max_natoms / 2)\n", + " rep = np.zeros((len(ncharges), size))\n", + " \n", + " # central atom loop\n", + " for k in range(len(ncharges)):\n", + " M = np.zeros((len(ncharges), len(ncharges)))\n", + " for i in range(len(ncharges)):\n", + " R_ik = np.linalg.norm(coords[i]-coords[k])\n", + " # print('R_ik', R_ik)\n", + " f_ik = cutoff_func(R_ik, central_cutoff=central_cutoff,\n", + " central_decay=central_decay)\n", + " for j in range(len(ncharges)):\n", + " if i <=j:\n", + " if i == j:\n", + " M[i,j] = 0.5 * ncharges[i]**2.4 * f_ik**2\n", + " M[j,i] = M[i,j]\n", + "\n", + " else:\n", + " R_jk = np.linalg.norm(coords[j]-coords[k])\n", + " # print('R_jk', R_jk)\n", + " f_jk = cutoff_func(R_jk, central_cutoff=central_cutoff,\n", + " central_decay=central_decay)\n", + " R_ij = np.linalg.norm(coords[i]-coords[j])\n", + " # print('R_ij', R_ij)\n", + " f_ij = cutoff_func(R_ij, central_cutoff=central_cutoff,\n", + " central_decay=central_decay)\n", + " M[i,j] = (ncharges[i]*ncharges[j]/R_ij)*f_ik*f_jk*f_ij\n", + " M[j,i] = M[i,j]\n", + "\n", + "\n", + " # concat upper triangular and diagonal\n", + " upper_triang = M[np.triu_indices(len(M))]\n", + " \n", + " # pad to full size\n", + " n_zeros = size - len(upper_triang)\n", + " zeros = np.zeros(n_zeros)\n", + " rep[k] = np.concatenate((upper_triang, zeros))\n", + "\n", + " return rep" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['targets/qm9.sdf', 'targets/vitc.sdf', 'targets/vitd.sdf']" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target_sdfs = sorted(glob(\"targets/*.sdf\"))\n", + "target_sdfs" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_files = sorted(glob(\"amons-qm9/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_sdfs = [read_sdf(x) for x in qm9_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in qm9_amons_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_ncharges = ncharges_list" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_reps = [np.array(get_atomic_CM(np.array(ncharges_list[i]),\n", + " np.array(coords_list[i]), \n", + " max_natoms=9))\n", + " for i in range(len(ncharges_list))]" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"Entry point for launching an IPython kernel.\n" + ] + } + ], + "source": [ + "qm9_reps = np.array(qm9_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(1, 45)" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "qm9_reps[0].shape" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [], + "source": [ + "qm9_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in qm9_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_files = sorted(glob(\"amons-vitc/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_sdfs = [read_sdf(x) for x in vitc_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in vitc_amons_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_ncharges = ncharges_list" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_reps = [np.array(get_atomic_CM(np.array(ncharges_list[i]), np.array(coords_list[i]), \n", + " max_natoms=12)) for i in \n", + " range(len(ncharges_list))]" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"Entry point for launching an IPython kernel.\n" + ] + } + ], + "source": [ + "vitc_reps = np.array(vitc_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [], + "source": [ + "vitc_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in vitc_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_files = sorted(glob(\"amons-vitd/*.sdf\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_sdfs = [read_sdf(x) for x in vitd_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [], + "source": [ + "conf_data = [get_ncharges_coords(x) for x in vitd_amons_sdfs]" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [], + "source": [ + "ncharges_list, coords_list = zip(*conf_data)" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_ncharges = ncharges_list" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_reps = [np.array(get_atomic_CM(np.array(ncharges_list[i]), np.array(coords_list[i]),\n", + " max_natoms=28))\n", + " for i in range(len(ncharges_list))]" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " \"\"\"Entry point for launching an IPython kernel.\n" + ] + } + ], + "source": [ + "vitd_reps = np.array(vitd_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [], + "source": [ + "vitd_amons_labels = [t.split(\"/\")[-1].split(\".sdf\")[0] for t in vitd_amons_files]" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": {}, + "outputs": [], + "source": [ + "# np save " + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/numpy/core/_asarray.py:136: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", + " return array(a, dtype, copy=False, order=order, subok=True)\n" + ] + } + ], + "source": [ + "np.savez(\"amons_aCM_data.npz\", \n", + " vitd_amons_labels=vitd_amons_labels,\n", + " vitc_amons_labels=vitc_amons_labels,\n", + " qm9_amons_labels=qm9_amons_labels,\n", + " vitd_amons_ncharges=vitd_ncharges,\n", + " vitc_amons_ncharges=vitc_ncharges,\n", + " qm9_amons_ncharges=qm9_ncharges,\n", + " vitd_amons_reps=vitd_reps,\n", + " vitc_amons_reps=vitc_reps,\n", + " qm9_amons_reps=qm9_reps)" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(1, 406)" + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "vitd_reps[0].shape" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/.ipynb_checkpoints/xyz2sdf-checkpoint.ipynb b/.ipynb_checkpoints/xyz2sdf-checkpoint.ipynb new file mode 100644 index 0000000..2742375 --- /dev/null +++ b/.ipynb_checkpoints/xyz2sdf-checkpoint.ipynb @@ -0,0 +1,235 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "demanding-buffer", + "metadata": {}, + "outputs": [], + "source": [ + "from rdkit import Chem" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "stuffed-charity", + "metadata": {}, + "outputs": [], + "source": [ + "from xyz2mol import xyz2mol as x2m" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "motivated-category", + "metadata": {}, + "outputs": [], + "source": [ + "from glob import glob" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "stunning-uncle", + "metadata": {}, + "outputs": [], + "source": [ + "targets = sorted(glob(\"targets/*\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "exceptional-knowing", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['targets/qm9_0.xyz', 'targets/vitc.xyz', 'targets/vitd.xyz']" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "targets" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "rental-toronto", + "metadata": {}, + "outputs": [], + "source": [ + "NUCLEAR_CHARGE = {\n", + " \"H\":1,\n", + " \"C\":6,\n", + " \"O\":8,\n", + " \"N\":7,\n", + " \"F\":9,\n", + " \"Cl\":17\n", + "}" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "associate-course", + "metadata": {}, + "outputs": [], + "source": [ + "def read_xyz(filename):\n", + " with open(filename, \"r\") as f:\n", + " lines = f.readlines()\n", + "\n", + " natoms = int(lines[0])\n", + " nuclear_charges = []\n", + " coordinates = []\n", + "\n", + " for i, line in enumerate(lines[2:natoms+2]):\n", + " tokens = line.split()\n", + "\n", + " if len(tokens) < 4:\n", + " break\n", + "\n", + " nuclear_charges.append(NUCLEAR_CHARGE[tokens[0]])\n", + " coordinates.append([float(token) for token in tokens[1:4]])\n", + " \n", + " return nuclear_charges, coordinates" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "beneficial-drilling", + "metadata": {}, + "outputs": [], + "source": [ + "def xyzfile_to_mol(filename):\n", + " ncharges, coords = read_xyz(filename)\n", + " mols = x2m(ncharges, coords)\n", + " return mols[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "violent-monaco", + "metadata": {}, + "outputs": [], + "source": [ + "def xyz_to_sdf(xyz):\n", + " ncharges, coords = read_xyz(xyz)\n", + " mol = x2m(ncharges, coords)[0]\n", + " conf = mol.GetConformer()\n", + " for i in range(mol.GetNumAtoms()):\n", + " x, y, z = coords[i]\n", + " conf.SetAtomPosition(i, Point3D(x, y, z))\n", + " sdfstr = Chem.MolToMolBlock(mol)\n", + " return sdfstr" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "compatible-proposal", + "metadata": {}, + "outputs": [], + "source": [ + "vitc = targets[1]\n", + "sdfstr = xyz_to_sdf(vitc)" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "id": "ruled-forestry", + "metadata": {}, + "outputs": [], + "source": [ + "with open('targets/vitc.sdf', 'w') as f:\n", + " f.write(sdfstr)" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "consistent-building", + "metadata": {}, + "outputs": [], + "source": [ + "vitd = targets[2]\n", + "sdfstr = xyz_to_sdf(vitd)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "amateur-debut", + "metadata": {}, + "outputs": [], + "source": [ + "with open('targets/vitd.sdf', 'w') as f:\n", + " f.write(sdfstr)" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "id": "serial-nature", + "metadata": {}, + "outputs": [], + "source": [ + "qm9 = targets[0]\n", + "sdfstr = xyz_to_sdf(qm9)" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "extensive-shoot", + "metadata": {}, + "outputs": [], + "source": [ + "with open('targets/qm9.sdf', 'w') as f:\n", + " f.write(sdfstr)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "recent-drill", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/GetFunctionalGroups.ipynb b/GetFunctionalGroups.ipynb deleted file mode 100644 index 9651451..0000000 --- a/GetFunctionalGroups.ipynb +++ /dev/null @@ -1,365 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "from rdkit import Chem\n", - "from xyz2mol import xyz2mol" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "import numpy as np" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "# need ncharges, coords" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "NUCLEAR_CHARGE = {\n", - " \"H\":1,\n", - " \"C\":6,\n", - " \"O\":8,\n", - " \"N\":7,\n", - " \"F\":9,\n", - " \"S\":16\n", - "}" - ] - }, - { - "cell_type": "code", - "execution_count": 60, - "metadata": {}, - "outputs": [], - "source": [ - "def read_xyz(filename):\n", - " with open(filename, \"r\") as f:\n", - " lines = f.readlines()\n", - "\n", - " natoms = int(lines[0])\n", - " nuclear_charges = []\n", - " coordinates = []\n", - "\n", - " for i, line in enumerate(lines[2:natoms+2]):\n", - " tokens = line.split()\n", - "\n", - " if len(tokens) < 4:\n", - " break\n", - "\n", - " nuclear_charges.append(NUCLEAR_CHARGE[tokens[0]])\n", - " coordinates.append([float(token) for token in tokens[1:4]])\n", - " \n", - " return nuclear_charges, coordinates" - ] - }, - { - "cell_type": "code", - "execution_count": 74, - "metadata": {}, - "outputs": [], - "source": [ - "def xyzfile_to_mol(filename):\n", - " ncharges, coords = read_xyz(filename)\n", - " mols = xyz2mol(ncharges, coords)\n", - " return mols[0]" - ] - }, - { - "cell_type": "code", - "execution_count": 75, - "metadata": {}, - "outputs": [], - "source": [ - "from glob import glob" - ] - }, - { - "cell_type": "code", - "execution_count": 76, - "metadata": {}, - "outputs": [], - "source": [ - "frag_files = [x for x in sorted(glob(\"qm7/*\"))]" - ] - }, - { - "cell_type": "code", - "execution_count": 77, - "metadata": {}, - "outputs": [], - "source": [ - "target_files = [x for x in sorted(glob(\"targets/*\"))]" - ] - }, - { - "cell_type": "code", - "execution_count": 78, - "metadata": {}, - "outputs": [], - "source": [ - "frag_mols = [xyzfile_to_mol(x) for x in frag_files]" - ] - }, - { - "cell_type": "code", - "execution_count": 79, - "metadata": {}, - "outputs": [], - "source": [ - "target_mols = [xyzfile_to_mol(x) for x in target_files]" - ] - }, - { - "cell_type": "code", - "execution_count": 87, - "metadata": {}, - "outputs": [], - "source": [ - "# for func group matches need to use SMARTS and \n", - "# func_group = Chem.MolFromSmarts(\"smarts\")\n", - "# mol.GetSubStructMatches(func_group)\n", - "# this returns tuples of matches (then count)" - ] - }, - { - "cell_type": "code", - "execution_count": 150, - "metadata": {}, - "outputs": [], - "source": [ - "# need to identify list of relevant functional groups" - ] - }, - { - "cell_type": "code", - "execution_count": 208, - "metadata": {}, - "outputs": [], - "source": [ - "functional_groups = {\n", - " 'arene' : 'c',\n", - " 'allenic C' : '[$([CX2](=C)=C)]',\n", - " 'vinylic C' : '[$([CX3]=[CX3])]',\n", - " 'acetylenic C' : '[$([CX2]#C)]',\n", - " \"carbonyl\" : '[$([CX3]=[OX1]),$([CX3+]-[OX1-])]',\n", - " 'aldeyhde' : '[CX3H1](=O)[#6]',\n", - " 'amide' : '[NX3][CX3](=[OX1])[#6]',\n", - " 'carboxylic acid': '[CX3](=O)[OX2H1]',\n", - " 'ester' : '[#6][CX3](=O)[OX2H0][#6]',\n", - " 'ketone' : '[#6][CX3](=O)[#6]',\n", - " 'ether' : '[OD2]([#6])[#6]',\n", - " 'azo general' : '[#7]',\n", - " 'amine' : '[NX3;H2,H1;!$(NC=O)]',\n", - " 'enamine' : '[NX3][CX3]=[CX3]',\n", - " 'imine' : '[$([CX3]([#6])[#6]),$([CX3H][#6])]=[$([NX2][#6]),$([NX2H])]',\n", - " 'nitrate' : '[$([NX3](=[OX1])(=[OX1])O),$([NX3+]([OX1-])(=[OX1])O)]',\n", - " 'nitrile' : '[NX1]#[CX2]',\n", - " 'nitro' : '[$([NX3](=O)=O),$([NX3+](=O)[O-])][!#8]',\n", - " 'alcohol' : '[#6][OX2H]',\n", - " 'enol' : '[OX2H][#6X3]=[#6]',\n", - " 'phenol' : '[OX2H][cX3]:[c]'\n", - "}" - ] - }, - { - "cell_type": "code", - "execution_count": 216, - "metadata": {}, - "outputs": [], - "source": [ - "with open('functional_groups.txt', 'w') as f:\n", - " for label, fg in functional_groups.items():\n", - " f.write(label+' '+fg+'\\n')" - ] - }, - { - "cell_type": "code", - "execution_count": 200, - "metadata": {}, - "outputs": [], - "source": [ - "def get_fg_count(mol, functional_groups):\n", - " fg_count = []\n", - " for label, fg in functional_groups.items():\n", - " fg_mol = Chem.MolFromSmarts(fg)\n", - " match = mol.GetSubstructMatches(fg_mol)\n", - " fg_count.append(len(match))\n", - " return fg_count " - ] - }, - { - "cell_type": "code", - "execution_count": 201, - "metadata": {}, - "outputs": [], - "source": [ - "fg_counts_targets = [get_fg_count(x, functional_groups) for x in target_mols]" - ] - }, - { - "cell_type": "code", - "execution_count": 203, - "metadata": {}, - "outputs": [], - "source": [ - "fg_counts_frags = [get_fg_count(x, functional_groups) for x in frag_mols]" - ] - }, - { - "cell_type": "code", - "execution_count": 80, - "metadata": {}, - "outputs": [], - "source": [ - "# get adj matrices" - ] - }, - { - "cell_type": "code", - "execution_count": 85, - "metadata": {}, - "outputs": [], - "source": [ - "frag_adj_matrices = [Chem.rdmolops.GetAdjacencyMatrix(x) for x in frag_mols]" - ] - }, - { - "cell_type": "code", - "execution_count": 86, - "metadata": {}, - "outputs": [], - "source": [ - "target_adj_matrices = [Chem.rdmolops.GetAdjacencyMatrix(x) for x in target_mols]" - ] - }, - { - "cell_type": "code", - "execution_count": 205, - "metadata": {}, - "outputs": [], - "source": [ - "# save everything" - ] - }, - { - "cell_type": "code", - "execution_count": 217, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", - " \"\"\"Entry point for launching an IPython kernel.\n", - "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/ipykernel_launcher.py:2: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", - " \n" - ] - } - ], - "source": [ - "data = [np.array(fg_counts_targets), np.array(fg_counts_frags), np.array(frag_adj_matrices),\n", - " np.array(target_adj_matrices)]" - ] - }, - { - "cell_type": "code", - "execution_count": 222, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/puck/anaconda3/envs/rdkit/lib/python3.7/site-packages/numpy/core/_asarray.py:136: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n", - " return array(a, dtype, copy=False, order=order, subok=True)\n" - ] - } - ], - "source": [ - "np.savez('connectivity_data.npz',fg_counts_targets=fg_counts_targets,\n", - " fg_counts_frags=fg_counts_frags,\n", - " frag_adj_matrices=frag_adj_matrices,\n", - " target_adj_matrices=target_adj_matrices)" - ] - }, - { - "cell_type": "code", - "execution_count": 223, - "metadata": {}, - "outputs": [], - "source": [ - "container = np.load('connectivity_data.npz')" - ] - }, - { - "cell_type": "code", - "execution_count": 224, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['fg_counts_targets',\n", - " 'fg_counts_frags',\n", - " 'frag_adj_matrices',\n", - " 'target_adj_matrices']" - ] - }, - "execution_count": 224, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "list(container.keys())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/Project.aux b/Project.aux deleted file mode 100644 index c11e7b2..0000000 --- a/Project.aux +++ /dev/null @@ -1,4 +0,0 @@ -\relax -\@writefile{toc}{\contentsline {section}{\numberline {1}Basic problem}{1}\protected@file@percent } -\newlabel{sec:1}{{1}{1}} -\@writefile{toc}{\contentsline {section}{\numberline {2}Optimal placement of molecules}{1}\protected@file@percent } diff --git a/Project.log b/Project.log deleted file mode 100644 index f656f14..0000000 --- a/Project.log +++ /dev/null @@ -1,155 +0,0 @@ -This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2021.5.19) 25 JUN 2021 11:38 -entering extended mode - restricted \write18 enabled. - %&-line parsing enabled. -**Project.tex -(./Project.tex -LaTeX2e <2020-02-02> patch level 2 -L3 programming layer <2020-02-14> -(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls -Document Class: article 2019/12/20 v1.4l Standard LaTeX document class -(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo -File: size11.clo 2019/12/20 v1.4l Standard LaTeX file (size option) -) -\c@part=\count167 -\c@section=\count168 -\c@subsection=\count169 -\c@subsubsection=\count170 -\c@paragraph=\count171 -\c@subparagraph=\count172 -\c@figure=\count173 -\c@table=\count174 -\abovecaptionskip=\skip47 -\belowcaptionskip=\skip48 -\bibindent=\dimen134 -) -(/usr/share/texlive/texmf-dist/tex/latex/anysize/anysize.sty -Package: anysize 1994/08/13 setting margin sizes - -document style option `anysize' loaded -Michael Salzenberg, Thomas Esser, Dirk Hillbrecht -Version 1.0, Aug 13, 1994 -\@Leftmargin=\dimen135 -\@Rightmargin=\dimen136 -\@Topmargin=\dimen137 -\@Bottommargin=\dimen138 -) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty -Package: amsmath 2020/01/20 v2.17e AMS math features -\@mathmargin=\skip49 - -For additional information on amsmath, use the `?' option. -(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty -Package: amstext 2000/06/29 v2.01 AMS text - -(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty -File: amsgen.sty 1999/11/30 v2.0 generic functions -\@emptytoks=\toks14 -\ex@=\dimen139 -)) -(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty -Package: amsbsy 1999/11/29 v1.2d Bold Symbols -\pmbraise@=\dimen140 -) -(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty -Package: amsopn 2016/03/08 v2.02 operator names -) -\inf@bad=\count175 -LaTeX Info: Redefining \frac on input line 227. -\uproot@=\count176 -\leftroot@=\count177 -LaTeX Info: Redefining \overline on input line 389. -\classnum@=\count178 -\DOTSCASE@=\count179 -LaTeX Info: Redefining \ldots on input line 486. -LaTeX Info: Redefining \dots on input line 489. -LaTeX Info: Redefining \cdots on input line 610. -\Mathstrutbox@=\box45 -\strutbox@=\box46 -\big@size=\dimen141 -LaTeX Font Info: Redeclaring font encoding OML on input line 733. -LaTeX Font Info: Redeclaring font encoding OMS on input line 734. -\macc@depth=\count180 -\c@MaxMatrixCols=\count181 -\dotsspace@=\muskip16 -\c@parentequation=\count182 -\dspbrk@lvl=\count183 -\tag@help=\toks15 -\row@=\count184 -\column@=\count185 -\maxfields@=\count186 -\andhelp@=\toks16 -\eqnshift@=\dimen142 -\alignsep@=\dimen143 -\tagshift@=\dimen144 -\tagwidth@=\dimen145 -\totwidth@=\dimen146 -\lineht@=\dimen147 -\@envbody=\toks17 -\multlinegap=\skip50 -\multlinetaggap=\skip51 -\mathdisplay@stack=\toks18 -LaTeX Info: Redefining \[ on input line 2859. -LaTeX Info: Redefining \] on input line 2860. -) -(/usr/share/texlive/texmf-dist/tex/latex/bbold/bbold.sty -Package: bbold 1994/04/06 Bbold symbol package -) -(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def -File: l3backend-pdfmode.def 2020-02-03 L3 backend support: PDF mode -\l__kernel_color_stack_int=\count187 -\l__pdf_internal_box=\box47 -) -(./Project.aux) -\openout1 = `Project.aux'. - -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 16. -LaTeX Font Info: ... okay on input line 16. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 16. -LaTeX Font Info: ... okay on input line 16. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 16. -LaTeX Font Info: ... okay on input line 16. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 16. -LaTeX Font Info: ... okay on input line 16. -LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 16. -LaTeX Font Info: ... okay on input line 16. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 16. -LaTeX Font Info: ... okay on input line 16. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 16. -LaTeX Font Info: ... okay on input line 16. -LaTeX Font Info: Trying to load font information for U+bbold on input line 2 -2. - (/usr/share/texlive/texmf-dist/tex/latex/bbold/Ubbold.fd) -[1 - -{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./Project.aux) - -LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. - - ) -Here is how much of TeX's memory you used: - 1067 strings out of 481239 - 14465 string characters out of 5920377 - 251543 words of memory out of 5000000 - 16373 multiletter control sequences out of 15000+600000 - 537599 words of font info for 43 fonts, out of 8000000 for 9000 - 1141 hyphenation exceptions out of 8191 - 30i,9n,25p,504b,131s stack positions out of 5000i,500n,10000p,200000b,80000s -{/usr/share/texmf/fonts/enc/dvips/cm-super/cm-super-ts1.enc} -Output written on Project.pdf (1 page, 112593 bytes). -PDF statistics: - 57 PDF objects out of 1000 (max. 8388607) - 41 compressed objects within 1 object stream - 0 named destinations out of 1000 (max. 500000) - 1 words of extra memory for PDF output out of 10000 (max. 10000000) - diff --git a/Untitled.ipynb b/Untitled.ipynb deleted file mode 100644 index 32dfefd..0000000 --- a/Untitled.ipynb +++ /dev/null @@ -1,7319 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import numpy as np \n", - "data = np.load(\"data.npz\", allow_pickle=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['target_labels', 'target_CMs', 'database_labels', 'database_CMs']" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "data.files" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "5\n", - "8\n", - "7\n", - "12\n", - "17\n", - "13\n", - "13\n", - "15\n", - "16\n", - "15\n", - "15\n", - "15\n", - "17\n", - "17\n", - "14\n", - "13\n", - "17\n", - "15\n", - "15\n", - "15\n", - "14\n", - "11\n", - "13\n", - "15\n", - "17\n", - "13\n", - "11\n", - "13\n", - "11\n", - "17\n", - "13\n", - "13\n", - "12\n", - "13\n", - "13\n", - "15\n", - "12\n", - "15\n", - "13\n", - "13\n", - "13\n", - "15\n", - "15\n", - "15\n", - "14\n", - "15\n", - "17\n", - "12\n", - "13\n", - "17\n", - "15\n", - "15\n", - "13\n", - "17\n", - "15\n", - "17\n", - "12\n", - "15\n", - "12\n", - "15\n", - "17\n", - "13\n", - "11\n", - "13\n", - "11\n", - "15\n", - "15\n", - "15\n", - "18\n", - "12\n", - "17\n", - "15\n", - "11\n", - "15\n", - "11\n", - "17\n", - "13\n", - "17\n", - "13\n", - "15\n", - "14\n", - "18\n", - "13\n", - "11\n", - "15\n", - "15\n", - "11\n", - "11\n", - "15\n", - "15\n", - "15\n", - "10\n", - "13\n", - "16\n", - "15\n", - "15\n", - "11\n", - "15\n", - "11\n", - "15\n", - "15\n", - "11\n", - "10\n", - "17\n", - "15\n", - "14\n", - "15\n", - "13\n", - "15\n", - "13\n", - "15\n", - "13\n", - "15\n", - "8\n", - "8\n", - "13\n", - "13\n", - "11\n", - "18\n", - "18\n", - "11\n", - "13\n", - "9\n", - "11\n", - "11\n", - "10\n", - "15\n", - "13\n", - "9\n", - "11\n", - "11\n", - "16\n", - "15\n", - "13\n", - "15\n", - "13\n", - "12\n", - "15\n", - "13\n", - "7\n", - "9\n", - "7\n", - "11\n", - "14\n", - "11\n", - "9\n", - "11\n", - "11\n", - "11\n", - "9\n", - "13\n", - "15\n", - "13\n", - "13\n", - "13\n", - "18\n", - "11\n", - "11\n", - "10\n", - "13\n", - "13\n", - "11\n", - "12\n", - "11\n", - "12\n", - "11\n", - "11\n", - "18\n", - "11\n", - "12\n", - "11\n", - "11\n", - "14\n", - "12\n", - "10\n", - "11\n", - "16\n", - "11\n", - "10\n", - "10\n", - "10\n", - "12\n", - "16\n", - "14\n", - "12\n", - "18\n", - "18\n", - "18\n", - "16\n", - "22\n", - "20\n", - "10\n", - "16\n", - "22\n", - "18\n", - "22\n", - "18\n", - "14\n", - "22\n", - "19\n", - "18\n", - "18\n", - "10\n", - "18\n", - "14\n", - "20\n", - "16\n", - "20\n", - "16\n", - "22\n", - "22\n", - "17\n", - "18\n", - "8\n", - "18\n", - "14\n", - "22\n", - "18\n", - "22\n", - "20\n", - "20\n", - "22\n", - "22\n", - "19\n", - "10\n", - "9\n", - "22\n", - "18\n", - "22\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "8\n", - "19\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "19\n", - "19\n", - "19\n", - "19\n", - "8\n", - "19\n", - "15\n", - "15\n", - "17\n", - "15\n", - "15\n", - "15\n", - "15\n", - "17\n", - "17\n", - "9\n", - "17\n", - "17\n", - "19\n", - "17\n", - "19\n", - "19\n", - "19\n", - "15\n", - "15\n", - "19\n", - "15\n", - "19\n", - "19\n", - "20\n", - "15\n", - "18\n", - "16\n", - "18\n", - "18\n", - "18\n", - "20\n", - "13\n", - "20\n", - "16\n", - "16\n", - "20\n", - "15\n", - "22\n", - "12\n", - "18\n", - "16\n", - "18\n", - "11\n", - "16\n", - "20\n", - "18\n", - "16\n", - "12\n", - "15\n", - "16\n", - "20\n", - "20\n", - "18\n", - "13\n", - "20\n", - "18\n", - "22\n", - "18\n", - "16\n", - "14\n", - "17\n", - "19\n", - "20\n", - "18\n", - "15\n", - "16\n", - "14\n", - "18\n", - "22\n", - "20\n", - "18\n", - "22\n", - "20\n", - "17\n", - "20\n", - "11\n", - "18\n", - "22\n", - "20\n", - "18\n", - "22\n", - "11\n", - "15\n", - "15\n", - "11\n", - "17\n", - "6\n", - "15\n", - "17\n", - "9\n", - "17\n", - "11\n", - "19\n", - "19\n", - "17\n", - "19\n", - "17\n", - "11\n", - "13\n", - "19\n", - "17\n", - "19\n", - "13\n", - "21\n", - "21\n", - "19\n", - "13\n", - "17\n", - "15\n", - "11\n", - "17\n", - "19\n", - "17\n", - "15\n", - "21\n", - "19\n", - "13\n", - "21\n", - "21\n", - "19\n", - "9\n", - "15\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "17\n", - "15\n", - "19\n", - "17\n", - "15\n", - "19\n", - "13\n", - "15\n", - "17\n", - "19\n", - "17\n", - "19\n", - "21\n", - "19\n", - "17\n", - "15\n", - "19\n", - "19\n", - "20\n", - "20\n", - "17\n", - "20\n", - "18\n", - "16\n", - "20\n", - "20\n", - "13\n", - "18\n", - "14\n", - "16\n", - "20\n", - "20\n", - "17\n", - "16\n", - "20\n", - "20\n", - "13\n", - "15\n", - "19\n", - "15\n", - "19\n", - "19\n", - "22\n", - "18\n", - "15\n", - "16\n", - "14\n", - "20\n", - "13\n", - "18\n", - "22\n", - "20\n", - "18\n", - "16\n", - "18\n", - "16\n", - "17\n", - "21\n", - "20\n", - "15\n", - "20\n", - "18\n", - "20\n", - "22\n", - "20\n", - "18\n", - "20\n", - "18\n", - "20\n", - "17\n", - "10\n", - "14\n", - "18\n", - "22\n", - "22\n", - "20\n", - "18\n", - "21\n", - "15\n", - "13\n", - "17\n", - "17\n", - "10\n", - "17\n", - "17\n", - "21\n", - "21\n", - "19\n", - "19\n", - "17\n", - "21\n", - "19\n", - "21\n", - "12\n", - "15\n", - "17\n", - "21\n", - "17\n", - "19\n", - "19\n", - "17\n", - "17\n", - "19\n", - "21\n", - "14\n", - "19\n", - "19\n", - "17\n", - "19\n", - "14\n", - "14\n", - "15\n", - "15\n", - "13\n", - "17\n", - "14\n", - "15\n", - "19\n", - "17\n", - "19\n", - "17\n", - "15\n", - "17\n", - "21\n", - "17\n", - "19\n", - "14\n", - "19\n", - "17\n", - "15\n", - "19\n", - "19\n", - "20\n", - "18\n", - "16\n", - "19\n", - "15\n", - "14\n", - "20\n", - "20\n", - "16\n", - "14\n", - "20\n", - "17\n", - "18\n", - "20\n", - "15\n", - "13\n", - "14\n", - "17\n", - "15\n", - "13\n", - "15\n", - "19\n", - "17\n", - "17\n", - "20\n", - "20\n", - "19\n", - "14\n", - "19\n", - "20\n", - "20\n", - "20\n", - "20\n", - "19\n", - "19\n", - "19\n", - "19\n", - "19\n", - "14\n", - "19\n", - "19\n", - "19\n", - "20\n", - "20\n", - "20\n", - "19\n", - "19\n", - "17\n", - "19\n", - "7\n", - "15\n", - "18\n", - "16\n", - "14\n", - "20\n", - "18\n", - "16\n", - "18\n", - "16\n", - "22\n", - "20\n", - "14\n", - "17\n", - "18\n", - "16\n", - "14\n", - "20\n", - "20\n", - "18\n", - "22\n", - "20\n", - "18\n", - "12\n", - "22\n", - "19\n", - "22\n", - "22\n", - "20\n", - "18\n", - "20\n", - "22\n", - "20\n", - "18\n", - "10\n", - "20\n", - "18\n", - "19\n", - "21\n", - "15\n", - "21\n", - "15\n", - "19\n", - "19\n", - "21\n", - "16\n", - "21\n", - "17\n", - "21\n", - "19\n", - "17\n", - "21\n", - "19\n", - "17\n", - "19\n", - "15\n", - "10\n", - "21\n", - "17\n", - "21\n", - "17\n", - "19\n", - "21\n", - "19\n", - "19\n", - "19\n", - "19\n", - "8\n", - "17\n", - "13\n", - "15\n", - "13\n", - "19\n", - "19\n", - "17\n", - "19\n", - "17\n", - "21\n", - "14\n", - "17\n", - "15\n", - "19\n", - "17\n", - "19\n", - "19\n", - "17\n", - "19\n", - "17\n", - "15\n", - "10\n", - "12\n", - "12\n", - "14\n", - "14\n", - "17\n", - "17\n", - "17\n", - "15\n", - "17\n", - "17\n", - "14\n", - "17\n", - "17\n", - "15\n", - "13\n", - "19\n", - "17\n", - "15\n", - "17\n", - "13\n", - "15\n", - "10\n", - "10\n", - "13\n", - "17\n", - "15\n", - "19\n", - "19\n", - "17\n", - "15\n", - "12\n", - "14\n", - "19\n", - "15\n", - "19\n", - "14\n", - "12\n", - "14\n", - "14\n", - "16\n", - "18\n", - "18\n", - "16\n", - "17\n", - "16\n", - "18\n", - "17\n", - "17\n", - "18\n", - "18\n", - "16\n", - "19\n", - "19\n", - "15\n", - "18\n", - "16\n", - "18\n", - "17\n", - "19\n", - "18\n", - "16\n", - "20\n", - "18\n", - "16\n", - "19\n", - "15\n", - "12\n", - "15\n", - "18\n", - "15\n", - "17\n", - "15\n", - "15\n", - "17\n", - "20\n", - "18\n", - "20\n", - "12\n", - "18\n", - "18\n", - "15\n", - "15\n", - "15\n", - "17\n", - "17\n", - "15\n", - "15\n", - "19\n", - "8\n", - "19\n", - "19\n", - "17\n", - "17\n", - "19\n", - "15\n", - "15\n", - "15\n", - "15\n", - "20\n", - "16\n", - "18\n", - "16\n", - "19\n", - "19\n", - "15\n", - "19\n", - "15\n", - "20\n", - "20\n", - "20\n", - "12\n", - "19\n", - "19\n", - "19\n", - "20\n", - "20\n", - "16\n", - "18\n", - "17\n", - "20\n", - "18\n", - "16\n", - "17\n", - "13\n", - "15\n", - "15\n", - "19\n", - "19\n", - "19\n", - "15\n", - "17\n", - "19\n", - "12\n", - "14\n", - "19\n", - "19\n", - "15\n", - "20\n", - "19\n", - "19\n", - "20\n", - "20\n", - "20\n", - "17\n", - "16\n", - "20\n", - "19\n", - "19\n", - "19\n", - "19\n", - "19\n", - "19\n", - "19\n", - "20\n", - "20\n", - "15\n", - "15\n", - "19\n", - "20\n", - "19\n", - "19\n", - "19\n", - "22\n", - "20\n", - "20\n", - "18\n", - "14\n", - "18\n", - "16\n", - "13\n", - "20\n", - "18\n", - "20\n", - "22\n", - "20\n", - "18\n", - "20\n", - "12\n", - "18\n", - "14\n", - "20\n", - "13\n", - "18\n", - "16\n", - "18\n", - "16\n", - "20\n", - "22\n", - "16\n", - "20\n", - "18\n", - "16\n", - "14\n", - "13\n", - "20\n", - "22\n", - "20\n", - "18\n", - "20\n", - "14\n", - "18\n", - "21\n", - "17\n", - "21\n", - "15\n", - "15\n", - "17\n", - "17\n", - "15\n", - "15\n", - "14\n", - "15\n", - "21\n", - "15\n", - "21\n", - "17\n", - "21\n", - "15\n", - "17\n", - "13\n", - "19\n", - "16\n", - "15\n", - "19\n", - "15\n", - "21\n", - "21\n", - "17\n", - "17\n", - "19\n", - "13\n", - "21\n", - "14\n", - "17\n", - "21\n", - "17\n", - "15\n", - "17\n", - "21\n", - "19\n", - "17\n", - "15\n", - "19\n", - "10\n", - "12\n", - "17\n", - "17\n", - "15\n", - "19\n", - "17\n", - "19\n", - "17\n", - "21\n", - "14\n", - "17\n", - "11\n", - "14\n", - "12\n", - "14\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "19\n", - "14\n", - "17\n", - "17\n", - "17\n", - "15\n", - "17\n", - "19\n", - "17\n", - "15\n", - "17\n", - "19\n", - "17\n", - "17\n", - "19\n", - "19\n", - "15\n", - "17\n", - "15\n", - "15\n", - "14\n", - "14\n", - "14\n", - "14\n", - "14\n", - "14\n", - "13\n", - "17\n", - "12\n", - "15\n", - "13\n", - "17\n", - "15\n", - "17\n", - "10\n", - "17\n", - "15\n", - "17\n", - "17\n", - "17\n", - "13\n", - "15\n", - "17\n", - "15\n", - "17\n", - "9\n", - "19\n", - "17\n", - "15\n", - "17\n", - "15\n", - "17\n", - "12\n", - "12\n", - "14\n", - "14\n", - "14\n", - "14\n", - "14\n", - "14\n", - "16\n", - "18\n", - "16\n", - "19\n", - "18\n", - "17\n", - "17\n", - "12\n", - "17\n", - "17\n", - "16\n", - "18\n", - "17\n", - "18\n", - "16\n", - "19\n", - "17\n", - "17\n", - "9\n", - "17\n", - "15\n", - "18\n", - "18\n", - "17\n", - "17\n", - "18\n", - "16\n", - "19\n", - "17\n", - "11\n", - "11\n", - "18\n", - "17\n", - "18\n", - "15\n", - "17\n", - "17\n", - "18\n", - "16\n", - "18\n", - "17\n", - "9\n", - "16\n", - "18\n", - "16\n", - "18\n", - "16\n", - "15\n", - "13\n", - "17\n", - "15\n", - "16\n", - "13\n", - "19\n", - "16\n", - "18\n", - "19\n", - "17\n", - "14\n", - "20\n", - "16\n", - "16\n", - "16\n", - "11\n", - "18\n", - "17\n", - "18\n", - "18\n", - "13\n", - "17\n", - "15\n", - "15\n", - "13\n", - "19\n", - "17\n", - "19\n", - "17\n", - "19\n", - "19\n", - "13\n", - "19\n", - "17\n", - "17\n", - "17\n", - "15\n", - "13\n", - "17\n", - "15\n", - "17\n", - "15\n", - "19\n", - "17\n", - "17\n", - "17\n", - "15\n", - "15\n", - "13\n", - "15\n", - "18\n", - "16\n", - "19\n", - "11\n", - "17\n", - "19\n", - "20\n", - "16\n", - "14\n", - "13\n", - "12\n", - "12\n", - "12\n", - "14\n", - "14\n", - "18\n", - "19\n", - "16\n", - "16\n", - "16\n", - "13\n", - "18\n", - "18\n", - "19\n", - "15\n", - "11\n", - "15\n", - "19\n", - "15\n", - "15\n", - "13\n", - "13\n", - "17\n", - "19\n", - "11\n", - "15\n", - "10\n", - "12\n", - "13\n", - "19\n", - "17\n", - "12\n", - "6\n", - "11\n", - "13\n", - "10\n", - "10\n", - "12\n", - "10\n", - "17\n", - "15\n", - "10\n", - "13\n", - "19\n", - "17\n", - "13\n", - "17\n", - "12\n", - "10\n", - "12\n", - "10\n", - "19\n", - "20\n", - "16\n", - "19\n", - "15\n", - "11\n", - "15\n", - "19\n", - "15\n", - "19\n", - "20\n", - "16\n", - "14\n", - "12\n", - "18\n", - "16\n", - "9\n", - "18\n", - "17\n", - "18\n", - "16\n", - "19\n", - "15\n", - "13\n", - "11\n", - "17\n", - "15\n", - "15\n", - "17\n", - "17\n", - "15\n", - "15\n", - "18\n", - "16\n", - "16\n", - "14\n", - "18\n", - "16\n", - "17\n", - "18\n", - "16\n", - "18\n", - "13\n", - "19\n", - "16\n", - "14\n", - "16\n", - "14\n", - "18\n", - "11\n", - "16\n", - "18\n", - "16\n", - "16\n", - "14\n", - "19\n", - "20\n", - "18\n", - "21\n", - "11\n", - "13\n", - "9\n", - "13\n", - "13\n", - "11\n", - "13\n", - "19\n", - "19\n", - "19\n", - "17\n", - "19\n", - "11\n", - "13\n", - "15\n", - "13\n", - "11\n", - "19\n", - "17\n", - "19\n", - "19\n", - "17\n", - "10\n", - "13\n", - "10\n", - "19\n", - "15\n", - "19\n", - "15\n", - "19\n", - "19\n", - "17\n", - "19\n", - "19\n", - "13\n", - "11\n", - "17\n", - "12\n", - "12\n", - "12\n", - "13\n", - "12\n", - "13\n", - "17\n", - "15\n", - "19\n", - "15\n", - "15\n", - "17\n", - "17\n", - "17\n", - "17\n", - "13\n", - "15\n", - "15\n", - "13\n", - "15\n", - "15\n", - "17\n", - "13\n", - "13\n", - "11\n", - "17\n", - "15\n", - "12\n", - "14\n", - "12\n", - "12\n", - "13\n", - "10\n", - "17\n", - "14\n", - "17\n", - "13\n", - "15\n", - "15\n", - "17\n", - "17\n", - "15\n", - "11\n", - "13\n", - "11\n", - "19\n", - "15\n", - "13\n", - "15\n", - "13\n", - "13\n", - "11\n", - "17\n", - "9\n", - "15\n", - "15\n", - "15\n", - "19\n", - "15\n", - "15\n", - "15\n", - "13\n", - "13\n", - "13\n", - "11\n", - "15\n", - "13\n", - "15\n", - "13\n", - "17\n", - "19\n", - "17\n", - "17\n", - "17\n", - "17\n", - "16\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "13\n", - "15\n", - "15\n", - "17\n", - "18\n", - "13\n", - "17\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "17\n", - "17\n", - "16\n", - "15\n", - "17\n", - "15\n", - "17\n", - "15\n", - "17\n", - "19\n", - "15\n", - "15\n", - "15\n", - "7\n", - "13\n", - "17\n", - "15\n", - "15\n", - "17\n", - "17\n", - "17\n", - "15\n", - "15\n", - "17\n", - "17\n", - "12\n", - "15\n", - "17\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "12\n", - "15\n", - "15\n", - "15\n", - "13\n", - "15\n", - "11\n", - "13\n", - "15\n", - "17\n", - "15\n", - "15\n", - "15\n", - "13\n", - "15\n", - "15\n", - "15\n", - "13\n", - "15\n", - "15\n", - "13\n", - "15\n", - "15\n", - "13\n", - "17\n", - "13\n", - "15\n", - "15\n", - "17\n", - "15\n", - "17\n", - "17\n", - "15\n", - "15\n", - "17\n", - "17\n", - "17\n", - "17\n", - "15\n", - "17\n", - "17\n", - "17\n", - "17\n", - "15\n", - "15\n", - "15\n", - "15\n", - "17\n", - "17\n", - "15\n", - "19\n", - "19\n", - "17\n", - "17\n", - "15\n", - "18\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "17\n", - "19\n", - "17\n", - "15\n", - "17\n", - "15\n", - "15\n", - "15\n", - "17\n", - "15\n", - "15\n", - "19\n", - "19\n", - "19\n", - "15\n", - "17\n", - "15\n", - "19\n", - "19\n", - "17\n", - "17\n", - "19\n", - "17\n", - "17\n", - "15\n", - "13\n", - "15\n", - "5\n", - "13\n", - "15\n", - "15\n", - "19\n", - "13\n", - "13\n", - "15\n", - "17\n", - "15\n", - "13\n", - "15\n", - "13\n", - "13\n", - "19\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "19\n", - "17\n", - "17\n", - "15\n", - "15\n", - "19\n", - "19\n", - "17\n", - "15\n", - "15\n", - "15\n", - "17\n", - "15\n", - "15\n", - "11\n", - "15\n", - "15\n", - "17\n", - "19\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "19\n", - "17\n", - "17\n", - "17\n", - "19\n", - "11\n", - "19\n", - "17\n", - "15\n", - "17\n", - "17\n", - "15\n", - "12\n", - "15\n", - "15\n", - "17\n", - "19\n", - "13\n", - "17\n", - "19\n", - "19\n", - "19\n", - "17\n", - "10\n", - "19\n", - "13\n", - "13\n", - "13\n", - "15\n", - "11\n", - "17\n", - "15\n", - "17\n", - "15\n", - "12\n", - "17\n", - "15\n", - "15\n", - "15\n", - "15\n", - "19\n", - "15\n", - "15\n", - "15\n", - "15\n", - "18\n", - "17\n", - "19\n", - "17\n", - "13\n", - "11\n", - "13\n", - "13\n", - "17\n", - "21\n", - "17\n", - "15\n", - "15\n", - "13\n", - "15\n", - "17\n", - "15\n", - "15\n", - "19\n", - "17\n", - "13\n", - "15\n", - "13\n", - "10\n", - "13\n", - "15\n", - "17\n", - "17\n", - "15\n", - "13\n", - "17\n", - "15\n", - "15\n", - "17\n", - "16\n", - "21\n", - "19\n", - "15\n", - "15\n", - "17\n", - "17\n", - "13\n", - "17\n", - "15\n", - "13\n", - "10\n", - "15\n", - "19\n", - "15\n", - "15\n", - "17\n", - "17\n", - "15\n", - "17\n", - "13\n", - "17\n", - "14\n", - "15\n", - "19\n", - "17\n", - "17\n", - "15\n", - "19\n", - "17\n", - "15\n", - "19\n", - "17\n", - "12\n", - "15\n", - "17\n", - "17\n", - "19\n", - "15\n", - "17\n", - "17\n", - "15\n", - "15\n", - "17\n", - "14\n", - "15\n", - "15\n", - "15\n", - "19\n", - "17\n", - "15\n", - "15\n", - "17\n", - "17\n", - "13\n", - "14\n", - "17\n", - "13\n", - "15\n", - "17\n", - "15\n", - "13\n", - "17\n", - "17\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "17\n", - "15\n", - "19\n", - "15\n", - "15\n", - "17\n", - "15\n", - "19\n", - "17\n", - "17\n", - "19\n", - "17\n", - "17\n", - "17\n", - "17\n", - "15\n", - "13\n", - "18\n", - "15\n", - "13\n", - "17\n", - "15\n", - "17\n", - "15\n", - "17\n", - "13\n", - "15\n", - "21\n", - "9\n", - "14\n", - "17\n", - "15\n", - "13\n", - "15\n", - "13\n", - "17\n", - "15\n", - "17\n", - "15\n", - "17\n", - "12\n", - "17\n", - "17\n", - "15\n", - "17\n", - "17\n", - "15\n", - "15\n", - "17\n", - "15\n", - "15\n", - "12\n", - "19\n", - "15\n", - "17\n", - "15\n", - "17\n", - "17\n", - "17\n", - "17\n", - "15\n", - "17\n", - "17\n", - "15\n", - "15\n", - "19\n", - "13\n", - "13\n", - "17\n", - "15\n", - "19\n", - "17\n", - "17\n", - "17\n", - "13\n", - "17\n", - "11\n", - "21\n", - "13\n", - "17\n", - "15\n", - "15\n", - "17\n", - "15\n", - "13\n", - "15\n", - "13\n", - "13\n", - "15\n", - "19\n", - "19\n", - "15\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "15\n", - "15\n", - "15\n", - "17\n", - "17\n", - "15\n", - "17\n", - "17\n", - "13\n", - "15\n", - "15\n", - "15\n", - "11\n", - "13\n", - "15\n", - "17\n", - "13\n", - "15\n", - "19\n", - "15\n", - "19\n", - "17\n", - "19\n", - "13\n", - "19\n", - "19\n", - "17\n", - "15\n", - "19\n", - "19\n", - "17\n", - "15\n", - "13\n", - "11\n", - "19\n", - "19\n", - "17\n", - "12\n", - "18\n", - "15\n", - "15\n", - "15\n", - "13\n", - "13\n", - "17\n", - "15\n", - "17\n", - "19\n", - "21\n", - "17\n", - "21\n", - "19\n", - "17\n", - "19\n", - "15\n", - "13\n", - "11\n", - "19\n", - "17\n", - "15\n", - "17\n", - "15\n", - "19\n", - "15\n", - "13\n", - "17\n", - "17\n", - "19\n", - "17\n", - "19\n", - "13\n", - "13\n", - "15\n", - "19\n", - "17\n", - "19\n", - "13\n", - "17\n", - "15\n", - "15\n", - "15\n", - "13\n", - "17\n", - "13\n", - "15\n", - "17\n", - "19\n", - "19\n", - "17\n", - "17\n", - "15\n", - "13\n", - "13\n", - "17\n", - "11\n", - "15\n", - "15\n", - "17\n", - "17\n", - "19\n", - "15\n", - "13\n", - "11\n", - "19\n", - "17\n", - "17\n", - "15\n", - "17\n", - "13\n", - "15\n", - "17\n", - "19\n", - "19\n", - "17\n", - "13\n", - "15\n", - "17\n", - "15\n", - "15\n", - "13\n", - "15\n", - "19\n", - "15\n", - "17\n", - "17\n", - "15\n", - "15\n", - "13\n", - "13\n", - "11\n", - "15\n", - "17\n", - "19\n", - "17\n", - "17\n", - "17\n", - "19\n", - "17\n", - "15\n", - "19\n", - "17\n", - "15\n", - "17\n", - "17\n", - "19\n", - "19\n", - "15\n", - "15\n", - "13\n", - "17\n", - "19\n", - "19\n", - "17\n", - "15\n", - "17\n", - "17\n", - "19\n", - "15\n", - "19\n", - "21\n", - "18\n", - "17\n", - "19\n", - "15\n", - "19\n", - "19\n", - "19\n", - "17\n", - "13\n", - "15\n", - "15\n", - "13\n", - "15\n", - "19\n", - "13\n", - "15\n", - "13\n", - "11\n", - "17\n", - "17\n", - "17\n", - "17\n", - "12\n", - "19\n", - "17\n", - "13\n", - "19\n", - "15\n", - "15\n", - "17\n", - "17\n", - "19\n", - "15\n", - "14\n", - "21\n", - "13\n", - "15\n", - "19\n", - "15\n", - "15\n", - "13\n", - "15\n", - "15\n", - "13\n", - "14\n", - "17\n", - "19\n", - "15\n", - "19\n", - "19\n", - "19\n", - "17\n", - "17\n", - "17\n", - "15\n", - "14\n", - "17\n", - "15\n", - "19\n", - "19\n", - "17\n", - "17\n", - "15\n", - "13\n", - "19\n", - "17\n", - "17\n", - "17\n", - "19\n", - "17\n", - "15\n", - "17\n", - "15\n", - "15\n", - "19\n", - "15\n", - "13\n", - "16\n", - "17\n", - "17\n", - "17\n", - "15\n", - "17\n", - "21\n", - "19\n", - "13\n", - "19\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "21\n", - "19\n", - "19\n", - "17\n", - "19\n", - "17\n", - "17\n", - "11\n", - "17\n", - "21\n", - "21\n", - "19\n", - "17\n", - "15\n", - "21\n", - "19\n", - "19\n", - "15\n", - "15\n", - "12\n", - "17\n", - "15\n", - "17\n", - "15\n", - "13\n", - "15\n", - "13\n", - "17\n", - "17\n", - "15\n", - "18\n", - "19\n", - "13\n", - "11\n", - "17\n", - "15\n", - "15\n", - "19\n", - "19\n", - "17\n", - "19\n", - "16\n", - "17\n", - "19\n", - "21\n", - "17\n", - "19\n", - "19\n", - "17\n", - "17\n", - "17\n", - "17\n", - "14\n", - "21\n", - "19\n", - "17\n", - "17\n", - "21\n", - "19\n", - "21\n", - "19\n", - "19\n", - "21\n", - "12\n", - "19\n", - "17\n", - "17\n", - "15\n", - "19\n", - "15\n", - "19\n", - "17\n", - "19\n", - "17\n", - "10\n", - "21\n", - "21\n", - "19\n", - "17\n", - "15\n", - "19\n", - "21\n", - "19\n", - "19\n", - "21\n", - "12\n", - "19\n", - "19\n", - "19\n", - "21\n", - "19\n", - "21\n", - "17\n", - "21\n", - "17\n", - "19\n", - "12\n", - "19\n", - "21\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "19\n", - "17\n", - "17\n", - "14\n", - "13\n", - "13\n", - "15\n", - "15\n", - "17\n", - "13\n", - "17\n", - "21\n", - "17\n", - "13\n", - "13\n", - "12\n", - "13\n", - "15\n", - "13\n", - "17\n", - "13\n", - "17\n", - "17\n", - "15\n", - "15\n", - "21\n", - "17\n", - "13\n", - "17\n", - "15\n", - "17\n", - "15\n", - "13\n", - "17\n", - "15\n", - "17\n", - "13\n", - "15\n", - "19\n", - "15\n", - "17\n", - "15\n", - "19\n", - "19\n", - "17\n", - "17\n", - "15\n", - "19\n", - "20\n", - "17\n", - "15\n", - "19\n", - "17\n", - "15\n", - "19\n", - "17\n", - "13\n", - "11\n", - "15\n", - "13\n", - "13\n", - "15\n", - "21\n", - "21\n", - "17\n", - "17\n", - "15\n", - "21\n", - "19\n", - "17\n", - "16\n", - "19\n", - "19\n", - "19\n", - "17\n", - "19\n", - "19\n", - "17\n", - "15\n", - "21\n", - "19\n", - "12\n", - "17\n", - "19\n", - "13\n", - "13\n", - "13\n", - "17\n", - "13\n", - "13\n", - "15\n", - "13\n", - "16\n", - "15\n", - "17\n", - "15\n", - "15\n", - "13\n", - "17\n", - "19\n", - "15\n", - "15\n", - "15\n", - "16\n", - "13\n", - "17\n", - "15\n", - "15\n", - "15\n", - "15\n", - "17\n", - "17\n", - "19\n", - "17\n", - "17\n", - "17\n", - "15\n", - "19\n", - "17\n", - "17\n", - "15\n", - "17\n", - "13\n", - "21\n", - "11\n", - "4\n", - "11\n", - "15\n", - "15\n", - "13\n", - "13\n", - "15\n", - "15\n", - "15\n", - "19\n", - "17\n", - "17\n", - "19\n", - "14\n", - "19\n", - "17\n", - "17\n", - "15\n", - "19\n", - "17\n", - "17\n", - "19\n", - "17\n", - "19\n", - "12\n", - "17\n", - "17\n", - "15\n", - "15\n", - "15\n", - "17\n", - "17\n", - "17\n", - "19\n", - "19\n", - "16\n", - "19\n", - "15\n", - "17\n", - "19\n", - "13\n", - "13\n", - "15\n", - "17\n", - "17\n", - "15\n", - "20\n", - "17\n", - "21\n", - "21\n", - "13\n", - "17\n", - "15\n", - "13\n", - "17\n", - "19\n", - "17\n", - "14\n", - "17\n", - "15\n", - "17\n", - "21\n", - "21\n", - "17\n", - "15\n", - "15\n", - "13\n", - "17\n", - "12\n", - "19\n", - "17\n", - "21\n", - "19\n", - "19\n", - "19\n", - "17\n", - "17\n", - "15\n", - "19\n", - "17\n", - "19\n", - "17\n", - "17\n", - "19\n", - "17\n", - "15\n", - "17\n", - "17\n", - "15\n", - "19\n", - "17\n", - "21\n", - "19\n", - "17\n", - "19\n", - "17\n", - "19\n", - "19\n", - "19\n", - "17\n", - "19\n", - "15\n", - "21\n", - "19\n", - "19\n", - "17\n", - "19\n", - "13\n", - "15\n", - "17\n", - "17\n", - "15\n", - "11\n", - "13\n", - "15\n", - "17\n", - "15\n", - "15\n", - "15\n", - "13\n", - "15\n", - "19\n", - "19\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "19\n", - "17\n", - "15\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "15\n", - "15\n", - "15\n", - "19\n", - "19\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "19\n", - "17\n", - "17\n", - "19\n", - "19\n", - "17\n", - "15\n", - "19\n", - "19\n", - "17\n", - "15\n", - "15\n", - "17\n", - "15\n", - "19\n", - "17\n", - "17\n", - "19\n", - "19\n", - "19\n", - "15\n", - "20\n", - "17\n", - "17\n", - "17\n", - "13\n", - "15\n", - "15\n", - "17\n", - "17\n", - "17\n", - "19\n", - "13\n", - "17\n", - "17\n", - "19\n", - "17\n", - "15\n", - "21\n", - "15\n", - "15\n", - "17\n", - "15\n", - "17\n", - "13\n", - "15\n", - "13\n", - "15\n", - "15\n", - "13\n", - "13\n", - "15\n", - "13\n", - "19\n", - "17\n", - "13\n", - "11\n", - "17\n", - "15\n", - "17\n", - "15\n", - "13\n", - "19\n", - "19\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "21\n", - "19\n", - "17\n", - "15\n", - "13\n", - "17\n", - "19\n", - "9\n", - "15\n", - "19\n", - "17\n", - "17\n", - "15\n", - "19\n", - "19\n", - "17\n", - "15\n", - "19\n", - "15\n", - "13\n", - "17\n", - "15\n", - "21\n", - "19\n", - "21\n", - "19\n", - "17\n", - "19\n", - "21\n", - "19\n", - "15\n", - "13\n", - "17\n", - "19\n", - "17\n", - "19\n", - "13\n", - "13\n", - "15\n", - "17\n", - "15\n", - "15\n", - "13\n", - "11\n", - "15\n", - "13\n", - "17\n", - "13\n", - "11\n", - "15\n", - "15\n", - "19\n", - "17\n", - "15\n", - "17\n", - "19\n", - "15\n", - "17\n", - "15\n", - "19\n", - "19\n", - "17\n", - "15\n", - "13\n", - "13\n", - "19\n", - "17\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "17\n", - "15\n", - "20\n", - "19\n", - "17\n", - "19\n", - "17\n", - "15\n", - "17\n", - "19\n", - "17\n", - "19\n", - "19\n", - "16\n", - "11\n", - "13\n", - "11\n", - "15\n", - "13\n", - "17\n", - "21\n", - "11\n", - "15\n", - "13\n", - "19\n", - "15\n", - "13\n", - "17\n", - "15\n", - "15\n", - "13\n", - "17\n", - "15\n", - "15\n", - "17\n", - "9\n", - "15\n", - "13\n", - "17\n", - "15\n", - "13\n", - "17\n", - "15\n", - "15\n", - "21\n", - "13\n", - "10\n", - "11\n", - "19\n", - "17\n", - "15\n", - "17\n", - "17\n", - "15\n", - "17\n", - "17\n", - "19\n", - "19\n", - "11\n", - "19\n", - "19\n", - "17\n", - "17\n", - "17\n", - "15\n", - "19\n", - "17\n", - "15\n", - "15\n", - "9\n", - "17\n", - "19\n", - "15\n", - "17\n", - "19\n", - "17\n", - "13\n", - "17\n", - "15\n", - "13\n", - "13\n", - "17\n", - "19\n", - "15\n", - "17\n", - "15\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "9\n", - "15\n", - "19\n", - "21\n", - "17\n", - "19\n", - "19\n", - "17\n", - "17\n", - "17\n", - "17\n", - "7\n", - "17\n", - "19\n", - "17\n", - "19\n", - "17\n", - "19\n", - "17\n", - "15\n", - "15\n", - "17\n", - "11\n", - "17\n", - "15\n", - "17\n", - "19\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "17\n", - "17\n", - "19\n", - "17\n", - "15\n", - "17\n", - "15\n", - "19\n", - "17\n", - "15\n", - "17\n", - "15\n", - "20\n", - "19\n", - "17\n", - "15\n", - "19\n", - "17\n", - "19\n", - "17\n", - "21\n", - "17\n", - "21\n", - "17\n", - "19\n", - "17\n", - "19\n", - "17\n", - "13\n", - "19\n", - "17\n", - "15\n", - "17\n", - "19\n", - "10\n", - "13\n", - "15\n", - "19\n", - "21\n", - "19\n", - "17\n", - "15\n", - "13\n", - "19\n", - "21\n", - "19\n", - "17\n", - "21\n", - "17\n", - "19\n", - "17\n", - "19\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "13\n", - "15\n", - "19\n", - "17\n", - "17\n", - "15\n", - "15\n", - "15\n", - "15\n", - "19\n", - "17\n", - "17\n", - "15\n", - "19\n", - "17\n", - "17\n", - "19\n", - "17\n", - "17\n", - "17\n", - "15\n", - "17\n", - "13\n", - "15\n", - "19\n", - "19\n", - "19\n", - "17\n", - "15\n", - "13\n", - "19\n", - "17\n", - "17\n", - "13\n", - "19\n", - "17\n", - "19\n", - "17\n", - "17\n", - "17\n", - "19\n", - "15\n", - "13\n", - "17\n", - "19\n", - "17\n", - "17\n", - "15\n", - "15\n", - "13\n", - "19\n", - "17\n", - "15\n", - "17\n", - "17\n", - "17\n", - "15\n", - "15\n", - "17\n", - "15\n", - "13\n", - "15\n", - "17\n", - "13\n", - "17\n", - "15\n", - "13\n", - "17\n", - "19\n", - "17\n", - "17\n", - "15\n", - "13\n", - "13\n", - "19\n", - "13\n", - "15\n", - "14\n", - "17\n", - "15\n", - "17\n", - "15\n", - "15\n", - "15\n", - "13\n", - "15\n", - "17\n", - "21\n", - "12\n", - "19\n", - "17\n", - "15\n", - "15\n", - "13\n", - "17\n", - "15\n", - "15\n", - "15\n", - "13\n", - "15\n", - "15\n", - "21\n", - "11\n", - "13\n", - "13\n", - "17\n", - "17\n", - "15\n", - "15\n", - "17\n", - "15\n", - "19\n", - "15\n", - "19\n", - "15\n", - "17\n", - "15\n", - "15\n", - "13\n", - "17\n", - "15\n", - "13\n", - "15\n", - "15\n", - "13\n", - "17\n", - "13\n", - "13\n", - "17\n", - "15\n", - "17\n", - "15\n", - "17\n", - "11\n", - "15\n", - "15\n", - "15\n", - "21\n", - "15\n", - "17\n", - "15\n", - "13\n", - "15\n", - "15\n", - "15\n", - "13\n", - "11\n", - "13\n", - "15\n", - "19\n", - "15\n", - "17\n", - "17\n", - "11\n", - "13\n", - "15\n", - "13\n", - "15\n", - "13\n", - "15\n", - "13\n", - "21\n", - "19\n", - "17\n", - "15\n", - "15\n", - "11\n", - "15\n", - "15\n", - "15\n", - "17\n", - "17\n", - "17\n", - "21\n", - "11\n", - "15\n", - "13\n", - "17\n", - "13\n", - "17\n", - "15\n", - "13\n", - "15\n", - "17\n", - "11\n", - "19\n", - "13\n", - "15\n", - "13\n", - "11\n", - "17\n", - "15\n", - "11\n", - "13\n", - "13\n", - "13\n", - "15\n", - "21\n", - "15\n", - "8\n", - "14\n", - "11\n", - "15\n", - "13\n", - "15\n", - "13\n", - "15\n", - "13\n", - "15\n", - "13\n", - "19\n", - "17\n", - "21\n", - "15\n", - "13\n", - "13\n", - "15\n", - "15\n", - "15\n", - "13\n", - "11\n", - "13\n", - "13\n", - "13\n", - "15\n", - "13\n", - "17\n", - "15\n", - "17\n", - "13\n", - "15\n", - "17\n", - "13\n", - "19\n", - "15\n", - "19\n", - "21\n", - "17\n", - "15\n", - "13\n", - "13\n", - "13\n", - "15\n", - "15\n", - "19\n", - "17\n", - "15\n", - "15\n", - "21\n", - "15\n", - "17\n", - "17\n", - "13\n", - "11\n", - "17\n", - "15\n", - "15\n", - "13\n", - "13\n", - "15\n", - "19\n", - "15\n", - "13\n", - "11\n", - "17\n", - "15\n", - "15\n", - "13\n", - "13\n", - "15\n", - "15\n", - "17\n", - "17\n", - "13\n", - "13\n", - "15\n", - "17\n", - "11\n", - "15\n", - "11\n", - "15\n", - "13\n", - "13\n", - "17\n", - "19\n", - "15\n", - "17\n", - "19\n", - "19\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "17\n", - "19\n", - "17\n", - "17\n", - "13\n", - "15\n", - "15\n", - "13\n", - "17\n", - "15\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "15\n", - "12\n", - "19\n", - "11\n", - "13\n", - "11\n", - "15\n", - "13\n", - "15\n", - "15\n", - "13\n", - "11\n", - "17\n", - "12\n", - "13\n", - "11\n", - "11\n", - "13\n", - "11\n", - "15\n", - "17\n", - "15\n", - "15\n", - "13\n", - "19\n", - "15\n", - "21\n", - "17\n", - "15\n", - "17\n", - "15\n", - "17\n", - "15\n", - "13\n", - "15\n", - "14\n", - "13\n", - "17\n", - "21\n", - "15\n", - "17\n", - "15\n", - "15\n", - "13\n", - "19\n", - "17\n", - "14\n", - "19\n", - "13\n", - "11\n", - "21\n", - "15\n", - "15\n", - "13\n", - "15\n", - "15\n", - "15\n", - "14\n", - "13\n", - "17\n", - "15\n", - "17\n", - "19\n", - "15\n", - "15\n", - "13\n", - "17\n", - "11\n", - "14\n", - "11\n", - "15\n", - "13\n", - "15\n", - "15\n", - "17\n", - "13\n", - "17\n", - "15\n", - "15\n", - "14\n", - "13\n", - "17\n", - "15\n", - "17\n", - "17\n", - "15\n", - "21\n", - "13\n", - "15\n", - "15\n", - "16\n", - "17\n", - "11\n", - "13\n", - "15\n", - "13\n", - "17\n", - "15\n", - "19\n", - "17\n", - "15\n", - "16\n", - "15\n", - "15\n", - "15\n", - "15\n", - "11\n", - "13\n", - "13\n", - "11\n", - "17\n", - "13\n", - "12\n", - "12\n", - "11\n", - "11\n", - "9\n", - "15\n", - "13\n", - "14\n", - "14\n", - "14\n", - "13\n", - "21\n", - "12\n", - "13\n", - "14\n", - "14\n", - "12\n", - "14\n", - "12\n", - "16\n", - "16\n", - "14\n", - "16\n", - "14\n", - "21\n", - "16\n", - "12\n", - "11\n", - "16\n", - "16\n", - "14\n", - "16\n", - "16\n", - "13\n", - "16\n", - "14\n", - "19\n", - "21\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "18\n", - "15\n", - "16\n", - "15\n", - "14\n", - "16\n", - "19\n", - "16\n", - "15\n", - "14\n", - "15\n", - "14\n", - "16\n", - "16\n", - "16\n", - "14\n", - "13\n", - "16\n", - "17\n", - "12\n", - "16\n", - "11\n", - "11\n", - "16\n", - "17\n", - "16\n", - "16\n", - "13\n", - "13\n", - "12\n", - "15\n", - "11\n", - "13\n", - "12\n", - "10\n", - "15\n", - "11\n", - "10\n", - "16\n", - "14\n", - "12\n", - "13\n", - "21\n", - "13\n", - "14\n", - "13\n", - "13\n", - "12\n", - "14\n", - "13\n", - "13\n", - "12\n", - "14\n", - "16\n", - "21\n", - "16\n", - "14\n", - "17\n", - "16\n", - "16\n", - "18\n", - "16\n", - "18\n", - "16\n", - "14\n", - "14\n", - "19\n", - "16\n", - "10\n", - "19\n", - "16\n", - "18\n", - "16\n", - "14\n", - "14\n", - "14\n", - "16\n", - "18\n", - "16\n", - "21\n", - "17\n", - "14\n", - "16\n", - "16\n", - "16\n", - "16\n", - "12\n", - "14\n", - "12\n", - "14\n", - "18\n", - "15\n", - "19\n", - "16\n", - "14\n", - "18\n", - "16\n", - "14\n", - "16\n", - "18\n", - "18\n", - "14\n", - "14\n", - "13\n", - "16\n", - "13\n", - "15\n", - "14\n", - "14\n", - "13\n", - "13\n", - "14\n", - "14\n", - "19\n", - "14\n", - "18\n", - "16\n", - "21\n", - "12\n", - "18\n", - "16\n", - "18\n", - "14\n", - "16\n", - "17\n", - "18\n", - "16\n", - "15\n", - "14\n", - "16\n", - "14\n", - "14\n", - "12\n", - "14\n", - "16\n", - "15\n", - "16\n", - "15\n", - "13\n", - "12\n", - "14\n", - "15\n", - "12\n", - "12\n", - "16\n", - "18\n", - "19\n", - "16\n", - "16\n", - "15\n", - "15\n", - "15\n", - "18\n", - "16\n", - "18\n", - "16\n", - "18\n", - "17\n", - "18\n", - "16\n", - "16\n", - "18\n", - "14\n", - "12\n", - "18\n", - "15\n", - "16\n", - "18\n", - "15\n", - "18\n", - "16\n", - "16\n", - "14\n", - "18\n", - "16\n", - "18\n", - "13\n", - "16\n", - "15\n", - "9\n", - "10\n", - "19\n", - "13\n", - "15\n", - "15\n", - "14\n", - "14\n", - "18\n", - "16\n", - "13\n", - "15\n", - "16\n", - "8\n", - "13\n", - "12\n", - "14\n", - "14\n", - "13\n", - "14\n", - "13\n", - "16\n", - "13\n", - "12\n", - "14\n", - "11\n", - "13\n", - "13\n", - "15\n", - "15\n", - "13\n", - "15\n", - "13\n", - "16\n", - "14\n", - "14\n", - "12\n", - "10\n", - "12\n", - "14\n", - "13\n", - "15\n", - "16\n", - "18\n", - "18\n", - "13\n", - "16\n", - "14\n", - "18\n", - "18\n", - "14\n", - "14\n", - "14\n", - "18\n", - "16\n", - "18\n", - "18\n", - "14\n", - "16\n", - "21\n", - "14\n", - "18\n", - "18\n", - "18\n", - "14\n", - "18\n", - "13\n", - "13\n", - "12\n", - "15\n", - "15\n", - "13\n", - "13\n", - "14\n", - "14\n", - "12\n", - "12\n", - "14\n", - "14\n", - "18\n", - "16\n", - "13\n", - "16\n", - "13\n", - "15\n", - "12\n", - "12\n", - "14\n", - "14\n", - "16\n", - "16\n", - "13\n", - "15\n", - "12\n", - "15\n", - "14\n", - "16\n", - "18\n", - "18\n", - "16\n", - "16\n", - "10\n", - "15\n", - "15\n", - "14\n", - "18\n", - "15\n", - "18\n", - "18\n", - "18\n", - "16\n", - "16\n", - "12\n", - "18\n", - "18\n", - "12\n", - "18\n", - "16\n", - "18\n", - "15\n", - "16\n", - "16\n", - "13\n", - "15\n", - "18\n", - "13\n", - "18\n", - "18\n", - "15\n", - "13\n", - "13\n", - "16\n", - "12\n", - "11\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "11\n", - "16\n", - "17\n", - "15\n", - "13\n", - "13\n", - "13\n", - "14\n", - "16\n", - "15\n", - "13\n", - "15\n", - "12\n", - "12\n", - "16\n", - "14\n", - "14\n", - "12\n", - "12\n", - "16\n", - "14\n", - "15\n", - "11\n", - "14\n", - "13\n", - "12\n", - "12\n", - "11\n", - "11\n", - "15\n", - "14\n", - "13\n", - "13\n", - "18\n", - "16\n", - "15\n", - "13\n", - "11\n", - "15\n", - "13\n", - "15\n", - "13\n", - "13\n", - "13\n", - "13\n", - "14\n", - "18\n", - "21\n", - "14\n", - "14\n", - "13\n", - "15\n", - "12\n", - "14\n", - "16\n", - "14\n", - "16\n", - "13\n", - "14\n", - "18\n", - "14\n", - "12\n", - "13\n", - "16\n", - "18\n", - "18\n", - "14\n", - "16\n", - "15\n", - "15\n", - "14\n", - "18\n", - "14\n", - "18\n", - "18\n", - "18\n", - "14\n", - "16\n", - "14\n", - "14\n", - "14\n", - "18\n", - "18\n", - "18\n", - "16\n", - "18\n", - "18\n", - "18\n", - "14\n", - "10\n", - "16\n", - "13\n", - "11\n", - "17\n", - "12\n", - "10\n", - "18\n", - "16\n", - "14\n", - "11\n", - "13\n", - "16\n", - "15\n", - "13\n", - "14\n", - "12\n", - "14\n", - "14\n", - "18\n", - "16\n", - "14\n", - "13\n", - "17\n", - "15\n", - "12\n", - "14\n", - "14\n", - "14\n", - "14\n", - "12\n", - "18\n", - "10\n", - "14\n", - "17\n", - "12\n", - "16\n", - "14\n", - "12\n", - "10\n", - "14\n", - "16\n", - "14\n", - "18\n", - "16\n", - "17\n", - "14\n", - "18\n", - "16\n", - "14\n", - "12\n", - "10\n", - "18\n", - "13\n", - "11\n", - "18\n", - "17\n", - "9\n", - "14\n", - "12\n", - "10\n", - "13\n", - "11\n", - "9\n", - "14\n", - "12\n", - "10\n", - "14\n", - "18\n", - "18\n", - "14\n", - "12\n", - "14\n", - "16\n", - "13\n", - "11\n", - "9\n", - "18\n", - "16\n", - "14\n", - "18\n", - "21\n", - "16\n", - "18\n", - "14\n", - "18\n", - "16\n", - "14\n", - "12\n", - "17\n", - "10\n", - "13\n", - "11\n", - "17\n", - "9\n", - "18\n", - "13\n", - "11\n", - "9\n", - "13\n", - "17\n", - "11\n", - "9\n", - "14\n", - "12\n", - "15\n", - "16\n", - "12\n", - "10\n", - "14\n", - "18\n", - "10\n", - "15\n", - "12\n", - "10\n", - "14\n", - "18\n", - "18\n", - "15\n", - "18\n", - "12\n", - "10\n", - "14\n", - "19\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "18\n", - "16\n", - "16\n", - "16\n", - "19\n", - "16\n", - "16\n", - "16\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "14\n", - "17\n", - "16\n", - "14\n", - "14\n", - "14\n", - "14\n", - "16\n", - "16\n", - "16\n", - "18\n", - "16\n", - "15\n", - "16\n", - "18\n", - "18\n", - "18\n", - "14\n", - "14\n", - "18\n", - "18\n", - "18\n", - "14\n", - "18\n", - "12\n", - "14\n", - "14\n", - "16\n", - "16\n", - "18\n", - "18\n", - "16\n", - "18\n", - "16\n", - "18\n", - "15\n", - "16\n", - "18\n", - "20\n", - "20\n", - "18\n", - "14\n", - "16\n", - "14\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "20\n", - "18\n", - "20\n", - "20\n", - "18\n", - "15\n", - "15\n", - "16\n", - "15\n", - "17\n", - "16\n", - "21\n", - "13\n", - "17\n", - "13\n", - "17\n", - "17\n", - "18\n", - "12\n", - "20\n", - "18\n", - "12\n", - "12\n", - "17\n", - "12\n", - "12\n", - "14\n", - "12\n", - "18\n", - "6\n", - "18\n", - "14\n", - "12\n", - "18\n", - "14\n", - "12\n", - "17\n", - "14\n", - "14\n", - "16\n", - "14\n", - "16\n", - "20\n", - "16\n", - "14\n", - "16\n", - "10\n", - "16\n", - "15\n", - "12\n", - "14\n", - "20\n", - "16\n", - "16\n", - "16\n", - "14\n", - "20\n", - "16\n", - "16\n", - "16\n", - "13\n", - "16\n", - "18\n", - "14\n", - "18\n", - "14\n", - "18\n", - "20\n", - "18\n", - "18\n", - "15\n", - "15\n", - "18\n", - "17\n", - "16\n", - "17\n", - "13\n", - "17\n", - "17\n", - "14\n", - "14\n", - "16\n", - "14\n", - "16\n", - "18\n", - "16\n", - "12\n", - "14\n", - "16\n", - "16\n", - "12\n", - "18\n", - "14\n", - "18\n", - "18\n", - "20\n", - "14\n", - "18\n", - "16\n", - "16\n", - "16\n", - "16\n", - "20\n", - "20\n", - "18\n", - "18\n", - "18\n", - "14\n", - "14\n", - "16\n", - "20\n", - "18\n", - "20\n", - "16\n", - "20\n", - "18\n", - "18\n", - "18\n", - "14\n", - "18\n", - "15\n", - "16\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "17\n", - "17\n", - "12\n", - "17\n", - "17\n", - "13\n", - "18\n", - "21\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "10\n", - "16\n", - "17\n", - "17\n", - "17\n", - "20\n", - "14\n", - "16\n", - "16\n", - "16\n", - "16\n", - "13\n", - "14\n", - "13\n", - "15\n", - "15\n", - "15\n", - "15\n", - "17\n", - "17\n", - "18\n", - "17\n", - "15\n", - "12\n", - "17\n", - "15\n", - "17\n", - "17\n", - "17\n", - "14\n", - "18\n", - "14\n", - "15\n", - "15\n", - "16\n", - "15\n", - "13\n", - "17\n", - "13\n", - "17\n", - "12\n", - "14\n", - "14\n", - "14\n", - "16\n", - "17\n", - "16\n", - "16\n", - "14\n", - "16\n", - "17\n", - "14\n", - "14\n", - "16\n", - "18\n", - "18\n", - "15\n", - "20\n", - "16\n", - "18\n", - "20\n", - "12\n", - "14\n", - "12\n", - "18\n", - "14\n", - "18\n", - "13\n", - "14\n", - "15\n", - "12\n", - "20\n", - "20\n", - "16\n", - "16\n", - "20\n", - "18\n", - "14\n", - "16\n", - "16\n", - "16\n", - "13\n", - "14\n", - "20\n", - "20\n", - "16\n", - "16\n", - "16\n", - "18\n", - "12\n", - "20\n", - "15\n", - "15\n", - "17\n", - "15\n", - "15\n", - "17\n", - "17\n", - "17\n", - "17\n", - "13\n", - "17\n", - "17\n", - "15\n", - "17\n", - "18\n", - "17\n", - "17\n", - "17\n", - "17\n", - "14\n", - "8\n", - "14\n", - "14\n", - "14\n", - "14\n", - "16\n", - "16\n", - "17\n", - "21\n", - "16\n", - "16\n", - "16\n", - "17\n", - "16\n", - "14\n", - "14\n", - "16\n", - "16\n", - "16\n", - "16\n", - "18\n", - "16\n", - "14\n", - "15\n", - "16\n", - "18\n", - "16\n", - "18\n", - "20\n", - "18\n", - "16\n", - "18\n", - "17\n", - "13\n", - "12\n", - "15\n", - "15\n", - "17\n", - "17\n", - "17\n", - "15\n", - "17\n", - "12\n", - "14\n", - "15\n", - "14\n", - "16\n", - "16\n", - "16\n", - "14\n", - "16\n", - "13\n", - "13\n", - "15\n", - "17\n", - "17\n", - "12\n", - "17\n", - "15\n", - "16\n", - "12\n", - "16\n", - "14\n", - "18\n", - "16\n", - "14\n", - "16\n", - "16\n", - "16\n", - "17\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "14\n", - "18\n", - "18\n", - "16\n", - "18\n", - "20\n", - "14\n", - "20\n", - "16\n", - "16\n", - "18\n", - "17\n", - "18\n", - "20\n", - "20\n", - "17\n", - "16\n", - "20\n", - "16\n", - "20\n", - "18\n", - "18\n", - "16\n", - "18\n", - "16\n", - "20\n", - "18\n", - "18\n", - "20\n", - "18\n", - "18\n", - "15\n", - "15\n", - "9\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "17\n", - "20\n", - "14\n", - "14\n", - "16\n", - "16\n", - "13\n", - "13\n", - "13\n", - "14\n", - "21\n", - "13\n", - "19\n", - "17\n", - "19\n", - "17\n", - "15\n", - "17\n", - "15\n", - "15\n", - "17\n", - "17\n", - "16\n", - "17\n", - "16\n", - "17\n", - "12\n", - "14\n", - "12\n", - "18\n", - "16\n", - "18\n", - "16\n", - "18\n", - "13\n", - "17\n", - "16\n", - "14\n", - "18\n", - "16\n", - "14\n", - "11\n", - "11\n", - "19\n", - "13\n", - "17\n", - "17\n", - "13\n", - "13\n", - "12\n", - "12\n", - "12\n", - "18\n", - "18\n", - "16\n", - "14\n", - "14\n", - "16\n", - "16\n", - "15\n", - "14\n", - "13\n", - "17\n", - "15\n", - "17\n", - "16\n", - "15\n", - "17\n", - "17\n", - "15\n", - "13\n", - "13\n", - "15\n", - "15\n", - "15\n", - "17\n", - "15\n", - "15\n", - "15\n", - "15\n", - "17\n", - "17\n", - "17\n", - "15\n", - "15\n", - "17\n", - "17\n", - "17\n", - "15\n", - "16\n", - "19\n", - "16\n", - "15\n", - "14\n", - "18\n", - "18\n", - "16\n", - "14\n", - "17\n", - "13\n", - "17\n", - "14\n", - "17\n", - "17\n", - "16\n", - "14\n", - "14\n", - "16\n", - "18\n", - "16\n", - "17\n", - "15\n", - "15\n", - "15\n", - "18\n", - "18\n", - "16\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "16\n", - "16\n", - "16\n", - "18\n", - "18\n", - "18\n", - "18\n", - "16\n", - "16\n", - "18\n", - "17\n", - "21\n", - "20\n", - "17\n", - "12\n", - "12\n", - "14\n", - "12\n", - "12\n", - "16\n", - "10\n", - "14\n", - "20\n", - "18\n", - "19\n", - "14\n", - "12\n", - "18\n", - "14\n", - "18\n", - "14\n", - "20\n", - "20\n", - "16\n", - "16\n", - "17\n", - "19\n", - "12\n", - "16\n", - "14\n", - "18\n", - "14\n", - "18\n", - "14\n", - "20\n", - "16\n", - "15\n", - "20\n", - "15\n", - "16\n", - "20\n", - "15\n", - "15\n", - "17\n", - "17\n", - "17\n", - "15\n", - "17\n", - "17\n", - "17\n", - "16\n", - "17\n", - "14\n", - "14\n", - "14\n", - "16\n", - "16\n", - "16\n", - "15\n", - "14\n", - "16\n", - "16\n", - "17\n", - "16\n", - "16\n", - "18\n", - "18\n", - "16\n", - "18\n", - "18\n", - "16\n", - "20\n", - "15\n", - "19\n", - "16\n", - "19\n", - "17\n", - "14\n", - "18\n", - "18\n", - "9\n", - "14\n", - "16\n", - "13\n", - "13\n", - "15\n", - "15\n", - "16\n", - "17\n", - "17\n", - "15\n", - "17\n", - "18\n", - "16\n", - "18\n", - "16\n", - "14\n", - "14\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "14\n", - "16\n", - "14\n", - "18\n", - "18\n", - "16\n", - "16\n", - "14\n", - "14\n", - "17\n", - "13\n", - "13\n", - "17\n", - "13\n", - "17\n", - "17\n", - "16\n", - "17\n", - "21\n", - "14\n", - "14\n", - "14\n", - "14\n", - "16\n", - "14\n", - "16\n", - "16\n", - "17\n", - "16\n", - "15\n", - "12\n", - "13\n", - "15\n", - "14\n", - "16\n", - "16\n", - "16\n", - "18\n", - "18\n", - "16\n", - "16\n", - "18\n", - "15\n", - "17\n", - "15\n", - "14\n", - "16\n", - "18\n", - "16\n", - "16\n", - "14\n", - "14\n", - "14\n", - "14\n", - "16\n", - "18\n", - "14\n", - "18\n", - "18\n", - "16\n", - "18\n", - "13\n", - "15\n", - "18\n", - "12\n", - "13\n", - "15\n", - "17\n", - "15\n", - "13\n", - "15\n", - "12\n", - "14\n", - "14\n", - "14\n", - "18\n", - "13\n", - "15\n", - "17\n", - "15\n", - "13\n", - "15\n", - "13\n", - "13\n", - "13\n", - "7\n", - "9\n", - "18\n", - "13\n", - "13\n", - "15\n", - "13\n", - "16\n", - "13\n", - "15\n", - "12\n", - "14\n", - "15\n", - "16\n", - "18\n", - "18\n", - "16\n", - "18\n", - "18\n", - "15\n", - "18\n", - "18\n", - "16\n", - "14\n", - "14\n", - "13\n", - "14\n", - "18\n", - "18\n", - "16\n", - "18\n", - "15\n", - "13\n", - "15\n", - "17\n", - "16\n", - "15\n", - "13\n", - "13\n", - "18\n", - "16\n", - "14\n", - "18\n", - "15\n", - "16\n", - "13\n", - "14\n", - "15\n", - "13\n", - "15\n", - "15\n", - "13\n", - "18\n", - "18\n", - "18\n", - "15\n", - "21\n", - "14\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "20\n", - "16\n", - "14\n", - "18\n", - "20\n", - "16\n", - "18\n", - "18\n", - "16\n", - "14\n", - "16\n", - "16\n", - "16\n", - "12\n", - "20\n", - "15\n", - "16\n", - "20\n", - "18\n", - "20\n", - "18\n", - "18\n", - "18\n", - "16\n", - "14\n", - "18\n", - "16\n", - "15\n", - "20\n", - "20\n", - "18\n", - "16\n", - "14\n", - "20\n", - "18\n", - "14\n", - "18\n", - "15\n", - "15\n", - "18\n", - "15\n", - "17\n", - "17\n", - "17\n", - "15\n", - "17\n", - "9\n", - "10\n", - "17\n", - "17\n", - "17\n", - "17\n", - "16\n", - "20\n", - "20\n", - "18\n", - "18\n", - "20\n", - "12\n", - "16\n", - "14\n", - "16\n", - "16\n", - "17\n", - "18\n", - "15\n", - "15\n", - "17\n", - "15\n", - "16\n", - "13\n", - "17\n", - "19\n", - "19\n", - "17\n", - "17\n", - "18\n", - "17\n", - "16\n", - "14\n", - "14\n", - "14\n", - "18\n", - "16\n", - "16\n", - "14\n", - "18\n", - "16\n", - "18\n", - "18\n", - "17\n", - "12\n", - "13\n", - "15\n", - "17\n", - "13\n", - "15\n", - "13\n", - "19\n", - "15\n", - "16\n", - "16\n", - "14\n", - "14\n", - "14\n", - "16\n", - "14\n", - "18\n", - "16\n", - "16\n", - "14\n", - "18\n", - "18\n", - "15\n", - "21\n", - "16\n", - "16\n", - "15\n", - "17\n", - "15\n", - "17\n", - "17\n", - "17\n", - "16\n", - "13\n", - "15\n", - "18\n", - "17\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "17\n", - "16\n", - "15\n", - "17\n", - "15\n", - "17\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "13\n", - "17\n", - "15\n", - "16\n", - "16\n", - "18\n", - "15\n", - "14\n", - "16\n", - "16\n", - "18\n", - "16\n", - "11\n", - "13\n", - "14\n", - "16\n", - "14\n", - "15\n", - "18\n", - "17\n", - "15\n", - "17\n", - "13\n", - "14\n", - "15\n", - "16\n", - "16\n", - "14\n", - "14\n", - "17\n", - "17\n", - "16\n", - "15\n", - "15\n", - "17\n", - "15\n", - "15\n", - "13\n", - "13\n", - "15\n", - "13\n", - "15\n", - "15\n", - "15\n", - "13\n", - "15\n", - "14\n", - "13\n", - "13\n", - "15\n", - "15\n", - "17\n", - "17\n", - "15\n", - "18\n", - "17\n", - "15\n", - "10\n", - "15\n", - "15\n", - "17\n", - "17\n", - "17\n", - "11\n", - "15\n", - "13\n", - "18\n", - "15\n", - "12\n", - "15\n", - "13\n", - "16\n", - "15\n", - "14\n", - "16\n", - "15\n", - "14\n", - "14\n", - "16\n", - "16\n", - "13\n", - "14\n", - "15\n", - "13\n", - "10\n", - "14\n", - "12\n", - "18\n", - "18\n", - "14\n", - "12\n", - "18\n", - "21\n", - "18\n", - "18\n", - "18\n", - "14\n", - "18\n", - "16\n", - "18\n", - "18\n", - "16\n", - "14\n", - "13\n", - "18\n", - "12\n", - "14\n", - "12\n", - "18\n", - "17\n", - "16\n", - "14\n", - "16\n", - "18\n", - "18\n", - "12\n", - "15\n", - "13\n", - "13\n", - "15\n", - "13\n", - "12\n", - "12\n", - "14\n", - "12\n", - "14\n", - "15\n", - "13\n", - "12\n", - "18\n", - "15\n", - "13\n", - "14\n", - "18\n", - "18\n", - "12\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "18\n", - "16\n", - "16\n", - "18\n", - "16\n", - "20\n", - "18\n", - "18\n", - "14\n", - "18\n", - "14\n", - "15\n", - "18\n", - "18\n", - "14\n", - "17\n", - "14\n", - "14\n", - "20\n", - "18\n", - "14\n", - "20\n", - "16\n", - "16\n", - "20\n", - "16\n", - "13\n", - "12\n", - "18\n", - "14\n", - "18\n", - "14\n", - "20\n", - "20\n", - "16\n", - "15\n", - "16\n", - "16\n", - "12\n", - "20\n", - "16\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "17\n", - "15\n", - "12\n", - "17\n", - "17\n", - "17\n", - "17\n", - "14\n", - "14\n", - "14\n", - "14\n", - "14\n", - "16\n", - "16\n", - "18\n", - "16\n", - "16\n", - "16\n", - "16\n", - "18\n", - "18\n", - "18\n", - "16\n", - "18\n", - "16\n", - "16\n", - "18\n", - "21\n", - "20\n", - "15\n", - "15\n", - "13\n", - "19\n", - "19\n", - "17\n", - "12\n", - "14\n", - "14\n", - "14\n", - "20\n", - "18\n", - "18\n", - "16\n", - "15\n", - "15\n", - "17\n", - "10\n", - "16\n", - "18\n", - "16\n", - "18\n", - "16\n", - "20\n", - "16\n", - "13\n", - "14\n", - "15\n", - "15\n", - "17\n", - "15\n", - "17\n", - "17\n", - "15\n", - "13\n", - "16\n", - "12\n", - "14\n", - "18\n", - "16\n", - "13\n", - "14\n", - "16\n", - "14\n", - "16\n", - "14\n", - "16\n", - "17\n", - "14\n", - "14\n", - "13\n", - "16\n", - "13\n", - "15\n", - "16\n", - "15\n", - "14\n", - "16\n", - "14\n", - "17\n", - "16\n", - "18\n", - "12\n", - "16\n", - "14\n", - "16\n", - "14\n", - "17\n", - "17\n", - "13\n", - "15\n", - "18\n", - "17\n", - "15\n", - "13\n", - "15\n", - "17\n", - "16\n", - "16\n", - "14\n", - "16\n", - "14\n", - "14\n", - "18\n", - "13\n", - "14\n", - "16\n", - "17\n", - "16\n", - "15\n", - "17\n", - "15\n", - "15\n", - "13\n", - "14\n", - "11\n", - "20\n", - "14\n", - "12\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "14\n", - "19\n", - "14\n", - "14\n", - "13\n", - "16\n", - "16\n", - "18\n", - "15\n", - "15\n", - "16\n", - "14\n", - "17\n", - "17\n", - "21\n", - "15\n", - "16\n", - "16\n", - "14\n", - "15\n", - "16\n", - "8\n", - "15\n", - "16\n", - "18\n", - "16\n", - "14\n", - "17\n", - "18\n", - "16\n", - "16\n", - "13\n", - "13\n", - "13\n", - "18\n", - "18\n", - "18\n", - "15\n", - "13\n", - "18\n", - "13\n", - "12\n", - "11\n", - "13\n", - "15\n", - "17\n", - "15\n", - "13\n", - "13\n", - "13\n", - "14\n", - "16\n", - "16\n", - "13\n", - "17\n", - "13\n", - "12\n", - "12\n", - "16\n", - "14\n", - "18\n", - "14\n", - "12\n", - "16\n", - "18\n", - "14\n", - "13\n", - "16\n", - "16\n", - "11\n", - "13\n", - "11\n", - "13\n", - "12\n", - "13\n", - "18\n", - "11\n", - "11\n", - "15\n", - "12\n", - "17\n", - "17\n", - "15\n", - "17\n", - "15\n", - "13\n", - "13\n", - "18\n", - "17\n", - "16\n", - "14\n", - "16\n", - "14\n", - "16\n", - "14\n", - "16\n", - "16\n", - "16\n", - "16\n", - "15\n", - "18\n", - "13\n", - "17\n", - "12\n", - "16\n", - "16\n", - "16\n", - "18\n", - "16\n", - "16\n", - "18\n", - "16\n", - "16\n", - "15\n", - "13\n", - "13\n", - "17\n", - "12\n", - "16\n", - "16\n", - "14\n", - "8\n", - "15\n", - "13\n", - "16\n", - "13\n", - "11\n", - "13\n", - "11\n", - "15\n", - "13\n", - "11\n", - "6\n", - "14\n", - "13\n", - "13\n", - "13\n", - "18\n", - "23\n", - "19\n", - "13\n", - "12\n", - "18\n", - "18\n", - "6\n", - "14\n", - "10\n", - "18\n", - "14\n", - "12\n", - "12\n", - "16\n", - "16\n", - "16\n", - "13\n", - "10\n", - "9\n", - "11\n", - "15\n", - "14\n", - "10\n", - "18\n", - "14\n", - "16\n", - "12\n", - "16\n", - "16\n", - "18\n", - "13\n", - "9\n", - "15\n", - "14\n", - "15\n", - "17\n", - "15\n", - "20\n", - "13\n", - "16\n", - "9\n", - "17\n", - "13\n", - "9\n", - "16\n", - "14\n", - "12\n", - "12\n", - "16\n", - "20\n", - "14\n", - "18\n", - "16\n", - "13\n", - "9\n", - "17\n", - "16\n", - "14\n", - "16\n", - "11\n", - "13\n", - "16\n", - "20\n", - "15\n", - "17\n", - "17\n", - "17\n", - "13\n", - "9\n", - "17\n", - "11\n", - "15\n", - "12\n", - "16\n", - "16\n", - "14\n", - "17\n", - "16\n", - "17\n", - "17\n", - "16\n", - "16\n", - "12\n", - "16\n", - "18\n", - "16\n", - "20\n", - "16\n", - "14\n", - "17\n", - "16\n", - "18\n", - "18\n", - "14\n", - "14\n", - "18\n", - "14\n", - "18\n", - "20\n", - "18\n", - "14\n", - "12\n", - "10\n", - "16\n", - "14\n", - "12\n", - "14\n", - "16\n", - "16\n", - "14\n", - "20\n", - "16\n", - "14\n", - "14\n", - "18\n", - "18\n", - "16\n", - "16\n", - "18\n", - "18\n", - "16\n", - "15\n", - "15\n", - "16\n", - "23\n", - "13\n", - "15\n", - "15\n", - "14\n", - "15\n", - "15\n", - "15\n", - "13\n", - "13\n", - "17\n", - "17\n", - "20\n", - "14\n", - "12\n", - "14\n", - "14\n", - "14\n", - "12\n", - "16\n", - "15\n", - "15\n", - "19\n", - "19\n", - "16\n", - "17\n", - "12\n", - "12\n", - "14\n", - "12\n", - "12\n", - "18\n", - "16\n", - "16\n", - "16\n", - "18\n", - "18\n", - "14\n", - "16\n", - "18\n", - "16\n", - "18\n", - "11\n", - "13\n", - "11\n", - "11\n", - "19\n", - "12\n", - "12\n", - "16\n", - "14\n", - "14\n", - "12\n", - "14\n", - "14\n", - "18\n", - "18\n", - "16\n", - "17\n", - "12\n", - "17\n", - "18\n", - "19\n", - "19\n", - "13\n", - "13\n", - "18\n", - "14\n", - "18\n", - "18\n", - "14\n", - "17\n", - "17\n", - "16\n", - "16\n", - "16\n", - "18\n", - "16\n", - "18\n", - "16\n", - "18\n", - "14\n", - "16\n", - "19\n", - "11\n", - "14\n", - "13\n", - "18\n", - "12\n", - "18\n", - "14\n", - "18\n", - "12\n", - "12\n", - "13\n", - "15\n", - "15\n", - "14\n", - "16\n", - "13\n", - "13\n", - "15\n", - "13\n", - "13\n", - "12\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "16\n", - "15\n", - "13\n", - "15\n", - "17\n", - "14\n", - "15\n", - "13\n", - "15\n", - "13\n", - "13\n", - "11\n", - "20\n", - "23\n", - "15\n", - "11\n", - "12\n", - "11\n", - "13\n", - "11\n", - "15\n", - "13\n", - "15\n", - "15\n", - "15\n", - "18\n", - "13\n", - "14\n", - "15\n", - "13\n", - "14\n", - "16\n", - "15\n", - "14\n", - "15\n", - "14\n", - "16\n", - "16\n", - "14\n", - "15\n", - "14\n", - "14\n", - "12\n", - "14\n", - "12\n", - "12\n", - "10\n", - "16\n", - "14\n", - "14\n", - "20\n", - "11\n", - "11\n", - "9\n", - "13\n", - "16\n", - "14\n", - "12\n", - "14\n", - "12\n", - "14\n", - "12\n", - "18\n", - "10\n", - "14\n", - "15\n", - "12\n", - "10\n", - "14\n", - "12\n", - "14\n", - "12\n", - "15\n", - "15\n", - "18\n", - "15\n", - "13\n", - "14\n", - "14\n", - "12\n", - "13\n", - "13\n", - "14\n", - "13\n", - "15\n", - "13\n", - "20\n", - "15\n", - "13\n", - "15\n", - "13\n", - "13\n", - "15\n", - "15\n", - "16\n", - "15\n", - "15\n", - "15\n", - "17\n", - "14\n", - "15\n", - "15\n", - "13\n", - "15\n", - "13\n", - "12\n", - "15\n", - "13\n", - "15\n", - "13\n", - "15\n", - "20\n", - "15\n", - "15\n", - "15\n", - "15\n", - "14\n", - "13\n", - "15\n", - "13\n", - "11\n", - "11\n", - "11\n", - "20\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "16\n", - "14\n", - "16\n", - "16\n", - "14\n", - "16\n", - "18\n", - "23\n", - "12\n", - "14\n", - "14\n", - "13\n", - "13\n", - "12\n", - "16\n", - "16\n", - "14\n", - "16\n", - "15\n", - "18\n", - "12\n", - "14\n", - "15\n", - "14\n", - "16\n", - "14\n", - "14\n", - "16\n", - "14\n", - "13\n", - "16\n", - "14\n", - "20\n", - "14\n", - "12\n", - "12\n", - "14\n", - "14\n", - "14\n", - "14\n", - "12\n", - "16\n", - "12\n", - "14\n", - "20\n", - "12\n", - "14\n", - "12\n", - "16\n", - "14\n", - "14\n", - "12\n", - "12\n", - "14\n", - "18\n", - "16\n", - "16\n", - "11\n", - "15\n", - "13\n", - "10\n", - "12\n", - "14\n", - "12\n", - "12\n", - "12\n", - "12\n", - "11\n", - "16\n", - "16\n", - "14\n", - "12\n", - "13\n", - "15\n", - "12\n", - "9\n", - "13\n", - "14\n", - "12\n", - "14\n", - "12\n", - "18\n", - "20\n", - "16\n", - "14\n", - "11\n", - "13\n", - "10\n", - "12\n", - "12\n", - "11\n", - "13\n", - "13\n", - "15\n", - "18\n", - "12\n", - "10\n", - "10\n", - "12\n", - "12\n", - "14\n", - "16\n", - "14\n", - "12\n", - "16\n", - "14\n", - "18\n", - "16\n", - "14\n", - "11\n", - "12\n", - "13\n", - "15\n", - "13\n", - "14\n", - "14\n", - "14\n", - "15\n", - "16\n", - "16\n", - "14\n", - "16\n", - "16\n", - "16\n", - "14\n", - "14\n", - "16\n", - "11\n", - "15\n", - "10\n", - "20\n", - "23\n", - "16\n", - "14\n", - "11\n", - "13\n", - "15\n", - "15\n", - "12\n", - "14\n", - "12\n", - "12\n", - "11\n", - "16\n", - "15\n", - "13\n", - "13\n", - "15\n", - "14\n", - "12\n", - "12\n", - "14\n", - "14\n", - "13\n", - "14\n", - "12\n", - "14\n", - "12\n", - "11\n", - "14\n", - "13\n", - "13\n", - "12\n", - "10\n", - "14\n", - "16\n", - "11\n", - "15\n", - "20\n", - "13\n", - "10\n", - "14\n", - "12\n", - "11\n", - "10\n", - "13\n", - "16\n", - "13\n", - "12\n", - "18\n", - "12\n", - "12\n", - "12\n", - "12\n", - "14\n", - "18\n", - "16\n", - "13\n", - "16\n", - "12\n", - "14\n", - "18\n", - "18\n", - "16\n", - "14\n", - "12\n", - "16\n", - "14\n", - "13\n", - "14\n", - "11\n", - "15\n", - "13\n", - "12\n", - "18\n", - "10\n", - "12\n", - "14\n", - "12\n", - "10\n", - "12\n", - "12\n", - "14\n", - "15\n", - "12\n", - "14\n", - "18\n", - "15\n", - "12\n", - "14\n", - "14\n", - "16\n", - "13\n", - "11\n", - "15\n", - "13\n", - "12\n", - "10\n", - "20\n", - "11\n", - "13\n", - "11\n", - "14\n", - "13\n", - "15\n", - "13\n", - "12\n", - "10\n", - "12\n", - "10\n", - "20\n", - "16\n", - "12\n", - "14\n", - "14\n", - "12\n", - "16\n", - "14\n", - "11\n", - "13\n", - "16\n", - "12\n", - "20\n", - "23\n", - "12\n", - "14\n", - "16\n", - "12\n", - "14\n", - "14\n", - "16\n", - "13\n", - "15\n", - "11\n", - "13\n", - "14\n", - "20\n", - "12\n", - "10\n", - "13\n", - "11\n", - "15\n", - "13\n", - "12\n", - "14\n", - "16\n", - "16\n", - "18\n", - "20\n", - "16\n", - "18\n", - "16\n", - "18\n", - "16\n", - "12\n", - "14\n", - "12\n", - "14\n", - "16\n", - "14\n", - "15\n", - "16\n", - "16\n", - "14\n", - "10\n", - "12\n", - "10\n", - "10\n", - "15\n", - "16\n", - "12\n", - "10\n", - "14\n", - "13\n", - "14\n", - "12\n", - "14\n", - "14\n", - "14\n", - "12\n", - "12\n", - "12\n", - "14\n", - "14\n", - "12\n", - "15\n", - "16\n", - "14\n", - "14\n", - "14\n", - "12\n", - "16\n", - "16\n", - "18\n", - "16\n", - "12\n", - "14\n", - "15\n", - "10\n", - "14\n", - "12\n", - "15\n", - "14\n", - "15\n", - "17\n", - "14\n", - "14\n", - "14\n", - "16\n", - "17\n", - "15\n", - "17\n", - "16\n", - "14\n", - "18\n", - "16\n", - "18\n", - "16\n", - "12\n", - "14\n", - "11\n", - "17\n", - "13\n", - "14\n", - "16\n", - "18\n", - "16\n", - "13\n", - "15\n", - "18\n", - "14\n", - "16\n", - "11\n", - "19\n", - "13\n", - "10\n", - "15\n", - "15\n", - "15\n", - "12\n", - "12\n", - "14\n", - "14\n", - "16\n", - "12\n", - "17\n", - "14\n", - "23\n", - "14\n", - "14\n", - "12\n", - "11\n", - "12\n", - "12\n", - "16\n", - "14\n", - "14\n", - "16\n", - "11\n", - "17\n", - "15\n", - "13\n", - "14\n", - "11\n", - "13\n", - "12\n", - "13\n", - "12\n", - "12\n", - "16\n", - "15\n", - "15\n", - "14\n", - "16\n", - "15\n", - "14\n", - "12\n", - "14\n", - "11\n", - "15\n", - "16\n", - "13\n", - "12\n", - "13\n", - "18\n", - "10\n", - "15\n", - "15\n", - "11\n", - "13\n", - "14\n", - "14\n", - "12\n", - "14\n", - "14\n", - "14\n", - "16\n", - "14\n", - "14\n", - "14\n", - "10\n", - "13\n", - "12\n", - "13\n", - "15\n", - "12\n", - "12\n", - "14\n", - "18\n", - "13\n", - "15\n", - "13\n", - "13\n", - "12\n", - "16\n", - "12\n", - "14\n", - "14\n", - "15\n", - "13\n", - "16\n", - "11\n", - "14\n", - "12\n", - "14\n", - "15\n", - "11\n", - "14\n", - "13\n", - "12\n", - "13\n", - "12\n", - "15\n", - "14\n", - "16\n", - "16\n", - "15\n", - "14\n", - "15\n", - "14\n", - "16\n", - "15\n", - "14\n", - "14\n", - "17\n", - "12\n", - "14\n", - "10\n", - "14\n", - "12\n", - "14\n", - "12\n", - "12\n", - "10\n", - "16\n", - "14\n", - "15\n", - "14\n", - "11\n", - "9\n", - "11\n", - "11\n", - "9\n", - "13\n", - "15\n", - "13\n", - "12\n", - "12\n", - "14\n", - "17\n", - "23\n", - "12\n", - "10\n", - "14\n", - "14\n", - "12\n", - "15\n", - "10\n", - "12\n", - "12\n", - "10\n", - "14\n", - "17\n", - "12\n", - "14\n", - "15\n", - "15\n", - "15\n", - "15\n", - "15\n", - "11\n", - "12\n", - "13\n", - "15\n", - "13\n", - "17\n", - "14\n", - "14\n", - "14\n", - "14\n", - "12\n", - "14\n", - "14\n", - "12\n", - "13\n", - "12\n", - "11\n", - "18\n", - "12\n", - "11\n", - "11\n", - "11\n", - "10\n", - "16\n", - "10\n", - "15\n", - "16\n", - "14\n", - "13\n", - "14\n", - "14\n", - "13\n", - "13\n", - "13\n", - "14\n", - "12\n", - "12\n", - "12\n", - "16\n", - "15\n", - "15\n", - "14\n", - "13\n", - "15\n", - "14\n", - "12\n", - "13\n", - "12\n", - "13\n", - "15\n", - "20\n", - "13\n", - "13\n", - "12\n", - "14\n", - "14\n", - "14\n", - "12\n", - "13\n", - "20\n", - "15\n", - "14\n", - "13\n", - "15\n", - "14\n", - "14\n", - "13\n", - "12\n", - "13\n", - "13\n", - "13\n", - "12\n", - "14\n", - "13\n", - "12\n", - "15\n", - "14\n", - "13\n", - "14\n", - "13\n", - "12\n", - "15\n", - "13\n", - "12\n", - "14\n", - "14\n", - "13\n", - "12\n", - "13\n", - "12\n", - "13\n", - "13\n", - "23\n", - "13\n", - "12\n", - "13\n", - "13\n", - "13\n", - "15\n", - "14\n", - "14\n", - "13\n", - "13\n", - "12\n", - "13\n", - "12\n", - "13\n", - "11\n", - "15\n", - "19\n", - "12\n", - "11\n", - "12\n", - "10\n", - "14\n", - "13\n", - "11\n", - "15\n", - "12\n", - "10\n", - "14\n", - "12\n", - "15\n", - "12\n", - "10\n", - "14\n", - "11\n", - "9\n", - "13\n", - "12\n", - "10\n", - "14\n", - "11\n", - "9\n", - "16\n", - "19\n", - "13\n", - "12\n", - "10\n", - "14\n", - "11\n", - "9\n", - "13\n", - "12\n", - "10\n", - "14\n", - "14\n", - "17\n", - "11\n", - "9\n", - "13\n", - "11\n", - "9\n", - "13\n", - "11\n", - "9\n", - "14\n", - "13\n", - "15\n", - "14\n", - "15\n", - "17\n", - "17\n", - "15\n", - "15\n", - "17\n", - "13\n", - "12\n", - "17\n", - "14\n", - "14\n", - "16\n", - "16\n", - "12\n", - "16\n", - "13\n", - "13\n", - "15\n", - "14\n", - "11\n", - "15\n", - "17\n", - "17\n", - "20\n", - "16\n", - "13\n", - "15\n", - "15\n", - "13\n", - "16\n", - "11\n", - "15\n", - "13\n", - "17\n", - "10\n", - "18\n", - "12\n", - "11\n", - "13\n", - "15\n", - "16\n", - "16\n", - "15\n", - "18\n", - "15\n", - "12\n", - "15\n", - "14\n", - "13\n", - "12\n", - "14\n", - "14\n", - "13\n", - "18\n", - "12\n", - "14\n", - "13\n", - "14\n", - "13\n", - "13\n", - "13\n", - "13\n", - "9\n", - "18\n", - "13\n", - "13\n", - "16\n", - "15\n", - "16\n", - "16\n", - "15\n", - "17\n", - "15\n", - "14\n", - "14\n", - "12\n", - "13\n", - "12\n", - "20\n", - "13\n", - "12\n", - "12\n", - "12\n", - "12\n", - "12\n", - "12\n", - "15\n", - "13\n", - "11\n", - "15\n", - "18\n", - "14\n", - "13\n", - "15\n", - "13\n", - "14\n", - "16\n", - "12\n", - "13\n", - "15\n", - "14\n", - "14\n", - "20\n", - "13\n", - "13\n", - "12\n", - "12\n", - "16\n", - "13\n", - "12\n", - "13\n", - "13\n", - "12\n", - "13\n", - "12\n", - "12\n", - "15\n", - "10\n", - "14\n", - "14\n", - "9\n", - "13\n", - "10\n", - "14\n", - "9\n", - "13\n", - "9\n", - "13\n", - "15\n", - "12\n", - "9\n", - "13\n", - "9\n", - "13\n", - "9\n", - "13\n", - "15\n", - "15\n", - "15\n", - "13\n", - "16\n", - "15\n", - "14\n", - "14\n", - "12\n", - "13\n", - "13\n", - "11\n", - "17\n", - "15\n", - "19\n", - "16\n", - "13\n", - "10\n", - "12\n", - "11\n", - "13\n", - "10\n", - "12\n", - "10\n", - "12\n", - "10\n", - "16\n", - "19\n", - "12\n", - "10\n", - "12\n", - "10\n", - "12\n", - "9\n", - "13\n", - "11\n", - "11\n", - "13\n", - "14\n", - "15\n", - "13\n", - "13\n", - "15\n", - "10\n", - "12\n", - "14\n", - "11\n", - "13\n", - "10\n", - "12\n", - "14\n", - "19\n", - "13\n", - "12\n", - "11\n", - "9\n", - "8\n", - "13\n", - "13\n", - "11\n", - "12\n", - "13\n", - "13\n", - "17\n", - "13\n", - "15\n", - "15\n", - "16\n", - "15\n", - "15\n", - "15\n", - "14\n", - "19\n", - "17\n", - "17\n", - "13\n", - "15\n", - "13\n", - "15\n", - "15\n", - "15\n", - "13\n", - "14\n", - "15\n", - "15\n", - "17\n", - "17\n", - "15\n", - "17\n", - "18\n", - "18\n", - "17\n", - "18\n", - "16\n", - "16\n", - "19\n", - "17\n", - "17\n", - "15\n", - "18\n", - "16\n", - "20\n", - "18\n", - "16\n", - "12\n", - "20\n", - "18\n", - "16\n", - "20\n", - "17\n", - "18\n", - "16\n", - "19\n", - "19\n", - "15\n", - "18\n", - "19\n", - "19\n", - "17\n", - "15\n", - "17\n", - "17\n", - "18\n", - "16\n", - "20\n", - "16\n", - "12\n", - "20\n", - "18\n", - "19\n", - "19\n", - "19\n", - "19\n", - "17\n", - "16\n", - "18\n", - "20\n", - "12\n", - "20\n", - "18\n", - "13\n", - "15\n", - "19\n", - "19\n", - "17\n", - "15\n", - "17\n", - "15\n", - "11\n", - "10\n", - "15\n", - "19\n", - "17\n", - "13\n", - "15\n", - "15\n", - "15\n", - "15\n", - "17\n", - "19\n", - "14\n", - "17\n", - "17\n", - "17\n", - "16\n", - "15\n", - "16\n", - "15\n", - "15\n", - "13\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "17\n", - "12\n", - "15\n", - "15\n", - "17\n", - "15\n", - "15\n", - "17\n", - "18\n", - "17\n", - "18\n", - "18\n", - "16\n", - "19\n", - "19\n", - "16\n", - "19\n", - "19\n", - "15\n", - "18\n", - "15\n", - "20\n", - "20\n", - "16\n", - "18\n", - "16\n", - "17\n", - "19\n", - "19\n", - "19\n", - "19\n", - "15\n", - "18\n", - "15\n", - "14\n", - "17\n", - "20\n", - "18\n", - "17\n", - "18\n", - "19\n", - "19\n", - "19\n", - "20\n", - "16\n", - "16\n", - "18\n", - "18\n", - "18\n", - "18\n", - "17\n", - "18\n", - "13\n", - "17\n", - "15\n", - "15\n", - "14\n", - "15\n", - "19\n", - "19\n", - "15\n", - "15\n", - "17\n", - "17\n", - "13\n", - "13\n", - "15\n", - "14\n", - "15\n", - "15\n", - "15\n", - "15\n", - "13\n", - "15\n", - "19\n", - "17\n", - "15\n", - "17\n", - "16\n", - "15\n", - "15\n", - "15\n", - "15\n", - "20\n", - "14\n", - "12\n", - "19\n", - "20\n", - "16\n", - "13\n", - "14\n", - "20\n", - "20\n", - "20\n", - "20\n", - "20\n", - "20\n", - "18\n", - "16\n", - "17\n", - "20\n", - "14\n", - "20\n", - "20\n", - "14\n", - "12\n", - "16\n", - "20\n", - "20\n", - "20\n", - "20\n", - "17\n", - "14\n", - "18\n", - "16\n", - "16\n", - "14\n", - "18\n", - "18\n", - "20\n", - "20\n", - "14\n", - "12\n", - "10\n", - "17\n", - "16\n", - "13\n", - "11\n", - "15\n", - "15\n", - "13\n", - "17\n", - "20\n", - "15\n", - "18\n", - "17\n", - "17\n", - "19\n", - "15\n", - "17\n", - "20\n", - "20\n", - "19\n", - "20\n", - "20\n", - "16\n", - "15\n", - "13\n", - "15\n", - "17\n", - "19\n", - "17\n", - "15\n", - "13\n", - "11\n", - "13\n", - "14\n", - "15\n", - "11\n", - "13\n", - "15\n", - "19\n", - "15\n", - "17\n", - "13\n", - "11\n", - "15\n", - "18\n", - "20\n", - "16\n", - "14\n", - "12\n", - "20\n", - "17\n", - "18\n", - "16\n", - "19\n", - "13\n", - "16\n", - "11\n", - "15\n", - "20\n", - "20\n", - "19\n", - "19\n", - "19\n", - "16\n", - "14\n", - "20\n", - "18\n", - "18\n", - "15\n", - "13\n", - "17\n", - "13\n", - "11\n", - "15\n", - "17\n", - "19\n", - "15\n", - "9\n", - "13\n", - "16\n", - "13\n", - "13\n", - "11\n", - "17\n", - "15\n", - "20\n", - "18\n", - "18\n", - "19\n", - "20\n", - "16\n", - "16\n", - "20\n", - "18\n", - "16\n", - "18\n", - "18\n", - "20\n", - "20\n", - "16\n", - "17\n", - "14\n", - "20\n", - "20\n", - "18\n", - "20\n", - "16\n", - "20\n", - "18\n", - "16\n", - "18\n", - "18\n", - "14\n", - "19\n", - "20\n", - "16\n", - "20\n", - "18\n", - "20\n", - "16\n", - "20\n", - "20\n", - "20\n", - "16\n", - "18\n", - "17\n", - "14\n", - "16\n", - "16\n", - "14\n", - "16\n", - "14\n", - "12\n", - "18\n", - "12\n", - "18\n", - "18\n", - "17\n", - "19\n", - "18\n", - "20\n", - "18\n", - "20\n", - "16\n", - "16\n", - "12\n", - "18\n", - "18\n", - "20\n", - "16\n", - "15\n", - "22\n", - "12\n", - "14\n", - "14\n", - "14\n", - "16\n", - "12\n", - "12\n", - "14\n", - "14\n", - "12\n", - "17\n", - "16\n", - "12\n", - "10\n", - "10\n", - "14\n", - "12\n", - "10\n", - "14\n", - "20\n", - "14\n", - "20\n", - "17\n", - "20\n", - "16\n", - "12\n", - "16\n", - "18\n", - "14\n", - "18\n", - "14\n", - "20\n", - "20\n", - "16\n", - "15\n", - "16\n", - "12\n", - "13\n", - "14\n", - "20\n", - "16\n", - "20\n", - "18\n", - "14\n", - "18\n", - "14\n", - "20\n", - "17\n", - "16\n", - "18\n", - "12\n", - "16\n", - "14\n", - "12\n", - "18\n", - "14\n", - "22\n", - "20\n", - "20\n", - "15\n", - "18\n", - "16\n", - "16\n", - "16\n", - "22\n", - "18\n", - "14\n", - "20\n", - "16\n", - "20\n", - "16\n", - "16\n", - "17\n", - "22\n", - "22\n", - "18\n", - "18\n", - "14\n", - "22\n", - "18\n", - "16\n", - "14\n", - "14\n", - "18\n", - "17\n", - "16\n", - "12\n", - "16\n", - "12\n", - "18\n", - "18\n", - "14\n", - "14\n", - "14\n", - "10\n", - "18\n", - "17\n", - "14\n", - "20\n", - "20\n", - "16\n", - "20\n", - "16\n", - "20\n", - "12\n", - "20\n", - "16\n", - "16\n", - "17\n", - "19\n", - "18\n", - "16\n", - "16\n", - "13\n", - "18\n", - "16\n", - "16\n", - "18\n", - "12\n", - "12\n", - "10\n", - "14\n", - "10\n", - "14\n", - "15\n", - "18\n", - "10\n", - "12\n", - "10\n", - "14\n", - "14\n", - "14\n", - "8\n", - "12\n", - "16\n", - "13\n", - "14\n", - "16\n", - "16\n", - "14\n", - "16\n", - "14\n", - "12\n", - "18\n", - "12\n", - "16\n", - "13\n", - "14\n", - "16\n", - "10\n", - "10\n", - "12\n", - "12\n", - "12\n", - "12\n", - "16\n", - "16\n", - "11\n", - "14\n", - "14\n", - "16\n", - "14\n", - "14\n", - "12\n", - "16\n", - "14\n", - "14\n", - "14\n", - "13\n", - "14\n", - "18\n", - "16\n", - "14\n", - "14\n", - "16\n", - "12\n", - "14\n", - "12\n", - "14\n", - "11\n", - "12\n", - "16\n", - "16\n", - "16\n", - "14\n", - "16\n", - "18\n", - "16\n", - "16\n", - "14\n", - "13\n", - "16\n", - "12\n", - "14\n", - "18\n", - "12\n", - "12\n", - "16\n", - "16\n", - "14\n", - "14\n", - "11\n", - "13\n", - "14\n", - "14\n", - "16\n", - "12\n", - "16\n", - "16\n", - "14\n", - "16\n", - "16\n", - "14\n", - "11\n", - "16\n", - "14\n", - "16\n", - "14\n", - "12\n", - "14\n", - "14\n", - "12\n", - "16\n", - "18\n", - "9\n", - "16\n", - "14\n", - "16\n", - "18\n", - "16\n", - "14\n", - "16\n", - "16\n", - "14\n", - "16\n", - "13\n", - "14\n", - "12\n", - "14\n", - "12\n", - "16\n", - "14\n", - "16\n", - "14\n", - "14\n", - "14\n", - "11\n", - "16\n", - "14\n", - "16\n", - "12\n", - "10\n", - "14\n", - "10\n", - "14\n", - "16\n", - "12\n", - "10\n", - "12\n", - "14\n", - "12\n", - "16\n", - "14\n", - "10\n", - "12\n", - "12\n", - "12\n", - "16\n", - "8\n", - "14\n", - "14\n", - "10\n", - "12\n", - "10\n", - "10\n", - "14\n", - "12\n", - "12\n", - "14\n", - "8\n", - "14\n", - "12\n", - "10\n", - "14\n", - "16\n", - "14\n", - "14\n", - "12\n", - "14\n", - "12\n", - "12\n", - "14\n", - "16\n", - "18\n", - "16\n", - "14\n", - "14\n", - "12\n", - "8\n", - "10\n", - "8\n", - "12\n", - "12\n", - "14\n", - "12\n", - "14\n", - "10\n", - "14\n", - "12\n", - "14\n", - "12\n", - "12\n", - "9\n", - "12\n", - "10\n", - "16\n", - "14\n", - "16\n", - "18\n", - "10\n", - "8\n", - "12\n", - "12\n", - "14\n", - "11\n", - "12\n", - "14\n", - "12\n", - "12\n", - "10\n", - "16\n", - "14\n", - "8\n", - "10\n", - "12\n", - "10\n", - "10\n", - "14\n", - "12\n", - "14\n", - "12\n", - "12\n", - "14\n", - "10\n", - "12\n", - "10\n", - "14\n", - "11\n", - "15\n", - "13\n", - "13\n", - "13\n", - "13\n", - "11\n", - "18\n", - "11\n", - "13\n", - "12\n", - "11\n", - "13\n", - "13\n", - "15\n", - "13\n", - "11\n", - "15\n", - "11\n", - "16\n", - "11\n", - "14\n", - "15\n", - "11\n", - "13\n", - "15\n", - "13\n", - "15\n", - "15\n", - "13\n", - "11\n", - "18\n", - "12\n", - "15\n", - "13\n", - "15\n", - "11\n", - "15\n", - "15\n", - "15\n", - "13\n", - "13\n", - "13\n", - "14\n", - "18\n", - "13\n", - "13\n", - "15\n", - "15\n", - "11\n", - "11\n", - "15\n", - "15\n", - "15\n", - "12\n", - "13\n", - "16\n", - "13\n", - "13\n", - "13\n", - "17\n", - "15\n", - "17\n", - "17\n", - "15\n", - "12\n", - "15\n", - "9\n", - "12\n", - "18\n", - "9\n", - "11\n", - "17\n", - "13\n", - "13\n", - "11\n" - ] - } - ], - "source": [ - "for i in data['database_CMs']:\n", - " print(len(i))" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "5\n", - "\n", - "[[36.8581052 5.49459062 5.49462923 5.49450051 5.49031317]\n", - " [ 5.49459062 0.5 0.56071951 0.56071661 0.56064041]\n", - " [ 5.49462923 0.56071951 0.5 0.56071757 0.56064092]\n", - " [ 5.49450051 0.56071661 0.56071757 0.5 0.56063788]\n", - " [ 5.49031317 0.56064041 0.56064092 0.56063788 0.5 ]]\n" - ] - } - ], - "source": [ - "print(len(data['database_CMs'][0]))\n", - "print(type(data['database_CMs'][0]))\n", - "print(data['database_CMs'][0])\n" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "72\n", - "[[73.51669472 5.6730171 5.01906995 ... 1.45172691 1.43586937\n", - " 8.23652758]\n", - " [ 5.6730171 36.8581052 23.22387337 ... 0.88151033 1.10082282\n", - " 0.7819375 ]\n", - " [ 5.01906995 23.22387337 36.8581052 ... 0.81139936 0.95646112\n", - " 0.68863654]\n", - " ...\n", - " [ 1.45172691 0.88151033 0.81139936 ... 0.5 0.5423828\n", - " 0.19827322]\n", - " [ 1.43586937 1.10082282 0.95646112 ... 0.5423828 0.5\n", - " 0.19694058]\n", - " [ 8.23652758 0.7819375 0.68863654 ... 0.19827322 0.19694058\n", - " 0.5 ]]\n" - ] - } - ], - "source": [ - "print(len(data['target_CMs'][2]))\n", - "print(data['target_CMs'][2])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We define a function that has two parameters (Target,Molecule) and finds a placement of the molecule that is optimal w.r.t. error^2. Later we will pick the moluecule that is best w.r.t. error^2 / length (molecule). " - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/functional_groups.txt b/functional_groups.txt deleted file mode 100644 index 9d72a0b..0000000 --- a/functional_groups.txt +++ /dev/null @@ -1,21 +0,0 @@ -arene c -allenic C [$([CX2](=C)=C)] -vinylic C [$([CX3]=[CX3])] -acetylenic C [$([CX2]#C)] -carbonyl [$([CX3]=[OX1]),$([CX3+]-[OX1-])] -aldeyhde [CX3H1](=O)[#6] -amide [NX3][CX3](=[OX1])[#6] -carboxylic acid [CX3](=O)[OX2H1] -ester [#6][CX3](=O)[OX2H0][#6] -ketone [#6][CX3](=O)[#6] -ether [OD2]([#6])[#6] -azo general [#7] -amine [NX3;H2,H1;!$(NC=O)] -enamine [NX3][CX3]=[CX3] -imine [$([CX3]([#6])[#6]),$([CX3H][#6])]=[$([NX2][#6]),$([NX2H])] -nitrate [$([NX3](=[OX1])(=[OX1])O),$([NX3+]([OX1-])(=[OX1])O)] -nitrile [NX1]#[CX2] -nitro [$([NX3](=O)=O),$([NX3+](=O)[O-])][!#8] -alcohol [#6][OX2H] -enol [OX2H][#6X3]=[#6] -phenol [OX2H][cX3]:[c] diff --git a/out_qm9.txt b/out_qm9.txt deleted file mode 100644 index cbf6006..0000000 --- a/out_qm9.txt +++ /dev/null @@ -1,127 +0,0 @@ -Academic license - for non-commercial use only - expires 2022-06-20 -Using license file /home/puck/gurobi.lic -Parameter OutputFlag unchanged - Value: 1 Min: 0 Max: 1 Default: 1 -Variables added. -Constraints added. -Constructing objective function... -1 / 16 -2 / 16 -3 / 16 -4 / 16 -5 / 16 -6 / 16 -7 / 16 -8 / 16 -9 / 16 -10 / 16 -11 / 16 -12 / 16 -13 / 16 -14 / 16 -15 / 16 -16 / 16 -Objective function set. -Model setup: 0.2502532389917178 s -Changed value of parameter DegenMoves to 2 - Prev: -1 Min: -1 Max: 2000000000 Default: -1 -Changed value of parameter ZeroHalfCuts to 2 - Prev: -1 Min: -1 Max: 2 Default: -1 -Changed value of parameter BQPCuts to 2 - Prev: -1 Min: -1 Max: 2 Default: -1 -Changed value of parameter RLTCuts to 2 - Prev: -1 Min: -1 Max: 2 Default: -1 -Changed value of parameter TimeLimit to 180.0 - Prev: inf Min: 0.0 Max: inf Default: inf -Changed value of parameter PoolSolutions to 5 - Prev: 10 Min: 1 Max: 2000000000 Default: 10 ------------- -Optimization ------------- -Gurobi Optimizer version 9.1.2 build v9.1.2rc0 (linux64) -Thread count: 4 physical cores, 8 logical processors, using up to 8 threads -Optimize a model with 595 rows, 456 columns and 2152 nonzeros -Model fingerprint: 0x0c84ff71 -Model has 3544 quadratic objective terms -Variable types: 0 continuous, 456 integer (456 binary) -Coefficient statistics: - Matrix range [1e+00, 1e+00] - Objective range [1e+00, 7e+00] - QObjective range [5e+00, 2e+04] - Bounds range [1e+00, 1e+00] - RHS range [1e+00, 1e+00] -Found heuristic solution: objective 33625.562363 -Presolve removed 426 rows and 2 columns -Presolve time: 0.02s -Presolved: 3289 rows, 3574 columns, 10784 nonzeros -Variable types: 0 continuous, 3574 integer (3574 binary) - -Root relaxation: objective -1.799637e+04, 2193 iterations, 0.05 seconds - - Nodes | Current Node | Objective Bounds | Work - Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time - - 0 0 -17996.372 0 75 33625.5624 -17996.372 154% - 0s -H 0 0 32307.953298 -17996.372 156% - 0s -H 0 0 6154.0021481 -17996.372 392% - 0s - 0 0 -14391.629 0 50 6154.00215 -14391.629 334% - 0s - 0 0 -8340.7450 0 209 6154.00215 -8340.7450 236% - 0s - 0 0 -5045.5767 0 171 6154.00215 -5045.5767 182% - 0s -H 0 0 6148.6032792 -5045.5767 182% - 0s - 0 0 -1830.6740 0 177 6148.60328 -1830.6740 130% - 0s - 0 0 -1830.6740 0 177 6148.60328 -1830.6740 130% - 0s - 0 2 -1830.6740 0 177 6148.60328 -1830.6740 130% - 0s -* 120 21 15 6146.4638864 -1830.6740 130% 237 2s -* 138 15 16 6146.1889978 -1830.6740 130% 217 2s -* 142 15 20 6144.5279393 -1830.6740 130% 220 2s - -Cutting planes: - Gomory: 2 - Clique: 1 - MIR: 44 - Zero half: 29 - RLT: 630 - -Explored 187 nodes (41406 simplex iterations) in 2.32 seconds -Thread count was 8 (of 8 available processors) - -Solution count 5: 6144.53 6146.19 6146.46 ... 6154 - -Optimal solution found (tolerance 1.00e-04) -Best objective 6.144527939316e+03, best bound 6.144527939316e+03, gap 0.0000% -Optimization runtime: 2.322972059249878 s -Target has size 9 - --------------------------------- -Solution number 1 , objective value (square rooted) 78.38703935801847 -Molecule frag_04_c00001 has been picked 1 time(s) ( size 2 , used 2.0 ) -1: 1 -> 1, 2 -> 2, -Molecule frag_16_c00001 has been picked 1 time(s) ( size 7 , used 7.0 ) -1: 1 -> 3, 2 -> 4, 3 -> 5, 4 -> 6, 5 -> 7, 6 -> 8, 7 -> 9, - --------------------------------- -Solution number 2 , objective value (square rooted) 78.39763387904925 -Molecule frag_08_c00001 has been picked 1 time(s) ( size 4 , used 2.0 ) -1: 1 -> 1, 2 -> 2, -Molecule frag_16_c00001 has been picked 1 time(s) ( size 7 , used 7.0 ) -1: 1 -> 3, 2 -> 4, 3 -> 5, 4 -> 6, 5 -> 7, 6 -> 8, 7 -> 9, - --------------------------------- -Solution number 3 , objective value (square rooted) 78.39938702794768 -Molecule frag_09_c00001 has been picked 1 time(s) ( size 4 , used 2.0 ) -1: 1 -> 1, 2 -> 2, -Molecule frag_16_c00001 has been picked 1 time(s) ( size 7 , used 7.0 ) -1: 1 -> 3, 2 -> 4, 3 -> 5, 4 -> 6, 5 -> 7, 6 -> 8, 7 -> 9, - --------------------------------- -Solution number 4 , objective value (square rooted) 78.4130300347006 -Molecule frag_14_c00001 has been picked 1 time(s) ( size 6 , used 2.0 ) -1: 5 -> 2, 6 -> 1, -Molecule frag_16_c00001 has been picked 1 time(s) ( size 7 , used 7.0 ) -1: 1 -> 3, 2 -> 4, 3 -> 5, 4 -> 6, 5 -> 7, 6 -> 8, 7 -> 9, - --------------------------------- -Solution number 5 , objective value (square rooted) 78.44744832097405 -Molecule frag_16_c00001 has been picked 2 time(s) ( size 7 , used 9.0 ) -1: 3 -> 2, 4 -> 1, -2: 1 -> 3, 2 -> 4, 3 -> 5, 4 -> 6, 5 -> 7, 6 -> 8, 7 -> 9, diff --git a/out_vitc.txt b/out_vitc.txt deleted file mode 100644 index 9005220..0000000 --- a/out_vitc.txt +++ /dev/null @@ -1,263 +0,0 @@ -Academic license - for non-commercial use only - expires 2022-06-20 -Using license file /home/puck/gurobi.lic -Parameter OutputFlag unchanged - Value: 1 Min: 0 Max: 1 Default: 1 -Variables added. -Constraints added. -Constructing objective function... -1 / 58 -2 / 58 -3 / 58 -4 / 58 -5 / 58 -6 / 58 -7 / 58 -8 / 58 -9 / 58 -10 / 58 -11 / 58 -12 / 58 -13 / 58 -14 / 58 -15 / 58 -16 / 58 -17 / 58 -18 / 58 -19 / 58 -20 / 58 -21 / 58 -22 / 58 -23 / 58 -24 / 58 -25 / 58 -26 / 58 -27 / 58 -28 / 58 -29 / 58 -30 / 58 -31 / 58 -32 / 58 -33 / 58 -34 / 58 -35 / 58 -36 / 58 -37 / 58 -38 / 58 -39 / 58 -40 / 58 -41 / 58 -42 / 58 -43 / 58 -44 / 58 -45 / 58 -46 / 58 -47 / 58 -48 / 58 -49 / 58 -50 / 58 -51 / 58 -52 / 58 -53 / 58 -54 / 58 -55 / 58 -56 / 58 -57 / 58 -58 / 58 -Objective function set. -Model setup: 4.36920658001327 s -Changed value of parameter DegenMoves to 2 - Prev: -1 Min: -1 Max: 2000000000 Default: -1 -Changed value of parameter ZeroHalfCuts to 2 - Prev: -1 Min: -1 Max: 2 Default: -1 -Changed value of parameter BQPCuts to 2 - Prev: -1 Min: -1 Max: 2 Default: -1 -Changed value of parameter RLTCuts to 2 - Prev: -1 Min: -1 Max: 2 Default: -1 -Changed value of parameter TimeLimit to 500.0 - Prev: inf Min: 0.0 Max: inf Default: inf -Changed value of parameter PoolSolutions to 5 - Prev: 10 Min: 1 Max: 2000000000 Default: 10 ------------- -Optimization ------------- -Gurobi Optimizer version 9.1.2 build v9.1.2rc0 (linux64) -Thread count: 4 physical cores, 8 logical processors, using up to 8 threads -Optimize a model with 4090 rows, 3512 columns and 17096 nonzeros -Model fingerprint: 0x8e4bd3e0 -Model has 57246 quadratic objective terms -Variable types: 0 continuous, 3512 integer (3512 binary) -Coefficient statistics: - Matrix range [1e+00, 1e+00] - Objective range [1e+00, 7e+00] - QObjective range [4e-02, 2e+04] - Bounds range [1e+00, 1e+00] - RHS range [1e+00, 1e+00] -Found heuristic solution: objective 51286.443115 -Presolve removed 3400 rows and 4 columns -Presolve time: 0.06s -Presolved: 54540 rows, 57358 columns, 172388 nonzeros -Variable types: 0 continuous, 57358 integer (57358 binary) - -Deterministic concurrent LP optimizer: primal and dual simplex -Showing first log only... - -Warning: Markowitz tolerance tightened to 0.5 - -Root simplex log... - -Iteration Objective Primal Inf. Dual Inf. Time - 85400 -5.9471785e+04 0.000000e+00 7.691416e+07 5s - 108612 -6.0472956e+04 0.000000e+00 0.000000e+00 10s -Concurrent spin time: 2.04s - -Solved with primal simplex - -Root relaxation: objective -6.047296e+04, 108612 iterations, 8.96 seconds -Total elapsed time = 9.52s - - Nodes | Current Node | Objective Bounds | Work - Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time - - 0 0 -60472.956 0 223 51286.4431 -60472.956 218% - 9s -H 0 0 51285.443115 -60472.956 218% - 9s -H 0 0 33426.851156 -60472.956 281% - 10s -H 0 0 24012.125937 -60472.956 352% - 10s -H 0 0 21720.948726 -60472.956 378% - 11s - 0 0 -59338.941 0 223 21720.9487 -59338.941 373% - 12s - 0 0 -59299.584 0 224 21720.9487 -59299.584 373% - 13s - 0 0 -59275.237 0 225 21720.9487 -59275.237 373% - 13s - 0 0 -55215.240 0 224 21720.9487 -55215.240 354% - 15s - 0 0 -53588.486 0 245 21720.9487 -53588.486 347% - 18s - 0 0 -53588.486 0 245 21720.9487 -53588.486 347% - 22s - 0 2 -53238.626 0 245 21720.9487 -53238.626 345% - 25s - 1 4 -52292.188 1 240 21720.9487 -52292.188 341% 1413 37s - 3 8 -48195.519 2 73 21720.9487 -48195.519 322% 6337 53s - 7 12 -47465.805 3 323 21720.9487 -47465.805 319% 5805 62s - 11 16 -46868.376 4 150 21720.9487 -47464.990 319% 5435 76s - 15 20 -45551.240 5 153 21720.9487 -47464.990 319% 5797 99s - 19 24 -25382.046 5 335 21720.9487 -47464.990 319% 7709 116s - 23 29 -44796.019 6 311 21720.9487 -47464.990 319% 6795 127s - 28 33 -43159.057 7 429 21720.9487 -47464.990 319% 6464 149s - 32 38 -43107.814 8 351 21720.9487 -47464.990 319% 7380 164s - 37 44 -42215.002 9 280 21720.9487 -47464.990 319% 7446 171s - 43 49 -40905.769 10 217 21720.9487 -47464.990 319% 6668 178s - 48 55 -40251.005 11 299 21720.9487 -47464.990 319% 6246 188s - 54 59 -40010.827 12 371 21720.9487 -47464.990 319% 6403 197s - 58 65 -39642.696 13 401 21720.9487 -47464.990 319% 6833 203s - 64 72 -39279.694 15 299 21720.9487 -47464.990 319% 6720 211s - 71 82 -38915.720 16 341 21720.9487 -47464.990 319% 6756 218s - 81 89 -24166.829 16 332 21720.9487 -47464.990 319% 6473 226s - 88 102 -38688.011 17 266 21720.9487 -47464.990 319% 6308 235s - 101 106 -23763.062 19 396 21720.9487 -47464.990 319% 6212 245s - 111 116 -23763.062 20 526 21720.9487 -47464.990 319% 6352 254s - 125 128 -37080.171 20 379 21720.9487 -47464.990 319% 6015 265s - 139 136 -23762.062 21 396 21720.9487 -47464.990 319% 5811 275s - 153 145 -36148.007 22 634 21720.9487 -47464.990 319% 5571 294s - 169 158 -36096.844 23 379 21720.9487 -47464.990 319% 5223 308s - 189 170 -35165.913 26 397 21720.9487 -47464.990 319% 4927 320s - 205 181 -35013.271 28 280 21720.9487 -47464.990 319% 4706 334s - 221 199 -34967.476 30 472 21720.9487 -47464.990 319% 4552 345s - 243 210 -34185.716 35 300 21720.9487 -47464.990 319% 4384 360s - 256 236 -34179.899 36 359 21720.9487 -47464.990 319% 4270 375s - 288 258 -33764.215 39 561 21720.9487 -47464.990 319% 4005 389s - 318 281 -33572.125 41 610 21720.9487 -47464.990 319% 3736 405s - 349 305 -32999.733 46 775 21720.9487 -47464.990 319% 3575 419s - 379 321 -32110.325 50 692 21720.9487 -47464.990 319% 3435 433s - 404 348 -20975.796 50 305 21720.9487 -47464.990 319% 3399 446s - 438 355 -20974.796 51 305 21720.9487 -47464.990 319% 3257 461s - 458 373 -31139.923 54 498 21720.9487 -47464.990 319% 3245 480s - 476 396 -15391.238 56 423 21720.9487 -47464.990 319% 3222 496s - 499 399 7656.17897 111 364 21720.9487 -47464.990 319% 3247 500s - -Cutting planes: - Gomory: 4 - MIR: 654 - StrongCG: 4 - Zero half: 97 - RLT: 5072 - -Explored 502 nodes (1735565 simplex iterations) in 500.01 seconds -Thread count was 8 (of 8 available processors) - -Solution count 5: 21720.9 24012.1 33426.9 ... 51286.4 - -Time limit reached -Best objective 2.172094872647e+04, best bound -4.746499022279e+04, gap 318.5217% -Optimization runtime: 500.0138010978699 s -Target has size 12 - --------------------------------- -Solution number 1 , objective value (square rooted) 147.38028608490308 -Molecule frag_46_c00001 has been picked 2 time(s) ( size 7 , used 12.0 ) -1: 1 -> 8, 2 -> 5, 3 -> 6, 4 -> 4, 5 -> 9, 6 -> 10, 7 -> 7, -2: 1 -> 3, 3 -> 12, 4 -> 11, 5 -> 2, 6 -> 1, - --------------------------------- -Solution number 2 , objective value (square rooted) 154.95846520084763 -Molecule frag_32_c00001 has been picked 1 time(s) ( size 6 , used 2.0 ) -1: 1 -> 6, 2 -> 5, -Molecule frag_46_c00001 has been picked 2 time(s) ( size 7 , used 10.0 ) -1: 3 -> 10, 5 -> 7, 6 -> 8, -2: 1 -> 3, 2 -> 2, 3 -> 1, 4 -> 11, 5 -> 9, 6 -> 12, 7 -> 4, - --------------------------------- -Solution number 3 , objective value (square rooted) 182.830115560803 -Molecule frag_32_c00001 has been picked 1 time(s) ( size 6 , used 3.0 ) -1: 1 -> 8, 4 -> 6, 6 -> 12, -Molecule frag_46_c00001 has been picked 2 time(s) ( size 7 , used 9.0 ) -1: 2 -> 9, 4 -> 7, -2: 1 -> 3, 2 -> 2, 3 -> 1, 4 -> 11, 5 -> 5, 6 -> 10, 7 -> 4, - --------------------------------- -Solution number 4 , objective value (square rooted) 226.46289566883354 -Molecule frag_06_c00001 has been picked 1 time(s) ( size 2 , used 1.0 ) -1: 2 -> 2, -Molecule frag_11_c00001 has been picked 1 time(s) ( size 3 , used 1.0 ) -1: 3 -> 8, -Molecule frag_18_c00001 has been picked 1 time(s) ( size 4 , used 1.0 ) -1: 4 -> 4, -Molecule frag_21_c00001 has been picked 1 time(s) ( size 5 , used 1.0 ) -1: 5 -> 7, -Molecule frag_23_c00001 has been picked 1 time(s) ( size 5 , used 1.0 ) -1: 5 -> 6, -Molecule frag_26_c00001 has been picked 1 time(s) ( size 5 , used 1.0 ) -1: 5 -> 3, -Molecule frag_28_c00001 has been picked 1 time(s) ( size 5 , used 1.0 ) -1: 5 -> 10, -Molecule frag_30_c00001 has been picked 1 time(s) ( size 5 , used 1.0 ) -1: 5 -> 5, -Molecule frag_38_c00001 has been picked 1 time(s) ( size 6 , used 1.0 ) -1: 6 -> 11, -Molecule frag_40_c00001 has been picked 1 time(s) ( size 6 , used 1.0 ) -1: 6 -> 9, -Molecule frag_44_c00001 has been picked 1 time(s) ( size 7 , used 1.0 ) -1: 7 -> 12, -Molecule frag_54_c00001 has been picked 1 time(s) ( size 7 , used 1.0 ) -1: 7 -> 1, - --------------------------------- -Solution number 5 , objective value (square rooted) 226.4651035252738 -Molecule frag_13_c00001 has been picked 1 time(s) ( size 4 , used 1.0 ) -1: 4 -> 3, -Molecule frag_15_c00001 has been picked 1 time(s) ( size 4 , used 1.0 ) -1: 2 -> 8, -Molecule frag_16_c00001 has been picked 1 time(s) ( size 4 , used 1.0 ) -1: 3 -> 10, -Molecule frag_18_c00001 has been picked 1 time(s) ( size 4 , used 1.0 ) -1: 2 -> 5, -Molecule frag_19_c00001 has been picked 1 time(s) ( size 4 , used 1.0 ) -1: 2 -> 4, -Molecule frag_26_c00001 has been picked 1 time(s) ( size 5 , used 1.0 ) -1: 2 -> 11, -Molecule frag_26_c00002 has been picked 1 time(s) ( size 5 , used 1.0 ) -1: 3 -> 7, -Molecule frag_30_c00001 has been picked 1 time(s) ( size 5 , used 1.0 ) -1: 1 -> 6, -Molecule frag_33_c00001 has been picked 1 time(s) ( size 6 , used 1.0 ) -1: 3 -> 1, -Molecule frag_38_c00001 has been picked 1 time(s) ( size 6 , used 1.0 ) -1: 2 -> 2, -Molecule frag_44_c00001 has been picked 1 time(s) ( size 7 , used 1.0 ) -1: 2 -> 9, -Molecule frag_49_c00001 has been picked 1 time(s) ( size 7 , used 1.0 ) -1: 3 -> 12, diff --git a/qm9_out.txt b/qm9_out.txt deleted file mode 100644 index 1d0f6b0..0000000 --- a/qm9_out.txt +++ /dev/null @@ -1,128 +0,0 @@ -Academic license - for non-commercial use only - expires 2022-06-20 -Using license file /home/puck/gurobi.lic -Parameter OutputFlag unchanged - Value: 1 Min: 0 Max: 1 Default: 1 -Variables added. -Constraints added. -Constructing objective function... -1 / 16 -2 / 16 -3 / 16 -4 / 16 -5 / 16 -6 / 16 -7 / 16 -8 / 16 -9 / 16 -10 / 16 -11 / 16 -12 / 16 -13 / 16 -14 / 16 -15 / 16 -16 / 16 -Objective function set. -Model setup: 0.38783659413456917 s -Changed value of parameter DegenMoves to 2 - Prev: -1 Min: -1 Max: 2000000000 Default: -1 -Changed value of parameter ZeroHalfCuts to 2 - Prev: -1 Min: -1 Max: 2 Default: -1 -Changed value of parameter BQPCuts to 2 - Prev: -1 Min: -1 Max: 2 Default: -1 -Changed value of parameter RLTCuts to 2 - Prev: -1 Min: -1 Max: 2 Default: -1 -Changed value of parameter TimeLimit to 180.0 - Prev: inf Min: 0.0 Max: inf Default: inf -Changed value of parameter PoolSolutions to 5 - Prev: 10 Min: 1 Max: 2000000000 Default: 10 ------------- -Optimization ------------- -Gurobi Optimizer version 9.1.2 build v9.1.2rc0 (linux64) -Thread count: 4 physical cores, 8 logical processors, using up to 8 threads -Optimize a model with 204 rows, 636 columns and 1272 nonzeros -Model fingerprint: 0x66222770 -Model has 5316 quadratic objective terms -Variable types: 0 continuous, 636 integer (636 binary) -Coefficient statistics: - Matrix range [1e+00, 1e+00] - Objective range [0e+00, 0e+00] - QObjective range [5e+00, 2e+04] - Bounds range [1e+00, 1e+00] - RHS range [1e+00, 1e+00] -Found heuristic solution: objective 34851.221932 -Presolve time: 0.02s -Presolved: 4884 rows, 5316 columns, 15312 nonzeros -Variable types: 0 continuous, 5316 integer (5316 binary) - -Root relaxation: objective -1.799787e+04, 3583 iterations, 0.12 seconds - - Nodes | Current Node | Objective Bounds | Work - Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time - - 0 0 -17997.872 0 74 34851.2219 -17997.872 152% - 0s -H 0 0 25825.493277 -17997.872 170% - 0s -H 0 0 6149.0021481 -17997.872 393% - 0s - 0 0 -17173.388 0 239 6149.00215 -17173.388 379% - 0s - 0 0 -8386.7025 0 161 6149.00215 -8386.7025 236% - 0s -H 0 0 6144.6032792 -8386.7025 236% - 0s - 0 0 -8386.7025 0 161 6144.60328 -8386.7025 236% - 0s - 0 0 -4810.8598 0 148 6144.60328 -4810.8598 178% - 0s - 0 0 -4810.8598 0 148 6144.60328 -4810.8598 178% - 0s - 0 2 -4810.8598 0 148 6144.60328 -4810.8598 178% - 0s -* 107 11 10 6144.0592821 1099.11294 82.1% 327 2s -* 108 11 9 6143.7301346 1099.11294 82.1% 325 2s - -Cutting planes: - Cover: 2 - MIR: 101 - StrongCG: 2 - Zero half: 81 - RLT: 727 - -Explored 145 nodes (49257 simplex iterations) in 3.27 seconds -Thread count was 8 (of 8 available processors) - -Solution count 5: 6143.73 6144.06 6144.6 ... 25825.5 - -Optimal solution found (tolerance 1.00e-04) -Best objective 6.143730134594e+03, best bound 6.143730134594e+03, gap 0.0000% -Optimization runtime: 3.2694780826568604 s -Target has size 9 - --------------------------------- -Solution number 1 , objective value (square rooted) 78.38195031123882 -Molecule frag_11_c00001 has been picked 1 time(s) ( size 5 , used 2.0 ) -1: 3 -> 2, 4 -> 1, -Molecule frag_16_c00001 has been picked 1 time(s) ( size 7 , used 7.0 ) -1: 1 -> 3, 2 -> 4, 3 -> 5, 4 -> 6, 5 -> 7, 6 -> 8, 7 -> 9, - --------------------------------- -Solution number 2 , objective value (square rooted) 78.38404992136763 -Molecule frag_14_c00001 has been picked 1 time(s) ( size 6 , used 2.0000000000000004 ) -1: -Molecule frag_16_c00001 has been picked 1 time(s) ( size 7 , used 7.0 ) -1: 2 -> 4, 3 -> 5, 4 -> 6, - --------------------------------- -Solution number 3 , objective value (square rooted) 78.38751992009225 -Molecule frag_14_c00001 has been picked 1 time(s) ( size 6 , used 2.0 ) -1: 5 -> 2, 6 -> 1, -Molecule frag_16_c00001 has been picked 1 time(s) ( size 7 , used 7.0 ) -1: 1 -> 3, 2 -> 4, 3 -> 5, 4 -> 6, 5 -> 7, 6 -> 8, 7 -> 9, - --------------------------------- -Solution number 4 , objective value (square rooted) 78.41557337717995 -Molecule frag_16_c00001 has been picked 2 time(s) ( size 7 , used 9.0 ) -1: 1 -> 3, 2 -> 4, 3 -> 5, 4 -> 6, 5 -> 7, 6 -> 8, 7 -> 9, -2: 3 -> 2, 4 -> 1, - --------------------------------- -Solution number 5 , objective value (square rooted) 160.70312155323944 -Molecule frag_04_c00001 has been picked 1 time(s) ( size 2 , used 2.0 ) -1: 1 -> 1, 2 -> 3, -Molecule frag_06_c00001 has been picked 2 time(s) ( size 3 , used 5.0 ) -1: 1 -> 5, 2 -> 6, -2: 1 -> 9, 2 -> 7, 3 -> 8, -Molecule frag_07_c00001 has been picked 1 time(s) ( size 4 , used 2.0 ) -1: 1 -> 2, 3 -> 4, diff --git a/vitc_opt.txt b/vitc_opt.txt deleted file mode 100644 index c42715f..0000000 --- a/vitc_opt.txt +++ /dev/null @@ -1,66 +0,0 @@ -Optimization runtime: 48424.25801897049 s -Target has size 12 - --------------------------------- -Solution number 1 , objective value -1.80448693382017 -Molecule qm7_15 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 4.0, 3 -> 3.0, used 2 -Molecule qm7_2495 has been picked 1 time(s) ( size 7 , used 4.0 ) -1: 4 -> 12.0, 5 -> 11.0, 6 -> 9.0, 7 -> 10.0, used 4 -Molecule qm7_4 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 5.0, 3 -> 6.0, used 2 -Molecule qm7_5 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 2.0, 3 -> 1.0, used 2 -Molecule qm7_6 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 8.0, 3 -> 7.0, used 2 - --------------------------------- -Solution number 2 , objective value -1.7920164617285317 -Molecule qm7_15 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 4.0, 3 -> 3.0, used 2 -Molecule qm7_2495 has been picked 1 time(s) ( size 7 , used 4.0 ) -1: 4 -> 12.0, 5 -> 11.0, 6 -> 9.0, 7 -> 10.0, used 4 -Molecule qm7_4 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 7.0, 3 -> 8.0, used 2 -Molecule qm7_5 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 2.0, 3 -> 1.0, used 2 -Molecule qm7_6 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 6.0, 3 -> 5.0, used 2 - --------------------------------- -Solution number 3 , objective value -1.7521006144471445 -Molecule qm7_15 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 4.0, 3 -> 3.0, used 2 -Molecule qm7_4 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 5.0, 3 -> 6.0, used 2 -Molecule qm7_5 has been picked 1 time(s) ( size 3 , used 1.9999999999999987 ) -1: 2 -> 2.0, 3 -> 1.0, used 2 -Molecule qm7_595 has been picked 1 time(s) ( size 6 , used 4.0 ) -1: 3 -> 12.0, 4 -> 11.0, 5 -> 9.0, 6 -> 10.0, used 4 -Molecule qm7_6 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 8.0, 3 -> 7.0, used 2 - --------------------------------- -Solution number 4 , objective value 3.1686816179387085 -Molecule qm7_5 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 2.0, 3 -> 1.0, used 2 -Molecule qm7_594 has been picked 1 time(s) ( size 6 , used 4.0 ) -1: 3 -> 6.0, 4 -> 5.0, 5 -> 4.0, 6 -> 3.0, used 4 -Molecule qm7_595 has been picked 1 time(s) ( size 6 , used 4.0 ) -1: 3 -> 12.0, 4 -> 11.0, 5 -> 9.0, 6 -> 10.0, used 4 -Molecule qm7_6 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 8.0, 3 -> 7.0, used 2 - --------------------------------- -Solution number 5 , objective value 12.456326013988036 -Molecule qm7_15 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 7.0, 3 -> 8.0, used 2 -Molecule qm7_2395 has been picked 1 time(s) ( size 7 , used 4.0 ) -1: 4 -> 4.0, 5 -> 3.0, 6 -> 2.0, 7 -> 1.0, used 4 -Molecule qm7_4 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 5.0, 3 -> 6.0, used 2 -Molecule qm7_5 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 11.0, 3 -> 12.0, used 2 -Molecule qm7_6 has been picked 1 time(s) ( size 3 , used 2.0 ) -1: 2 -> 10.0, 3 -> 9.0, used 2 - diff --git a/vitc_out.txt b/vitc_out.txt deleted file mode 100644 index 0aa913c..0000000 --- a/vitc_out.txt +++ /dev/null @@ -1,225 +0,0 @@ -Academic license - for non-commercial use only - expires 2022-06-20 -Using license file /home/puck/gurobi.lic -Parameter OutputFlag unchanged - Value: 1 Min: 0 Max: 1 Default: 1 -Variables added. -Constraints added. -Constructing objective function... -1 / 58 -2 / 58 -3 / 58 -4 / 58 -5 / 58 -6 / 58 -7 / 58 -8 / 58 -9 / 58 -10 / 58 -11 / 58 -12 / 58 -13 / 58 -14 / 58 -15 / 58 -16 / 58 -17 / 58 -18 / 58 -19 / 58 -20 / 58 -21 / 58 -22 / 58 -23 / 58 -24 / 58 -25 / 58 -26 / 58 -27 / 58 -28 / 58 -29 / 58 -30 / 58 -31 / 58 -32 / 58 -33 / 58 -34 / 58 -35 / 58 -36 / 58 -37 / 58 -38 / 58 -39 / 58 -40 / 58 -41 / 58 -42 / 58 -43 / 58 -44 / 58 -45 / 58 -46 / 58 -47 / 58 -48 / 58 -49 / 58 -50 / 58 -51 / 58 -52 / 58 -53 / 58 -54 / 58 -55 / 58 -56 / 58 -57 / 58 -58 / 58 -Objective function set. -Model setup: 6.410152044147253 s -Changed value of parameter DegenMoves to 2 - Prev: -1 Min: -1 Max: 2000000000 Default: -1 -Changed value of parameter ZeroHalfCuts to 2 - Prev: -1 Min: -1 Max: 2 Default: -1 -Changed value of parameter BQPCuts to 2 - Prev: -1 Min: -1 Max: 2 Default: -1 -Changed value of parameter RLTCuts to 2 - Prev: -1 Min: -1 Max: 2 Default: -1 -Changed value of parameter TimeLimit to 180.0 - Prev: inf Min: 0.0 Max: inf Default: inf -Changed value of parameter PoolSolutions to 5 - Prev: 10 Min: 1 Max: 2000000000 Default: 10 ------------- -Optimization ------------- -Gurobi Optimizer version 9.1.2 build v9.1.2rc0 (linux64) -Thread count: 4 physical cores, 8 logical processors, using up to 8 threads -Optimize a model with 861 rows, 5094 columns and 10188 nonzeros -Model fingerprint: 0xd6739a25 -Model has 85869 quadratic objective terms -Variable types: 0 continuous, 5094 integer (5094 binary) -Coefficient statistics: - Matrix range [1e+00, 1e+00] - Objective range [0e+00, 0e+00] - QObjective range [4e-02, 2e+04] - Bounds range [1e+00, 1e+00] - RHS range [1e+00, 1e+00] -Found heuristic solution: objective 50147.018742 -Presolve time: 0.07s -Presolved: 81636 rows, 85869 columns, 252513 nonzeros -Variable types: 0 continuous, 85869 integer (85869 binary) -Found heuristic solution: objective 49288.575935 - -Deterministic concurrent LP optimizer: primal and dual simplex -Showing first log only... - -Warning: Markowitz tolerance tightened to 0.5 - -Root simplex log... - -Iteration Objective Primal Inf. Dual Inf. Time - 116603 -4.3102245e+04 0.000000e+00 3.561539e+08 5s - 142246 -6.2617292e+04 0.000000e+00 5.628243e+07 10s - 163955 -6.4022932e+04 0.000000e+00 4.134081e+05 15s - 168292 -6.0474456e+04 0.000000e+00 0.000000e+00 16s -Concurrent spin time: 5.77s - -Solved with primal simplex - -Root relaxation: objective -6.047446e+04, 168292 iterations, 15.49 seconds -Total elapsed time = 16.07s - - Nodes | Current Node | Objective Bounds | Work - Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time - - 0 0 -60474.456 0 221 49288.5759 -60474.456 223% - 16s -H 0 0 38990.154097 -60474.456 255% - 16s -H 0 0 33498.145079 -60474.456 281% - 16s -H 0 0 28776.609054 -60474.456 310% - 16s -H 0 0 25854.276822 -60474.456 334% - 18s - 0 0 -60420.615 0 221 25854.2768 -60420.615 334% - 18s - 0 0 -59340.441 0 289 25854.2768 -59340.441 330% - 21s - 0 0 -59340.441 0 221 25854.2768 -59340.441 330% - 21s - 0 0 -59340.441 0 221 25854.2768 -59340.441 330% - 21s - 0 0 -59295.206 0 222 25854.2768 -59295.206 329% - 21s - 0 0 -57934.433 0 223 25854.2768 -57934.433 324% - 24s - 0 0 -55226.987 0 222 25854.2768 -55226.987 314% - 25s - 0 0 -55224.148 0 223 25854.2768 -55224.148 314% - 25s - 0 0 -53619.846 0 242 25854.2768 -53619.846 307% - 31s - 0 0 -53619.846 0 242 25854.2768 -53619.846 307% - 35s - 0 2 -53619.846 0 242 25854.2768 -53619.846 307% - 38s - 1 4 -53619.846 1 346 25854.2768 -53619.846 307% 633 49s - 3 8 -53615.146 2 242 25854.2768 -53615.146 307% 2941 58s - 7 12 -52308.295 3 237 25854.2768 -52803.307 304% 9879 64s - 11 16 -48224.734 4 72 25854.2768 -52803.307 304% 6843 77s - 15 20 -28641.326 4 350 25854.2768 -52803.307 304% 9027 94s - 19 24 -47195.306 5 145 25854.2768 -52803.307 304% 10863 106s - 23 28 -29522.261 5 300 25854.2768 -52803.307 304% 11538 122s - 27 32 -46432.191 6 140 25854.2768 -52803.307 304% 12175 131s - 31 37 -45616.820 7 316 25854.2768 -52803.307 304% 12478 146s - 36 42 -44962.775 8 400 25854.2768 -52803.307 304% 13368 156s - 41 49 -27249.537 8 454 25854.2768 -52803.307 304% 12723 164s - 48 56 -27139.122 9 412 25854.2768 -52803.307 304% 11744 177s - 55 57 -23626.983 12 402 25854.2768 -52803.307 304% 11175 180s - -Cutting planes: - Gomory: 4 - MIR: 800 - Zero half: 134 - RLT: 6179 - -Explored 56 nodes (793462 simplex iterations) in 180.13 seconds -Thread count was 8 (of 8 available processors) - -Solution count 5: 25854.3 28776.6 33498.1 ... 49288.6 - -Time limit reached -Best objective 2.585427682234e+04, best bound -5.280330716567e+04, gap 304.2343% -Optimization runtime: 180.12638115882874 s -Target has size 12 - --------------------------------- -Solution number 1 , objective value (square rooted) 160.792651642868 -Molecule frag_46_c00001 has been picked 2 time(s) ( size 7 , used 12.0 ) -1: 1 -> 10, 2 -> 2, 3 -> 3, 4 -> 9, 5 -> 4, 6 -> 1, 7 -> 11, -2: 1 -> 12, 3 -> 8, 4 -> 7, 5 -> 5, 6 -> 6, - --------------------------------- -Solution number 2 , objective value (square rooted) 169.63669724939749 -Molecule frag_32_c00001 has been picked 1 time(s) ( size 6 , used 2.0 ) -1: 5 -> 7, 6 -> 8, -Molecule frag_46_c00001 has been picked 2 time(s) ( size 7 , used 10.0 ) -1: 1 -> 10, 2 -> 2, 3 -> 3, 4 -> 9, 5 -> 4, 6 -> 12, 7 -> 11, -2: 2 -> 5, 3 -> 6, 6 -> 1, - --------------------------------- -Solution number 3 , objective value (square rooted) 183.02498484794813 -Molecule frag_32_c00001 has been picked 1 time(s) ( size 6 , used 3.0 ) -1: 1 -> 12, 4 -> 1, 6 -> 8, -Molecule frag_46_c00001 has been picked 2 time(s) ( size 7 , used 9.0 ) -1: 1 -> 10, 2 -> 2, 3 -> 3, 4 -> 9, 5 -> 4, 6 -> 6, 7 -> 11, -2: 2 -> 5, 4 -> 7, - --------------------------------- -Solution number 4 , objective value (square rooted) 197.45924667324311 -Molecule frag_11_c00002 has been picked 1 time(s) ( size 3 , used 3.0 ) -1: 1 -> 4, 2 -> 7, 3 -> 8, -Molecule frag_16_c00001 has been picked 1 time(s) ( size 4 , used 2.0 ) -1: 1 -> 9, 3 -> 10, -Molecule frag_23_c00001 has been picked 1 time(s) ( size 5 , used 2.0 ) -1: 1 -> 1, 5 -> 12, -Molecule frag_31_c00001 has been picked 1 time(s) ( size 6 , used 3.0 ) -1: 2 -> 2, 3 -> 11, 6 -> 3, -Molecule frag_37_c00001 has been picked 1 time(s) ( size 6 , used 2.0 ) -1: 3 -> 5, 4 -> 6, - --------------------------------- -Solution number 5 , objective value (square rooted) 222.0103059210164 -Molecule frag_13_c00001 has been picked 1 time(s) ( size 4 , used 2.0 ) -1: 1 -> 7, 4 -> 6, -Molecule frag_21_c00001 has been picked 1 time(s) ( size 5 , used 1.0 ) -1: 1 -> 10, -Molecule frag_22_c00001 has been picked 1 time(s) ( size 5 , used 1.0 ) -1: 1 -> 12, -Molecule frag_29_c00001 has been picked 1 time(s) ( size 5 , used 1.0 ) -1: 4 -> 11, -Molecule frag_32_c00001 has been picked 1 time(s) ( size 6 , used 1.0 ) -1: 4 -> 8, -Molecule frag_36_c00001 has been picked 1 time(s) ( size 6 , used 2.0 ) -1: 1 -> 5, 4 -> 4, -Molecule frag_38_c00001 has been picked 1 time(s) ( size 6 , used 1.0 ) -1: 4 -> 9, -Molecule frag_42_c00001 has been picked 1 time(s) ( size 6 , used 1.0 ) -1: 3 -> 3, -Molecule frag_46_c00001 has been picked 1 time(s) ( size 7 , used 1.0 ) -1: 5 -> 2, -Molecule frag_50_c00001 has been picked 1 time(s) ( size 7 , used 1.0 ) -1: 3 -> 1,