molgrid.moleculargrid module

class molgrid.moleculargrid.MolecularGrid(molecule, nshells=32, nangpts=110, partition_method='becke')[source]

Bases: object

Build a molecular integration grid by combining atomic grids.

Each atom produces a radial/angular grid via AtomicGrid. Becke partition weights can be applied to distribute grid contributions across atoms.

property coords

Cached full grid coordinates.

property weights

Cached full grid weights.

build()[source]

Build each atomic grid and refresh cached molecular grid.

This method constructs atomic grids for each atom in the molecule and optionally prunes the grid points based on the specified pruning method.

Returns:

Modifies the grid in place by building and optionally pruning the grid.

Return type:

None

Raises:

ValueError – If an invalid prune method is specified.

partition(atomic_grids, partition_method='becke')[source]

Partition the grid weights based on the specified method.

Parameters:
  • atomic_grids ([AtomicGrid]) – List of atomic grids to partition.

  • partition_method (str, optional) – Partition method to use. Default is ‘becke’.

Return type:

None

Raises:

ValueError – If an invalid partition method is specified.