diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2020-08-01 15:34:22 +0530 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2020-08-01 15:34:22 +0530 |
commit | e80badd278f54e8cde64243aa56687f8e6e32cc2 (patch) | |
tree | 12667ca96236edca69b9f28ae7a66a1884f30156 /lstm_chem/utils/smiles_tokenizer.py | |
parent | cfa7ae936935010f77eaddd561ff1c0857a3c6f0 (diff) |
added alpha model
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): |