Examples

The examples/ directory of the repository holds scripts and notebooks. Run them from that directory, in an environment made from prop-sapt.yaml (see Installation). Each script sets its geometry, memory, threads and basis sets at the top (BASIS, DF_BASIS).

Scripts

  • example.py - interaction-induced dipole moment and density matrices of Ne–H2

  • sapt_example.py - the SAPT energy components of He2, compared with Psi4’s own SAPT(DFT) run with the HF functional

  • finite_field_sapt.py - the analytic interaction-induced dipole of He–H2 next to the finite-field SAPT derivative, term by term

  • water_dimer.py - the dipole and the density cubes of the water dimer

  • save_mo_matrices.py - the density matrices of Ne–H2 computed in the MO basis and saved, in the AO basis, into one bundle (matrices_MO/densities.npz)

  • make_cubes_from_mo_matrices.py - cube files from that bundle, read back with load_densities(); run save_mo_matrices.py first

  • read_subtract_save.py - cube arithmetic on the cubes that water_dimer.py writes to water-dimer-cubes/; run water_dimer.py first

  • run_config.yaml - a commented configuration for prop-sapt run

For example:

cd examples
python water_dimer.py

Notebooks

  • visualise_density.ipynb - interaction-induced densities from the cubes of water_dimer.py

  • visualise_orbital.ipynb - molecular orbitals from cube files

cd examples
jupyter lab visualise_density.ipynb

The notebooks use the visualisation packages of prop-sapt.yaml (fortecubeview, pythreejs, ipywidgets).

See the Usage Guide guide for the workflows, and the API Reference for every function.