from unittest import TestCase

from deepchem.models import MultitaskClassifier
from rdkit.Chem.rdMolAlign import AlignMol
from rdkit.Chem.rdmolfiles import MolFromSmiles
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import roc_auc_score, classification_report, precision_score, accuracy_score, confusion_matrix
from sklearn.svm import SVC
from tensorflow.python.keras import Sequential
from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten
from tensorflow.keras.optimizers import Adadelta, Adam, RMSprop

from compoundFeaturization.mixedDescriptors import MixedFeaturizer
from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, \
    PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, \
    SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, \
    ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file
from compoundFeaturization.rdkitFingerprints import MorganFingerprint
from loaders.Loaders import SDFLoader, CSVLoader
from metrics.Metrics import Metric
from models.DeepChemModels import DeepChemModel
from models.kerasModels import KerasModel
from models.sklearnModels import SklearnModel
from splitters.splitters import SingletaskStratifiedSplitter

import pandas as pd


class Test3DGeneration(TestCase):

    def test_align(self):
        generator = ThreeDimensionalMoleculeGenerator()

        mol = MolFromSmiles("Cc1cc2-c3c(O)cc(cc3OC3(Oc4cc(O)ccc4-c(c1O)c23)c1ccc(O)cc1O)-c1cc2cccc(O)c2o1")

        generator.generate_conformers(mol)


