neurosnap.conformers module#
Provides functions and classes related to processing and generating conformers.
- neurosnap.conformers.find_LCS(mol)[source]#
Find the largest common substructure (LCS) between a set of conformers and aligns all conformers to the LCS.
- neurosnap.conformers.generate(input_mol, output_name='unique_conformers', write_multi=False, num_confs=1000, min_method='auto', max_atoms=500)[source]#
Generate conformers for an input molecule.
Performs the following actions in order: 1. Generate conformers using ETKDG method 2. Minimize energy of all conformers and remove those below a dynamic threshold 3. Align & create RMSD matrix of all conformers 4. Clusters using Butina method to remove structurally redundant conformers 5. Return most energetically favorable conformers in each cluster
- Parameters:
input_mol (
Any) – Input molecule can be a path to a molecule file, a SMILES string, or an instance of rdkit.Chem.rdchem.Moloutput_name (
str) – Output to write SDF files of passing conformerswrite_multi (
bool) – If True will write all unique conformers to a single SDF file, if False will write all unique conformers in separate SDF files in output_namenum_confs (
int) – Number of conformers to generatemin_method (
Optional[str]) – Method for minimization, can be either “auto”, “UFF”, “MMFF94”, “MMFF94s”, or None for no minimizationmax_atoms (
int) – Maximum number of atoms allowed for the input molecule
- Return type:
DataFrame- Returns:
A dataframe with all conformer statistics. Note if energy minimization is disabled or fails then energy column will consist of None values.
- neurosnap.conformers.minimize(mol, method='MMFF94', percentile=100.0)[source]#
Minimize conformer energy (kcal/mol) using RDkit and filter out conformers based on energy percentile.
- Parameters:
mol (
Mol) – RDkit mol object containing the conformers you want to minimize. (rdkit.Chem.rdchem.Mol)method (
str) – Can be either UFF, MMFF94, or MMFF94s (str)percentile (
float) – Filters out conformers above a given energy percentile (0 to 100). For example, 10.0 will retain conformers within the lowest 10% energy. (float)
- Return type:
- Returns:
A tuple of the form
(mol_filtered, energies)-mol_filtered: Molecule object with filtered conformers. -energies: Dictionary where keys are conformer IDs and values are calculated energies in kcal/mol.