Examples¶
PyTC 0.3.0 ships ten numbered examples in the
pytc/examples
directory. They are small, executable demonstrations rather than production
benchmarks.
Get and run the examples¶
Clone the matching release and install it in editable mode:
git clone --branch v0.3.0 https://github.com/nickirk/pytc.git
cd pytc
python -m pip install -e .
Run an example from the repository root, for example:
python pytc/examples/03_dense_xtc_ccsd.py
python pytc/examples/06_rank_m_x_factor_direct_ccsd.py
JAX_ENABLE_X64=1 python pytc/examples/08_adaptive_low_rank_bug_ccsd.py
Each script is runnable on its own unless the table notes a dependency. Examples 01 to 06 print a small expected-value or structural self-check and fail if that check does not pass. Examples 07 to 10 print the PyTC energy next to the PySCF reference.
Adaptive low-rank methods¶
These examples run on water in cc-pVDZ with a density-fitted RHF reference and
need JAX in double precision (JAX_ENABLE_X64=1). They are new in PyTC 0.3.0.
Script |
What it demonstrates |
Reference |
|---|---|---|
BUG direct RPA at three truncation thresholds |
PySCF direct RPA |
|
BUG-CCSD at a loose and a tight truncation threshold, with a per-iteration callback |
PySCF DF-CCSD |
|
BUG-MP2 at three truncation thresholds |
PySCF DF-MP2 |
|
BUG-CCSD followed by the projected (T) correction |
PySCF DF-CCSD(T) |
See Adaptive Low-Rank Methods for the interface.
Choosing a starting point¶
Start with 03 when validating integral conventions on a small molecule.
Compare 03 and 04 before relying on an ISDF rank for a new system.
Use 05 to study the additional FNO truncation error.
Use 06 only after the full-X ISDF calculation is understood and validated; rank-\(M\) X is an explicit approximation, not the default.
Start with 09 or 07 for the adaptive low-rank solvers, then 08 and 10 for CCSD and CCSD(T).