Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepchem/torchchem
/ functions
Functions
169 in github.com/deepchem/torchchem
⨍
Functions
169
◇
Types & classes
34
Method
__init__
Abstract class for all models. Parameters: ----------- model_instance: object Wrapper around ScikitLearn/Keras/Tensorflow model obje
torchchem/models/model.py:18
Method
__init__
Constructs the computational graph. This function constructs the computational graph for the model. It relies subclassed methods (build/cost)
torchchem/models/model.py:133
Method
_reward
Reward of a state. Returns: Float. QED of the current state.
contrib/MolDQN/agent.py:34
Method
add_graph
Add a single graph Parameters ---------- g : tg.data.Data Molecular graph
torchchem/data/mol_dataset.py:125
Function
atom_valences
Creates a list of valences corresponding to atom_types. Note that this is not a count of valence electrons, but a count of the maximum number of
contrib/MolDQN/utils.py:47
Method
build
Constructs the graph architecture as specified in its config. This method creates the following Placeholders: mol_features: Molecule des
torchchem/models/multitask_classification.py:34
Method
build
Constructs the graph architecture as specified in its config. This method creates the following Placeholders: mol_features: Molecule descri
torchchem/models/multitask_regression.py:32
Method
clone
clone() method to trick Theano
torchchem/feat/neural_fp.py:50
Function
construct_loader
(x, y, target, batch_size, shuffle=True)
torchchem/models/data_utils.py:401
Function
construct_loader_reg
(x, y, target, batch_size, shuffle=True)
torchchem/models/data_utils.py:412
Function
contains_scaffold
Returns whether mol contains the given scaffold. NOTE: This is more advanced than simply computing scaffold equality (i.e. scaffold(mol_a) == sca
contrib/MolDQN/utils.py:80
Method
cost
(self, logit, label, weight)
torchchem/models/multitask_classification.py:104
Method
cost
(self, logit, label, weight)
torchchem/models/multitask_regression.py:100
Method
current_file
Returns ------- str File path of the next data batch.
torchchem/data/mol_dataset.py:75
Method
dump_as_matrices
(self)
torchchem/feat/neural_fp.py:114
Method
dump_as_tensor
Method to represent attributed graph as a giant tensor The tensor is N_node x N_node x N_attributes. For a given node, A_i,i,: is a vect
torchchem/feat/neural_fp.py:65
Function
early_stop
Stop the training if there is no non-trivial progress in k steps @param val_acc_history: a list contains all the historical validation acc @par
torchchem/models/utils.py:6
Method
edgeAttributes
Returns 2D array where (#, :) contains attributes of edge #
torchchem/feat/neural_fp.py:40
Method
edgeAttributesAtt
(self)
torchchem/feat/neural_fp.py:44
Function
fillBondType
(rdmol, bondtype_list)
torchchem/feat/neural_fp.py:579
Method
fit
Fits a model on data in a Dataset object.
torchchem/models/model.py:81
Method
fit
Fit the model. Parameters ---------- dataset: dc.data.Dataset Dataset object holding training data nb_epoch: 10 Number
torchchem/models/model.py:234
Method
fit_on_batch
Updates existing model with new information.
torchchem/models/model.py:48
Method
forward
(self, x)
contrib/ElemNet/model.py:37
Method
forward
(self, output, y, w)
torchchem/models/graphconv.py:544
Method
forward
Take in and process masked src and target sequences.
torchchem/models/transformer.py:75
Method
forward
(self, x, mask)
torchchem/models/transformer.py:115
Method
forward
(self, x, mask)
torchchem/models/transformer.py:139
Method
forward
Pass the input (and mask) through each layer in turn.
torchchem/models/transformer.py:162
Method
forward
(self, x)
torchchem/models/transformer.py:178
Method
forward
(self, x)
torchchem/models/transformer.py:193
Method
forward
Apply residual connection to any sublayer with the same size.
torchchem/models/transformer.py:211
Method
forward
Follow Figure 1 (left) for connections.
torchchem/models/transformer.py:230
Method
forward
(self, x)
torchchem/models/transformer.py:253
Method
forward
Implements Figure 2
torchchem/models/transformer.py:352
Method
forward
TODO: Tutaj mozna jeszcze wrzucic jakas nieliniowosc na koniec, bo gdy N_dense = 1, to mamy zwykle mnozenie macierzy
torchchem/models/transformer.py:429
Method
forward
(self, x)
torchchem/models/transformer.py:454
Method
getAdjTensor
(self, maxNodes)
torchchem/feat/neural_fp.py:55
Function
get_fingerprint
Get Morgan Fingerprint of a specific SMILES string. Args: smiles: String. The SMILES string of the molecule. hparams: tf.contrib.training.H
contrib/MolDQN/utils.py:23
Method
get_num_tasks
Get number of tasks.
torchchem/models/model.py:124
Method
get_path
(self)
contrib/MolDQN/environment.py:382
Function
get_scaffold
Computes the Bemis-Murcko scaffold for a molecule. Args: mol: RDKit Mol. Returns: String scaffold SMILES.
contrib/MolDQN/utils.py:67
Method
get_task_type
Currently models can only be classifiers or regressors.
torchchem/models/model.py:118
Method
len
(self)
torchchem/data/mol_dataset.py:163
Function
load_csv_dataset
Load dataset from a csv file Parameters ---------- path : str Path to the csv data file. label_col : list of str Column names for
torchchem/data/data_utils.py:24
Function
load_data_from_df
(dataset_path, target, repeats=1, shuffle_re
torchchem/models/data_utils.py:31
Function
load_sdf_dataset
Load dataset from a csv file Parameters ---------- path : str Path to the sdf data file. label_col : list of str Column names for
torchchem/data/data_utils.py:92
Function
mol_collate_func_class
(batch)
torchchem/models/data_utils.py:328
Function
mol_collate_func_reg
Customized function for DataLoader that dynamically pads the batch so that all data have the same length
torchchem/models/data_utils.py:247
Method
nodeAttributes
Returns 2D array where (#, :) contains attributes of node #
torchchem/feat/neural_fp.py:36
Method
num_steps_taken
(self)
contrib/MolDQN/environment.py:379
Function
penalized_logp
Calculates the penalized logP of a molecule. Refactored from https://github.com/wengong-jin/icml18-jtnn/blob/master/bo/run_bo.py See Junction T
contrib/MolDQN/utils.py:119
Method
predict
(self, dataset, batch_size=32)
torchchem/models/graphconv.py:664
Method
predict
Uses self to make predictions on provided Dataset object. Returns: y_pred: numpy ndarray of shape (n_samples,)
torchchem/models/model.py:291
Method
predict_on_batch
(self, X_batch)
torchchem/models/multitask_classification.py:113
Method
predict_on_batch
(self, X_batch)
torchchem/models/multitask_regression.py:108
Method
predict_on_batch
Makes predictions on given batch of new data. Parameters ---------- X: np.ndarray Features
torchchem/models/model.py:55
Method
predict_proba
(self, dataset, transformers=[], n_classes=2)
torchchem/models/model.py:318
Method
predict_proba_on_batch
(self, X_batch)
torchchem/models/multitask_classification.py:121
Method
predict_proba_on_batch
(self, X_batch)
torchchem/models/multitask_regression.py:116
Method
raw_file_names
Returns ------- list File paths of saved data batches.
torchchem/data/mol_dataset.py:63
Method
reload
Reload trained model from disk.
torchchem/models/model.py:67
Method
reorder_with_indices
Reorder the data batches according to new indices Usually used after shuffle Parameters ---------- indices : list, optional
torchchem/data/mol_dataset.py:185
Method
state
(self)
contrib/MolDQN/environment.py:375
Method
test_classification_init
Test that classification init can happen.
torchchem/models/tests/test_multitask.py:8
Method
test_mat
Simple test that initializes and fits a MAT.
torchchem/models/tests/test_mat.py:10
Method
test_mol_to_graph
Test conversion of molecule to graph.
torchchem/feat/tests/test_neural_fp.py:12
Method
test_regression_init
Test that regression init can happen.
torchchem/models/tests/test_multitask.py:15
Method
visualize_state
Draws the molecule of the state. Args: state: String, Chem.Mol, or Chem.RWMol. If string is prov ided, it is considered as the SMIL
contrib/MolDQN/environment.py:485
← previous
101–169 of 169, ranked by callers