2Dの分子の類似性を比較する場合、各種FP計算を実施してあれこれ考えるわけですが、
社内的都合にて3Dの場合、ささっと使えるツールが無い訳です。世の中的にはOpenEye社のROCSが使われることが多そうな気がします。文献出の引用例や、ユーザー会のプレゼンをみてもかなり良さげです。
お気に入りのRDKitにはShapeTanimotoメソッッドがありますが、アライメントは別途かける必要があるのでちょいと面倒でございました。
そんなおり、某ワークショップで、silicos-itのshape-itは?と教えていただきました(ありがとうございます)。
winではちゃちゃっとBuildするのは無理そうなんでまずはMacでやってみます。
shape-itのマニュアルを読んでみるとベースにOpenBabelを使っているのでOpenBabelがフォローするファイルフォーマットならなんでもOKという点も良い感じです。
Buildはマニュアルに従って,
> cd /usr/local/src > sudo tar -xvf ~/Downloads/shape-it-1.0.1.tar.gz > cd shape-it-1.0.1 > sudo mkdir build > cd build > sudo cmake .. > sudo make > sudo make install
で準備は完了です。
続いてテスト用のファイルの準備です。全部openbabelでやればいいという噂もありますが、こちらは自分のスキルの都合上RDKitで取りあえずのファイルを作ります。テストファイルはpubchemからもらったDYRK1Kのデータ。
2Dの分子から3D配座を発生させて取りあえずUFFで一応最適化しておきます。
from rdkit import Chem from rdkit.Chem import AllChem mols = [m for m in Chem.SDMolSupplier( "test.sdf" ) ] mols3d = [ ] for m in mols: m = Chem.AddHs(m) AllChem.EmbedMolecule( m ) AllChem.UFFOptimizeMolecule( m ) mols3d.append( m ) out = Chem.SDWriter( "mols3.sdf" ) ref = Chem.SDWriter ( "ref.sdf" ) for m in mols3d: out.write( m ) ref.write( mols3d[0] ) out.close() ref.close()
全部の準備が終わったので
実行してみました。
ここでは先頭の分子をreferenceとして使います。
$ shape-it -r ref.sdf -d mols3.sdf -o out.txt -s score.txt +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Shape-it v1.0.1 | Jul 20 2012 21:18:30 -> GCC: 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) -> OpenBabel: 2.2.99 Copyright 2012 by Silicos-it, a division of Imacosi BVBA Shape-it is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Shape-it is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. Shape-it is linked against OpenBabel version 2. OpenBabel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ COMMAND_LINE OPTIONS: -> Reference file: ref.sdf -> Database file: 3dmols.sdf -> Output file: out.txt -> Scores file: score.txt -> Best hits: no -> Scoring only: no -> Extra iterations: no -> Rank by: Shape-it::Tanimoto -> Cutoff: no -> Output reference yes .. Processed 29 molecules 29 molecules in 1.34573 seconds (21.5496 molecules per second)
結果
$ cat score.txt dbName refName Shape-it::Tanimoto Shape-it::Tversky_Ref Shape-it::Tversky_Db dbName refName Shape-it::Tanimoto Shape-it::Tversky_Ref Shape-it::Tversky_Db overlap refVolume dbVolume 99380785 99380785 1 1 1 226.68 226.68 226.68 99380786 99380785 0.849 0.933 0.904 211.8 226.68 234.63 99380783 99380785 0.743 0.849 0.856 192.47 226.68 224.83 90945032 99380785 0.713 0.822 0.843 186.12 226.68 220.44 90945029 99380785 0.713 0.799 0.868 180.31 226.68 206.63 90945025 99380785 0.695 0.86 0.784 195.92 226.68 251.28 90945024 99380785 0.556 0.719 0.71 163.17 226.68 229.97 90945021 99380785 0.708 0.814 0.845 184.11 226.68 217.45 90945018 99380785 0.747 0.81 0.905 182.63 226.68 200.38 90945016 99380785 0.638 0.812 0.749 184.93 226.68 247.97 90945014 99380785 0.636 0.754 0.803 170.25 226.68 211.23 90945012 99380785 0.596 0.733 0.761 165.79 226.68 217.41 90944997 99380785 0.674 0.785 0.826 177.44 226.68 214.08 90944996 99380785 0.477 0.661 0.632 150.27 226.68 238.47 90944995 99380785 0.707 0.825 0.832 186.87 226.68 224.39 90944993 99380785 0.702 0.889 0.769 203.22 226.68 266.14 90944991 99380785 0.681 0.816 0.804 185.21 226.68 230.49 90944990 99380785 0.581 0.724 0.746 163.94 226.68 219.41 90944987 99380785 0.559 0.738 0.697 167.89 226.68 241.73 90944985 99380785 0.789 0.847 0.92 191.18 226.68 206.7 85239768 99380785 0.716 0.874 0.798 199.13 226.68 250.67 85239764 99380785 0.741 0.855 0.848 193.99 226.68 229 85239750 99380785 0.57 0.745 0.708 169.28 226.68 239.76 85239713 99380785 0.72 0.781 0.902 175.69 226.68 193.18 85239696 99380785 0.605 0.766 0.743 173.87 226.68 234.36 85239693 99380785 0.58 0.685 0.79 154.17 226.68 193.44 85239685 99380785 0.68 0.818 0.802 185.54 226.68 231.6 85239684 99380785 0.752 0.859 0.859 194.6 226.68 226.58 4239891 99380785 0.621 0.727 0.81 163.9 226.68 201.09
volumeだけの比較になりますが、ちゃんとアライメントもかけて出力してくれそうです。
背景をもう少しちゃんとフォローしてもう少しバリエーションのあるセットで試してみようと思います。
あとは配座発生も考えるとそれなりにバルキーな計算になりそうです。