diff --git a/chemcrow/tools/safety.py b/chemcrow/tools/safety.py index 3087e00..cd90ec6 100644 --- a/chemcrow/tools/safety.py +++ b/chemcrow/tools/safety.py @@ -1,3 +1,5 @@ +import urllib +from time import sleep import requests import pandas as pd import pkg_resources @@ -10,7 +12,7 @@ from langchain.tools import BaseTool from chemcrow.tools import Query2SMILES -from chemcrow.utils import is_smiles +from chemcrow.utils import is_smiles, tanimoto from .prompts import safety_summary_prompt, summary_each_data from .databases import Query2CAS, Query2SMILES @@ -231,6 +233,7 @@ def _run(self, cas_number): async def _arun(self, cas_number): raise NotImplementedError("Async not implemented.") + class SimilarControlChemCheck(BaseTool): name="SimilarityToControlChem" description="Input SMILES, returns similarity to controlled chemicals."