diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..15ff821 --- /dev/null +++ b/setup.py @@ -0,0 +1,20 @@ +import setuptools +from setuptools import setup, find_packages + +setup(name='smiles_transformer', + version='1.0.0', + description='Original implementation of the paper "SMILES Transformer: Pre-trained Molecular Fingerprint for Low Data Drug Discovery"', + long_description=open('README.md').read(), + author='Shion Honda', + author_email='https://twitter.com/shion_honda', + url='https://github.com/DSPsleeporg/smiles-transformer', + license='MIT', + install_requires=[ + 'numpy', + 'pandas', + 'torch', + 'tqdm', + ], + python_requires='>=3', + packages=['smiles_transformer'] + ) diff --git a/smiles_transformer/__init__.py b/smiles_transformer/__init__.py new file mode 100644 index 0000000..b6e690f --- /dev/null +++ b/smiles_transformer/__init__.py @@ -0,0 +1 @@ +from . import * diff --git a/smiles_transformer/build_corpus.py b/smiles_transformer/build_corpus.py index 5c42a95..bb46160 100644 --- a/smiles_transformer/build_corpus.py +++ b/smiles_transformer/build_corpus.py @@ -2,7 +2,7 @@ import pandas as pd from tqdm import tqdm -from utils import split +from .utils import split def main(): parser = argparse.ArgumentParser(description='Build a corpus file') diff --git a/smiles_transformer/dataset.py b/smiles_transformer/dataset.py index 34ed188..8be8423 100644 --- a/smiles_transformer/dataset.py +++ b/smiles_transformer/dataset.py @@ -3,8 +3,8 @@ import torch from torch.utils.data import Dataset, DataLoader -from enumerator import SmilesEnumerator -from utils import split +from .enumerator import SmilesEnumerator +from .utils import split PAD = 0 MAX_LEN = 220 diff --git a/smiles_transformer/pretrain_rnn.py b/smiles_transformer/pretrain_rnn.py index d51820e..280bb4c 100644 --- a/smiles_transformer/pretrain_rnn.py +++ b/smiles_transformer/pretrain_rnn.py @@ -12,8 +12,8 @@ from torch.autograd import Variable from torch.nn.utils import clip_grad_norm_ from torch.nn import functional as F -from build_vocab import WordVocab -from dataset import Seq2seqDataset +from .build_vocab import WordVocab +from .dataset import Seq2seqDataset PAD = 0 UNK = 1 diff --git a/smiles_transformer/pretrain_trfm.py b/smiles_transformer/pretrain_trfm.py index 3a054a9..9681e1c 100644 --- a/smiles_transformer/pretrain_trfm.py +++ b/smiles_transformer/pretrain_trfm.py @@ -12,8 +12,8 @@ from torch.utils.data import DataLoader from tqdm import tqdm -from build_vocab import WordVocab -from dataset import Seq2seqDataset +from .build_vocab import WordVocab +from .dataset import Seq2seqDataset PAD = 0 UNK = 1 diff --git a/smiles_transformer/sample.py b/smiles_transformer/sample.py index 198b87e..0ab9f08 100644 --- a/smiles_transformer/sample.py +++ b/smiles_transformer/sample.py @@ -1,4 +1,4 @@ -from enumerator import SmilesEnumerator +from .enumerator import SmilesEnumerator sme = SmilesEnumerator() smiles = ''