Skip to content

RDKit and OSRA in the Bottle on Tornado

License

Notifications You must be signed in to change notification settings

def-fun/chembl_beaker

 
 

Repository files navigation

chembl_beaker

这个是molOCR化学结构式识别 的后端,在chembl_beaker的基础上修改

部署方式如下:

# install docker on your linux machine
sudo snap install docker

# download
wget https://github.com/def-fun/chembl_beaker/archive/refs/heads/master.zip
unzip chembl_beaker-master.zip

# build and run
cd chembl_beaker-master
sudo docker build -f Dockerfile -t my_chembl_beaker:v1.2 .
sudo docker run -p 5000:5000 my_chembl_beaker:v1.2

# backup
#sudo docker save -o my_chembl_beaker-v1.2.tar my_chembl_beaker:v1.2
sudo docker save 722c1891ce36 > my_chembl_beaker-v1.2.tar 
7z a -mx9 my_chembl_beaker-v1.2.tar.7z my_chembl_beaker-v1.2.tar

# check size and sha1sum
# my_chembl_beaker-v1.2.tar.7z    922M    de78350d2db6c7a2a1f3f9a4b86195466a3437ef
# my_chembl_beaker-v1.2.tar       3.1G    338d26ab0ccee04e661d74c9975641e5adbaa592

# restore
sudo docker load -i my_chembl_beaker-v1.2.tar

在Ubuntu 22.04.3 LTS上测试通过

curl -v -X POST --data-binary @test/5.png http://127.0.0.1:5000/image2ctab

输出结果如下

*   Trying 127.0.0.1:5000...
* Connected to 127.0.0.1 (127.0.0.1) port 5000 (#0)
> POST /image2ctab HTTP/1.1
> Host: 127.0.0.1:5000
> User-Agent: curl/8.1.2
> Accept: */*
> Content-Length: 18716
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 200 OK
< Server: gunicorn/20.0.0
< Date: Tue, 09 Apr 2024 06:51:27 GMT
< Connection: close
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET, POST, PUT, OPTIONS
< Access-Control-Allow-Headers: Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token
< X-Chembl-In-Cache: False
< X-Chembl-Retrieval-Time: 0.5003535747528076
< Content-Length: 6474
< Content-Type: text/html; charset=UTF-8
<

 OpenBabel04092406512D

 11 11  0  0  0  0  0  0  0  0999 V2000
    2.0160   -3.0171    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.4095   -3.8122    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.4013   -3.9398    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.2209   -2.4106    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.9388   -2.6317    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.9731   -1.0923    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.2040   -0.4284    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.4751   -1.1245    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.7645   -0.4218    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.2211   -3.3535    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.4656   -2.6188    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  1  3  1  0  0  0  0
  1  4  1  0  0  0  0
  1  5  1  0  0  0  0
  5  6  2  0  0  0  0
  5 10  1  0  0  0  0
  6  7  1  0  0  0  0
  7  8  2  0  0  0  0
  8  9  1  0  0  0  0
 10 11  2  0  0  0  0
 11  8  1  0  0  0  0
M  END
>  <Surrounding_box>
42x13-139x64

$$$$

 OpenBabel04092406512D

  8  8  0  0  0  0  0  0  0  0999 V2000
    1.6719   -7.1503    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.6742   -8.6782    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.9791   -6.3822    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.2481   -7.1202    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.5246   -6.4152    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    3.0302   -9.3472    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.3258   -9.4518    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.2275   -8.6211    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  2  0  0  0  0
  1  3  1  0  0  0  0
  2  6  1  0  0  0  0
  2  7  1  0  0  0  0
  3  4  2  0  0  0  0
  4  5  1  0  0  0  0
  6  8  2  0  0  0  0
  8  4  1  0  0  0  0
M  END
>  <Surrounding_box>
41x104-120x151

$$$$

 OpenBabel04092406512D

 13 15  0  0  0  0  0  0  0  0999 V2000
    0.4236  -13.7979    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.3447  -12.7275    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.0315  -12.1205    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.8915  -13.1916    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.2364  -12.9836    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.6691  -12.6501    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    7.7117  -13.7852    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    3.2770  -14.4402    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.8242  -14.4049    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.3141  -15.6207    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.9035  -15.3204    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    7.1576  -15.1932    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.7654  -15.5325    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  2  0  0  0  0
  1 11  1  0  0  0  0
  2  4  1  0  0  0  0
  3  4  1  0  0  0  0
  4  8  2  0  0  0  0
  5  3  1  0  0  0  0
  5  6  1  0  0  0  0
  6  7  2  0  0  0  0
  8  9  1  0  0  0  0
  8 10  1  0  0  0  0
  9  5  2  0  0  0  0
  9 13  1  0  0  0  0
 11 10  2  0  0  0  0
 12  7  1  0  0  0  0
 13 12  2  0  0  0  0
M  END
>  <Surrounding_box>
42x193-153x245

$$$$

 OpenBabel04092406512D

 10 11  0  0  0  0  0  0  0  0999 V2000
    1.6178  -19.3401    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.9426  -20.0320    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.2246  -19.3403    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.5461  -20.0617    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.5608  -21.5790    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.3129  -22.2478    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.9618  -21.5744    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.6980  -22.2497    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.3691  -21.5768    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.3981  -20.0590    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  2  0  0  0  0
  2  3  1  0  0  0  0
  3  4  1  0  0  0  0
  5  6  1  0  0  0  0
  5  4  1  0  0  0  0
  7  6  1  0  0  0  0
  7  2  1  0  0  0  0
  8  7  2  0  0  0  0
  8  9  1  0  0  0  0
  9 10  2  0  0  0  0
 10  1  1  0  0  0  0
M  END
>  <Surrounding_box>
40x303-121x348

$$$$

 OpenBabel04092406512D

 21 23  0  0  0  0  0  0  0  0999 V2000
    2.1113  -33.6262    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
    1.9409  -34.6115    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    3.0499  -33.2811    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    3.0859  -31.7463    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.3295  -31.0534    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.5904  -31.7770    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.8705  -31.0132    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.8677  -29.5344    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.6449  -28.8224    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.6222  -27.2593    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.9136  -26.5218    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.1333  -27.2780    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.1496  -28.7533    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.2062  -31.7853    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.4346  -34.0029    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   10.7113  -33.2725    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.1704  -33.2844    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.2807  -33.9680    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.5347  -33.3323    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   10.6800  -31.7831    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.4253  -31.0646    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  1  3  1  0  0  0  0
  3  4  2  0  0  0  0
  3 18  1  0  0  0  0
  4  5  1  0  0  0  0
  5  6  2  0  0  0  0
  6  7  1  0  0  0  0
  6 19  1  0  0  0  0
  7  8  1  0  0  0  0
  8 13  2  0  0  0  0
  9  8  1  0  0  0  0
 10  9  2  0  0  0  0
 10 11  1  0  0  0  0
 11 12  2  0  0  0  0
 13 12  1  0  0  0  0
 14  7  1  0  0  0  0
 14 21  1  0  0  0  0
 15 16  2  0  0  0  0
 15 17  1  0  0  0  0
 17 14  2  0  0  0  0
 18 19  2  0  0  0  0
 20 16  1  0  0  0  0
 21 20  2  0  0  0  0
M  END
>  <Surrounding_box>
40x414-199x534

$$$$
* Closing connection 0

About

RDKit and OSRA in the Bottle on Tornado

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 61.5%
  • JavaScript 35.1%
  • CSS 2.4%
  • Other 1.0%