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–H2sapt_example.py- the SAPT energy components of He2, compared with Psi4’s own SAPT(DFT) run with the HF functionalfinite_field_sapt.py- the analytic interaction-induced dipole of He–H2 next to the finite-field SAPT derivative, term by termwater_dimer.py- the dipole and the density cubes of the water dimersave_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 withload_densities(); runsave_mo_matrices.pyfirstread_subtract_save.py- cube arithmetic on the cubes thatwater_dimer.pywrites towater-dimer-cubes/; runwater_dimer.pyfirstrun_config.yaml- a commented configuration forprop-sapt run
For example:
cd examples
python water_dimer.py
Notebooks
visualise_density.ipynb- interaction-induced densities from the cubes ofwater_dimer.pyvisualise_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.