{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
numnamep_npsmiles
01Propanolol1[Cl].CC(C)NCC(O)COc1cccc2ccccc12
12Terbutylchlorambucil1C(=O)(OC(C)(C)C)CCCc1ccc(cc1)N(CCCl)CCCl
23407301c12c3c(N4CCN(C)CC4)c(F)cc1c(c(C(O)=O)cn2C(C)CO...
34241C1CCN(CC1)Cc1cccc(c1)OCCCNC(=O)C
45cloxacillin1Cc1onc(c2ccccc2Cl)c1C(=O)N[C@H]3[C@H]4SC(C)(C)...
...............
20452049licostinel1C1=C(Cl)C(=C(C2=C1NC(=O)C(N2)=O)[N+](=O)[O-])Cl
20462050ademetionine(adenosyl-methionine)1[C@H]3([N]2C1=C(C(=NC=N1)N)N=C2)[C@@H]([C@@H](...
20472051mesocarb1[O+]1=N[N](C=C1[N-]C(NC2=CC=CC=C2)=O)C(CC3=CC=...
20482052tofisoline1C1=C(OC)C(=CC2=C1C(=[N+](C(=C2CC)C)[NH-])C3=CC...
20492053azidamfenicol1[N+](=NCC(=O)N[C@@H]([C@H](O)C1=CC=C([N+]([O-]...
\n", "

2050 rows × 4 columns

\n", "
" ], "text/plain": [ " num name p_np \\\n", "0 1 Propanolol 1 \n", "1 2 Terbutylchlorambucil 1 \n", "2 3 40730 1 \n", "3 4 24 1 \n", "4 5 cloxacillin 1 \n", "... ... ... ... \n", "2045 2049 licostinel 1 \n", "2046 2050 ademetionine(adenosyl-methionine) 1 \n", "2047 2051 mesocarb 1 \n", "2048 2052 tofisoline 1 \n", "2049 2053 azidamfenicol 1 \n", "\n", " smiles \n", "0 [Cl].CC(C)NCC(O)COc1cccc2ccccc12 \n", "1 C(=O)(OC(C)(C)C)CCCc1ccc(cc1)N(CCCl)CCCl \n", "2 c12c3c(N4CCN(C)CC4)c(F)cc1c(c(C(O)=O)cn2C(C)CO... \n", "3 C1CCN(CC1)Cc1cccc(c1)OCCCNC(=O)C \n", "4 Cc1onc(c2ccccc2Cl)c1C(=O)N[C@H]3[C@H]4SC(C)(C)... \n", "... ... \n", "2045 C1=C(Cl)C(=C(C2=C1NC(=O)C(N2)=O)[N+](=O)[O-])Cl \n", "2046 [C@H]3([N]2C1=C(C(=NC=N1)N)N=C2)[C@@H]([C@@H](... \n", "2047 [O+]1=N[N](C=C1[N-]C(NC2=CC=CC=C2)=O)C(CC3=CC=... \n", "2048 C1=C(OC)C(=CC2=C1C(=[N+](C(=C2CC)C)[NH-])C3=CC... \n", "2049 [N+](=NCC(=O)N[C@@H]([C@H](O)C1=CC=C([N+]([O-]... \n", "\n", "[2050 rows x 4 columns]" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df= pd.read_csv('BBBP.csv')\n", "df" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "np.savetxt(r'bbbp.txt', df.smiles.values, fmt='%s')" ] }, { "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.9.5" }, "orig_nbformat": 4, "vscode": { "interpreter": { "hash": "a4329ea539b1232b51730207fd9c93849c82cf9ff2a2d6356a1e6b85d15167f8" } } }, "nbformat": 4, "nbformat_minor": 2 }