Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added explict safety check when mol is converted (#23) #26

Merged
merged 5 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion chemcrow/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from .tools.databases import *
from .tools.rdkit import *
from .tools.search import *
from .frontend import *
Expand Down
2 changes: 1 addition & 1 deletion chemcrow/data/chem_wep_smi.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CAS No.,Source,smiles
cas,source,smiles
(111-48-8),australia group,OCCSCCO
(10025-87-3),australia group,O=P(Cl)(Cl)Cl
(756-79-6),australia group,COP(C)(=O)OC
Expand Down
1 change: 0 additions & 1 deletion chemcrow/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""load all tools."""

from .databases import * # noqa
from .rdkit import * # noqa
from .search import * # noqa
from .rxn4chem import * # noqa
Expand Down
109 changes: 0 additions & 109 deletions chemcrow/tools/databases.py

This file was deleted.

6 changes: 3 additions & 3 deletions chemcrow/tools/rdkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MolSimilarity(BaseTool):
)

def __init__(self):
super(MolSimilarity, self).__init__()
super().__init__()

def _run(self, smiles_pair: str) -> str:
smi_list = smiles_pair.split(".")
Expand Down Expand Up @@ -55,7 +55,7 @@ class SMILES2Weight(BaseTool):
def __init__(
self,
):
super(SMILES2Weight, self).__init__()
super().__init__()

def _run(self, smiles: str) -> str:
mol = Chem.MolFromSmiles(smiles)
Expand All @@ -77,7 +77,7 @@ class FuncGroups(BaseTool):
def __init__(
self,
):
super(FuncGroups, self).__init__()
super().__init__()

# List obtained from https://github.com/rdkit/rdkit/blob/master/Data/FunctionalGroups.txt
self.dict_fgs = {
Expand Down
4 changes: 2 additions & 2 deletions chemcrow/tools/rxn4chem.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class RXN4Chem(BaseTool):

def __init__(self, rxn4chem_api_key):
"""Init object."""
super(RXN4Chem, self).__init__()
super().__init__()

self.rxn4chem_api_key = rxn4chem_api_key
self.rxn4chem = RXN4ChemistryWrapper(
Expand Down Expand Up @@ -135,7 +135,7 @@ class RXNRetrosynthesis(RXN4Chem):

def __init__(self, rxn4chem_api_key, openai_api_key):
"""Init object."""
super(RXNRetrosynthesis, self).__init__(rxn4chem_api_key)
super().__init__(rxn4chem_api_key)
self.openai_api_key = openai_api_key

def _run(self, target: str) -> str:
Expand Down
Loading
Loading