gflownet.utils.molecule.conformer_base

Attributes

rmol

Classes

ConformerBase

Functions

get_torsion_angles_atoms_list(mol)

get_torsion_angles_values(conf, torsion_angles_atoms_list)

get_all_torsion_angles(mol, conf)

get_dummy_ad_atom_positions()

get_dummy_ad_conf_base()

Module Contents

gflownet.utils.molecule.conformer_base.get_torsion_angles_atoms_list(mol)[source]
gflownet.utils.molecule.conformer_base.get_torsion_angles_values(conf, torsion_angles_atoms_list)[source]
gflownet.utils.molecule.conformer_base.get_all_torsion_angles(mol, conf)[source]
gflownet.utils.molecule.conformer_base.get_dummy_ad_atom_positions()[source]
gflownet.utils.molecule.conformer_base.get_dummy_ad_conf_base()[source]
class gflownet.utils.molecule.conformer_base.ConformerBase(atom_positions, smiles, freely_rotatable_tas=None)[source]
Parameters:

atom_positions – numpy.ndarray of shape [num_atoms, 3] of dtype float64

smiles[source]
rdk_mol[source]
rdk_conf[source]
freely_rotatable_tas = None[source]
__deepcopy__(memo)[source]
get_mol_from_smiles(smiles)[source]

Create RDKit molecule from SMILES string :param smiles: python string :returns: rdkit.Chem.rdchem.Mol object

embed_mol_and_get_conformer(mol, extra_opt=False)[source]

Embed RDkit mol with a conformer and return the RDKit conformer object (which is synchronized with the RDKit molecule object) :param mol: rdkit.Chem.rdchem.Mol object defining the molecule :param extre_opt: bool, if True, an additional optimisation of the conformer will be performed

set_atom_positions(atom_positions)[source]

Set atom positions of the self.rdk_conf to the input atom_positions values :param atom_positions: 2d numpy array of shape [num atoms, 3] with new atom positions

get_atom_positions()[source]
Returns:

numpy array of atom positions of shape [num_atoms, 3]

get_atomic_numbers()[source]

Get atomic numbers of the atoms as 1d numpy array :returns: numpy array of atomic numbers of shape [num_atoms,]

get_n_atoms()[source]
set_torsion_angle(torsion_angle, value)[source]
get_all_torsion_angles()[source]
Returns:

a dict of all tostion angles in the molecule with their values

get_freely_rotatable_tas_values()[source]
Returns:

a list of values of self.freely_rotatable_tas

randomize_freely_rotatable_tas()[source]

Uniformly randomize torsion angles defined by self.freely_rotatable_tas

increment_torsion_angle(torsion_angle, increment)[source]
Parameters:
  • torsion_angle – tuple of 4 integers defining the torsion angle

  • increment – a float value of the increment of the angle (in radians)

gflownet.utils.molecule.conformer_base.rmol[source]