qdk_chemistry.utils.cubegen module
Generate cube files for molecular orbitals and electron densities.
- qdk_chemistry.utils.cubegen.generate_cubefiles_from_orbitals(orbitals, output_folder=None, indices=None, grid_size=(40, 40, 40), margin=3.0, label_maker=None)[source]
Generate volumetric cube data for molecular orbitals.
This method creates cube files containing the spatial distribution of molecular orbitals on a 3D grid. It supports both canonical and localized orbitals.
- Return type:
- Parameters:
orbitals (Orbitals) – The orbitals object containing the molecular orbital coefficients and basis set
output_folder (str | Path | None) –
The folder where the cube files will be saved.
If None, files are not saved to temporary storage.
indices (list[int] | None) – Specific molecular orbital indices to generate cube files for. If None, all orbitals are processed.
grid_size (tuple) – The size of the grid in each dimension (nx, ny, nz). Default is (40, 40, 40).
margin (float) – The margin (in Bohr radii) to extend around molecule. Default is 3.
label_maker (Callable[[int], str] | None) –
A function that takes an orbital index and returns a string label for the cube file.
If None, a default labeling scheme is used.
- Returns:
Paths or contents of the generated cube files.
- Return type: