GridBased¶
This is the pydoc code for the gridbased module.
# molli.descriptor.gridbased
Grid based conformer averaged descriptors This is a foundational file
- molli.descriptor.gridbased.prune(grid: ndarray, struct_or_ens: ConformerEnsemble | CartesianGeometry, max_dist: float = 2.0, eps: float = 0.5)¶
This function prunes the grid to return only the points closer than (max_dist + eps) from an ensemble or molecule. This is a very fast (!) implementation that utilizes a KDTree structure for fast queries
- molli.descriptor.gridbased.nearest_atom_index(grid: ndarray, struct_or_ens: ConformerEnsemble | CartesianGeometry, max_dist: float = 2.0)¶
Returns an array of atom indexes that are closest to the grid points in the shape of (n_conformers, n_gridpoints) for ensembles and in the shape of (n_gridpoints,) for StructureLikes where the number corresponds to the atom index (or -1 if the closest atom is farther than max_dist)
Uses KDTree data structure to increase the rate of computations significantly
- molli.descriptor.gridbased.atomic_indicator_field(ens: ConformerEnsemble, grid: ndarray, indicator_values: ndarray, atomic_radii: ndarray, nearest_atom_idx: ndarray = None, weighted: bool = False) ndarray¶
Main workhorse function for indicator field calculation that takes advantage of C++ backend code whenever possible.
- molli.descriptor.gridbased.aso(ens: ConformerEnsemble, grid: ndarray, weighted: bool = False) ndarray¶
Main workhorse function for ASO calculation that takes advantage of C++ backend code whenever possible. With large grids can be relatively memory intensive, so breaking up the grid into smaller pieces is recommended (see “chunky” calculation strategy)
- molli.descriptor.gridbased.aeif(ens: ConformerEnsemble, grid: ndarray, nearest_atom_idx: ndarray = None, weighted: bool = False)¶
` Average electronic indicator field