0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

RDKitのAllChem.GetMorganFingerprintAsBitVectでエラー

新しめのバージョンのRDKitでAllChem.GetMorganFingerprintAsBitVectすると以下のエラーが出ました

DEPRECATION WARNING: please use MorganGenerator

issueもありました

Gregさんが回答してくださっている、以下のRDKit blogの通りにすればエラーは出なくなります。従来のやり方ではなくこちらの方が推奨される理由は、"The idea of the new code is that all supported fingerprinting algorithms can be used the same way."だそうです。

↓みたいな感じで書き換えればエラーが出なくなりました。

from rdkit import Chem
from rdkit.Chem import rdFingerprintGenerator

# generator
mfpgen = rdFingerprintGenerator.GetMorganGenerator(radius=2,fpSize=2048)

# smi -> fp
smi = "CCC"
m = Chem.MolFromSmiles(smi)
fp = mfpgen.GetFingerprint(m)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?