Catalog PyPI
PACKAGE EXPLORERView in registry

adf2stowf

PyPI

Converter from ADF TAPE21.asc to CASINO stowfn.data

Versions collected1
Direct dependencies6From release 1.1.0
Last observed20 Oct, 19:27 UTC

README

Version 1.1.0 documentation

adf2stowf

PyPI version PyPI - Python Version Tests Documentation

Converts wave function data from the ADF (Amsterdam Density Functional) program into the stowfn.data input file for the CASINO quantum Monte Carlo code.

ADF is the only major quantum chemistry program that uses Slater-Type Orbitals (STO) natively. CASINO can use them directly by setting:

atom_basis_type : slater-type

in the CASINO input file, which makes ADF+CASINO a powerful combination for high-accuracy QMC calculations.

For general information about ADF, see https://www.scm.com/ For CASINO, see https://vallico.net/casinoqmc/

For an example of using ADF as a source of orbitals for all-electron QMC, see Nemec, Towler & Needs, Benchmark all-electron ab initio quantum Monte Carlo calculations for small molecules (arXiv:0908.2041).

Requirements

  • Python >= 3.10
  • NumPy >= 2.0.0
  • SciPy >= 1.13.1
  • Matplotlib >= 3.9.0 (optional, for --plot-cusps)

Installation

pip install adf2stowf

with cusp plotting support:

pip install adf2stowf[plot]

or from source:

git clone https://github.com/Konjkov/adf2stowf
cd adf2stowf
pip install .

Usage

  1. Run ADF:

    adf < adf.in > adf.out
    

    This produces a binary file TAPE21 in the working directory.

  2. Convert to ASCII format using the dmpkf utility (included with ADF):

    dmpkf TAPE21 > TAPE21.asc
    
  3. Run the converter in the same directory:

    adf2stowf
    

    This reads TAPE21.asc and writes stowfn.data.

Command-line options

OptionDescription
--cusp-method=projectProject out cusp-violating components (default)
--cusp-method=enforceApply cusp correction to active orbitals
--cusp-method=noneDisable cusp correction
--all-orbitalsInclude virtual orbitals (default: occupied only)
--plot-cuspsPlot cusp constraints (requires Matplotlib)
--dumpWrite a text dump of TAPE21 to TAPE21.txt

By default (project) the converter removes the cusp-violating components of each orbital so the wavefunction satisfies the nuclear cusp condition. In a molecule the per-nucleus cusp also picks up a smooth background from the tails of basis functions on neighbouring atoms, so the residual deviation can stay large without affecting the variational energy — a single-determinant VMC run still reproduces the HF energy.

Cartesian-to-spherical conversion

ADF computes MOs in a Cartesian basis (6 d-functions, 10 f-functions). CASINO requires pure spherical harmonics (5 d, 7 f). The extra Cartesian components are not unphysical: they are themselves Slater orbitals with the radial prefactor raised by r². Specifically:

  • the s-type component x²+y²+z² of a d-shell is an s-type STO with radial prefactor rn+2
  • the p-type components x·r², y·r², z·r² of an f-shell are p-type STOs with radial prefactor rn+2

The converter therefore represents each d/f shell exactly by appending a companion shell with radial prefactor rn+2 and the same zeta — no Cartesian component is lost.

A subtlety of this transformation is normalisation: ADF MO coefficients refer to individually normalised Cartesian monomials (the bnorm factors stored in TAPE21), while CASINO expects coefficients of its own normalised real harmonics. Within a d or f shell these norms differ between components, so the polynomial transformation is conjugated by them, diag(1/casino_norm) · cart2harm · diag(bnorm). Omitting this conjugation distorts molecular orbitals that mix d/f with s/p functions — invisible for isolated atoms (closed and half-filled subshells are unitary-invariant) but worth several mHa in molecules such as HCN or O₃.

Unused basis functions are pruned. Any shell — of any angular momentum (s, p, d, or f), including the appended companion shells — whose coefficients are zero in every written orbital is omitted from stowfn.data. These are typically the polarisation d/f functions and diffuse s/p functions that no occupied orbital uses; dropping them leaves the wavefunction unchanged while reducing the number of basis functions CASINO must evaluate (for atoms this can roughly halve the AO count). Pass --all-orbitals to keep them — the virtual orbitals make use of them.

