Repository navigation
TREXIO export of the density changes for VIAMD, and their natural orbitals - #8
Merged
Merged
Conversation
btyrcha
force-pushed
the
feature/trexio-export
branch
from
November 16, 2026 12:19
568090c to
9f7cd5a
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…trexio extra The density changes are written as natural orbitals, positive occupations as alpha and negative ones as beta, so that VIAMD's alpha - beta density is the density change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…relative_cutoff An absolute cutoff of 1e-10 changed the weaker density changes by up to 7e-6 of their largest value; 1e-12 of the largest occupation drops as many orbitals with no change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trexio is checked before the calculation (and when a run configuration asks for the files), and the bundle lists the files with their encoding, as it does the cubes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rexio command The bundle's basis set is rebuilt by Psi4 and checked against the one it records; the orbitals come from its monomer wavefunctions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tals The usage guide says how to write the files and view them in VIAMD, and how to read the natural orbitals of the density changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
export_trexio and calc_densities name the TREXIO files through density_file_names, so the Ind and Disp files are delta_dm_ind-total*.h5 and delta_dm_disp-total*.h5 and no longer collide with ind and disp on a case-insensitive file system. export_trexio checks the names before it writes anything; TREXIO_PREFIX is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
btyrcha
force-pushed
the
feature/trexio-export
branch
from
November 16, 2026 13:47
9f7cd5a to
5f05252
Compare
calc_densities writes the bundle before the cube and TREXIO files, so that a failed or interrupted export cannot lose the matrices. Its "cubes" and "trexio" metadata entries therefore list the files the call was asked to write, which may be missing if writing them failed. The calc_densities docstring, a comment and the usage guide now say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A negative cutoff kept the natural orbitals of zero occupation, and one of 1 or more, or nan, silently left out every orbital. export_trexio now refuses them with a ValueError before anything else, which prop-sapt export trexio reports as an error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
density_natural_orbitalsgives the natural orbitals of the interaction-induced densitychanges, from
calc_densitiesresults or adensities.npzbundle. A few of them usuallycarry most of a change, in the spirit of NOCV.
VIAMD:
calc_densities(save_trexio=True)and thesave_trexiosetting of the runner'sdensitiestask write them with the calculation.export_trexioandprop-sapt export trexiowrite them from existing bundles.written as alpha orbitals and negative ones as beta, so VIAMD's alpha − beta density is the
density change. Psi4's basis set is written as it is, because its AO order and
normalisation are TREXIO's.
trexioextra, and trexio is added toprop-sapt.yamlsoCI runs the export tests. trexio is imported only when a file is written.
orbitals), an example (
examples/export_trexio.py) and changelog entries.Tests
(
tests/trexio_spec.py), match Psi4's up to g functions, for spherical and Cartesian basissets.
f/g shells and Cartesian basis sets are not yet checked in VIAMD itself.
🤖 Generated with Claude Code