Skip to content

Commit

Permalink
Minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samoturk committed Feb 1, 2018
1 parent 423b413 commit ca64128
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mol2vec/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, sentence):
if type(self.sentence[0]) != str:
raise TypeError('List with strings expected')

def __len___(self):
def __len__(self):
return len(self.sentence)

def __str__(self): # String representation
Expand Down Expand Up @@ -123,6 +123,11 @@ def mol2sentence(mol, radius):

def mol2alt_sentence(mol, radius):
"""Same as mol2sentence() expect it only returns the alternating sentence
Calculates ECFP (Morgan fingerprint) and returns identifiers of substructures as 'sentence' (string).
Returns a tuple with 1) a list with sentence for each radius and 2) a sentence with identifiers from all radii
combined.
NOTE: Words are ALWAYS reordered according to atom order in the input mol object.
NOTE: Due to the way how Morgan FPs are generated, number of identifiers at each radius is smaller
Parameters
----------
Expand Down

0 comments on commit ca64128

Please sign in to comment.