Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alexhernandezgarcia/gflownet
/ functions
Functions
481 in github.com/alexhernandezgarcia/gflownet
⨍
Functions
481
◇
Types & classes
47
↓ 47 callers
Method
copy
(self)
gflownet/envs/base.py:71
↓ 18 callers
Method
step
Executes step given an action. Args ---- action : tuple Action to be executed. An action is a tuple int
gflownet/envs/grid.py:315
↓ 17 callers
Method
train
(self)
gflownet/gflownet.py:696
↓ 15 callers
Method
load
()
gflownet/envs/base.py:758
↓ 14 callers
Method
parameters
(self)
gflownet/gflownet.py:201
↓ 11 callers
Method
plot
(self, x_sampled, kde_pred, kde_true, **plot_kwargs)
gflownet/gflownet.py:936
↓ 10 callers
Method
get_parents
Determines all parents and actions that lead to state. Args ---- state : list Representation of a state,
gflownet/envs/grid.py:270
↓ 10 callers
Method
min
(self)
gflownet/proxy/torus.py:17
↓ 9 callers
Method
_tfloat
(self, x)
gflownet/gflownet.py:183
↓ 8 callers
Method
sample
( self, )
gflownet/envs/base.py:740
↓ 7 callers
Method
_tbool
(self, x)
gflownet/gflownet.py:198
↓ 7 callers
Method
get_atom_positions
:returns: numpy array of atom positions of shape [num_atoms, 3]
gflownet/utils/molecule/conformer_base.py:88
↓ 7 callers
Method
get_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 callers
Method
get_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 callers
Method
log_metrics
(self, metrics: dict, step: int = None, use_context: bool = True)
gflownet/utils/logger.py:236
↓ 7 callers
Method
reset
Resets the environment.
gflownet/envs/grid.py:260
↓ 7 callers
Method
state2oracle
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 callers
Function
filterDuplicateSamples
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 callers
Method
nupackScore
( self, queries, returnFunc="energy", energy_weighting=False, motif=None )
gflownet/utils/oracle.py:515
↓ 6 callers
Method
state2oracle
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 callers
Method
statetorch2policy
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 callers
Method
copy
(self)
gflownet/envs/htorus.py:79
↓ 5 callers
Method
get_atomic_numbers
(self, mol)
gflownet/utils/molecule/featurizer.py:91
↓ 5 callers
Method
get_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 callers
Method
proxy2reward
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 callers
Method
sample_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 callers
Method
__init__
(self, x, y)
playground/botorch/mes_var_deepKernel.py:23
↓ 4 callers
Method
get_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 callers
Method
numbers2letters
Converts numerical values to ATGC-format :param sequences: numerical DNA sequences to be converted :return: DNA sequences in
gflownet/utils/oracle.py:467
↓ 4 callers
Function
numpy2python
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 callers
Method
one_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 callers
Method
setup
(self)
gflownet/proxy/corners.py:18
↓ 4 callers
Method
state2readable
Converts a state into human-readable representation.
gflownet/envs/base.py:283
↓ 4 callers
Method
state2readable
Converts a state (a list of positions) into a human-readable string representing a state.
gflownet/envs/grid.py:244
↓ 4 callers
Method
step
Executes the actions of a list on the environments of a list. Args ---- envs : list of GFlowNetEnv or derived
gflownet/gflownet.py:291
↓ 4 callers
Method
sync_conformer_with_state
(self, state: List = None)
gflownet/envs/alaninedipeptide.py:69
↓ 4 callers
Function
torch2np
(x)
gflownet/utils/common.py:26
↓ 3 callers
Method
_tlong
(self, x)
gflownet/gflownet.py:192
↓ 3 callers
Function
binaryDistance
compute simple sum of distances between sample vectors: distance = disagreement of allele elements. :param samples: :return:
gflownet/utils/legacy.py:220
↓ 3 callers
Method
do_test
(self, step)
gflownet/utils/logger.py:124
↓ 3 callers
Method
get_all_terminating_states
(self)
gflownet/envs/grid.py:362
↓ 3 callers
Function
get_all_torsion_angles
(mol, conf)
gflownet/utils/molecule/conformer_base.py:23
↓ 3 callers
Method
get_all_torsion_angles
:returns: a dict of all tostion angles in the molecule with their values
gflownet/utils/molecule/conformer_base.py:106
↓ 3 callers
Function
get_dummy_ad_conf_base
()
gflownet/utils/molecule/conformer_base.py:37
↓ 3 callers
Method
get_grid_terminating_states
(self, n_states: int)
gflownet/envs/plane.py:469
↓ 3 callers
Method
log_metric
(self, key: str, value, step=None, use_context=True)
gflownet/utils/logger.py:192
↓ 3 callers
Method
randomize_freely_rotatable_tas
Uniformly randomize torsion angles defined by self.freely_rotatable_tas
gflownet/utils/molecule/conformer_base.py:118
↓ 3 callers
Method
readable2state
Converts a human-readable string representing a state into a state as a list of positions.
gflownet/envs/grid.py:237
↓ 3 callers
Method
reward_torchbatch
Computes the rewards of a batch of states in "GFlownet format"
gflownet/envs/base.py:178
↓ 3 callers
Method
sample_actions
Samples one action on each environment of a list. Args ---- envs : list of GFlowNetEnv or derived A list
gflownet/gflownet.py:211
↓ 3 callers
Method
save
( self, )
gflownet/envs/base.py:752
↓ 3 callers
Function
set_device
(device: str)
gflownet/utils/common.py:8
↓ 3 callers
Function
set_float_precision
(precision: int)
gflownet/utils/common.py:15
↓ 3 callers
Method
statebatch2proxy
Prepares a batch of states in "GFlowNet format" for the proxy. Args ---- state : list A state
gflownet/envs/base.py:115
↓ 2 callers
Method
PottsEnergyNew
(self, sequences)
gflownet/utils/oracle.py:403
↓ 2 callers
Method
__init__
(self, gp, trainX, trainY)
playground/botorch/mes_exact_deepKernel.py:144
↓ 2 callers
Method
_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 callers
Function
_update_config
(arg, val, config, override=False)
gflownet/utils/legacy.py:31
↓ 2 callers
Function
bracket_dot_to_num
convert from (((...))) notation to 111222333
gflownet/utils/legacy.py:934
↓ 2 callers
Method
compute_stats
(self, data)
gflownet/envs/base.py:731
↓ 2 callers
Function
download_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 callers
Method
end
(self)
gflownet/utils/logger.py:417
↓ 2 callers
Method
fit_kde
(x, kernel="exponential", bandwidth=0.1)
gflownet/envs/torus.py:129
↓ 2 callers
Method
getScore
(self, queries)
gflownet/utils/oracle.py:226
↓ 2 callers
Method
get_all_terminating_states
(self)
gflownet/envs/torus.py:415
↓ 2 callers
Function
get_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 callers
Method
get_distance
(self, seq1, seq2)
gflownet/envs/sequence.py:520
↓ 2 callers
Method
get_energy
Compute energy of a molecule defined by atom_positions and atomic_numbers
gflownet/oracle/molecule.py:23
↓ 2 callers
Method
get_freely_rotatable_tas_values
:returns: a list of values of self.freely_rotatable_tas
gflownet/utils/molecule/conformer_base.py:112
↓ 2 callers
Method
get_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 callers
Method
get_logprobs
Computes log probabilities of actions given policy outputs and actions.
gflownet/envs/plane.py:351
↓ 2 callers
Method
get_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 callers
Method
get_parents
Determines all parents and actions that lead to state. Args ---- state : list Representation of a state
gflownet/envs/base.py:313
↓ 2 callers
Method
get_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 callers
Method
get_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 callers
Function
get_torsion_angles_values
(conf, torsion_angles_atoms_list)
gflownet/utils/molecule/conformer_base.py:16
↓ 2 callers
Method
increment_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 callers
Method
initializeDataset
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 callers
Method
logq
(self, traj_list, actions_list, model, env, loginf=1000)
gflownet/gflownet.py:1057
↓ 2 callers
Function
main
(config)
main.py:14
↓ 2 callers
Method
make_data_set
Constructs a data set as a DataFrame according to the configuration.
gflownet/envs/base.py:690
↓ 2 callers
Method
mol2dgl
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 callers
Function
namespace2dict
Recursively converts a dictionary and its internal dictionaries into an argparse.Namespace Parameters ---------- data_dict : dic
gflownet/utils/legacy.py:859
↓ 2 callers
Function
numpy_fillna
(data)
gflownet/utils/legacy.py:323
↓ 2 callers
Method
plot_kde
( self, kde, alpha=0.5, low=-np.pi * 0.5, high=2.5 * np.pi, dp
gflownet/envs/htorus.py:637
↓ 2 callers
Function
printRecord
print a string to command line output and a text file :param statement: :return:
gflownet/utils/legacy.py:75
↓ 2 callers
Function
proxy
()
tests/gflownet/proxy/test_molecule.py:11
↓ 2 callers
Method
reward_batch
Sets the reward to min_reward if any value of the state is larger than max_val.
gflownet/envs/plane.py:100
↓ 2 callers
Method
save_models
( self, forward_policy, backward_policy, step: int = 1e9, final=False )
gflownet/utils/logger.py:391
↓ 2 callers
Method
score
assign correct scores to selected sequences :param queries: sequences to be scored :return: computed scores
gflownet/utils/oracle.py:199
↓ 2 callers
Method
set_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 callers
Method
set_backward_policy_ckpt_path
(self, ckpt_id: str = None)
gflownet/utils/logger.py:176
↓ 2 callers
Function
set_device
(device: str)
scripts/eval_gflownet.py:38
↓ 2 callers
Method
set_forward_policy_ckpt_path
(self, ckpt_id: str = None)
gflownet/utils/logger.py:167
↓ 2 callers
Method
set_n_dim
(self, n_dim)
gflownet/proxy/torus.py:13
↓ 2 callers
Method
set_state
Sets the state and done of an environment.
gflownet/envs/base.py:508
↓ 2 callers
Method
set_torsion_angle
(self, torsion_angle, value)
gflownet/utils/molecule/conformer_base.py:103
↓ 2 callers
Method
state2oracle
(self, state: List = None)
gflownet/envs/sequence.py:316
↓ 2 callers
Method
state2policy
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 callers
Method
state2policy
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