Skip to content

Commit

Permalink
multi fingerprint
Browse files Browse the repository at this point in the history
  • Loading branch information
hcji committed Jan 18, 2019
1 parent d781074 commit 7146bbc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions PyFingerprint/All_Fingerprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@author: hcji
"""

import numpy as np
from PyFingerprint.CDK_Fingerprint import cdk_fingerprint
from PyFingerprint.RDK_Fingerprint import rdk_fingerprint
from PyFingerprint.Babel_Fingerprint import ob_fingerprint
Expand All @@ -26,4 +27,14 @@ def get_fingerprint(smi, fp_type, nbit=None, depth=None, output='bit'):
else:
raise IOError('invalid fingerprint type')
return res

def get_multi_fingerprint(smi, fp_types, nbit=None, depth=None, output='bit'):
vecs = [get_fingerprint(smi, f, nbit, depth, output='vector') for f in fp_types]
vec = np.concatenate(vecs)
if output == 'bit':
bits = np.where(vec > 0)[0]
return bits
else:
return vec


0 comments on commit 7146bbc

Please sign in to comment.