Skip to content

Add tutorial notebook: FCHK to electron density on a grid (IOData, Grid, GBasis)#4

Open
ModaHarsh wants to merge 3 commits intotheochem:masterfrom
ModaHarsh:notebook-workflow-fchk-to-density
Open

Add tutorial notebook: FCHK to electron density on a grid (IOData, Grid, GBasis)#4
ModaHarsh wants to merge 3 commits intotheochem:masterfrom
ModaHarsh:notebook-workflow-fchk-to-density

Conversation

@ModaHarsh
Copy link

Summary

Adds a small tutorial notebook that demonstrates an end-to-end workflow using IOData, Grid, and GBasis: loading a wavefunction from a Gaussian .fchk file, building a molecular grid, and evaluating/integrating the electron density.

What the notebook does

  • Section 1 (IOData): Loads data/h2o_sto3g.fchk, prints geometry and basis info.
  • Section 2 (Grid): Builds a Becke-style molecular grid.
  • Section 3 (GBasis): Builds the 1-RDM from the wavefunction, evaluates the density on the grid, and integrates to get the electron count (~10 for H₂O).

Notes

  • Uses the existing notebooks/data/h2o_sto3g.fchk example.
  • Includes an optional first cell for Colab (install + download data).
  • Working-directory handling so the notebook runs from repo root or from notebooks/.
  • Validates mol.mo before use when building the 1-RDM (aligned with horton3.ipynb).

This was proposed as a first contribution following maintainer guidance on adding tutorial notebooks to Horton3.

…aise a ValueError if wavefunction data is missing, ensuring proper input validation for density computation.
- demo_workflow_fchk_to_density.ipynb: load .fchk, build grid, evaluate and integrate density
- Robust working-directory setup; validate mol.mo before building 1-RDM
@ModaHarsh
Copy link
Author

Hello @PaulWAyers,

I hope you’re doing well! This PR adds a tutorial notebook demonstrating an end-to-end workflow with IOData, Grid, and GBasis. I believe it aligns with the project’s goals and would be helpful for users.

When you have a moment, I’d appreciate your review or feedback. Let me know if there’s anything I can adjust.
Thankyou!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant