Basic calculations

Pseudopotential and basis-set presets

Inspect the per-element presets of pseudopotentials, pseudo-atomic orbitals and basis sets, add basis functions and switch the XC functional.

Category
Basic calculations
APIs used
vps_namespao_namesbasisxc_typeVPS_GGAVPS_LDABASIS_MINI_AND_POLE
Script
basis_presets.py

Advance/OF-DFT uses the norm-conserving pseudopotentials (VPS) and pseudo-atomic orbitals (PAO) of OpenMX. The file names and basis assignments for each element are defined as dictionaries in aofdft.calculator, and the defaults are appropriate for most calculations.

basis_presets.pyDownload
"""
Advance/OF-DFT example: pseudopotential, PAO and basis-set presets.

Copyright (C) 2026 AdvanceSoft Corporation, All rights reserved.
"""

from ase.build import bulk

from aofdft.calculator import (
    AOFDFTCalculator,
    VPS_GGA, VPS_LDA,                        # pseudopotential files for PBE / LDA
    PAO_MINI, BASIS_MINI,                    # minimal basis (default)
    PAO_MINI_AND_POLE, BASIS_MINI_AND_POLE,  # minimal basis + polarization
)

VPS_DIR = "path/to/DFT_DATA19_AS/VPS"  # edit these two paths for your environment
PAO_DIR = "path/to/DFT_DATA19_AS/PAO"

atoms    = bulk("SiC", crystalstructure="zincblende", a=4.36).repeat((2, 2, 2))  # 16 atoms
elements = sorted(set(atoms.get_chemical_symbols()))

# 1) look into the presets: file names and basis labels for each element
for name, pao, basis in [
    ("MINI (default)", PAO_MINI,          BASIS_MINI),
    ("MINI_AND_POLE",  PAO_MINI_AND_POLE, BASIS_MINI_AND_POLE),
]:
    print(name)
    for el in elements:
        print(f"  {el:2s} vps = {VPS_GGA[el]:16s} pao = {pao[el]:12s} basis = {basis[el]}")

common = dict(
    console     = False,
    kin_type    = "AS26",
    kin_model   = "Crystal26",
    vps_dir     = VPS_DIR,
    pao_dir     = PAO_DIR,
    mix_precond = None,  # without the Thomas-Fermi preconditioner of the default preset
)

# 2) default: PBE with the minimal basis
atoms.calc = AOFDFTCalculator(logging_file="sic_mini.log", **common)
print(f"\nPBE, MINI          : {atoms.get_potential_energy():.4f} eV")

# 3) add polarization functions with a preset pair (PAO files and basis labels must match)
atoms.calc = AOFDFTCalculator(
    logging_file = "sic_pole.log",
    pao_names    = PAO_MINI_AND_POLE,
    basis        = BASIS_MINI_AND_POLE,
    **common,
)
print(f"PBE, MINI_AND_POLE : {atoms.get_potential_energy():.4f} eV")

# 4) change the basis of one element only: copy a preset and edit it
my_basis      = dict(BASIS_MINI)
my_basis["C"] = "s1p1d1"
atoms.calc = AOFDFTCalculator(logging_file="sic_custom.log", basis=my_basis, **common)
print(f"PBE, C = s1p1d1    : {atoms.get_potential_energy():.4f} eV")

# 5) LDA: switch the XC functional together with the pseudopotential preset
atoms.calc = AOFDFTCalculator(
    logging_file = "sic_lda.log",
    xc_type      = "LDA",
    vps_names    = VPS_LDA,
    **common,
)
print(f"LDA, MINI          : {atoms.get_potential_energy():.4f} eV")

Available presets

KindPresetsContent
PseudopotentialsVPS_GGA (default), VPS_LDAVPS file names for each XC functional
Pseudo-atomic orbitalsPAO_MINI (default), PAO_MINI_AND_POLE, PAO_OMX_QUICK, PAO_OMX_STANDARD, PAO_OMX_PRECISEPAO file names
Basis functionsBASIS_MINI (default), BASIS_MINI_AND_POLE, BASIS_OMX_QUICK, BASIS_OMX_STANDARD, BASIS_OMX_PRECISEbasis labels such as "s1p1" or "s2p2d1"

Notes

  • Use pao_names and basis from the same family (e.g. PAO_MINI_AND_POLE with BASIS_MINI_AND_POLE).
  • To change one element only, copy a preset with dict() and edit the copy. Do not modify the presets themselves.
  • The XC functional is set with xc_type ("PBE" or "LDA"). For LDA, also switch the pseudopotentials with vps_names=VPS_LDA.
  • For elements with semicore orbitals (Na, Fe, Ga, ...), the presets point to pseudopotentials (*26_as.vps) and pseudo-atomic orbitals (*_as.pao) regenerated by AdvanceSoft without the semicore states.
  • The pre-trained AdvanceSoft26 models are tuned together with the default basis sets. When you change the basis, we recommend checking the validity of the results.
  • The cell is a 2×2×2 repetition of the primitive cell of SiC (16 atoms). With v1.0.0 the results change when the cell has a short period.
  • mix_precond=None switches off the Thomas-Fermi preconditioner of the default preset (scf_style="bulk"). In this cell, with the preconditioner the SCF converges slowly for the calculations with added basis functions and does not converge for LDA. The presets are listed in Controlling and monitoring the SCF.