Accuracy

HF total energies (Hartree) for HF/QZ4P/Slater calculations. ADF is the reference energy from the source file; CASINO is the variational Monte Carlo energy from the converted stowfn.data. The Reference HF column gives numerical Roothaan–Hartree–Fock energies from Bunge, Barrientos & Bunge, Atomic Data and Nuclear Data Tables 53, 113 (1993) (doi:10.1006/adnd.1993.1003), accurate to 8–10 significant figures, for ground-state atoms He–Xe expressed in a Slater-type orbital basis. The Δ/σ column shows the deviation between ADF and CASINO in units of the CASINO statistical uncertainty (σ).

The ADF energies in the table below were obtained with the accuracy settings described in the note below the table.

SystemReference HFADF (HF energy)ADF (basis)CASINO (VMC energy)Δ/σ
H-0.49999985QZ4P-0.49999978 ± 0.000000100.7
H₂−1.13359570QZ4P-1.13357627 ± 0.000028380.7
He-2.861679993-2.86166638QZ4P-2.86167262 ± 0.000049380.1
Be-14.57302313-14.57301106QZ4P-14.57312996 ± 0.000184600.6
B-24.52906069-24.53307467QZ4P-24.53333575 ± 0.000252901.0
C-37.68861890-37.69365818QZ4P-37.69372952 ± 0.000325710.2
N-54.40093415-54.40446246QZ4P-54.40451476 ± 0.000456450.1
CN⁻-92.34767419QZ4P-92.34833189 ± 0.000629971.0
HCN-92.91263786mix-92.91268420 ± 0.000620880.1
Ne-128.5470980−128.54688836QZ4P-128.54608391 ± 0.000716181.1
O₃−224.36156862QZ4P-224.36217991 ± 0.000986280.6
Ar-526.8175122−526.81670427QZ4P-526.81743472 ± 0.001998990.5
Ga-1923.261001-1923.26303777QZ4P-1923.26195488 ± 0.004351810.2
Kr-2752.054969−2752.05365745QZ4P-2752.05285347 ± 0.005385700.1
Xe-7232.138349−7232.13699292QZ4P-7232.12063576 ± 0.034018430.5

Note on ADF accuracy settings. For a sub-mHa comparison with VMC the ADF input must contain

NUMERICALQUALITY excellent

(the default grid quality leaves 1–2 mHa of quadrature error), and in some cases — all-electron calculations with a tight, near-linearly-dependent core basis (e.g. Be in QZ4P), where the default pair-fit exchange leaves the SCF ~1 mHa above the true basis-set minimum — also

RIHartreeFock
  UseMe True
  Quality Excellent
  DependencyThreshold 1.0E-8
End

Note that the RIHartreeFock block is inert without UseMe True, and the default DependencyThreshold 1e-3 must be lowered — it removes exactly the tight core combinations at issue.

DependencyThreshold 1e-8 is for atoms only. In molecules the cross-centre overlap of diffuse QZ4P functions creates genuine near-linear dependence that must stay removed: with a tiny threshold the SCF becomes unstable and converges to an unphysical energy (the failure mode the ADF manual describes for this key). For molecules keep the default (omit the line).

More generally, QZ4P itself is atom-oriented: in molecules it does not give an accurate wavefunction — either the automatic dependency truncation distorts the basis or keeping it intact destabilizes the SCF. For molecules use a well-conditioned pVQZ-based basis instead (the "mix" basis for HCN in the table above).

A VMC calculation with a single Slater determinant should reproduce the HF energy exactly; all systems in the table agree within statistics.

Verification

Correctness is verified by comparing the CASINO VMC energy of the converted stowfn.data against the ADF reference energy: a single-determinant VMC run must reproduce the HF energy. Reference inputs/outputs for all example systems are included in examples/ (see the table above).

Documentation

Full documentation including mathematical background (cusp conditions, Cartesian-to-spherical transformation matrices) is available at https://adf2stowf.readthedocs.io/en/latest/

To build locally:

pip install sphinx sphinx-rtd-theme
cd docs && make html

Downloads & popularity

