Skip to main content

Converter from ADF TAPE21.asc to CASINO stowfn.data

Project description

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/

Requirements

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

Installation

pip install adf2stowf

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

Option Description
--cusp-method=enforce Apply cusp correction to active orbitals (default)
--cusp-method=project Project out cusp-violating components
--cusp-method=none Disable cusp correction
--cart2harm-projection Enforce pure spherical harmonics via orthogonal projection
--all-orbitals Include virtual orbitals (default: occupied only)
--plot-cusps Plot cusp constraints (requires Matplotlib)
--dump Write a text dump of TAPE21 to TAPE21.txt

Cartesian-to-spherical warning

You may see a warning during conversion:

WARNING: cartesian to spherical conversion for spin 0, orb 0 violated by 0.00063567

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 (e.g. the s-type contamination x²+y²+z² in d-shells) are unphysical in a spherical harmonic representation.

Use --cart2harm-projection to remove these components via an orthogonal projection onto the pure spherical harmonic subspace. Without it, the contaminating components are silently dropped, which may slightly affect the total energy.

Testing

Reference output files for all example systems are included in examples/. To run the regression tests:

pip install pytest
pytest tests/test_regression.py -v

Each test runs the full conversion pipeline on examples/<system>/TAPE21.asc and compares the result against the reference stowfn.data.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adf2stowf-1.0.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adf2stowf-1.0.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file adf2stowf-1.0.0.tar.gz.

File metadata

  • Download URL: adf2stowf-1.0.0.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for adf2stowf-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4cb4071145251f1d68b3c34d0410bccc5b7900e60548760f211df097f536e5e7
MD5 15aa6105ed8dd3f383ef88fe38aa91ed
BLAKE2b-256 044be68b7618ffa06681eeaf594c0a5b76121309ea6396715612897644963f48

See more details on using hashes here.

File details

Details for the file adf2stowf-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: adf2stowf-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for adf2stowf-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5825296addfcdf0b486515b99c925994d5df6bd9817edfc4ad8e22e5a6a080b
MD5 101f2b0e51c1841483cf8cc826b4367c
BLAKE2b-256 a3f8624750a1ba20f2f3d6b561fbff1959c72992f1f79a110e3c15a5d5e18402

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page