class TestSdfImporter(TestCase):

    def test_sdf_importer(self):
        loader = SDFLoader("../data/dataset_sweet_3D_to_test.sdf", "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        assert len(loader.mols_handler) == 100
        assert len(dataset.y) == 100
        assert len(dataset.X) == 100

    def test_2_sdf_importer(self):
        loader = SDFLoader("../data/A2780.sdf", "ChEMBL_ID", labels_fields=["pIC50"])
        dataset = loader.create_dataset()

        assert len(dataset.X) == 2255


class TestRdkit3DDescriptors(TestCase):

    def setUp(self) -> None:
        self.test_dataset_sdf = "../data/dataset_sweet_3D_to_test.sdf"
        self.test_dataset_to_fail = "../data/preprocessed_dataset_wfoodb.csv"

    def test_autocorr3D(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = AutoCorr3D().featurize(dataset)

        assert len(dataset.X) == 100
        assert isinstance(dataset.X[0][0], float)

    def test_autocorr3D_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            AutoCorr3D().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)

    def test_RDF(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = RadialDistributionFunction().featurize(dataset)

        assert len(dataset.X) == 100
        assert isinstance(dataset.X[0][0], float)
        assert len(dataset.X[0]) == 210

    def test_RDF_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            RadialDistributionFunction().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)

    def test_PBF(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = PlaneOfBestFit().featurize(dataset)

        assert len(dataset.X) == 100
        assert isinstance(dataset.X[0][0], float)
        assert len(dataset.X[0]) == 1

    def test_PDF_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            PlaneOfBestFit().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)

    def test_MORSE(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = MORSE().featurize(dataset)

        assert len(dataset.X) == 100
        assert isinstance(dataset.X[0][0], float)
        assert len(dataset.X[0]) == 224

    def test_MORSE_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            MORSE().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)

    def test_WHIM(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = WHIM().featurize(dataset)

        assert len(dataset.X) == 100
        assert isinstance(dataset.X[0][0], float)
        assert len(dataset.X[0]) == 114

    def test_WHIM_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            WHIM().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)

    def test_radius_of_gyration(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = RadiusOfGyration().featurize(dataset)

        assert len(dataset.X) == 100
        assert isinstance(dataset.X[0][0], float)
        assert len(dataset.X[0]) == 1

    def test_radius_of_gyration_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            RadiusOfGyration().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)

    def test_isf(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = InertialShapeFactor().featurize(dataset)

        assert len(dataset.X) == 100
        assert isinstance(dataset.X[0][0], float)
        assert len(dataset.X[0]) == 1

    def test_isf_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            InertialShapeFactor().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)

    def test_Eccentricity(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = Eccentricity().featurize(dataset)

        assert len(dataset.X) == 100
        assert isinstance(dataset.X[0][0], float)
        assert len(dataset.X[0]) == 1

    def test_eccentricity_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            Eccentricity().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)

    def test_Asphericity(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = Asphericity().featurize(dataset)

        assert len(dataset.X) == 100
        assert isinstance(dataset.X[0][0], float)
        assert len(dataset.X[0]) == 1

    def test_asphericity_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            Asphericity().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)

    def test_SpherocityIndex(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = SpherocityIndex().featurize(dataset)

        assert len(dataset.X) == 100
        assert isinstance(dataset.X[0][0], float)
        assert len(dataset.X[0]) == 1

    def test_SpherocityIndex_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            SpherocityIndex().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)

    def test_PMI(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = PrincipalMomentsOfInertia().featurize(dataset)

        assert len(dataset.X) == 100
        assert isinstance(dataset.X[0][0], float)
        assert len(dataset.X[0]) == 3

    def test_PMI_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            PrincipalMomentsOfInertia().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)

    def test_NormalizedPrincipalMomentsRatios(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = NormalizedPrincipalMomentsRatios().featurize(dataset)

        assert len(dataset.X) == 100
        assert isinstance(dataset.X[0][0], float)
        assert len(dataset.X[0]) == 2

    def test_NormalizedPrincipalMomentsRatios_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            NormalizedPrincipalMomentsRatios().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)

    def test_all_rdkit_descriptors(self):
        loader = SDFLoader(self.test_dataset_sdf, "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        dataset = All3DDescriptors().featurize(dataset)

        assert len(dataset.X) == 100
        assert len(dataset.X[0]) == 639

    def test_all_rdkit_descriptors_to_fail(self):
        loader = CSVLoader(self.test_dataset_to_fail,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        dataset = loader.create_dataset()

        with self.assertRaises(SystemExit) as cm:
            All3DDescriptors().featurize(dataset)

        self.assertEqual(cm.exception.code, 1)


class TestMixedDescriptors(TestCase):

    def setUp(self) -> None:
        self.test_dataset_sdf = "../data/dataset_sweet_3D_to_test.sdf"
        self.test_dataset_to_fail = "../preprocessed_dataset_wfoodb.csv"

    def test_mixed_descriptors_fingerprints_rdkit(self):
        loader = SDFLoader("../data/dataset_sweet_3D_to_test.sdf", "_SourceID", labels_fields=["_SWEET"])
        dataset = loader.create_dataset()

        descriptors = [All3DDescriptors(), MorganFingerprint()]

        dataset = MixedFeaturizer(featurizers=descriptors).featurize(dataset)

        assert len(dataset.X) == 100
        assert len(dataset.X[0]) == 2687


class TestModels3DDescriptors(TestCase):

    def setUp(self) -> None:
        loader = SDFLoader("../data/dataset_sweet_3d_balanced.sdf", "_SourceID", labels_fields=["_SWEET"])
        self.dataset = loader.create_dataset()

        self.dataset = All3DDescriptors().featurize(self.dataset, scale=True)

        splitter = SingletaskStratifiedSplitter()
        self.train_dataset, self.valid_dataset, self.test_dataset = splitter.train_valid_test_split(
            dataset=self.dataset,
            frac_train=0.6,
            frac_valid=0.2,
            frac_test=0.2)

    def test_svm_3d_descriptors(self):
        svm = SVC()
        model = SklearnModel(model=svm)

        res = model.cross_validate(self.dataset, Metric(roc_auc_score), folds=3)
        model = res[0]

        model.fit(self.train_dataset)

        metrics = [Metric(roc_auc_score), Metric(precision_score),
                   Metric(accuracy_score), Metric(confusion_matrix),
                   Metric(classification_report)]

        print("#############################")
        # evaluate the model
        print('Training Dataset: ')
        train_score = model.evaluate(self.train_dataset, metrics)
        self.assertAlmostEqual(train_score["accuracy_score"], 0.86, delta=0.05)
        print("#############################")
        print('Validation Dataset: ')
        valid_score = model.evaluate(self.valid_dataset, metrics)
        self.assertAlmostEqual(valid_score["accuracy_score"], 0.80, delta=0.1)
        print("#############################")
        print('Test Dataset: ')
        test_score = model.evaluate(self.test_dataset, metrics)
        self.assertAlmostEqual(test_score["accuracy_score"], 0.80, delta=0.1)
        print("#############################")

    def test_rf_3d_descriptors(self):
        rf = RandomForestClassifier()
        model = SklearnModel(model=rf)

        res = model.cross_validate(self.dataset, Metric(roc_auc_score), folds=3)
        model = res[0]

        model.fit(self.train_dataset)

        metrics = [Metric(roc_auc_score), Metric(precision_score),
                   Metric(accuracy_score), Metric(confusion_matrix),
                   Metric(classification_report)]

        print("#############################")
        # evaluate the model
        print('Training Dataset: ')
        train_score = model.evaluate(self.train_dataset, metrics)
        self.assertAlmostEqual(train_score["accuracy_score"], 0.99, delta=0.02)
        print("#############################")
        print('Validation Dataset: ')
        valid_score = model.evaluate(self.valid_dataset, metrics)
        self.assertAlmostEqual(valid_score["accuracy_score"], 0.80, delta=0.1)
        print("#############################")
        print('Test Dataset: ')
        test_score = model.evaluate(self.test_dataset, metrics)
        self.assertAlmostEqual(test_score["accuracy_score"], 0.80, delta=0.1)
        print("#############################")

    def test_dnn_3d_descriptors(self):

        input_dim = self.train_dataset.X.shape[1]

        def create_model(optimizer='adam', dropout=0.5, input_dim=input_dim):
            # create model
            model = Sequential()
            model.add(Dense(12, input_dim=input_dim, activation='relu'))
            model.add(Dropout(dropout))
            model.add(Dense(8, activation='relu'))
            model.add(Dense(1, activation='sigmoid'))
            # Compile model
            model.compile(loss='binary_crossentropy', optimizer=optimizer, metrics=['accuracy'])
            return model

        model = KerasModel(create_model, epochs=50, verbose=1, optimizer='adam')

        model.fit(self.train_dataset)

        metrics = [Metric(roc_auc_score), Metric(precision_score),
                   Metric(accuracy_score), Metric(confusion_matrix),
                   Metric(classification_report)]

        print("#############################")
        # evaluate the model
        print('Training Dataset: ')
        train_score = model.evaluate(self.train_dataset, metrics)
        self.assertAlmostEqual(train_score["accuracy_score"], 0.87, delta=0.02)
        print("#############################")
        print('Validation Dataset: ')
        valid_score = model.evaluate(self.valid_dataset, metrics)
        self.assertAlmostEqual(valid_score["accuracy_score"], 0.80, delta=0.1)
        print("#############################")
        print('Test Dataset: ')
        test_score = model.evaluate(self.test_dataset, metrics)
        self.assertAlmostEqual(test_score["accuracy_score"], 0.80, delta=0.1)
        print("#############################")

    def test_cnn_3d_descriptors(self):

        input_dim = self.train_dataset.X.shape[1]

        def make_cnn_model(input_dim=input_dim,
                           g_noise=0.05,
                           DENSE=128,
                           DROPOUT=0.5,
                           C1_K=8,
                           C1_S=32,
                           C2_K=16,
                           C2_S=32,
                           activation='relu',
                           loss='binary_crossentropy',
                           optimizer='adadelta',
                           learning_rate=0.01,
                           metrics='accuracy'):

            model = Sequential()
            # Adding a bit of GaussianNoise also works as regularization
            model.add(GaussianNoise(g_noise, input_shape=(input_dim,)))
            # First two is number of filter + kernel size
            model.add(Reshape((input_dim, 1)))
            model.add(Conv1D(C1_K, C1_S, activation=activation, padding="same"))
            model.add(Conv1D(C2_K, C2_S, padding="same", activation=activation))
            model.add(Flatten())
            model.add(Dropout(DROPOUT))
            model.add(Dense(DENSE, activation=activation))
            model.add(Dense(1, activation='sigmoid'))
            if optimizer == 'adadelta':
                opt = Adadelta(lr=learning_rate)
            elif optimizer == 'adam':
                opt = Adam(lr=learning_rate)
            elif optimizer == 'rsmprop':
                opt = RMSprop(lr=learning_rate)
            else:
                opt = optimizer

            model.compile(loss=loss, optimizer=opt, metrics=metrics, )

            return model

        model = KerasModel(make_cnn_model, epochs=10, verbose=1, optimizer="adam")

        model.fit(self.train_dataset)

        metrics = [Metric(roc_auc_score),
                   Metric(precision_score),
                   Metric(accuracy_score),
                   Metric(confusion_matrix),
                   Metric(classification_report)]

        train_score = model.evaluate(self.train_dataset, metrics)
        print('training set score:', train_score)
        self.assertAlmostEqual(train_score["accuracy_score"], 0.81, delta=0.3)

        validation_score = model.evaluate(self.valid_dataset, metrics)
        print('validation set score:', validation_score)
        self.assertAlmostEqual(validation_score["accuracy_score"], 0.81, delta=0.3)

        test_score = model.evaluate(self.test_dataset, metrics)
        print('test set score:', model.evaluate(self.test_dataset, metrics))
        self.assertAlmostEqual(test_score["accuracy_score"], 0.81, delta=0.3)

    def test_multitaskclass_3d_descriptors(self):

        multitask = MultitaskClassifier(n_tasks=1, n_features=self.train_dataset.X.shape[1], layer_sizes=[1000])
        model_multi = DeepChemModel(multitask)
        # Model training
        model_multi.fit(self.train_dataset)
        # Evaluation
        metrics = [Metric(roc_auc_score), Metric(precision_score), Metric(accuracy_score)]
        print('Training Dataset: ')
        train_score = model_multi.evaluate(self.train_dataset, metrics)
        self.assertAlmostEqual(train_score["accuracy_score"], 0.80, delta=0.1)
        print('Valid Dataset: ')
        valid_score = model_multi.evaluate(self.valid_dataset, metrics)
        self.assertAlmostEqual(valid_score["accuracy_score"], 0.80, delta=0.1)
        print('Test Dataset: ')
        test_score = model_multi.evaluate(self.test_dataset, metrics)
        self.assertAlmostEqual(test_score["accuracy_score"], 0.80, delta=0.1)


class Test3DGenerator(TestCase):

    def setUp(self) -> None:
        self.generator = ThreeDimensionalMoleculeGenerator(n_conformations=20)
        self.test_dataset_to_convert = "../data/test_to_convert_to_sdf.csv"
        loader = CSVLoader(self.test_dataset_to_convert,
                           mols_field='Smiles',
                           labels_fields='Class',
                           id_field='ID')

        self.test_dataset_to_convert_object = loader.create_dataset()

    def test_generate_20_conformers(self):
        mol = MolFromSmiles("CC(CC(C)(O)C=C)=CC=CC")

        self.assertEquals(mol.GetConformers(), ())

        mol = self.generator.generate_conformers(mol, 1)

        self.assertEquals(len(mol.GetConformers()), 20)

    def test_optimize_geometry(self):
        new_generator = ThreeDimensionalMoleculeGenerator(n_conformations=10)

        mol_raw = MolFromSmiles("CC(CC(C)(O)C=C)=CC=C")
        mol_raw2 = MolFromSmiles("CC(CC(C)(O)C=C)=CC=C")

        self.assertEquals(mol_raw.GetConformers(), ())

        new_mol = new_generator.generate_conformers(mol_raw, 1)

        conformer_1_before = new_mol.GetConformer(1)

        self.assertEquals(len(new_mol.GetConformers()), 10)

        new_mol = new_generator.optimize_molecular_geometry(new_mol, "MMFF94")

        conformer_1_after = new_mol.GetConformer(1)

        mol_raw.AddConformer(conformer_1_before)
        mol_raw2.AddConformer(conformer_1_after)

        rmsd = AlignMol(mol_raw, mol_raw2)

        self.assertNotEqual(rmsd, 0)

    def test_export_to_sdf(self):
        generate_conformers_to_sdf_file(self.test_dataset_to_convert_object, "../data/test.sdf",
                                        timeout_per_molecule=40)

        loader = SDFLoader("../data/test.sdf", "_ID", "_Class")
        dataset = loader.create_dataset()

        All3DDescriptors().featurize(dataset)

        features_number = dataset.len_X()[1]

        self.assertEqual(features_number, 639)

tensorflow.python.keras.layers.Flatten sklearn.ensemble.RandomForestClassifier tensorflow.python.keras.layers.Dense tensorflow.keras.optimizers.RMSprop tensorflow.keras.optimizers.Adadelta tensorflow.keras.optimizers.Adam tensorflow.python.keras.Sequential tensorflow.python.keras.layers.Dropout sklearn.svm.SVC tensorflow.python.keras.layers.Conv1D tensorflow.python.keras.layers.Reshape tensorflow.python.keras.layers.GaussianNoise
[(32, 'compoundFeaturization.rdkit3DDescriptors.ThreeDimensionalMoleculeGenerator', 'ThreeDimensionalMoleculeGenerator', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (34, 'rdkit.Chem.rdmolfiles.MolFromSmiles', 'MolFromSmiles', (['"""Cc1cc2-c3c(O)cc(cc3OC3(Oc4cc(O)ccc4-c(c1O)c23)c1ccc(O)cc1O)-c1cc2cccc(O)c2o1"""'], {}), False, 'from rdkit.Chem.rdmolfiles import MolFromSmiles\n'), (42, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['"""../data/dataset_sweet_3D_to_test.sdf"""', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (50, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['"""../data/A2780.sdf"""', '"""ChEMBL_ID"""'], {'labels_fields': "['pIC50']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (63, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (72, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (85, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (95, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (108, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (118, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (131, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (141, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (154, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (164, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (177, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (187, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (200, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (210, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (223, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (233, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (246, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (256, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (269, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (279, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (292, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (302, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (315, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (325, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (338, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['self.test_dataset_sdf', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (347, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_fail'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (367, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['"""../data/dataset_sweet_3D_to_test.sdf"""', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (381, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['"""../data/dataset_sweet_3d_balanced.sdf"""', '"""_SourceID"""'], {'labels_fields': "['_SWEET']"}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (386, 'splitters.splitters.SingletaskStratifiedSplitter', 'SingletaskStratifiedSplitter', ([], {}), False, 'from splitters.splitters import SingletaskStratifiedSplitter\n'), (394, 'sklearn.svm.SVC', 'SVC', ([], {}), False, 'from sklearn.svm import SVC\n'), (395, 'models.sklearnModels.SklearnModel', 'SklearnModel', ([], {'model': 'svm'}), False, 'from models.sklearnModels import SklearnModel\n'), (422, 'sklearn.ensemble.RandomForestClassifier', 'RandomForestClassifier', ([], {}), False, 'from sklearn.ensemble import RandomForestClassifier\n'), (423, 'models.sklearnModels.SklearnModel', 'SklearnModel', ([], {'model': 'rf'}), False, 'from models.sklearnModels import SklearnModel\n'), (464, 'models.kerasModels.KerasModel', 'KerasModel', (['create_model'], {'epochs': '(50)', 'verbose': '(1)', 'optimizer': '"""adam"""'}), False, 'from models.kerasModels import KerasModel\n'), (529, 'models.kerasModels.KerasModel', 'KerasModel', (['make_cnn_model'], {'epochs': '(10)', 'verbose': '(1)', 'optimizer': '"""adam"""'}), False, 'from models.kerasModels import KerasModel\n'), (553, 'deepchem.models.MultitaskClassifier', 'MultitaskClassifier', ([], {'n_tasks': '(1)', 'n_features': 'self.train_dataset.X.shape[1]', 'layer_sizes': '[1000]'}), False, 'from deepchem.models import MultitaskClassifier\n'), (554, 'models.DeepChemModels.DeepChemModel', 'DeepChemModel', (['multitask'], {}), False, 'from models.DeepChemModels import DeepChemModel\n'), (573, 'compoundFeaturization.rdkit3DDescriptors.ThreeDimensionalMoleculeGenerator', 'ThreeDimensionalMoleculeGenerator', ([], {'n_conformations': '(20)'}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (575, 'loaders.Loaders.CSVLoader', 'CSVLoader', (['self.test_dataset_to_convert'], {'mols_field': '"""Smiles"""', 'labels_fields': '"""Class"""', 'id_field': '"""ID"""'}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (583, 'rdkit.Chem.rdmolfiles.MolFromSmiles', 'MolFromSmiles', (['"""CC(CC(C)(O)C=C)=CC=CC"""'], {}), False, 'from rdkit.Chem.rdmolfiles import MolFromSmiles\n'), (592, 'compoundFeaturization.rdkit3DDescriptors.ThreeDimensionalMoleculeGenerator', 'ThreeDimensionalMoleculeGenerator', ([], {'n_conformations': '(10)'}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (594, 'rdkit.Chem.rdmolfiles.MolFromSmiles', 'MolFromSmiles', (['"""CC(CC(C)(O)C=C)=CC=C"""'], {}), False, 'from rdkit.Chem.rdmolfiles import MolFromSmiles\n'), (595, 'rdkit.Chem.rdmolfiles.MolFromSmiles', 'MolFromSmiles', (['"""CC(CC(C)(O)C=C)=CC=C"""'], {}), False, 'from rdkit.Chem.rdmolfiles import MolFromSmiles\n'), (612, 'rdkit.Chem.rdMolAlign.AlignMol', 'AlignMol', (['mol_raw', 'mol_raw2'], {}), False, 'from rdkit.Chem.rdMolAlign import AlignMol\n'), (617, 'compoundFeaturization.rdkit3DDescriptors.generate_conformers_to_sdf_file', 'generate_conformers_to_sdf_file', (['self.test_dataset_to_convert_object', '"""../data/test.sdf"""'], {'timeout_per_molecule': '(40)'}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (620, 'loaders.Loaders.SDFLoader', 'SDFLoader', (['"""../data/test.sdf"""', '"""_ID"""', '"""_Class"""'], {}), False, 'from loaders.Loaders import SDFLoader, CSVLoader\n'), (370, 'compoundFeaturization.rdkit3DDescriptors.All3DDescriptors', 'All3DDescriptors', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (370, 'compoundFeaturization.rdkitFingerprints.MorganFingerprint', 'MorganFingerprint', ([], {}), False, 'from compoundFeaturization.rdkitFingerprints import MorganFingerprint\n'), (397, 'metrics.Metrics.Metric', 'Metric', (['roc_auc_score'], {}), False, 'from metrics.Metrics import Metric\n'), (402, 'metrics.Metrics.Metric', 'Metric', (['roc_auc_score'], {}), False, 'from metrics.Metrics import Metric\n'), (402, 'metrics.Metrics.Metric', 'Metric', (['precision_score'], {}), False, 'from metrics.Metrics import Metric\n'), (403, 'metrics.Metrics.Metric', 'Metric', (['accuracy_score'], {}), False, 'from metrics.Metrics import Metric\n'), (403, 'metrics.Metrics.Metric', 'Metric', (['confusion_matrix'], {}), False, 'from metrics.Metrics import Metric\n'), (404, 'metrics.Metrics.Metric', 'Metric', (['classification_report'], {}), False, 'from metrics.Metrics import Metric\n'), (425, 'metrics.Metrics.Metric', 'Metric', (['roc_auc_score'], {}), False, 'from metrics.Metrics import Metric\n'), (430, 'metrics.Metrics.Metric', 'Metric', (['roc_auc_score'], {}), False, 'from metrics.Metrics import Metric\n'), (430, 'metrics.Metrics.Metric', 'Metric', (['precision_score'], {}), False, 'from metrics.Metrics import Metric\n'), (431, 'metrics.Metrics.Metric', 'Metric', (['accuracy_score'], {}), False, 'from metrics.Metrics import Metric\n'), (431, 'metrics.Metrics.Metric', 'Metric', (['confusion_matrix'], {}), False, 'from metrics.Metrics import Metric\n'), (432, 'metrics.Metrics.Metric', 'Metric', (['classification_report'], {}), False, 'from metrics.Metrics import Metric\n'), (455, 'tensorflow.python.keras.Sequential', 'Sequential', ([], {}), False, 'from tensorflow.python.keras import Sequential\n'), (468, 'metrics.Metrics.Metric', 'Metric', (['roc_auc_score'], {}), False, 'from metrics.Metrics import Metric\n'), (468, 'metrics.Metrics.Metric', 'Metric', (['precision_score'], {}), False, 'from metrics.Metrics import Metric\n'), (469, 'metrics.Metrics.Metric', 'Metric', (['accuracy_score'], {}), False, 'from metrics.Metrics import Metric\n'), (469, 'metrics.Metrics.Metric', 'Metric', (['confusion_matrix'], {}), False, 'from metrics.Metrics import Metric\n'), (470, 'metrics.Metrics.Metric', 'Metric', (['classification_report'], {}), False, 'from metrics.Metrics import Metric\n'), (505, 'tensorflow.python.keras.Sequential', 'Sequential', ([], {}), False, 'from tensorflow.python.keras import Sequential\n'), (533, 'metrics.Metrics.Metric', 'Metric', (['roc_auc_score'], {}), False, 'from metrics.Metrics import Metric\n'), (534, 'metrics.Metrics.Metric', 'Metric', (['precision_score'], {}), False, 'from metrics.Metrics import Metric\n'), (535, 'metrics.Metrics.Metric', 'Metric', (['accuracy_score'], {}), False, 'from metrics.Metrics import Metric\n'), (536, 'metrics.Metrics.Metric', 'Metric', (['confusion_matrix'], {}), False, 'from metrics.Metrics import Metric\n'), (537, 'metrics.Metrics.Metric', 'Metric', (['classification_report'], {}), False, 'from metrics.Metrics import Metric\n'), (558, 'metrics.Metrics.Metric', 'Metric', (['roc_auc_score'], {}), False, 'from metrics.Metrics import Metric\n'), (558, 'metrics.Metrics.Metric', 'Metric', (['precision_score'], {}), False, 'from metrics.Metrics import Metric\n'), (558, 'metrics.Metrics.Metric', 'Metric', (['accuracy_score'], {}), False, 'from metrics.Metrics import Metric\n'), (66, 'compoundFeaturization.rdkit3DDescriptors.AutoCorr3D', 'AutoCorr3D', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (88, 'compoundFeaturization.rdkit3DDescriptors.RadialDistributionFunction', 'RadialDistributionFunction', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (111, 'compoundFeaturization.rdkit3DDescriptors.PlaneOfBestFit', 'PlaneOfBestFit', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (134, 'compoundFeaturization.rdkit3DDescriptors.MORSE', 'MORSE', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (157, 'compoundFeaturization.rdkit3DDescriptors.WHIM', 'WHIM', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (180, 'compoundFeaturization.rdkit3DDescriptors.RadiusOfGyration', 'RadiusOfGyration', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (203, 'compoundFeaturization.rdkit3DDescriptors.InertialShapeFactor', 'InertialShapeFactor', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (226, 'compoundFeaturization.rdkit3DDescriptors.Eccentricity', 'Eccentricity', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (249, 'compoundFeaturization.rdkit3DDescriptors.Asphericity', 'Asphericity', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (272, 'compoundFeaturization.rdkit3DDescriptors.SpherocityIndex', 'SpherocityIndex', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (295, 'compoundFeaturization.rdkit3DDescriptors.PrincipalMomentsOfInertia', 'PrincipalMomentsOfInertia', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (318, 'compoundFeaturization.rdkit3DDescriptors.NormalizedPrincipalMomentsRatios', 'NormalizedPrincipalMomentsRatios', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (341, 'compoundFeaturization.rdkit3DDescriptors.All3DDescriptors', 'All3DDescriptors', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (372, 'compoundFeaturization.mixedDescriptors.MixedFeaturizer', 'MixedFeaturizer', ([], {'featurizers': 'descriptors'}), False, 'from compoundFeaturization.mixedDescriptors import MixedFeaturizer\n'), (384, 'compoundFeaturization.rdkit3DDescriptors.All3DDescriptors', 'All3DDescriptors', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (456, 'tensorflow.python.keras.layers.Dense', 'Dense', (['(12)'], {'input_dim': 'input_dim', 'activation': '"""relu"""'}), False, 'from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten\n'), (457, 'tensorflow.python.keras.layers.Dropout', 'Dropout', (['dropout'], {}), False, 'from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten\n'), (458, 'tensorflow.python.keras.layers.Dense', 'Dense', (['(8)'], {'activation': '"""relu"""'}), False, 'from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten\n'), (459, 'tensorflow.python.keras.layers.Dense', 'Dense', (['(1)'], {'activation': '"""sigmoid"""'}), False, 'from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten\n'), (507, 'tensorflow.python.keras.layers.GaussianNoise', 'GaussianNoise', (['g_noise'], {'input_shape': '(input_dim,)'}), False, 'from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten\n'), (509, 'tensorflow.python.keras.layers.Reshape', 'Reshape', (['(input_dim, 1)'], {}), False, 'from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten\n'), (510, 'tensorflow.python.keras.layers.Conv1D', 'Conv1D', (['C1_K', 'C1_S'], {'activation': 'activation', 'padding': '"""same"""'}), False, 'from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten\n'), (511, 'tensorflow.python.keras.layers.Conv1D', 'Conv1D', (['C2_K', 'C2_S'], {'padding': '"""same"""', 'activation': 'activation'}), False, 'from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten\n'), (512, 'tensorflow.python.keras.layers.Flatten', 'Flatten', ([], {}), False, 'from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten\n'), (513, 'tensorflow.python.keras.layers.Dropout', 'Dropout', (['DROPOUT'], {}), False, 'from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten\n'), (514, 'tensorflow.python.keras.layers.Dense', 'Dense', (['DENSE'], {'activation': 'activation'}), False, 'from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten\n'), (515, 'tensorflow.python.keras.layers.Dense', 'Dense', (['(1)'], {'activation': '"""sigmoid"""'}), False, 'from tensorflow.python.keras.layers import Dense, Dropout, GaussianNoise, Reshape, Conv1D, Flatten\n'), (517, 'tensorflow.keras.optimizers.Adadelta', 'Adadelta', ([], {'lr': 'learning_rate'}), False, 'from tensorflow.keras.optimizers import Adadelta, Adam, RMSprop\n'), (623, 'compoundFeaturization.rdkit3DDescriptors.All3DDescriptors', 'All3DDescriptors', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (80, 'compoundFeaturization.rdkit3DDescriptors.AutoCorr3D', 'AutoCorr3D', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (103, 'compoundFeaturization.rdkit3DDescriptors.RadialDistributionFunction', 'RadialDistributionFunction', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (126, 'compoundFeaturization.rdkit3DDescriptors.PlaneOfBestFit', 'PlaneOfBestFit', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (149, 'compoundFeaturization.rdkit3DDescriptors.MORSE', 'MORSE', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (172, 'compoundFeaturization.rdkit3DDescriptors.WHIM', 'WHIM', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (195, 'compoundFeaturization.rdkit3DDescriptors.RadiusOfGyration', 'RadiusOfGyration', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (218, 'compoundFeaturization.rdkit3DDescriptors.InertialShapeFactor', 'InertialShapeFactor', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (241, 'compoundFeaturization.rdkit3DDescriptors.Eccentricity', 'Eccentricity', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (264, 'compoundFeaturization.rdkit3DDescriptors.Asphericity', 'Asphericity', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (287, 'compoundFeaturization.rdkit3DDescriptors.SpherocityIndex', 'SpherocityIndex', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (310, 'compoundFeaturization.rdkit3DDescriptors.PrincipalMomentsOfInertia', 'PrincipalMomentsOfInertia', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (333, 'compoundFeaturization.rdkit3DDescriptors.NormalizedPrincipalMomentsRatios', 'NormalizedPrincipalMomentsRatios', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (355, 'compoundFeaturization.rdkit3DDescriptors.All3DDescriptors', 'All3DDescriptors', ([], {}), False, 'from compoundFeaturization.rdkit3DDescriptors import AutoCorr3D, All3DDescriptors, RadialDistributionFunction, PlaneOfBestFit, MORSE, WHIM, RadiusOfGyration, InertialShapeFactor, Eccentricity, Asphericity, SpherocityIndex, PrincipalMomentsOfInertia, NormalizedPrincipalMomentsRatios, ThreeDimensionalMoleculeGenerator, generate_conformers_to_sdf_file\n'), (519, 'tensorflow.keras.optimizers.Adam', 'Adam', ([], {'lr': 'learning_rate'}), False, 'from tensorflow.keras.optimizers import Adadelta, Adam, RMSprop\n'), (521, 'tensorflow.keras.optimizers.RMSprop', 'RMSprop', ([], {'lr': 'learning_rate'}), False, 'from tensorflow.keras.optimizers import Adadelta, Adam, RMSprop\n')]