compute_pore_sizes_uniform_rust
rust_fun.compute_pore_sizes_uniform_rust(
dgrid,
ase_atoms,
num_samples_total=10000,
min_sphere_center_radius=None,
)Compute pore sizes using uniform sampling across the material.
This function samples points uniformly throughout the material and calculates the pore size (distance to nearest atom surface) at each sample point.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| dgrid | numpy.ndarray | 3D distance grid from dgrid_from_atoms_rust | required |
| ase_atoms | ase.Atoms | ASE Atoms object of the material | required |
| num_samples_total | int | Total number of sample points to generate | 10000 |
| min_sphere_center_radius | float | None | Minimum clearance (Å) for sphere-center voxels in the largest-including-sphere search. Sample sites still use all void voxels (dgrid > 0). Set to the probe radius (e.g. 1.657 Å for N₂) to match PoreBlazer Total PSD. | None |
Returns
| Name | Type | Description |
|---|---|---|
| tuple[numpy.ndarray, numpy.ndarray] | Tuple of (sample_points, pore_sizes) where sample_points are the sampled coordinates and pore_sizes are the corresponding pore diameters |