gflownet.utils.molecule.conformer
Attributes
Classes
Module Contents
- class gflownet.utils.molecule.conformer.Conformer(atom_positions, smiles, atom_types, freely_rotatable_tas=None)[source]
Bases:
gflownet.utils.molecule.conformer_base.ConformerBase- Parameters:
atom_positions – numpy.ndarray of shape [num_atoms, 3] of dtype float64
- set_atom_positions_dgl(atom_positions)[source]
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 new atom positions
- apply_actions(actions)[source]
Apply torsion angles updates defined by agent’s actions :param actions: a sequence of torsion angle updates of length = number of bonds in the molecule. The order corresponds to the order of edges in self.dgl_graph, such that action[i] is an update for the torsion angle corresponding to the edge[2i]
- get_ta_index_in_dgl_graph(torsion_angle)[source]
Get an index in the dgl graph of the first edge corresponding to the input torsion_angle :param torsion_angle: tuple of 4 integers defining torsion angle (these integers are indexes of the atoms in both self.rdk_mol and self.dgl_graph) :returns: int, index of the torsion_angle’s edge in self.dgl_graph