2downloads
1-day window · source-reported counts20 Oct 2026
9547.50
2026-07-23: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-07-23–2026-07-232026-07-24: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-07-24–2026-07-242026-07-27: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-07-27–2026-07-272026-08-01: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-01–2026-08-012026-08-02: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-02–2026-08-022026-08-03: 6 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-03–2026-08-032026-08-05: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-05–2026-08-052026-08-09: 3 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-09–2026-08-092026-08-10: 4 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-10–2026-08-102026-08-11: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-11–2026-08-112026-08-13: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-13–2026-08-132026-08-14: 4 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-14–2026-08-142026-08-17: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-17–2026-08-172026-08-20: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-20–2026-08-202026-08-21: 4 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-21–2026-08-212026-08-22: 95 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-22–2026-08-222026-08-23: 7 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-23–2026-08-232026-08-24: 14 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-24–2026-08-242026-08-25: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-25–2026-08-252026-08-26: 4 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-26–2026-08-262026-08-27: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-27–2026-08-272026-08-28: 9 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-28–2026-08-282026-08-29: 14 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-29–2026-08-292026-08-30: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-30–2026-08-302026-08-31: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-08-31–2026-08-312026-09-01: 4 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-01–2026-09-012026-09-03: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-03–2026-09-032026-09-04: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-04–2026-09-042026-09-05: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-05–2026-09-052026-09-07: 16 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-07–2026-09-072026-09-08: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-08–2026-09-082026-09-09: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-09–2026-09-092026-09-12: 5 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-12–2026-09-122026-09-14: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-14–2026-09-142026-09-15: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-15–2026-09-152026-09-16: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-16–2026-09-162026-09-18: 3 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-18–2026-09-182026-09-19: 10 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-19–2026-09-192026-09-20: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-20–2026-09-202026-09-21: 3 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-21–2026-09-212026-09-22: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-22–2026-09-222026-09-24: 5 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-24–2026-09-242026-09-25: 7 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-25–2026-09-252026-09-26: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-26–2026-09-262026-09-27: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-27–2026-09-272026-09-28: 10 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-28–2026-09-282026-09-29: 5 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-29–2026-09-292026-09-30: 3 · observed 2026-10-21T13:47:21.0878419Z · period 2026-09-30–2026-09-302026-10-01: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-01–2026-10-012026-10-02: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-02–2026-10-022026-10-03: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-03–2026-10-032026-10-06: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-06–2026-10-062026-10-07: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-07–2026-10-072026-10-08: 10 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-08–2026-10-082026-10-09: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-09–2026-10-092026-10-10: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-10–2026-10-102026-10-11: 4 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-11–2026-10-112026-10-13: 5 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-13–2026-10-132026-10-14: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-14–2026-10-142026-10-15: 6 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-15–2026-10-152026-10-16: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-16–2026-10-162026-10-17: 1 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-17–2026-10-172026-10-19: 3 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-19–2026-10-192026-10-20: 2 · observed 2026-10-21T13:47:21.0878419Z · period 2026-10-20–2026-10-20
23 Jul20 Oct

