SQLite is a software library that implements a self-contained, serverless,zero-configuration, transactional SQL database engine.
And easy to use via Python API.
I think Molecular Matched Pairs(MMPs) are very attractive method .
But, difficult to use in my project.
For Education? Knowledge Management ? Design New Molecule ?
If you interested in MMP, you could find lots of references. ex)
Today, I tried to build MMPs_db using RDKit module.
MMP module in RDKit can make MMPdb and can transform query molecule using your mmps.
I got sample file from ZINCDB.

Then, to create DB, type following command.

$python < sample.smi > zinc.txt
$python < zinc.txt

After that, I could get “mmp.db” file.
The db-file handle via python sqlite3 module.

ln [2]: import sqlite3
In [3]: from rdkit import Chem
In [4]: conn = sqlite3.connect("mmp.db")
In [5]: cur = conn.cursor()
In [14]: for i in cur.fetchall():
   ....:     print i[1]
In [15]: cur.execute("SELECT context_smi FROM context_table;")
Out[15]: <sqlite3.Cursor at 0x111759810>
In [16]: for n,i in enumerate(cur.fetchall()):
   ....:     print n,i[0]
0 [*:1]/C(=N\N=C1\NC(=O)[C@H](CC(=O)Nc2ccccc2OC)S1)C(C)(C)C
1 [*:1]/C(=N\NC(=O)c1csc2ccccc12)c1ccc(-n2ccnc2)cc1
2 [*:1]/C(=N\NC(=O)c1sc2cc(Cl)ccc2c1Cl)c1cccc(NS(=O)(=O)c2ccccc2)c1
3 [*:1]/C(C)=N\N=C1\NC(=O)[C@H](CC(=O)Nc2ccccc2OC)S1
4 [*:1]/C(C)=N\NC(=O)c1csc2ccccc12
5 [*:1]/C(C)=N\NC(=O)c1csc2ccccc12.[*:2]n1ccnc1
6 [*:1]/C(C)=N\NC(=O)c1sc2cc(Cl)ccc2c1Cl.[*:2]c1ccccc1
7 [*:1]/C=C/C(=O)c1nc2ccccc2n1Cc1ccccc1Cl
8 [*:1]/C=C/C(=O)c1nc2ccccc2n1Cc1ccccc1Cl.[*:2]OC
9 [*:1]/C=C/C(=O)c1nc2ccccc2n1Cc1ccccc1Cl.[*:2]OC.[*:3]OC
10 [*:1]/C=C1/SC(N2CCOCC2)=NC1=O
11 [*:1]/C=C1/SC(N2CCOCC2)=NC1=O.[*:2]c1ccc(C)cc1Br
12 [*:1]/C=N/NC(=O)CCCCCCCC

Next, I’ll try to use mol transform.

Published by iwatobipen

I'm medicinal chemist in mid size of pharmaceutical company. I love chemoinfo, cording, organic synthesis, my family.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: