Molecule Config Generators
Functions for generating MolConfig objects given an input molecule.
- conformer_rl.molecule_generation.generate_molecule_config.config_from_molFile(file: str, num_conformers: int, calc_normalizers: bool = False, pruning_thresh: float = 0.05, save_file: str = '') conformer_rl.config.mol_config.MolConfig
Generates a
MolConfigobject for a molecule specified by the location of a MOL file containing the molecule.- Parameters
file (str) – Name of the MOL file containing the molecule to be converted into a
MolConfigobject.num_conformers (int) – Number of conformers to be generated. This parameter is also used for calculating normalizers.
calc_normalizers (bool) – Whether to calculate normalizing constants used in the Gibbs score reward. See
MolConfigfor more details.pruning_thresh (float) – Torsional fingerprint distance (TFD) threshold for pruning similar conformers when calculating normalizers. This parameter is only used for calculating normalizers and is ignored if
calc_normalizersis set toFalse.save_file (str) – If not set to an empty string, the generated config object will be saved as a pickle (.pkl) file with the filename set to this parameter.
- Returns
A
MolConfigobject configured with the input molecule, as well as normalizing constants ifcalc_normalizersis set toTrue.- Return type
- conformer_rl.molecule_generation.generate_molecule_config.config_from_smiles(smiles: str, num_conformers: int, calc_normalizers: bool = False, pruning_thresh: float = 0.05, save_file: str = '') conformer_rl.config.mol_config.MolConfig
Generates a
MolConfigobject for a molecule specified by a SMILES string.- Parameters
smiles (str) – A SMILES string representing the molecule.
num_conformers (int) – Number of conformers to be generated. This parameter is also used for calculating normalizers.
calc_normalizers (bool) – Whether to calculate normalizing constants used in the Gibbs score reward. See
MolConfigfor more details.pruning_thresh (float) – Torsional fingerprint distance (TFD) threshold for pruning similar conformers when calculating normalizers. This parameter is only used for calculating normalizers and is ignored if
calc_normalizersis set toFalse.save_file (str) – If not set to an empty string, the generated config object will be saved as a pickle (.pkl) file with the filename set to this parameter.
- Returns
A
MolConfigobject configured with the input molecule, as well as normalizing constants ifcalc_normalizersis set toTrue.- Return type
- conformer_rl.molecule_generation.generate_molecule_config.config_from_rdkit(mol: rdkit.Chem.rdchem.Mol, num_conformers: int, calc_normalizers: bool = False, pruning_thresh: float = 0.05, save_file: str = '') conformer_rl.config.mol_config.MolConfig
Generates a
MolConfigobject for a molecule specified by an rdkit molecule object.- Parameters
mol (rdkit.Chem.rdchem.Mol) – A rdkit molecule object.
num_conformers (int) – Number of conformers to be generated. This parameter is also used for calculating normalizers.
calc_normalizers (bool) – Whether to calculate normalizing constants used in the Gibbs score reward. See
MolConfigfor more details.pruning_thresh (float) – Torsional fingerprint distance (TFD) threshold for pruning similar conformers when calculating normalizers. This parameter is only used for calculating normalizers and is ignored if
calc_normalizersis set toFalse.save_file (str) – If not set to an empty string, the generated config object will be saved as a pickle (.pkl) file with the filename set to this parameter.
- Returns
A
MolConfigobject configured with the input molecule, as well as normalizing constants ifcalc_normalizersis set toTrue.- Return type