pypistats · 64 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-20 – 2026-10-2022026-10-21T13:47:21.0878419Z
2026-10-19 – 2026-10-1932026-10-21T13:47:21.0878419Z
2026-10-17 – 2026-10-1712026-10-21T13:47:21.0878419Z
2026-10-16 – 2026-10-1612026-10-21T13:47:21.0878419Z
2026-10-15 – 2026-10-1562026-10-21T13:47:21.0878419Z
2026-10-14 – 2026-10-1422026-10-21T13:47:21.0878419Z
2026-10-13 – 2026-10-1352026-10-21T13:47:21.0878419Z
2026-10-11 – 2026-10-1142026-10-21T13:47:21.0878419Z
2026-10-10 – 2026-10-1012026-10-21T13:47:21.0878419Z
2026-10-09 – 2026-10-0922026-10-21T13:47:21.0878419Z
2026-10-08 – 2026-10-08102026-10-21T13:47:21.0878419Z
2026-10-07 – 2026-10-0712026-10-21T13:47:21.0878419Z
2026-10-06 – 2026-10-0612026-10-21T13:47:21.0878419Z
2026-10-03 – 2026-10-0322026-10-21T13:47:21.0878419Z
2026-10-02 – 2026-10-0212026-10-21T13:47:21.0878419Z
2026-10-01 – 2026-10-0122026-10-21T13:47:21.0878419Z
2026-09-30 – 2026-09-3032026-10-21T13:47:21.0878419Z
2026-09-29 – 2026-09-2952026-10-21T13:47:21.0878419Z
2026-09-28 – 2026-09-28102026-10-21T13:47:21.0878419Z
2026-09-27 – 2026-09-2712026-10-21T13:47:21.0878419Z
2026-09-26 – 2026-09-2612026-10-21T13:47:21.0878419Z
2026-09-25 – 2026-09-2572026-10-21T13:47:21.0878419Z
2026-09-24 – 2026-09-2452026-10-21T13:47:21.0878419Z
2026-09-22 – 2026-09-2212026-10-21T13:47:21.0878419Z
2026-09-21 – 2026-09-2132026-10-21T13:47:21.0878419Z
2026-09-20 – 2026-09-2012026-10-21T13:47:21.0878419Z
2026-09-19 – 2026-09-19102026-10-21T13:47:21.0878419Z
2026-09-18 – 2026-09-1832026-10-21T13:47:21.0878419Z
2026-09-16 – 2026-09-1622026-10-21T13:47:21.0878419Z
2026-09-15 – 2026-09-1512026-10-21T13:47:21.0878419Z
2026-09-14 – 2026-09-1412026-10-21T13:47:21.0878419Z
2026-09-12 – 2026-09-1252026-10-21T13:47:21.0878419Z
2026-09-09 – 2026-09-0912026-10-21T13:47:21.0878419Z
2026-09-08 – 2026-09-0822026-10-21T13:47:21.0878419Z
2026-09-07 – 2026-09-07162026-10-21T13:47:21.0878419Z
2026-09-05 – 2026-09-0512026-10-21T13:47:21.0878419Z
2026-09-04 – 2026-09-0422026-10-21T13:47:21.0878419Z
2026-09-03 – 2026-09-0312026-10-21T13:47:21.0878419Z
2026-09-01 – 2026-09-0142026-10-21T13:47:21.0878419Z
2026-08-31 – 2026-08-3122026-10-21T13:47:21.0878419Z
2026-08-30 – 2026-08-3022026-10-21T13:47:21.0878419Z
2026-08-29 – 2026-08-29142026-10-21T13:47:21.0878419Z
2026-08-28 – 2026-08-2892026-10-21T13:47:21.0878419Z
2026-08-27 – 2026-08-2712026-10-21T13:47:21.0878419Z
2026-08-26 – 2026-08-2642026-10-21T13:47:21.0878419Z
2026-08-25 – 2026-08-2522026-10-21T13:47:21.0878419Z
2026-08-24 – 2026-08-24142026-10-21T13:47:21.0878419Z
2026-08-23 – 2026-08-2372026-10-21T13:47:21.0878419Z
2026-08-22 – 2026-08-22952026-10-21T13:47:21.0878419Z
2026-08-21 – 2026-08-2142026-10-21T13:47:21.0878419Z
2026-08-20 – 2026-08-2012026-10-21T13:47:21.0878419Z
2026-08-17 – 2026-08-1722026-10-21T13:47:21.0878419Z
2026-08-14 – 2026-08-1442026-10-21T13:47:21.0878419Z
2026-08-13 – 2026-08-1322026-10-21T13:47:21.0878419Z
2026-08-11 – 2026-08-1112026-10-21T13:47:21.0878419Z
2026-08-10 – 2026-08-1042026-10-21T13:47:21.0878419Z
2026-08-09 – 2026-08-0932026-10-21T13:47:21.0878419Z
2026-08-05 – 2026-08-0512026-10-21T13:47:21.0878419Z
2026-08-03 – 2026-08-0362026-10-21T13:47:21.0878419Z
2026-08-02 – 2026-08-0212026-10-21T13:47:21.0878419Z
2026-08-01 – 2026-08-0122026-10-21T13:47:21.0878419Z
2026-07-27 – 2026-07-2722026-10-21T13:47:21.0878419Z
2026-07-24 – 2026-07-2412026-10-21T13:47:21.0878419Z
2026-07-23 – 2026-07-2322026-10-21T13:47:21.0878419Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.1.022 Aug 20266

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
konjkov/adf2stowf

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:27 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:2a09b6e3f25be7ab780f0c7912d4923f5f2e6a6469d2208b0149c5979e7a697b