MCPcopy Create free account

hub / github.com/deepchem/torchchem / functions

Functions169 in github.com/deepchem/torchchem

↓ 11 callersMethod__init__
(self, layer, N, scale_norm)
torchchem/models/transformer.py:157
↓ 11 callersFunctiononeHotVector
Converts a value to a one-hot vector based on options in lst
torchchem/feat/neural_fp.py:525
↓ 7 callersMethodadd_graph_batch
Add a list of new graphs Parameters ---------- gs : list of tg.data.Data Molecular graphs
torchchem/data/mol_dataset.py:99
↓ 6 callersFunctionmolToGraph
Converts an RDKit molecule to an attributed undirected graph
torchchem/feat/neural_fp.py:354
↓ 5 callersFunctionclones
Produce N identical layers.
torchchem/models/transformer.py:149
↓ 5 callersFunctionone_of_k_encoding_unk
Maps inputs not in the allowable set to the last element.
torchchem/data/mol_graph.py:46
↓ 5 callersMethodsave
(self)
torchchem/data/mol_dataset.py:85
↓ 5 callersMethodstep
Takes a step forward according to the action. Args: action: Chem.RWMol. The action is actually the target of the modification. Returns
contrib/MolDQN/environment.py:452
↓ 4 callersMethodget_valid_actions
Gets the valid actions for the state. In this design, we do not further modify a aromatic ring. For example, we do not change a benzene to a
contrib/MolDQN/environment.py:393
↓ 3 callersMethodload
(root)
torchchem/data/mol_dataset.py:92
↓ 3 callersFunctionlog
Print string if verbose.
torchchem/utils.py:7
↓ 3 callersFunctionone_of_k_encoding
Maps inputs to one hot vectors.
torchchem/data/mol_graph.py:39
↓ 3 callersFunctionsizeAttributeVectorsAtt
(bondtype_list_order, atomtype_list_order, molecular_a
torchchem/feat/neural_fp.py:562
↓ 2 callersMethod_goal_reached
Sets the termination criterion for molecule Generation. A child class can define this function to terminate the MDP before max_steps is reach
contrib/MolDQN/environment.py:438
↓ 2 callersFunctionconstruct_dataset
(x_all, y_all, target)
torchchem/models/data_utils.py:209
↓ 2 callersFunctionevaluate
(dataset, model)
examples/tox21_gcn.py:52
↓ 2 callersFunctionfillAtomType_dic
(rdmol, atomtype_dic)
torchchem/feat/neural_fp.py:626
↓ 2 callersFunctionfillBondType_dic
(rdmol, bondtype_dic)
torchchem/feat/neural_fp.py:603
↓ 2 callersMethodforward
(self, X, training=False)
torchchem/models/multitask_classification.py:88
↓ 2 callersFunctionget_bond_features
Generate feature vector for each bond: [bond type, if conjugated, if in ring, (chirality)] Parameters ---------- bond : r
torchchem/data/mol_graph.py:130
↓ 2 callersFunctionget_bond_features_length
Get length of bond features
torchchem/data/mol_graph.py:160
↓ 2 callersMethodinitialize
Resets the MDP to its initial state.
contrib/MolDQN/environment.py:385
↓ 2 callersFunctionmol_to_graph
Converts an RDKit molecule to a graph Parameters ---------- rdmol : rdkit.Chem.rdchem.Mol rdkit molecule class explicit_H : bool, opti
torchchem/data/mol_graph.py:319
↓ 2 callersFunctionsizeAttributeVectors
(bondtype_list_order, atomtype_list_order, molecular_attribu
torchchem/feat/neural_fp.py:545
↓ 1 callersMethod__init__
(self, input_length, output_length, device)
contrib/MolDQN/agent.py:49
↓ 1 callersMethod__init__
(self, n_node_features=45, n_tasks=1, n_conv_layers=2,
torchchem/models/graphconv.py:554
↓ 1 callersMethod__len__
(self)
torchchem/models/data_utils.py:228
↓ 1 callersFunction_atom_addition
Computes valid actions that involve adding atoms to the graph. Actions: * Add atom (with a bond connecting it to the existing graph) Each ad
contrib/MolDQN/environment.py:116
↓ 1 callersFunction_bond_addition
Computes valid actions that involve adding bonds to the graph. Actions (where allowed): * None->{single,double,triple} * single->{double,tr
contrib/MolDQN/environment.py:165
↓ 1 callersFunction_bond_removal
Computes valid actions that involve removing bonds from the graph. Actions (where allowed): * triple->{double,single,None} * double->{singl
contrib/MolDQN/environment.py:241
↓ 1 callersMethod_reward
Gets the reward for the state. A child class can redefine the reward function if reward other than zero is desired. Returns: Float
contrib/MolDQN/environment.py:427
↓ 1 callersMethodadd_training_cost
(self, outputs, labels, weights)
torchchem/models/model.py:199
↓ 1 callersFunctionatomAttributes
Returns a numpy array of attributes for an RDKit atom From ECFP defaults: <IdentifierConfiguration> <Property Name="AtomicNumber" Value="1"
torchchem/feat/neural_fp.py:488
↓ 1 callersFunctionattention
Compute 'Scaled Dot Product Attention
torchchem/models/transformer.py:259
↓ 1 callersFunctionbondAttributes
Returns a numpy array of attributes for an RDKit bond From Neural FP defaults: The bond features were a concatenation of whether the bond type wa
torchchem/feat/neural_fp.py:464
↓ 1 callersMethodbuild
(self)
torchchem/models/model.py:336
↓ 1 callersMethodcost
(self, logit, label, weight)
torchchem/models/model.py:342
↓ 1 callersMethoddump_as_matrices_Att
(self)
torchchem/feat/neural_fp.py:158
↓ 1 callersMethoddump_as_matrices_Att_dummyNode
(self)
torchchem/feat/neural_fp.py:232
↓ 1 callersMethodencode
(self, src, src_mask, adj_matrix, distances_matrix, edges_att)
torchchem/models/transformer.py:81
↓ 1 callersFunctionfind_distance
Calculate graph distance between atom a1 with the remaining atoms using BFS
torchchem/data/mol_graph.py:247
↓ 1 callersMethodforward
(self, x)
contrib/MolDQN/dqn.py:19
↓ 1 callersMethodforward
(self, data)
torchchem/models/graphconv.py:595
↓ 1 callersMethodforward
(self, X, training=False)
torchchem/models/multitask_regression.py:86
↓ 1 callersMethodforward
(self, X, training=False)
torchchem/models/model.py:339
↓ 1 callersFunctionfrom_one_hot
Transorms label vector from one-hot encoding. y: np.ndarray A vector of shape [n_samples, num_classes]
torchchem/utils.py:13
↓ 1 callersMethodget
Fetch the idx-th graph from cache Parameters ---------- idx : int indice Returns ------- tg.data.Data
torchchem/data/mol_dataset.py:166
↓ 1 callersMethodget_action
(self, observations, epsilon_threshold)
contrib/MolDQN/agent.py:61
↓ 1 callersFunctionget_adjacency_list
Generate adjacency list for molecule
torchchem/data/mol_graph.py:169
↓ 1 callersFunctionget_atom_features
Generate feature vector for each atom: [atom type, degree (number of neighbors), valence, hybridization state, formal charg
torchchem/data/mol_graph.py:60
↓ 1 callersFunctionget_atom_features_length
Get length of atom features
torchchem/data/mol_graph.py:119
↓ 1 callersFunctionget_largest_ring_size
Calculates the largest ring size in the molecule. Refactored from https://github.com/wengong-jin/icml18-jtnn/blob/master/bo/run_bo.py Args:
contrib/MolDQN/utils.py:99
↓ 1 callersFunctionget_molecular_attributes
Molecular attributes calculated as: [Crippen contribution to logp, Crippen contribution to mr, TPSA contribution, Labute ASA con
torchchem/data/mol_graph.py:268
↓ 1 callersFunctionget_pair_features
Generate feature vector for each atom-atom pair: [bond features, if in the same ring, graph distance/catesian distance] Parameters
torchchem/data/mol_graph.py:181
↓ 1 callersMethodget_training_op
Get training op for applying gradients to variables. Subclasses that need to do anything fancy with gradients should override this method.
torchchem/models/model.py:212
↓ 1 callersFunctionget_valid_actions
Computes the set of valid actions for a given state. Args: state: String SMILES; the current state. If None or the empty string, we assum
contrib/MolDQN/environment.py:50
↓ 1 callersFunctionload_data_from_smiles
(smiles, labels, target, bondtyp
torchchem/models/data_utils.py:67
↓ 1 callersFunctionmake_model
Helper: Construct a model from hyperparameters.
torchchem/models/transformer.py:15
↓ 1 callersMethodnodeNeighbors
(self)
torchchem/feat/neural_fp.py:47
↓ 1 callersMethodpredict
(self, data)
torchchem/models/graphconv.py:614
↓ 1 callersMethodpredict
(self, out, out_mask)
torchchem/models/transformer.py:85
↓ 1 callersMethodpredict
Uses self to make predictions on provided Dataset object. Returns: y_pred: numpy ndarray of shape (n_samples,)
torchchem/models/model.py:87
↓ 1 callersMethodpredict_on_batch
(self, X_batch)
torchchem/models/model.py:345
↓ 1 callersMethodpredict_proba_on_batch
(self, X_batch)
torchchem/models/model.py:348
↓ 1 callersMethodsave
Dispatcher function for saving. Each subclass is responsible for overriding this method.
torchchem/models/model.py:74
↓ 1 callersFunctionsizeAttributeVector
(molecular_attributes=False, formal_charge_one_hot=False)
torchchem/feat/neural_fp.py:532
↓ 1 callersFunctiontest
(test_X, test_y)
contrib/ElemNet/train.py:68
↓ 1 callersFunctiontrain
(train_X, train_y)
contrib/ElemNet/train.py:30
↓ 1 callersMethodtrain_epoch
(self, dataset, batch_size=32, shuffle=True)
torchchem/models/graphconv.py:642
↓ 1 callersMethodupdate_cache
Add a batch of graphs into cache Parameters ---------- file_path : str File path of the cached data batch.
torchchem/data/mol_dataset.py:146
↓ 1 callersMethodupdate_params
(self, batch_size, gamma, polyak)
contrib/MolDQN/agent.py:71
↓ 1 callersFunctionxavier_normal_small_init_
(tensor, gain=1.)
torchchem/models/utils.py:28
↓ 1 callersFunctionxavier_uniform_small_init_
(tensor, gain=1.)
torchchem/models/utils.py:36
Method__del__
(self)
torchchem/models/model.py:44
Method__getitem__
Triggered when you call dataset[i]
torchchem/models/data_utils.py:231
Method__init__
(self, input_size)
contrib/ElemNet/model.py:8
Method__init__
Initializes the parameters for the MDP. Internal state will be stored as SMILES strings. Args: atom_types: The set of elements the mol
contrib/MolDQN/environment.py:313
Method__init__
Initializes the class. Args: discount_factor: Float. The discount factor. We only care about the molecule at the end of modificatio
contrib/MolDQN/agent.py:19
Method__init__
(self, input_length, output_length)
contrib/MolDQN/dqn.py:8
Method__init__
Molecule dataset Parameters ---------- mol_graphs : list of tg.data.Data, optional Molecular graphs data_batch_size : int,
torchchem/data/mol_dataset.py:20
Method__init__
(self)
torchchem/feat/neural_fp.py:26
Method__init__
(self, i=None, attributes=np.array([], dtype=att_dtype), attribut
torchchem/feat/neural_fp.py:318
Method__init__
(self, connects=(), i=None, attributes=np.array([], dtype=att_dty
torchchem/feat/neural_fp.py:334
Method__init__
(self)
torchchem/models/graphconv.py:540
Method__init__
(self, net, criterion=WeightedBCEWithLogits(), lr=0.001,
torchchem/models/graphconv.py:623
Method__init__
(self, x, label, target, index)
torchchem/models/data_utils.py:195
Method__init__
@param data_list: list of MolDatum
torchchem/models/data_utils.py:222
Method__init__
Constructs the computational graph. This function constructs the computational graph for the model. It relies subclassed methods (build/co
torchchem/models/multitask_classification.py:13
Method__init__
(self, encoder, src_embed, generator)
torchchem/models/transformer.py:69
Method__init__
(self, d_model, aggregation_type='mean', n_output=1,
torchchem/models/transformer.py:92
Method__init__
(self, d_model)
torchchem/models/transformer.py:134
Method__init__
(self, features, eps=1e-6)
torchchem/models/transformer.py:172
Method__init__
(self, scale, eps=1e-5)
torchchem/models/transformer.py:188
Method__init__
(self, size, dropout, scale_norm, use_adapter)
torchchem/models/transformer.py:204
Method__init__
(self, size, self_attn, feed_forward, dropout, scale_norm, use_adapter)
torchchem/models/transformer.py:221
Method__init__
(self, d_model, d_edge, h, dropout)
torchchem/models/transformer.py:244
Method__init__
Take in model size and number of heads.
torchchem/models/transformer.py:310
Method__init__
(self, d_model, N_dense, dropout=0.1, leaky_relu_s
torchchem/models/transformer.py:410
Method__init__
(self, d_model, d_atom, dropout)
torchchem/models/transformer.py:449
Method__init__
Constructs the computational graph. This function constructs the computational graph for the model. It relies subclassed methods (build/cost)
torchchem/models/multitask_regression.py:12
next →1–100 of 169, ranked by callers