We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96dd4ab commit 592b598Copy full SHA for 592b598
chebai/preprocessing/reader.py
@@ -387,15 +387,16 @@ def _read_data(self, raw_data: str) -> Optional[List[int]]:
387
try:
388
mol = Chem.MolFromSmiles(raw_data, sanitize=False)
389
inchi = Chem.MolToInchi(mol)
390
+ tokenized = [self._get_token_index(v) for v in inchi]
391
except Exception:
392
print(f"could not process {raw_data}")
393
# print(f'\t{e}')
394
self.error_count += 1
395
print(f"\terror count: {self.error_count}")
- inchi = None
396
+ tokenized = None
397
# if self.error_count > 20:
398
# raise Exception('Too many errors')
- return inchi # one letter = one token
399
+ return tokenized # one letter = one token
400
401
402
class OrdReader(DataReader):
0 commit comments