diff options
Diffstat (limited to 'lstm_chem/utils/smiles_tokenizer.py')
-rw-r--r--[-rwxr-xr-x] | lstm_chem/utils/smiles_tokenizer.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lstm_chem/utils/smiles_tokenizer.py b/lstm_chem/utils/smiles_tokenizer.py index d15d625..f998c4a 100755..100644 --- a/lstm_chem/utils/smiles_tokenizer.py +++ b/lstm_chem/utils/smiles_tokenizer.py @@ -1,8 +1,5 @@ -import copy import numpy as np -import time - class SmilesTokenizer(object): def __init__(self): @@ -30,7 +27,7 @@ class SmilesTokenizer(object): 'S', 'K', 'V', - 'I', + 'I' ] special = [ '(', ')', '[', ']', '=', '#', '%', '0', '1', '2', '3', '4', '5', @@ -51,8 +48,6 @@ class SmilesTokenizer(object): N = len(smiles) i = 0 token = [] - - timeout = time.time() + 5 # 5 seconds from now while (i < N): for j in range(self.table_len): symbol = self.table[j] @@ -60,8 +55,6 @@ class SmilesTokenizer(object): token.append(symbol) i += len(symbol) break - if time.time() > timeout: - break return token def one_hot_encode(self, tokenized_smiles): |