Skip to content

Commit

Permalink
add support for SELFIES
Browse files Browse the repository at this point in the history
  • Loading branch information
sfluegel committed Nov 29, 2023
1 parent 934c960 commit c9a1b76
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions chebai/preprocessing/datasets/chebi.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,10 @@ class ChEBIOverXDeepSMILES(ChEBIOverX):
READER = dr.DeepChemDataReader


class ChEBIOverXSELFIES(ChEBIOverX):
READER = dr.SelfiesReader


class ChEBIOver100(ChEBIOverX):
THRESHOLD = 100

Expand All @@ -443,6 +447,10 @@ class ChEBIOver100DeepSMILES(ChEBIOverXDeepSMILES, ChEBIOver100):
pass


class ChEBIOver100SELFIES(ChEBIOverXSELFIES, ChEBIOver100):
pass


class JCIExtendedBPEData(JCIExtendedBase):
READER = dr.ChemBPEReader

Expand Down
5 changes: 5 additions & 0 deletions chebai/preprocessing/datasets/pubchem.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,10 @@ class PubToxAndChebi100(PubToxAndChebiX):
class PubToxAndChebi50(PubToxAndChebiX):
CHEBI_X = ChEBIOver50


class PubChemDeepSMILES(PubChem):
READER = dr.DeepChemDataReader


class PubChemSELFIES(PubChem):
READER = dr.SelfiesReader
1 change: 1 addition & 0 deletions configs/data/chebi100_SELFIES.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class_path: chebai.preprocessing.datasets.chebi.ChEBIOver100SELFIES
1 change: 1 addition & 0 deletions configs/data/pubchem_SELFIES.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class_path: chebai.preprocessing.datasets.pubchem.PubChemSELFIES

0 comments on commit c9a1b76

Please sign in to comment.