MCPcopy Create free account

hub / github.com/alexhernandezgarcia/gflownet / functions

Functions481 in github.com/alexhernandezgarcia/gflownet

↓ 47 callersMethodcopy
(self)
gflownet/envs/base.py:71
↓ 18 callersMethodstep
Executes step given an action. Args ---- action : tuple Action to be executed. An action is a tuple int
gflownet/envs/grid.py:315
↓ 17 callersMethodtrain
(self)
gflownet/gflownet.py:696
↓ 15 callersMethodload
()
gflownet/envs/base.py:758
↓ 14 callersMethodparameters
(self)
gflownet/gflownet.py:201
↓ 11 callersMethodplot
(self, x_sampled, kde_pred, kde_true, **plot_kwargs)
gflownet/gflownet.py:936
↓ 10 callersMethodget_parents
Determines all parents and actions that lead to state. Args ---- state : list Representation of a state,
gflownet/envs/grid.py:270
↓ 10 callersMethodmin
(self)
gflownet/proxy/torus.py:17
↓ 9 callersMethod_tfloat
(self, x)
gflownet/gflownet.py:183
↓ 8 callersMethodsample
( self, )
gflownet/envs/base.py:740
↓ 7 callersMethod_tbool
(self, x)
gflownet/gflownet.py:198
↓ 7 callersMethodget_atom_positions
:returns: numpy array of atom positions of shape [num_atoms, 3]
gflownet/utils/molecule/conformer_base.py:88
↓ 7 callersMethodget_fixed_policy_output
Defines the structure of the output of the policy model, from which an action is to be determined or sampled, by returning a vector w
gflownet/envs/plane.py:129
↓ 7 callersMethodget_mask_invalid_actions_forward
Returns a vector of length the action space + 1: True if forward action is invalid given the current state, False otherwise.
gflownet/envs/grid.py:87
↓ 7 callersMethodlog_metrics
(self, metrics: dict, step: int = None, use_context: bool = True)
gflownet/utils/logger.py:236
↓ 7 callersMethodreset
Resets the environment.
gflownet/envs/grid.py:260
↓ 7 callersMethodstate2oracle
Prepares a list of states in "GFlowNet format" for the oracles: a list of length n_dim with values in the range [cell_min, cell_max]
gflownet/envs/torus_rounds.py:140
↓ 6 callersFunctionfilterDuplicateSamples
assumes original dataset contains no duplicates :param samples: must be np array padded to equal length. If a combination of new and original
gflownet/utils/legacy.py:336
↓ 6 callersMethodnupackScore
( self, queries, returnFunc="energy", energy_weighting=False, motif=None )
gflownet/utils/oracle.py:515
↓ 6 callersMethodstate2oracle
Prepares a state in "GFlowNet format" for the oracles: a list of length n_dim with values in the range [cell_min, cell_max] for each
gflownet/envs/grid.py:126
↓ 6 callersMethodstatetorch2policy
Transforms a batch of states into a one-hot encoding. The output is a numpy array of shape [n_states, length * n_dim]. See s
gflownet/envs/grid.py:205
↓ 5 callersMethodcopy
(self)
gflownet/envs/htorus.py:79
↓ 5 callersMethodget_atomic_numbers
(self, mol)
gflownet/utils/molecule/featurizer.py:91
↓ 5 callersMethodget_mask_invalid_actions
Returns a vector of length the action space + 1: True if forward action is invalid given the current state, False otherwise.
gflownet/envs/crystals.py:124
↓ 5 callersMethodproxy2reward
Prepares the output of an oracle for GFlowNet: the inputs proxy_vals is expected to be a negative value (energy), unless self.denorm_
gflownet/envs/base.py:193
↓ 5 callersMethodsample_batch
Builds a batch of data if train == True: Each item in the batch is a list of 7 elements (all tensors): -
gflownet/gflownet.py:335
↓ 4 callersMethod__init__
(self, x, y)
playground/botorch/mes_var_deepKernel.py:23
↓ 4 callersMethodget_actions_space
Constructs list with all possible actions. An action is described by a tuple (element, n), indicating that the count of element will
gflownet/envs/crystals.py:108
↓ 4 callersMethodnumbers2letters
Converts numerical values to ATGC-format :param sequences: numerical DNA sequences to be converted :return: DNA sequences in
gflownet/utils/oracle.py:467
↓ 4 callersFunctionnumpy2python
Recursively converts the numpy types into native Python types in order to enable proper dumping into YAML files: Parameters --------
gflownet/utils/legacy.py:884
↓ 4 callersMethodone_hot_encode
Creates a one-hot encoding vector. :param value: The value for which the encoding should be one :param choices: A list of pos
gflownet/utils/molecule/featurizer.py:16
↓ 4 callersMethodsetup
(self)
gflownet/proxy/corners.py:18
↓ 4 callersMethodstate2readable
Converts a state into human-readable representation.
gflownet/envs/base.py:283
↓ 4 callersMethodstate2readable
Converts a state (a list of positions) into a human-readable string representing a state.
gflownet/envs/grid.py:244
↓ 4 callersMethodstep
Executes the actions of a list on the environments of a list. Args ---- envs : list of GFlowNetEnv or derived
gflownet/gflownet.py:291
↓ 4 callersMethodsync_conformer_with_state
(self, state: List = None)
gflownet/envs/alaninedipeptide.py:69
↓ 4 callersFunctiontorch2np
(x)
gflownet/utils/common.py:26
↓ 3 callersMethod_tlong
(self, x)
gflownet/gflownet.py:192
↓ 3 callersFunctionbinaryDistance
compute simple sum of distances between sample vectors: distance = disagreement of allele elements. :param samples: :return:
gflownet/utils/legacy.py:220
↓ 3 callersMethoddo_test
(self, step)
gflownet/utils/logger.py:124
↓ 3 callersMethodget_all_terminating_states
(self)
gflownet/envs/grid.py:362
↓ 3 callersFunctionget_all_torsion_angles
(mol, conf)
gflownet/utils/molecule/conformer_base.py:23
↓ 3 callersMethodget_all_torsion_angles
:returns: a dict of all tostion angles in the molecule with their values
gflownet/utils/molecule/conformer_base.py:106
↓ 3 callersFunctionget_dummy_ad_conf_base
()
gflownet/utils/molecule/conformer_base.py:37
↓ 3 callersMethodget_grid_terminating_states
(self, n_states: int)
gflownet/envs/plane.py:469
↓ 3 callersMethodlog_metric
(self, key: str, value, step=None, use_context=True)
gflownet/utils/logger.py:192
↓ 3 callersMethodrandomize_freely_rotatable_tas
Uniformly randomize torsion angles defined by self.freely_rotatable_tas
gflownet/utils/molecule/conformer_base.py:118
↓ 3 callersMethodreadable2state
Converts a human-readable string representing a state into a state as a list of positions.
gflownet/envs/grid.py:237
↓ 3 callersMethodreward_torchbatch
Computes the rewards of a batch of states in "GFlownet format"
gflownet/envs/base.py:178
↓ 3 callersMethodsample_actions
Samples one action on each environment of a list. Args ---- envs : list of GFlowNetEnv or derived A list
gflownet/gflownet.py:211
↓ 3 callersMethodsave
( self, )
gflownet/envs/base.py:752
↓ 3 callersFunctionset_device
(device: str)
gflownet/utils/common.py:8
↓ 3 callersFunctionset_float_precision
(precision: int)
gflownet/utils/common.py:15
↓ 3 callersMethodstatebatch2proxy
Prepares a batch of states in "GFlowNet format" for the proxy. Args ---- state : list A state
gflownet/envs/base.py:115
↓ 2 callersMethodPottsEnergyNew
(self, sequences)
gflownet/utils/oracle.py:403
↓ 2 callersMethod__init__
(self, gp, trainX, trainY)
playground/botorch/mes_exact_deepKernel.py:144
↓ 2 callersMethod_can_produce_neutral_charge
Helper that checks whether there is a configuration of oxidation states that can produce a neutral charge for the given state.
gflownet/envs/crystals.py:340
↓ 2 callersFunction_update_config
(arg, val, config, override=False)
gflownet/utils/legacy.py:31
↓ 2 callersFunctionbracket_dot_to_num
convert from (((...))) notation to 111222333
gflownet/utils/legacy.py:934
↓ 2 callersMethodcompute_stats
(self, data)
gflownet/envs/base.py:731
↓ 2 callersFunctiondownload_file_if_not_exists
Download a file from google drive if path doestn't exist. url should be in the format: https://drive.google.com/uc?id=FILE_ID
gflownet/utils/common.py:48
↓ 2 callersMethodend
(self)
gflownet/utils/logger.py:417
↓ 2 callersMethodfit_kde
(x, kernel="exponential", bandwidth=0.1)
gflownet/envs/torus.py:129
↓ 2 callersMethodgetScore
(self, queries)
gflownet/utils/oracle.py:226
↓ 2 callersMethodget_all_terminating_states
(self)
gflownet/envs/torus.py:415
↓ 2 callersFunctionget_config
Combines YAML configuration file, command line arguments and default arguments into a single configuration dictionary. - Values in YAML
gflownet/utils/legacy.py:18
↓ 2 callersMethodget_distance
(self, seq1, seq2)
gflownet/envs/sequence.py:520
↓ 2 callersMethodget_energy
Compute energy of a molecule defined by atom_positions and atomic_numbers
gflownet/oracle/molecule.py:23
↓ 2 callersMethodget_freely_rotatable_tas_values
:returns: a list of values of self.freely_rotatable_tas
gflownet/utils/molecule/conformer_base.py:112
↓ 2 callersMethodget_log_corr
Kept as a function variable of GflowNetAgent because logq calculation requires tfloat and tbool member functions of GflowNet
gflownet/gflownet.py:981
↓ 2 callersMethodget_logprobs
Computes log probabilities of actions given policy outputs and actions.
gflownet/envs/plane.py:351
↓ 2 callersMethodget_mask_invalid_actions_backward
Returns a vector with the length of the discrete part of the action space + 1: True if action is invalid going backward given the cur
gflownet/envs/plane.py:175
↓ 2 callersMethodget_parents
Determines all parents and actions that lead to state. Args ---- state : list Representation of a state
gflownet/envs/base.py:313
↓ 2 callersMethodget_policy_output
Defines the structure of the output of the policy model, from which an action is to be determined or sampled, by returning a vector w
gflownet/envs/htorus.py:93
↓ 2 callersMethodget_ta_index_in_dgl_graph
Get an index in the dgl graph of the first edge corresponding to the input torsion_angle :param torsion_angle: tuple of 4 integers de
gflownet/utils/molecule/conformer.py:58
↓ 2 callersFunctionget_torsion_angles_values
(conf, torsion_angles_atoms_list)
gflownet/utils/molecule/conformer_base.py:16
↓ 2 callersMethodincrement_torsion_angle
:param torsion_angle: tuple of 4 integers defining the torsion angle :param increment: a float value of the increment of the angle (i
gflownet/utils/molecule/conformer_base.py:126
↓ 2 callersMethodinitializeDataset
generate an initial toy dataset with a given number of samples need an extra factor to speed it up (duplicate filtering is very slow)
gflownet/utils/oracle.py:129
↓ 2 callersMethodlogq
(self, traj_list, actions_list, model, env, loginf=1000)
gflownet/gflownet.py:1057
↓ 2 callersFunctionmain
(config)
main.py:14
↓ 2 callersMethodmake_data_set
Constructs a data set as a DataFrame according to the configuration.
gflownet/envs/base.py:690
↓ 2 callersMethodmol2dgl
Converts rdkit.Chem.rdchem.Mol to dgl.heterograph.DGLHeteroGraph. Takes into account chemical properties of atoms and bonds, without
gflownet/utils/molecule/featurizer.py:95
↓ 2 callersFunctionnamespace2dict
Recursively converts a dictionary and its internal dictionaries into an argparse.Namespace Parameters ---------- data_dict : dic
gflownet/utils/legacy.py:859
↓ 2 callersFunctionnumpy_fillna
(data)
gflownet/utils/legacy.py:323
↓ 2 callersMethodplot_kde
( self, kde, alpha=0.5, low=-np.pi * 0.5, high=2.5 * np.pi, dp
gflownet/envs/htorus.py:637
↓ 2 callersFunctionprintRecord
print a string to command line output and a text file :param statement: :return:
gflownet/utils/legacy.py:75
↓ 2 callersFunctionproxy
()
tests/gflownet/proxy/test_molecule.py:11
↓ 2 callersMethodreward_batch
Sets the reward to min_reward if any value of the state is larger than max_val.
gflownet/envs/plane.py:100
↓ 2 callersMethodsave_models
( self, forward_policy, backward_policy, step: int = 1e9, final=False )
gflownet/utils/logger.py:391
↓ 2 callersMethodscore
assign correct scores to selected sequences :param queries: sequences to be scored :return: computed scores
gflownet/utils/oracle.py:199
↓ 2 callersMethodset_atom_positions_dgl
Set atom positions of the self.dgl_graph to the input atom_positions values :param atom_positions: 2d numpy array of shape [num atoms, 3] with
gflownet/utils/molecule/conformer.py:36
↓ 2 callersMethodset_backward_policy_ckpt_path
(self, ckpt_id: str = None)
gflownet/utils/logger.py:176
↓ 2 callersFunctionset_device
(device: str)
scripts/eval_gflownet.py:38
↓ 2 callersMethodset_forward_policy_ckpt_path
(self, ckpt_id: str = None)
gflownet/utils/logger.py:167
↓ 2 callersMethodset_n_dim
(self, n_dim)
gflownet/proxy/torus.py:13
↓ 2 callersMethodset_state
Sets the state and done of an environment.
gflownet/envs/base.py:508
↓ 2 callersMethodset_torsion_angle
(self, torsion_angle, value)
gflownet/utils/molecule/conformer_base.py:103
↓ 2 callersMethodstate2oracle
(self, state: List = None)
gflownet/envs/sequence.py:316
↓ 2 callersMethodstate2policy
Transforms the state given as argument (or self.state if None) into a one-hot encoding. The output is a list of len n_angles * n_dim,
gflownet/envs/torus_rounds.py:152
↓ 2 callersMethodstate2policy
Transforms the state given as argument (or self.state if None) into a one-hot encoding. The output is a list of len length * n_dim,
gflownet/envs/grid.py:172
next →1–100 of 481, ranked by callers