# Full List of INPUT Keywords

<!-- This file is auto-generated from parameters.yaml -->
<!-- Do not edit manually - changes will be overwritten -->

<!-- Table of Contents -->
- [Full List of INPUT Keywords](#full-list-of-input-keywords)
  - [System variables](#system-variables)
    - [suffix](#suffix)
    - [ntype](#ntype)
    - [cell\_replica](#cell_replica)
    - [calculation](#calculation)
    - [socket\_driver](#socket_driver)
    - [esolver\_type](#esolver_type)
    - [symmetry](#symmetry)
    - [symmetry\_prec](#symmetry_prec)
    - [symmetry\_autoclose](#symmetry_autoclose)
    - [cal\_force](#cal_force)
    - [kpar](#kpar)
    - [bndpar](#bndpar)
    - [latname](#latname)
    - [assume\_isolated](#assume_isolated)
    - [pcc\_2d\_axis](#pcc_2d_axis)
    - [init\_wfc](#init_wfc)
    - [init\_chg](#init_chg)
    - [init\_vel](#init_vel)
    - [mem\_saver](#mem_saver)
    - [cal\_stress](#cal_stress)
    - [diago\_proc](#diago_proc)
    - [nbspline](#nbspline)
    - [kspacing](#kspacing)
    - [koffset](#koffset)
    - [kmesh\_type](#kmesh_type)
    - [min\_dist\_coef](#min_dist_coef)
    - [device](#device)
    - [precision](#precision)
    - [gint\_precision](#gint_precision)
    - [timer\_enable\_nvtx](#timer_enable_nvtx)
    - [cell\_factor](#cell_factor)
    - [dm\_to\_rho](#dm_to_rho)
    - [chg\_extrap](#chg_extrap)
    - [nb2d](#nb2d)
    - [cal\_symm\_repr](#cal_symm_repr)
  - [Input files](#input-files)
    - [stru\_file](#stru_file)
    - [kpoint\_file](#kpoint_file)
    - [pseudo\_dir](#pseudo_dir)
    - [orbital\_dir](#orbital_dir)
    - [read\_file\_dir](#read_file_dir)
    - [spillage\_outdir](#spillage_outdir)
  - [Plane wave related variables](#plane-wave-related-variables)
    - [ecutwfc](#ecutwfc)
    - [ecutrho](#ecutrho)
    - [nx](#nx)
    - [ny](#ny)
    - [nz](#nz)
    - [ndx](#ndx)
    - [ndy](#ndy)
    - [ndz](#ndz)
    - [pw\_seed](#pw_seed)
    - [diag\_subspace](#diag_subspace)
    - [erf\_ecut](#erf_ecut)
    - [fft\_mode](#fft_mode)
    - [erf\_height](#erf_height)
    - [erf\_sigma](#erf_sigma)
    - [pw\_diag\_thr](#pw_diag_thr)
    - [diago\_smooth\_ethr](#diago_smooth_ethr)
    - [use\_k\_continuity](#use_k_continuity)
    - [pw\_diag\_nmax](#pw_diag_nmax)
    - [pw\_diag\_ndim](#pw_diag_ndim)
    - [ppcg\_rr\_step](#ppcg_rr_step)
    - [lobpcg\_locking](#lobpcg_locking)
    - [diago\_cg\_prec](#diago_cg_prec)
  - [Numerical atomic orbitals related variables](#numerical-atomic-orbitals-related-variables)
    - [lmaxmax](#lmaxmax)
    - [lcao\_ecut](#lcao_ecut)
    - [lcao\_dk](#lcao_dk)
    - [lcao\_dr](#lcao_dr)
    - [lcao\_rmax](#lcao_rmax)
    - [search\_radius](#search_radius)
    - [bx](#bx)
    - [by](#by)
    - [bz](#bz)
    - [elpa\_num\_thread](#elpa_num_thread)
    - [num\_stream](#num_stream)
  - [Electronic structure](#electronic-structure)
    - [basis\_type](#basis_type)
    - [ks\_solver](#ks_solver)
    - [lcao\_sk\_cut](#lcao_sk_cut)
    - [nbands](#nbands)
    - [nelec](#nelec)
    - [nelec\_delta](#nelec_delta)
    - [nupdown](#nupdown)
    - [dft\_functional](#dft_functional)
    - [device\_xc](#device_xc)
    - [xc\_temperature](#xc_temperature)
    - [xc\_exch\_ext](#xc_exch_ext)
    - [xc\_corr\_ext](#xc_corr_ext)
    - [pseudo\_rcut](#pseudo_rcut)
    - [pseudo\_mesh](#pseudo_mesh)
    - [nspin](#nspin)
    - [gga\_grad](#gga_grad)
    - [smearing\_method](#smearing_method)
    - [smearing\_sigma](#smearing_sigma)
    - [smearing\_sigma\_temp](#smearing_sigma_temp)
    - [mixing\_type](#mixing_type)
    - [mixing\_beta](#mixing_beta)
    - [mixing\_beta\_mag](#mixing_beta_mag)
    - [mixing\_ndim](#mixing_ndim)
    - [mixing\_restart](#mixing_restart)
    - [mixing\_dmr](#mixing_dmr)
    - [mixing\_gg0](#mixing_gg0)
    - [mixing\_gg0\_mag](#mixing_gg0_mag)
    - [mixing\_gg0\_min](#mixing_gg0_min)
    - [mixing\_angle](#mixing_angle)
    - [mixing\_tau](#mixing_tau)
    - [mixing\_dftu](#mixing_dftu)
    - [gamma\_only](#gamma_only)
    - [scf\_nmax](#scf_nmax)
    - [scf\_thr](#scf_thr)
    - [scf\_ene\_thr](#scf_ene_thr)
    - [scf\_thr\_type](#scf_thr_type)
    - [scf\_os\_stop](#scf_os_stop)
    - [scf\_os\_thr](#scf_os_thr)
    - [scf\_os\_ndim](#scf_os_ndim)
    - [sc\_os\_ndim](#sc_os_ndim)
    - [lspinorb](#lspinorb)
    - [noncolin](#noncolin)
    - [soc\_lambda](#soc_lambda)
    - [dfthalf\_type](#dfthalf_type)
  - [Electronic structure (SDFT)](#electronic-structure-sdft)
    - [method\_sto](#method_sto)
    - [nbands\_sto](#nbands_sto)
    - [nche\_sto](#nche_sto)
    - [emin\_sto](#emin_sto)
    - [emax\_sto](#emax_sto)
    - [seed\_sto](#seed_sto)
    - [initsto\_ecut](#initsto_ecut)
    - [initsto\_freq](#initsto_freq)
    - [npart\_sto](#npart_sto)
  - [Geometry relaxation](#geometry-relaxation)
    - [relax\_method](#relax_method)
    - [relax\_scale\_force](#relax_scale_force)
    - [relax\_nmax](#relax_nmax)
    - [relax\_cg\_thr](#relax_cg_thr)
    - [force\_thr](#force_thr)
    - [force\_thr\_ev](#force_thr_ev)
    - [force\_zero\_out](#force_zero_out)
    - [relax\_bfgs\_w1](#relax_bfgs_w1)
    - [relax\_bfgs\_w2](#relax_bfgs_w2)
    - [relax\_bfgs\_rmax](#relax_bfgs_rmax)
    - [relax\_bfgs\_rmin](#relax_bfgs_rmin)
    - [relax\_bfgs\_init](#relax_bfgs_init)
    - [stress\_thr](#stress_thr)
    - [press1](#press1)
    - [press2](#press2)
    - [press3](#press3)
    - [fixed\_axes](#fixed_axes)
    - [fixed\_ibrav](#fixed_ibrav)
    - [fixed\_atoms](#fixed_atoms)
  - [Output information](#output-information)
    - [out\_freq\_ion](#out_freq_ion)
    - [out\_freq\_elec](#out_freq_elec)
    - [out\_chg](#out_chg)
    - [out\_occ\_mat](#out_occ_mat)
    - [out\_pot](#out_pot)
    - [out\_sol](#out_sol)
    - [out\_dmk](#out_dmk)
    - [out\_dmr](#out_dmr)
    - [out\_wfc\_pw](#out_wfc_pw)
    - [out\_wfc\_lcao](#out_wfc_lcao)
    - [out\_dos](#out_dos)
    - [out\_ldos](#out_ldos)
    - [out\_band](#out_band)
    - [out\_proj\_band](#out_proj_band)
    - [out\_stru](#out_stru)
    - [out\_level](#out_level)
    - [out\_hsk](#out_hsk)
    - [out\_mat\_hs](#out_mat_hs)
    - [out\_hsr](#out_hsr)
    - [out\_mat\_hs2](#out_mat_hs2)
    - [out\_mat\_tk](#out_mat_tk)
    - [out\_mat\_r](#out_mat_r)
    - [out\_mat\_t](#out_mat_t)
    - [out\_mat\_dh](#out_mat_dh)
    - [out\_mat\_dh\_t](#out_mat_dh_t)
    - [out\_mat\_dh\_vl](#out_mat_dh_vl)
    - [out\_mat\_dh\_vnl](#out_mat_dh_vnl)
    - [out\_mat\_dh\_vh](#out_mat_dh_vh)
    - [out\_mat\_dh\_vxc](#out_mat_dh_vxc)
    - [out\_mat\_h\_t](#out_mat_h_t)
    - [out\_mat\_vnlk](#out_mat_vnlk)
    - [out\_mat\_h\_vnl](#out_mat_h_vnl)
    - [out\_mat\_vlk](#out_mat_vlk)
    - [out\_mat\_h\_vl](#out_mat_h_vl)
    - [out\_mat\_vhk](#out_mat_vhk)
    - [out\_mat\_h\_vh](#out_mat_h_vh)
    - [out\_mat\_vxck](#out_mat_vxck)
    - [out\_mat\_h\_vxc](#out_mat_h_vxc)
    - [out\_mat\_exxk](#out_mat_exxk)
    - [out\_mat\_h\_exx](#out_mat_h_exx)
    - [out\_mat\_exx](#out_mat_exx)
    - [out\_mat\_ds](#out_mat_ds)
    - [out\_mat\_xc](#out_mat_xc)
    - [out\_mat\_xc2](#out_mat_xc2)
    - [out\_mat\_l](#out_mat_l)
    - [out\_mat\_p](#out_mat_p)
    - [out\_xc\_r](#out_xc_r)
    - [out\_eband](#out_eband)
    - [out\_eband\_terms](#out_eband_terms)
    - [out\_hsr\_npz](#out_hsr_npz)
    - [out\_dm\_npz](#out_dm_npz)
    - [out\_mul](#out_mul)
    - [out\_app\_flag](#out_app_flag)
    - [out\_element\_info](#out_element_info)
    - [rpa](#rpa)
    - [rpa\_out\_vel](#rpa_out_vel)
    - [rpa\_outdir](#rpa_outdir)
    - [out\_librpa\_ver](#out_librpa_ver)
    - [out\_pchg](#out_pchg)
    - [out\_wfc\_norm](#out_wfc_norm)
    - [out\_wfc\_re\_im](#out_wfc_re_im)
    - [if\_separate\_k](#if_separate_k)
    - [out\_elf](#out_elf)
    - [out\_spillage](#out_spillage)
    - [out\_alllog](#out_alllog)
  - [Density of states](#density-of-states)
    - [dos\_edelta\_ev](#dos_edelta_ev)
    - [dos\_sigma](#dos_sigma)
    - [dos\_scale](#dos_scale)
    - [dos\_emin\_ev](#dos_emin_ev)
    - [dos\_emax\_ev](#dos_emax_ev)
    - [dos\_nche](#dos_nche)
    - [stm\_bias](#stm_bias)
    - [ldos\_line](#ldos_line)
  - [NAOs](#naos)
    - [bessel\_nao\_ecut](#bessel_nao_ecut)
    - [bessel\_nao\_tolerence](#bessel_nao_tolerence)
    - [bessel\_nao\_rcut](#bessel_nao_rcut)
    - [bessel\_nao\_smooth](#bessel_nao_smooth)
    - [bessel\_nao\_sigma](#bessel_nao_sigma)
  - [DeePKS](#deepks)
    - [deepks\_out\_labels](#deepks_out_labels)
    - [deepks\_out\_freq\_elec](#deepks_out_freq_elec)
    - [deepks\_out\_base](#deepks_out_base)
    - [deepks\_scf](#deepks_scf)
    - [deepks\_grad](#deepks_grad)
    - [deepks\_equiv](#deepks_equiv)
    - [deepks\_model](#deepks_model)
    - [bessel\_descriptor\_lmax](#bessel_descriptor_lmax)
    - [bessel\_descriptor\_ecut](#bessel_descriptor_ecut)
    - [bessel\_descriptor\_tolerence](#bessel_descriptor_tolerence)
    - [bessel\_descriptor\_rcut](#bessel_descriptor_rcut)
    - [bessel\_descriptor\_smooth](#bessel_descriptor_smooth)
    - [bessel\_descriptor\_sigma](#bessel_descriptor_sigma)
    - [deepks\_bandgap](#deepks_bandgap)
    - [deepks\_band\_range](#deepks_band_range)
    - [deepks\_v\_delta](#deepks_v_delta)
    - [deepks\_out\_unittest](#deepks_out_unittest)
  - [OFDFT: orbital free density functional theory](#ofdft-orbital-free-density-functional-theory)
    - [of\_kinetic](#of_kinetic)
    - [of\_method](#of_method)
    - [of\_conv](#of_conv)
    - [of\_tole](#of_tole)
    - [of\_tolp](#of_tolp)
    - [of\_tf\_weight](#of_tf_weight)
    - [of\_vw\_weight](#of_vw_weight)
    - [of\_wt\_alpha](#of_wt_alpha)
    - [of\_wt\_beta](#of_wt_beta)
    - [of\_extwt\_kappa](#of_extwt_kappa)
    - [of\_wt\_rho0](#of_wt_rho0)
    - [of\_hold\_rho0](#of_hold_rho0)
    - [of\_lkt\_a](#of_lkt_a)
    - [of\_xwm\_rho\_ref](#of_xwm_rho_ref)
    - [of\_xwm\_kappa](#of_xwm_kappa)
    - [of\_read\_kernel](#of_read_kernel)
    - [of\_kernel\_file](#of_kernel_file)
    - [of\_full\_pw](#of_full_pw)
    - [of\_full\_pw\_dim](#of_full_pw_dim)
  - [ML-KEDF: machine learning based kinetic energy density functional for OFDFT](#ml-kedf-machine-learning-based-kinetic-energy-density-functional-for-ofdft)
    - [of\_ml\_gene\_data](#of_ml_gene_data)
    - [of\_ml\_device](#of_ml_device)
    - [of\_ml\_feg](#of_ml_feg)
    - [of\_ml\_nkernel](#of_ml_nkernel)
    - [of\_ml\_kernel](#of_ml_kernel)
    - [of\_ml\_kernel\_scaling](#of_ml_kernel_scaling)
    - [of\_ml\_yukawa\_alpha](#of_ml_yukawa_alpha)
    - [of\_ml\_kernel\_file](#of_ml_kernel_file)
    - [of\_ml\_gamma](#of_ml_gamma)
    - [of\_ml\_p](#of_ml_p)
    - [of\_ml\_q](#of_ml_q)
    - [of\_ml\_tanhp](#of_ml_tanhp)
    - [of\_ml\_tanhq](#of_ml_tanhq)
    - [of\_ml\_chi\_p](#of_ml_chi_p)
    - [of\_ml\_chi\_q](#of_ml_chi_q)
    - [of\_ml\_gammanl](#of_ml_gammanl)
    - [of\_ml\_pnl](#of_ml_pnl)
    - [of\_ml\_qnl](#of_ml_qnl)
    - [of\_ml\_xi](#of_ml_xi)
    - [of\_ml\_tanhxi](#of_ml_tanhxi)
    - [of\_ml\_tanhxi\_nl](#of_ml_tanhxi_nl)
    - [of\_ml\_tanh\_pnl](#of_ml_tanh_pnl)
    - [of\_ml\_tanh\_qnl](#of_ml_tanh_qnl)
    - [of\_ml\_tanhp\_nl](#of_ml_tanhp_nl)
    - [of\_ml\_tanhq\_nl](#of_ml_tanhq_nl)
    - [of\_ml\_chi\_xi](#of_ml_chi_xi)
    - [of\_ml\_chi\_pnl](#of_ml_chi_pnl)
    - [of\_ml\_chi\_qnl](#of_ml_chi_qnl)
    - [of\_ml\_local\_test](#of_ml_local_test)
    - [ml\_exx](#ml_exx)
  - [TDOFDFT: time dependent orbital free density functional theory](#tdofdft-time-dependent-orbital-free-density-functional-theory)
    - [of\_cd](#of_cd)
    - [of\_mcd\_alpha](#of_mcd_alpha)
  - [Electric field and dipole correction](#electric-field-and-dipole-correction)
    - [efield\_flag](#efield_flag)
    - [dip\_cor\_flag](#dip_cor_flag)
    - [efield\_dir](#efield_dir)
    - [efield\_pos\_max](#efield_pos_max)
    - [efield\_pos\_dec](#efield_pos_dec)
    - [efield\_amp](#efield_amp)
  - [Gate field (compensating charge)](#gate-field-compensating-charge)
    - [gate\_flag](#gate_flag)
    - [zgate](#zgate)
    - [block](#block)
    - [block\_down](#block_down)
    - [block\_up](#block_up)
    - [block\_height](#block_height)
  - [Exact Exchange (Common)](#exact-exchange-common)
    - [exx\_fock\_alpha](#exx_fock_alpha)
    - [init\_exx](#init_exx)
    - [exx\_erfc\_alpha](#exx_erfc_alpha)
    - [exx\_erfc\_omega](#exx_erfc_omega)
    - [exx\_separate\_loop](#exx_separate_loop)
    - [exx\_hybrid\_step](#exx_hybrid_step)
    - [exx\_mixing\_beta](#exx_mixing_beta)
    - [exx\_singularity\_correction](#exx_singularity_correction)
  - [Exact Exchange (LCAO in PW)](#exact-exchange-lcao-in-pw)
    - [exx\_fock\_lambda](#exx_fock_lambda)
  - [Exact Exchange (LCAO)](#exact-exchange-lcao)
    - [device\_exx](#device_exx)
    - [exx\_pca\_threshold](#exx_pca_threshold)
    - [exx\_c\_threshold](#exx_c_threshold)
    - [exx\_cs\_inv\_thr](#exx_cs_inv_thr)
    - [exx\_v\_threshold](#exx_v_threshold)
    - [exx\_dm\_threshold](#exx_dm_threshold)
    - [exx\_c\_grad\_threshold](#exx_c_grad_threshold)
    - [exx\_v\_grad\_threshold](#exx_v_grad_threshold)
    - [exx\_c\_grad\_r\_threshold](#exx_c_grad_r_threshold)
    - [exx\_v\_grad\_r\_threshold](#exx_v_grad_r_threshold)
    - [exx\_ccp\_rmesh\_times](#exx_ccp_rmesh_times)
    - [exx\_opt\_orb\_lmax](#exx_opt_orb_lmax)
    - [exx\_opt\_orb\_ecut](#exx_opt_orb_ecut)
    - [exx\_opt\_orb\_tolerence](#exx_opt_orb_tolerence)
    - [exx\_real\_number](#exx_real_number)
    - [rpa\_ccp\_rmesh\_times](#rpa_ccp_rmesh_times)
    - [rpa\_cut\_coulomb](#rpa_cut_coulomb)
    - [rpa\_cut\_radius](#rpa_cut_radius)
    - [rpa\_cut\_width](#rpa_cut_width)
    - [exx\_symmetry\_realspace](#exx_symmetry_realspace)
    - [out\_ri\_cv](#out_ri_cv)
  - [Exact Exchange (PW)](#exact-exchange-pw)
    - [exxace](#exxace)
    - [exx\_gamma\_extra](#exx_gamma_extra)
    - [ecutexx](#ecutexx)
    - [exx\_batch\_size](#exx_batch_size)
    - [exx\_thr\_type](#exx_thr_type)
    - [exx\_ene\_thr](#exx_ene_thr)
  - [Molecular dynamics](#molecular-dynamics)
    - [md\_type](#md_type)
    - [md\_nstep](#md_nstep)
    - [md\_dt](#md_dt)
    - [md\_thermostat](#md_thermostat)
    - [md\_tfirst](#md_tfirst)
    - [md\_tlast](#md_tlast)
    - [md\_prec\_level](#md_prec_level)
    - [md\_restart](#md_restart)
    - [md\_restartfreq](#md_restartfreq)
    - [out\_thermo\_freq](#out_thermo_freq)
    - [md\_neighbor\_skin](#md_neighbor_skin)
    - [md\_seed](#md_seed)
    - [md\_tfreq](#md_tfreq)
    - [md\_tchain](#md_tchain)
    - [md\_pmode](#md_pmode)
    - [ref\_cell\_factor](#ref_cell_factor)
    - [md\_pcouple](#md_pcouple)
    - [md\_pfirst](#md_pfirst)
    - [md\_plast](#md_plast)
    - [md\_pfreq](#md_pfreq)
    - [md\_pchain](#md_pchain)
    - [lj\_rule](#lj_rule)
    - [lj\_eshift](#lj_eshift)
    - [lj\_rcut](#lj_rcut)
    - [lj\_epsilon](#lj_epsilon)
    - [lj\_sigma](#lj_sigma)
    - [pot\_file](#pot_file)
    - [snap\_param\_file](#snap_param_file)
    - [dp\_rescaling](#dp_rescaling)
    - [dp\_fparam](#dp_fparam)
    - [dp\_aparam](#dp_aparam)
    - [msst\_direction](#msst_direction)
    - [msst\_vel](#msst_vel)
    - [msst\_vis](#msst_vis)
    - [msst\_tscale](#msst_tscale)
    - [msst\_qmass](#msst_qmass)
    - [md\_damp](#md_damp)
    - [md\_csvr\_tau](#md_csvr_tau)
    - [md\_tolerance](#md_tolerance)
    - [md\_nraise](#md_nraise)
    - [cal\_syns](#cal_syns)
    - [dmax](#dmax)
    - [plumed](#plumed)
    - [plumed\_file](#plumed_file)
  - [DFT+U correction](#dftu-correction)
    - [dft\_plus\_u](#dft_plus_u)
    - [dftu\_dc](#dftu_dc)
    - [dftu\_alpha](#dftu_alpha)
    - [dft\_plus\_dmft](#dft_plus_dmft)
    - [orbital\_corr](#orbital_corr)
    - [hubbard\_u](#hubbard_u)
    - [yukawa\_potential](#yukawa_potential)
    - [yukawa\_lambda](#yukawa_lambda)
    - [uramping](#uramping)
    - [init\_occ\_mat](#init_occ_mat)
    - [omc](#omc)
    - [onsite\_radius](#onsite_radius)
  - [Spin-Constrained DFT](#spin-constrained-dft)
    - [sc\_mag\_switch](#sc_mag_switch)
    - [decay\_grad\_switch](#decay_grad_switch)
    - [sc\_thr](#sc_thr)
    - [nsc](#nsc)
    - [nsc\_min](#nsc_min)
    - [alpha\_trial](#alpha_trial)
    - [sccut](#sccut)
    - [sc\_drop\_thr](#sc_drop_thr)
    - [sc\_scf\_thr](#sc_scf_thr)
    - [sc\_direction\_only](#sc_direction_only)
    - [sc\_lambda\_strategy](#sc_lambda_strategy)
    - [sc\_scan\_lambda\_start](#sc_scan_lambda_start)
    - [sc\_scan\_lambda\_end](#sc_scan_lambda_end)
    - [sc\_scan\_steps](#sc_scan_steps)
  - [vdW correction](#vdw-correction)
    - [vdw\_method](#vdw_method)
    - [vdw\_d4\_xc](#vdw_d4_xc)
    - [vdw\_d4\_model](#vdw_d4_model)
    - [vdw\_s6](#vdw_s6)
    - [vdw\_s8](#vdw_s8)
    - [vdw\_a1](#vdw_a1)
    - [vdw\_a2](#vdw_a2)
    - [vdw\_d](#vdw_d)
    - [vdw\_abc](#vdw_abc)
    - [vdw\_c6\_file](#vdw_c6_file)
    - [vdw\_c6\_unit](#vdw_c6_unit)
    - [vdw\_r0\_file](#vdw_r0_file)
    - [vdw\_r0\_unit](#vdw_r0_unit)
    - [vdw\_cutoff\_type](#vdw_cutoff_type)
    - [vdw\_cutoff\_radius](#vdw_cutoff_radius)
    - [vdw\_radius\_unit](#vdw_radius_unit)
    - [vdw\_cutoff\_width2](#vdw_cutoff_width2)
    - [vdw\_cutoff\_width3](#vdw_cutoff_width3)
    - [vdw\_cutoff\_period](#vdw_cutoff_period)
    - [vdw\_cn\_thr](#vdw_cn_thr)
    - [vdw\_cn\_thr\_unit](#vdw_cn_thr_unit)
  - [Berry phase and wannier90 interface](#berry-phase-and-wannier90-interface)
    - [berry\_phase](#berry_phase)
    - [gdir](#gdir)
    - [towannier90](#towannier90)
    - [nnkpfile](#nnkpfile)
    - [wannier\_method](#wannier_method)
    - [wannier\_spin](#wannier_spin)
    - [out\_wannier\_mmn](#out_wannier_mmn)
    - [out\_wannier\_amn](#out_wannier_amn)
    - [out\_wannier\_eig](#out_wannier_eig)
    - [out\_wannier\_spn](#out_wannier_spn)
    - [out\_wannier\_unk](#out_wannier_unk)
    - [out\_wannier\_wvfn\_formatted](#out_wannier_wvfn_formatted)
  - [Real-Time TDDFT (Common)](#real-time-tddft-common)
    - [td\_scf\_nmax](#td_scf_nmax)
    - [estep\_per\_md](#estep_per_md)
    - [td\_dt](#td_dt)
    - [td\_print\_eij](#td_print_eij)
    - [td\_propagator](#td_propagator)
    - [td\_vext](#td_vext)
    - [td\_vext\_dire](#td_vext_dire)
    - [td\_stype](#td_stype)
    - [td\_dipole\_position](#td_dipole_position)
    - [td\_dipole\_width](#td_dipole_width)
    - [td\_efield\_amp](#td_efield_amp)
    - [td\_dipole\_moment](#td_dipole_moment)
    - [td\_ttype](#td_ttype)
    - [td\_tstart](#td_tstart)
    - [td\_tend](#td_tend)
    - [td\_lcut1](#td_lcut1)
    - [td\_lcut2](#td_lcut2)
    - [td\_gauss\_freq](#td_gauss_freq)
    - [td\_gauss\_phase](#td_gauss_phase)
    - [td\_gauss\_sigma](#td_gauss_sigma)
    - [td\_gauss\_t0](#td_gauss_t0)
    - [td\_trape\_freq](#td_trape_freq)
    - [td\_trape\_phase](#td_trape_phase)
    - [td\_trape\_t1](#td_trape_t1)
    - [td\_trape\_t2](#td_trape_t2)
    - [td\_trape\_t3](#td_trape_t3)
    - [td\_trigo\_freq1](#td_trigo_freq1)
    - [td\_trigo\_freq2](#td_trigo_freq2)
    - [td\_trigo\_phase1](#td_trigo_phase1)
    - [td\_trigo\_phase2](#td_trigo_phase2)
    - [td\_heavi\_t0](#td_heavi_t0)
    - [td\_supsine\_freq](#td_supsine_freq)
    - [td\_supsine\_phase](#td_supsine_phase)
    - [td\_supsine\_sigma](#td_supsine_sigma)
    - [td\_supsine\_tstart](#td_supsine_tstart)
    - [td\_supsine\_tend](#td_supsine_tend)
    - [init\_vecpot](#init_vecpot)
    - [ocp](#ocp)
    - [ocp\_set](#ocp_set)
    - [out\_freq\_td](#out_freq_td)
    - [out\_dipole](#out_dipole)
    - [out\_current](#out_current)
    - [out\_current\_k](#out_current_k)
    - [out\_efield](#out_efield)
    - [out\_vecpot](#out_vecpot)
  - [Real-Time TDDFT (LCAO)](#real-time-tddft-lcao)
    - [td\_edm](#td_edm)
  - [Real-Time TDDFT (PW)](#real-time-tddft-pw)
    - [td\_orthonormal](#td_orthonormal)
    - [td\_out\_stat](#td_out_stat)
    - [td\_max\_halvings](#td_max_halvings)
    - [td\_out\_mag](#td_out_mag)
    - [td\_out\_torque](#td_out_torque)
    - [td\_out\_spincur](#td_out_spincur)
    - [lin\_solver](#lin_solver)
    - [lin\_precond](#lin_precond)
    - [lin\_thr](#lin_thr)
    - [lin\_maxiter](#lin_maxiter)
    - [lin\_gmres\_restart](#lin_gmres_restart)
    - [td\_cn\_init](#td_cn_init)
    - [lin\_reconstruct](#lin_reconstruct)
    - [td\_exp\_method](#td_exp_method)
    - [td\_exp\_order](#td_exp_order)
    - [td\_exp\_thr](#td_exp_thr)
    - [td\_exp\_krylov\_dim](#td_exp_krylov_dim)
    - [td\_nl\_motion](#td_nl_motion)
    - [td\_vg\_nl](#td_vg_nl)
  - [Variables useful for debugging](#variables-useful-for-debugging)
    - [nurse](#nurse)
    - [t\_in\_h](#t_in_h)
    - [vl\_in\_h](#vl_in_h)
    - [vnl\_in\_h](#vnl_in_h)
    - [vh\_in\_h](#vh_in_h)
    - [vion\_in\_h](#vion_in_h)
    - [test\_force](#test_force)
    - [test\_stress](#test_stress)
    - [test\_skip\_ewald](#test_skip_ewald)
  - [Electronic conductivities](#electronic-conductivities)
    - [cal\_cond](#cal_cond)
    - [cond\_che\_thr](#cond_che_thr)
    - [cond\_dw](#cond_dw)
    - [cond\_wcut](#cond_wcut)
    - [cond\_dt](#cond_dt)
    - [cond\_dtbatch](#cond_dtbatch)
    - [cond\_smear](#cond_smear)
    - [cond\_fwhm](#cond_fwhm)
    - [cond\_nonlocal](#cond_nonlocal)
  - [Implicit solvation model](#implicit-solvation-model)
    - [imp\_sol](#imp_sol)
    - [eb\_k](#eb_k)
    - [tau](#tau)
    - [sigma\_k](#sigma_k)
    - [nc\_k](#nc_k)
    - [sccs\_preset](#sccs_preset)
    - [sccs\_epsilon](#sccs_epsilon)
    - [sccs\_rho\_min](#sccs_rho_min)
    - [sccs\_rho\_max](#sccs_rho_max)
    - [sccs\_gamma](#sccs_gamma)
    - [sccs\_pressure](#sccs_pressure)
    - [sccs\_maxiter](#sccs_maxiter)
    - [sccs\_tol\_rms](#sccs_tol_rms)
    - [sccs\_tol\_max](#sccs_tol_max)
    - [sccs\_surface\_eta](#sccs_surface_eta)
    - [sccs\_lowpass\_p1](#sccs_lowpass_p1)
    - [sccs\_lowpass\_p2](#sccs_lowpass_p2)
    - [sccs\_solvent\_mode](#sccs_solvent_mode)
    - [sccs\_corespread](#sccs_corespread)
    - [sccs\_solvent\_radius](#sccs_solvent_radius)
    - [sccs\_radial\_scale](#sccs_radial_scale)
    - [sccs\_radial\_spread](#sccs_radial_spread)
    - [sccs\_filling\_thr](#sccs_filling_thr)
    - [sccs\_filling\_spread](#sccs_filling_spread)
    - [sccs\_start\_drho](#sccs_start_drho)
    - [sccs\_start\_nmax](#sccs_start_nmax)
    - [sccs\_debug](#sccs_debug)
  - [Quasiatomic Orbital (QO) analysis](#quasiatomic-orbital-qo-analysis)
    - [qo\_switch](#qo_switch)
    - [qo\_basis](#qo_basis)
    - [qo\_strategy](#qo_strategy)
    - [qo\_screening\_coeff](#qo_screening_coeff)
    - [qo\_thr](#qo_thr)
  - [PEXSI](#pexsi)
    - [pexsi\_npole](#pexsi_npole)
    - [pexsi\_inertia](#pexsi_inertia)
    - [pexsi\_nmax](#pexsi_nmax)
    - [pexsi\_comm](#pexsi_comm)
    - [pexsi\_storage](#pexsi_storage)
    - [pexsi\_ordering](#pexsi_ordering)
    - [pexsi\_row\_ordering](#pexsi_row_ordering)
    - [pexsi\_nproc](#pexsi_nproc)
    - [pexsi\_symm](#pexsi_symm)
    - [pexsi\_trans](#pexsi_trans)
    - [pexsi\_method](#pexsi_method)
    - [pexsi\_nproc\_pole](#pexsi_nproc_pole)
    - [pexsi\_temp](#pexsi_temp)
    - [pexsi\_gap](#pexsi_gap)
    - [pexsi\_delta\_e](#pexsi_delta_e)
    - [pexsi\_mu\_lower](#pexsi_mu_lower)
    - [pexsi\_mu\_upper](#pexsi_mu_upper)
    - [pexsi\_mu](#pexsi_mu)
    - [pexsi\_mu\_thr](#pexsi_mu_thr)
    - [pexsi\_mu\_expand](#pexsi_mu_expand)
    - [pexsi\_mu\_guard](#pexsi_mu_guard)
    - [pexsi\_elec\_thr](#pexsi_elec_thr)
    - [pexsi\_zero\_thr](#pexsi_zero_thr)
  - [Linear Response TDDFT](#linear-response-tddft)
    - [xc\_kernel](#xc_kernel)
    - [lr\_init\_xc\_kernel](#lr_init_xc_kernel)
    - [lr\_solver](#lr_solver)
    - [lr\_thr](#lr_thr)
    - [nocc](#nocc)
    - [nvirt](#nvirt)
    - [lr\_nstates](#lr_nstates)
    - [lr\_target\_state](#lr_target_state)
    - [lr\_degen\_thr](#lr_degen_thr)
    - [lr\_degen\_mode](#lr_degen_mode)
    - [lr\_grad\_solver](#lr_grad_solver)
    - [lr\_target\_spin](#lr_target_spin)
    - [lr\_unrestricted](#lr_unrestricted)
    - [abs\_wavelen\_range](#abs_wavelen_range)
    - [out\_wfc\_lr](#out_wfc_lr)
    - [abs\_gauge](#abs_gauge)
    - [abs\_broadening](#abs_broadening)
    - [plot\_istate](#plot_istate)
    - [exciton\_plot\_type](#exciton_plot_type)
    - [exciton\_plot\_format](#exciton_plot_format)
    - [exciton\_fixed\_coordinate](#exciton_fixed_coordinate)
    - [exciton\_slice\_plane](#exciton_slice_plane)
    - [exciton\_slice\_pos](#exciton_slice_pos)
    - [exciton\_slice\_npoints](#exciton_slice_npoints)
    - [exciton\_slice\_range](#exciton_slice_range)
    - [ri\_hartree\_benchmark](#ri_hartree_benchmark)
    - [aims\_nbasis](#aims_nbasis)
  - [Bethe-Salpeter Equation](#bethe-salpeter-equation)
    - [bse\_tda](#bse_tda)
    - [bse\_spin\_types](#bse_spin_types)
    - [bse\_mem\_save](#bse_mem_save)
    - [bse\_ri\_hartree](#bse_ri_hartree)
    - [bse\_use\_fine\_kgrid](#bse_use_fine_kgrid)
    - [bse\_q\_approx\_mode](#bse_q_approx_mode)
    - [bse\_q\_approx\_threshold](#bse_q_approx_threshold)
    - [out\_bse\_ab](#out_bse_ab)
    - [bse\_continue](#bse_continue)
  - [Reduced Density Matrix Functional Theory](#reduced-density-matrix-functional-theory)
    - [rdmft](#rdmft)
    - [rdmft\_power\_alpha](#rdmft_power_alpha)
  - [Density functional perturbation theory](#density-functional-perturbation-theory)
    - [dfpt\_qmesh](#dfpt_qmesh)
    - [dfpt\_qfile](#dfpt_qfile)
    - [dfpt\_compute\_q0](#dfpt_compute_q0)
    - [dfpt\_loto](#dfpt_loto)
    - [dfpt\_out\_dyn](#dfpt_out_dyn)
    - [dfpt\_conv\_thr](#dfpt_conv_thr)
    - [dfpt\_max\_iter](#dfpt_max_iter)
    - [dfpt\_lin\_conv\_thr](#dfpt_lin_conv_thr)
    - [dfpt\_lin\_max\_iter](#dfpt_lin_max_iter)
    - [dfpt\_mix\_beta](#dfpt_mix_beta)
    - [dfpt\_asr](#dfpt_asr)
    - [dfpt\_mix\_type](#dfpt_mix_type)
    - [dfpt\_kerker\_a2](#dfpt_kerker_a2)
    - [dfpt\_broyden\_ndim](#dfpt_broyden_ndim)

## System variables

### suffix

- **Type**: String
- **Description**: In each run, ABACUS will generate a subdirectory in the working directory. This subdirectory contains all the information of the run. The subdirectory name has the format: OUT.suffix, where the suffix is the name you can pick up for your convenience.
- **Default**: ABACUS

### ntype

- **Type**: Integer
- **Description**: Number of different atom species in the calculation.
- **Default**: 0

### cell_replica

- **Type**: Three Integers
- **Description**: Replicate the input STRU by Na, Nb, and Nc along its lattice vectors for distributed MDCell workflows. This parameter is only used for classical potentials or machine-learned interatomic potentials. The default is 1 1 1, which preserves the input structure.
- **Default**: 1 1 1

### calculation

- **Type**: String
- **Allowed values**: scf, relax, md, cell-relax, nscf, get_s, get_wf, get_pchg, gen_bessel, gen_opt_abfs, test_memory, test_neighbour

**Requirements**

| Option | Requirements |
| --- | --- |
| `md`, `relax` | [`cal_force`](#cal_force)==true |
| `cell-relax` | [`cal_force`](#cal_force)==true and [`cal_stress`](#cal_stress)==true |
| `get_wf` | [`cal_force`](#cal_force)==false and [`init_chg`](#init_chg)==atomic and [`chg_extrap`](#chg_extrap)==atomic and [`out_proj_band`](#out_proj_band)==false and [`bx`](#bx)==1 and [`by`](#by)==1 and [`bz`](#bz)==1 and [`basis_type`](#basis_type)!=pw |
| `get_pchg` | [`cal_force`](#cal_force)==false and [`init_chg`](#init_chg)==atomic and [`chg_extrap`](#chg_extrap)==atomic and [`out_proj_band`](#out_proj_band)==false and [`basis_type`](#basis_type)!=pw |
| `get_s` | [`cal_force`](#cal_force)==false |
| `nscf` | [`scf_nmax`](#scf_nmax)==1 |
| `gen_bessel` | [`basis_type`](#basis_type)==pw |

- **Description**: Specify the type of calculation.

  - scf: perform self-consistent electronic structure calculations
  - nscf: perform non-self-consistent electronic structure calculations using a saved charge density. PW screened hybrids also require SCF binary wavefunctions and eig_occ.txt; see [hybrid NSCF](../elec_properties/hybrid_nscf.md).
  - relax: perform structure relaxation calculations, the relax_nmax parameter depicts the maximal number of ionic iterations
  - cell-relax: perform cell relaxation calculations
  - md: perform molecular dynamics simulations
  - get_pchg: obtain partial (band-decomposed) charge densities (for LCAO basis only). See out_pchg for more information
  - get_wf: obtain real space wave functions (for LCAO basis only). See out_wfc_norm and out_wfc_re_im for more information
  - get_s: obtain the overlap matrix formed by localized orbitals (for LCAO basis with multiple k points). The file name is OUT.${suffix}/sr_nao.csr, with the same file format as generated by out_hsr 1. When out_mat_l is enabled, the angular momentum matrices lrx_nao.csr, lry_nao.csr and lrz_nao.csr are also written, because they are built from the orbital tables and do not require an SCF cycle. When out_mat_p is enabled, the momentum operator matrices prx_nao.csr, pry_nao.csr and prz_nao.csr are also written; these include the gradient and nonlocal-pseudopotential commutator terms and likewise require no SCF cycle
  - gen_bessel: generates projectors, i.e., a series of Bessel functions, for the DeePKS method (for LCAO basis only)
  - gen_opt_abfs: generate opt-ABFs as discussed in this article
  - test_memory: obtain a rough estimation of memory consumption for the calculation
  - test_neighbour: obtain information of neighboring atoms (for LCAO basis only), please specify a positive search_radius manually
- **Default**: scf

### socket_driver

- **Type**: Boolean
- **Description**: If set to True, ABACUS keeps the calculation type as scf and receives atomic positions from an external driver through the i-PI socket protocol.

  > Note: Use calculation = scf with socket_driver = True. ABACUS connects to the external i-PI server selected by ABACUS_SOCKET_ADDRESS. If ABACUS_SOCKET_ADDRESS is unset, ABACUS uses localhost:31415. The value can use one of two forms:

  - host:port, for example localhost:31415 or 127.0.0.1:31415, opens a TCP connection to that host and port. Use this when the i-PI server listens on a TCP port.
  - path:UNIX, for example /tmp/ipi_abacus_si:UNIX, opens a Unix-domain socket at the given filesystem path. The :UNIX suffix tells ABACUS that the preceding value is a local socket path rather than a TCP host name. This form only works on the same machine.
  When using the ASE AbacusSocketIO interface, this environment variable is set automatically from the port or unixsocket calculator argument.

  Socket mode always computes energy. Force and stress extraction follows cal_force and cal_stress independently; disabled properties are sent as protocol padding and marked absent in the ABACUS i-PI extras metadata, not reported as physical zero values. This metadata extension is required for safe optional-property handling: a legacy response with empty extras is accepted only for energy-only use, while a generic client that ignores extras cannot distinguish padding from a computed zero. A non-converged SCF step is returned with scf_converged=false metadata so an external driver can choose its policy.
- **Default**: False

### esolver_type

- **Type**: String

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| `tddft` | [`exx_separate_loop`](#exx_separate_loop)==false and [`calculation`](#calculation)==md and [`basis_type`](#basis_type) in [pw, lcao] |
| [`esolver_type`](#esolver_type) in [lj, dp] and [`calculation`](#calculation)==md | [`cal_stress`](#cal_stress)==true |

- **Description**: Choose the energy solver.
  - `ksdft`: Kohn-Sham density functional theory.
  - `ofdft`: Orbital-free density functional theory.
  - `tdofdft`: Time-dependent orbital-free density functional theory.
  - `sdft`: Stochastic density functional theory.
  - `tddft`: Real-time time-dependent density functional theory (RT-TDDFT). Requires `calculation=md`.
  - `lj`: Lennard-Jones potential.
  - `dp`: Deep Potential (DP) model.
  - `nep`: Neuroevolution potential (NEP).
  - `snap`: Spectral Neighbor Analysis Potential (SNAP).
  - `ks-lr`: Kohn-Sham density functional theory followed by linear-response time-dependent density functional theory (LR-TDDFT; under development).
  - `lr`: Linear-response time-dependent density functional theory (LR-TDDFT) using precomputed Kohn-Sham orbitals (under development).
  - `dfpt`: Density functional perturbation theory (DFPT; under development).

  > Note: Excited-state forces (`cal_force = 1`) and atomic relaxation with `ks-lr` or `lr` currently require `gamma_only = 1` and pseudopotentials without nonlinear core correction (NLCC). NLCC core-density response-force and XC-kernel derivative terms are not implemented; these force requests are rejected after reading the pseudopotentials, before force evaluation. Multi-k spectra and spectra with NLCC pseudopotentials remain available with `cal_force = 0`. Ground-state forces are unaffected by this LR restriction.
- **Default**: ksdft

### symmetry

- **Type**: String
- **Allowed values**: -1, 0, 1

**Requirements**

| Option | Requirements |
| --- | --- |
| `-1`, `0` | [`exx_symmetry_realspace`](#exx_symmetry_realspace)==false |

- **Description**: Takes value 1, 0 or -1.
  - -1: No symmetry will be considered. It is recommended to set -1 for non-colinear + soc calculations, where time reversal symmetry is broken sometimes.
  - 0: Only time reversal symmetry would be considered in symmetry operations, which implied k point and -k point would be treated as a single k point with twice the weight.
  - 1: Symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations (point groups, space groups, primitive cells, and irreducible k-points). For a magnetic system, the symmetry of the initial magnetic structure will be analyzed and preserved.

  > Note: When symmetry is enabled (value 1), k-points are reduced to the irreducible Brillouin zone (IBZ). For explicit k-point lists with custom weights (see KPT file), the custom weights are preserved during symmetry reduction. For Monkhorst-Pack grids, uniform weights are used.
- **Default**: 1 normally; 0 or -1 depending on the calculation and enabled features.

### symmetry_prec

- **Type**: Real
- **Description**: The accuracy for symmetry analysis. Typically, the default value is good enough, but if the lattice parameters or atom positions in STRU file are not accurate enough, this value should be enlarged.
  > Note: if calculation==cell_relax, this value can be dynamically changed corresponding to the variation of accuracy of the lattice parameters and atom positions during the relaxation.
- **Default**: 1.0e-6
- **Unit**: Bohr

### symmetry_autoclose

- **Type**: Boolean
- **Availability**: *[`symmetry`](#symmetry)==1*
- **Description**: Control how to deal with error in symmetry analysis due to inaccurate lattice parameters or atom positions in STRU file, especially useful when calculation==cell-relax
  - False: quit with an error message
  - True: automatically set symmetry to 0 and continue running without symmetry analysis
- **Default**: True

### cal_force

- **Type**: Boolean
- **Description**: If set to True, calculate the force at the end of the electronic iteration.
  See calculation requirements for the value required by each calculation type.
  If omitted, the required value is used; an explicit conflicting value is rejected.
  In socket_driver mode, this flag controls whether the returned frame advertises forces; it is not forced on by the socket protocol.
- **Default**: False

### kpar

- **Type**: Integer
- **Description**: Controls k-point parallelism. The value must be positive and should not exceed either the number of k-points or the number of MPI processes.
  - For PW calculations, divide all MPI processes into persistent k-point pools. Each pool stores and processes a subset of the k-points.
  - For LCAO calculations with lapack, genelpa, elpa, or scalapack_gvx, divide the diagonalization work into temporary k-point pools. After diagonalization, the eigenvalues and distributed wavefunctions are restored for all k-points before occupations, density matrices, and output are evaluated.
  - Multi-process LCAO cusolver uses its own active-GPU distribution and does not use this value to define its k-point layout. Other LCAO eigensolvers do not use the temporary k-point-pool implementation.
  - On DSP builds, the mtblas/C_PACK libraries require kpar (kpar_lcao for LCAO) times bndpar to equal the number of MPI processes exactly; ABACUS aborts at startup otherwise.
- **Default**: 1

### bndpar

- **Type**: Integer
- **Availability**: *([`basis_type`](#basis_type)==pw and [`esolver_type`](#esolver_type)==sdft) or ([`basis_type`](#basis_type)==pw and [`esolver_type`](#esolver_type)==ksdft and [`ks_solver`](#ks_solver)==bpcg)*
- **Description**: Controls band-group parallelism for PW SDFT and PW KSDFT calculations using the BPCG eigensolver.
  - Within each k-point pool, divide the MPI processes into bndpar band groups. Each group contains NPROC / (kpar * bndpar) processes when bndpar is greater than 1.
  - With BPCG, distribute contiguous ranges of global Kohn-Sham bands among the band groups. nbands does not need to be divisible by bndpar, but bndpar cannot exceed a positive nbands. Groups with lower indices receive one additional band when necessary.
  - In SDFT, distribute stochastic orbitals among the band groups. When the deterministic Kohn-Sham eigensolver is not BPCG, band group 0 calculates the deterministic orbitals and broadcasts them to the other groups.
  - bndpar must be positive and no greater than the number of MPI processes. When bndpar is greater than 1, kpar * bndpar must divide the number of MPI processes exactly.
  > Note: For PW calculations on GPU, if the input kpar * bndpar differs from the number of MPI processes, ABACUS automatically sets the effective kpar to NPROC / bndpar.
- **Default**: 1

### latname

- **Type**: String
- **Description**: Specifies the type of Bravias lattice. When set to none, the three lattice vectors are supplied explicitly in STRU file.

  Available options are:

  - none: free structure
  - sc: simple cubic
  - fcc: face-centered cubic
  - bcc: body-centered cubic
  - hexagonal: hexagonal
  - trigonal: trigonal
  - st: simple tetragonal
  - bct: body-centered tetragonal
  - so: orthorhombic
  - baco: base-centered orthorhombic
  - fco: face-centered orthorhombic
  - bco: body-centered orthorhombic
  - sm: simple monoclinic
  - bacm: base-centered monoclinic
  - triclinic: triclinic
- **Default**: none

### assume_isolated

- **Type**: String
- **Description**: Used to perform a calculation assuming an isolated system in a 3D supercell.

  Available options are:

  - none: regular periodic calculation without isolated-system correction.
  - pcc_0d: self-consistent point-counter-charge (PCC) correction for a molecule in a cubic cell. The multipoles are taken about the mass-weighted ionic center.
  - pcc_2d: self-consistent PCC correction for a slab, open along the lattice vector selected by pcc_2d_axis (default: the third) and periodic along the other two. The open vector must be perpendicular to the periodic plane (rewrite a tilted cell as the equivalent perpendicular one), and the k-point sampling along it must be Gamma only. The monopole term uses the open planar kernel that vanishes on the plane of the charge, -pi*Q*L/(3*A) with L the cell length along the open vector and A the periodic area, so the energy of a charged slab converges with the vacuum size; it is referenced to zero potential on the plane of the charge. ENVIRON uses -pi*Q/(3*L), so charged-slab energies agree with ENVIRON only for A = L^2.
  - makov-payne, m-p, mp: compute the Makov-Payne correction to the total energy and estimate a corrected vacuum level for eigenvalue alignment. This option is available only for cubic lattices (latname = sc, fcc, or bcc).

  pcc_0d and pcc_2d contribute to the energy, the potential and the fixed-cell forces; the correction energy is printed as E_pcc. They require CPU KS-DFT (esolver_type ksdft) with basis_type pw or lcao, calculation scf or relax, and nspin 1 or 2, without efield_flag, gate_flag, cal_stress, DFT-1/2, deepks output or dm_to_rho. With imp_sol=2, pcc_0d and pcc_2d support SCF energies, forces and fixed-cell relax; imp_sol=1 is not supported.

  Theory: G. Makov and M. C. Payne, Phys. Rev. B 51, 4014 (1995); PCC: O. Andreussi and N. Marzari, Phys. Rev. B 90, 245101 (2014).
- **Default**: none

### pcc_2d_axis

- **Type**: Integer
- **Allowed values**: 0, 1, 2
- **Availability**: *[`assume_isolated`](#assume_isolated)==pcc_2d*
- **Description**: Index of the lattice vector along which assume_isolated=pcc_2d is open: 0, 1 or 2 for the first, second or third vector of LATTICE_VECTORS. The selected vector must be perpendicular to the other two, which span the periodic plane; the k-point sampling along it must be Gamma only.
- **Default**: 2

### init_wfc

- **Type**: Vector of string
- **Description**: The method used to initialize wavefunction coefficients. The available options and behavior depend on `basis_type`.

  For `basis_type=pw`, the available options are:

  - `atomic`: Use atomic pseudo wavefunctions from `PP_PSWFC`. If no `PP_PSWFC` states are available, all bands are initialized randomly. If the number of atomic states is smaller than `nbands`, the remaining bands are initialized randomly.
  - `atomic+random`: If there are at least `nbands` atomic states, apply an approximately 5% multiplicative random perturbation to the atomic initialization. If there are fewer atomic states than `nbands`, use the atomic states and initialize the remaining bands randomly, as for `atomic`.
  - `random`: Initialize all bands with random coefficients.
  - `nao`: Use numerical atomic orbitals. If the number of NAO states is smaller than `nbands`, the remaining bands are initialized randomly.
  - `nao+random`: Apply an approximately 5% multiplicative random perturbation to the NAO initialization; any bands not covered by NAO states are first initialized randomly.
  - `file binary`: Read binary `wf*_pw.dat` files generated with `out_wfc_pw=2` from `read_file_dir`. The files must match the current k points, `nbands`, plane-wave layout, and lattice. The `txt` format is not supported for PW wavefunctions.

  For `basis_type=lcao`, the file options are:

  - `file txt`: Read text `wf*_nao.txt` files generated with `out_wfc_lcao=1` from `read_file_dir`.
  - `file binary`: Read binary `wf*_nao.dat` files generated with `out_wfc_lcao=2` from `read_file_dir`.

  The selected format is required; ABACUS does not automatically detect or fall back to the other format. The files must use a compatible NAO basis, match the current k-point and spin setup, and contain enough bands. File initialization matches independent files without geometry-step indices. Files accumulated with `out_app_flag` or files under `WFC/` with a `g*` geometry-step index are not supported.

  For `basis_type=lcao_in_pw`, `init_wfc` is automatically set to `nao`.

  > Note: For `calculation=get_wf` or `calculation=get_pchg`, non-file initialization choices are automatically changed to the file option appropriate for the selected basis. An explicitly selected file format is preserved. If `basis_type=lcao_in_pw` is also used, the final value is `nao`.
- **Default**: atomic

### init_chg

- **Type**: String
- **Description**: This variable is used for both plane wave set and localized orbitals set. It indicates the type of starting density.

  - atomic: the density is starting from the summation of the atomic density of single atoms.
  - file: the density will be read in from a binary file charge-density.dat first. If it does not exist, the charge density will be read in from cube files.
  - wfc: the density will be calculated by wavefunctions and occupations.
  - dm: the density will be calculated from the LCAO real-space density matrix (DMR) CSR files. If no DMR file exists, the dense k-space density matrix (DM(k)) files written by out_dmk are read instead and transformed to DMR.
  - dm_no_renormalize: same as dm, but the charge density is not renormalized to the number of electrons.
  - hr: the real space Hamiltonian matrix(HR) will be read in from file hrs1_nao.csr in directory read_file_dir.
  - auto: Abacus first attempts to read the density from a file; if not found, it defaults to using atomic density.
- **Default**: atomic

### init_vel

- **Type**: Boolean
- **Description**: - True: read the atom velocity (atomic unit : 1 a.u. = 21.877 Angstrom/fs) from the atom file (STRU) and determine the initial temperature md_tfirst. If md_tfirst is unset or less than zero, init_vel is autoset to be true.
  - False: assign value to atom velocity using Gaussian distributed random numbers.
- **Default**: False

### mem_saver

- **Type**: Integer
- **Allowed values**: 0, 1

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`calculation`](#calculation) in [scf, relax] | [`mem_saver`](#mem_saver)==0 |

- **Availability**: *[`calculation`](#calculation)==nscf and [`basis_type`](#basis_type)==pw*
- **Description**: Save memory when performing nscf calculations.
  - 0: no memory saving techniques are used.
  - 1: a memory saving technique will be used for many k point calculations.

  Legal values are 0 and 1. For calculation=scf or relax, mem_saver must be 0; setting it to 1 is an input error rather than being reset to 0.
- **Default**: 0

### cal_stress

- **Type**: Boolean
- **Description**: If set to True, calculate the stress at the end of the electronic iteration.
  In socket_driver mode, this flag independently controls whether the returned frame advertises stress/virial.
- **Default**: False

### diago_proc

- **Type**: Integer
- **Availability**: *[`basis_type`](#basis_type)==pw*
- **Description**: - 0: it will be set to the number of MPI processes.
  - &gt;0: it specifies the number of processes used for carrying out diagonalization. Must be less than or equal to total number of MPI processes.
- **Default**: 0

### nbspline

- **Type**: Integer
- **Description**: If set to a natural number, a Cardinal B-spline interpolation will be used to calculate Structure Factor. nbspline represents the order of B-spline basis and a larger one can get more accurate results but cost more. It is turned off by default.
- **Default**: -1

### kspacing

- **Type**: Vector of Real (1 or 3 values)
- **Description**: Set the smallest allowed spacing between k points, unit in 1/bohr. It should be larger than 0.0, and suggest smaller than 0.25. When you have set this value &gt; 0.0, then the KPT file is unnecessary. The default value 0.0 means that ABACUS will read the applied KPT file.

  > Note: If gamma_only is set to be true, kspacing is invalid.
- **Default**: 0.0

### koffset

- **Type**: Vector of Real (3 values)
- **Description**: Set offsets for automatic k-point mesh generated by kspacing, in each reciprocal direction. This parameter is only effective when kspacing &gt; 0.0 and gamma_only is false.
- **Default**: 0.0 0.0 0.0

### kmesh_type

- **Type**: String
- **Description**: Set mesh type used for automatic k-point mesh generated by kspacing. Available options are gamma and mp. This parameter is only effective when kspacing &gt; 0.0 and gamma_only is false.
- **Default**: gamma

### min_dist_coef

- **Type**: Real
- **Description**: A factor related to the allowed minimum distance between two atoms. At the beginning, ABACUS will check the structure, and if the distance of two atoms is shorter than min_dist_coef*(standard covalent bond length), we think this structure is unreasonable.
- **Default**: 0.2

### device

- **Type**: String
- **Allowed values**: cpu, gpu
- **Description**: Specifies the computing device for ABACUS.

  Available options are:

  - cpu: for CPUs via Intel, AMD, or Other supported CPU devices
  - gpu: for GPUs via CUDA or ROCm.

  > Note: ks_solver must also be set to the algorithms supported. lcao_in_pw currently does not support gpu.
- **Default**: cpu

### precision

- **Type**: String
- **Allowed values**: single, double

**Requirements**

| Option | Requirements |
| --- | --- |
| `single` | [`basis_type`](#basis_type)!=lcao |

- **Availability**: *[`basis_type`](#basis_type)==pw*
- **Description**: Specifies the precision when performing scf calculation.
  - single: single precision
  - double: double precision
  PW Kohn-Sham DFT+U and DeltaSpin onsite corrections require double precision.
  PW RT-TDDFT does not support DFT+U or spin constraints at any precision.
- **Default**: double

### gint_precision

- **Type**: String
- **Allowed values**: single, double, mix

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`gint_precision`](#gint_precision)!=double | [`basis_type`](#basis_type)==lcao and [`nspin`](#nspin)!=4 |

- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Specifies the precision when performing grid integral in LCAO calculations.
  - single: single precision
  - double: double precision
  - mix: mixed precision, starting from single precision and switching to double precision when the SCF residual becomes small enough
- **Default**: double

### timer_enable_nvtx

- **Type**: Boolean
- **Description**: Controls whether NVTX profiling labels are emitted by the timer. This feature is only effective on CUDA platforms.

  - True: Enable NVTX profiling labels in the timer.
  - False: Disable NVTX profiling labels in the timer.
- **Default**: False

### cell_factor

- **Type**: Real
- **Description**: Used in the construction of the pseudopotential tables. For cell-relax calculations, this is automatically set to 2.0.
- **Default**: 1.2

### dm_to_rho

- **Type**: Boolean
- **Description**: Reads density matrix in npz format and calculates electron density.
- **Default**: False

### chg_extrap

- **Type**: String
- **Description**: Charge extrapolation method for MD, relaxation, and socket-driven calculations.

  When set to default, ABACUS chooses second-order for md, first-order for
  relax/cell-relax and socket_driver calculations, and atomic for other calculations. Socket-driven
  molecular dynamics can explicitly set second-order if the external driver
  updates structures smoothly enough for second-order extrapolation.
- **Default**: default

### nb2d

- **Type**: Integer
- **Legal range**: value>=0
- **Description**: In LCAO calculations, the Hamiltonian and overlap matrices are distributed across 2D processor grid. This parameter controls the 2D block size for distribution.
- **Default**: 0

### cal_symm_repr

- **Type**: Integer \[Integer\](optional)
- **Description**: Whether to print the matrix representation of symmetry operation to running log file. If the first value is given as 1, then all matrix representations will be printed. The second optional parameter controls the precision (number of digits) to print, default is 3, which is enough for a quick check.
- **Default**: 1 3

[back to top](#full-list-of-input-keywords)

## Input files

### stru_file

- **Type**: String
- **Description**: The name of the structure file containing various information about atom species, including pseudopotential files, local orbitals files, cell information, atom positions, and whether atoms should be allowed to move.
- **Default**: STRU

### kpoint_file

- **Type**: String
- **Description**: The name of the k-point file that includes the k-point information of Brillouin zone.
- **Default**: KPT

### pseudo_dir

- **Type**: String
- **Description**: The directory of pseudopotential files. This parameter is combined with the pseudopotential filenames in the STRU file to form the complete pseudopotential file paths.
- **Default**: ""

### orbital_dir

- **Type**: String
- **Description**: The directory to save numerical atomic orbitals. This parameter is combined with orbital filenames in the STRU file to form the complete orbital file paths.
- **Default**: ""

### read_file_dir

- **Type**: String
- **Description**: Location of files, such as the electron density (chgs1.cube), required as a starting point. Standalone LR first reads the complete chg.cube/chgs*.cube set. If unavailable, it reads the binary density file {suffix}-CHARGE-DENSITY.restart and performs inverse FFT onto the current grid. The stored spin count must match the requested nspin exactly. This reads ground-state density only; it does not resume a previous calculation.
- **Default**: OUT.$suffix

### spillage_outdir

- **Type**: String
- **Availability**: *[`basis_type`](#basis_type)==pw*
- **Description**: The directory to save the spillage files.
- **Default**: "./"

[back to top](#full-list-of-input-keywords)

## Plane wave related variables

### ecutwfc

- **Type**: Real
- **Legal range**: value>0
- **Description**: Energy cutoff for plane wave functions. Note that even for localized orbitals basis, you still need to setup an energy cutoff for this system. Because our local pseudopotential parts and the related force are calculated from plane wave basis set.
  > Note: ecutwfc and ecutrho can be set simultaneously. If only one parameter is set, abacus will automatically set another parameter based on the 4-time relationship.
- **Default**: 50 for PW basis, 100 for LCAO basis
- **Unit**: Ry

### ecutrho

- **Type**: Real
- **Legal range**: value>0
- **Description**: Energy cutoff for charge density and potential. For norm-conserving pseudopotential you should stick to the default value, you can reduce it by a little but it will introduce noise especially on forces and stress.
- **Default**: 4*ecutwfc
- **Unit**: Ry

### nx

- **Type**: Integer
- **Description**: If set to a positive number, specifies the number of FFT grid points in x direction. If set to 0, the number will be calculated from ecutrho.

  > Note: You must specify all three dimensions (nx, ny, nz) for this setting to be used.
- **Default**: 0

### ny

- **Type**: Integer
- **Description**: If set to a positive number, specifies the number of FFT grid points in y direction. If set to 0, the number will be calculated from ecutrho.

  > Note: You must specify all three dimensions (nx, ny, nz) for this setting to be used.
- **Default**: 0

### nz

- **Type**: Integer
- **Description**: If set to a positive number, specifies the number of FFT grid points in z direction. If set to 0, the number will be calculated from ecutrho.

  > Note: You must specify all three dimensions (nx, ny, nz) for this setting to be used.
- **Default**: 0

### ndx

- **Type**: Integer
- **Description**: If set to a positive number, specifies the number of FFT grid points for the dense part of charge density in x direction. If set to 0, the number will be calculated from ecutwfc.

  > Note: You must specify all three dimensions (ndx, ndy, ndz) for this setting to be used. These parameters must be used combined with nx, ny, nz. If nx, ny, nz are unset, ndx, ndy, ndz are used as nx, ny, nz.
- **Default**: 0

### ndy

- **Type**: Integer
- **Description**: If set to a positive number, specifies the number of FFT grid points for the dense part of charge density in y direction. If set to 0, the number will be calculated from ecutwfc.

  > Note: You must specify all three dimensions (ndx, ndy, ndz) for this setting to be used. These parameters must be used combined with nx, ny, nz. If nx, ny, nz are unset, ndx, ndy, ndz are used as nx, ny, nz.
- **Default**: 0

### ndz

- **Type**: Integer
- **Description**: If set to a positive number, specifies the number of FFT grid points for the dense part of charge density in z direction. If set to 0, the number will be calculated from ecutwfc.

  > Note: You must specify all three dimensions (ndx, ndy, ndz) for this setting to be used. These parameters must be used combined with nx, ny, nz. If nx, ny, nz are unset, ndx, ndy, ndz are used as nx, ny, nz.
- **Default**: 0

### pw_seed

- **Type**: Integer
- **Availability**: *[`basis_type`](#basis_type)==pw*
- **Description**: Specify the random seed to initialize wave functions. Only positive integers are available.
- **Default**: 0

### diag_subspace

- **Type**: Integer
- **Allowed values**: 0, 1, 2

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`ks_solver`](#ks_solver)==lobpcg | [`diag_subspace`](#diag_subspace) in [0, 2] |

- **Availability**: *[`basis_type`](#basis_type)==pw and ([`ks_solver`](#ks_solver)==dav_subspace or [`ks_solver`](#ks_solver)==lobpcg)*
- **Description**: Subspace diagonalization backend for dav_subspace and lobpcg.

  - 0: LAPACK (cuSOLVER for LOBPCG on CUDA).
  - 1: GenELPA (dav_subspace only).
  - 2: ScaLAPACK.
- **Default**: 0

### erf_ecut

- **Type**: Real
- **Description**: Used in variable-cell molecular dynamics (or in stress calculation). See erf_sigma for details.
- **Default**: 0.0
- **Unit**: Ry

### fft_mode

- **Type**: Integer
- **Allowed values**: 0, 1, 2, 3
- **Description**: Set the mode of FFTW.
  - 0: FFTW_ESTIMATE
  - 1: FFTW_MEASURE
  - 2: FFTW_PATIENT
  - 3: FFTW_EXHAUSTIVE
- **Default**: 0

### erf_height

- **Type**: Real
- **Description**: Used in variable-cell molecular dynamics (or in stress calculation). See erf_sigma for details.
- **Default**: 0.0
- **Unit**: Ry

### erf_sigma

- **Type**: Real
- **Description**: In order to recover the accuracy of a constant energy cutoff calculation, the kinetic functional is modified, which is used in variable-cell molecular dynamics (or in stress calculation).
- **Default**: 0.1
- **Unit**: Ry

### pw_diag_thr

- **Type**: Real
- **Description**: Only used when you use ks_solver = cg/dav/dav_subspace/bpcg/ppcg/lobpcg. It indicates the threshold for the first electronic iteration, from the second iteration the pw_diag_thr will be updated automatically. The stopping criterion is solver-dependent: CG and Davidson methods compare eigenvalue changes against the threshold, whereas PPCG requires the norm of H psi - epsilon S psi to be at most max(ethr_band, ethr, 1e-14). The same numerical threshold therefore does not imply the same accuracy or cost across these methods. PPCG uses a direct residual tolerance; it does not convert an eigenvalue-difference tolerance by taking its square root. Validate total energies, forces and stresses for the system and SCF settings of interest. For nscf calculations with planewave basis set, pw_diag_thr should be &lt;= 1e-3.
- **Default**: 0.01

### diago_smooth_ethr

- **Type**: Boolean
- **Description**: If TRUE, relax diagonalization thresholds for nearly empty bands to reduce work in ground-state SCF. If FALSE, use the same threshold for all bands.
- **Default**: false

### use_k_continuity

- **Type**: Boolean

**Requirements**

| Option | Requirements |
| --- | --- |
| `true` | [`basis_type`](#basis_type)==pw and [`calculation`](#calculation)!=nscf and [`kpar`](#kpar)==1 and [`nspin`](#nspin)!=2 and [`esolver_type`](#esolver_type)!=sdft |

- **Availability**: *[`basis_type`](#basis_type)==pw*
- **Description**: If TRUE, the wavefunctions at k-point will be initialized from the converged wavefunctions at the nearest k-point, which can speed up the SCF convergence. Only works for PW basis.
- **Default**: false

### pw_diag_nmax

- **Type**: Integer
- **Legal range**: value>0
- **Availability**: *[`basis_type`](#basis_type)==pw and [`ks_solver`](#ks_solver) in [cg, dav, dav_subspace, bpcg, ppcg, lobpcg]*
- **Description**: Sets the maximum number of iterations for the selected iterative PW diagonalization method. It is used by CG, Davidson, Davidson-subspace, LOBPCG, and PPCG; the value is a solver-specific iteration limit and does not define a common number of operator applications or a convergence tolerance. Increasing it does not guarantee convergence. BPCG currently does not use this parameter.
- **Default**: 50

### pw_diag_ndim

- **Type**: Integer
- **Availability**: *[`basis_type`](#basis_type)==pw and [`ks_solver`](#ks_solver) in [dav, dav_subspace, ppcg]*
- **Description**: Only useful when you use ks_solver = dav, dav_subspace, or ppcg. It indicates dimension of workspace(number of wavefunction packets, at least 2 needed) for the Davidson method, and the block size for the PPCG method. A larger value may yield a smaller number of iterations in the algorithm but uses more memory and more CPU time in subspace diagonalization.
- **Default**: 4

### ppcg_rr_step

- **Type**: Integer
- **Legal range**: value>=1
- **Availability**: *[`basis_type`](#basis_type)==pw and [`ks_solver`](#ks_solver)==ppcg*
- **Description**: Number of PPCG block sweeps between scheduled full Rayleigh-Ritz solves. The conservative default of 1 performs a full solve each sweep. Larger values reduce global subspace work but may require more iterations; tune with accuracy and timing checks for the system of interest. Initial, convergence-certifying and recovery solves, and operator-cache refreshes, are independent of this interval.
- **Default**: 1

### lobpcg_locking

- **Type**: String
- **Allowed values**: hard, soft
- **Availability**: *[`basis_type`](#basis_type)==pw and [`ks_solver`](#ks_solver)==lobpcg*
- **Description**: The default hard keeps converged bands fixed to reduce computation. With soft, these bands continue to be refined, which can help when closely spaced bands converge slowly, with more work per iteration.
- **Default**: hard

### diago_cg_prec

- **Type**: Integer
- **Description**: Preconditioner type for conjugate gradient diagonalization method.
- **Default**: 1

[back to top](#full-list-of-input-keywords)

## Numerical atomic orbitals related variables

### lmaxmax

- **Type**: Integer
- **Description**: If not equals to 2, then the maximum l channels on LCAO is set to lmaxmax. If 2, then the number of l channels will be read from the LCAO data sets. Normally no input should be supplied for this variable so that it is kept as its default.
- **Default**: 2.

### lcao_ecut

- **Type**: Real
- **Description**: Energy cutoff (in Ry) for two-center integrals in LCAO. The two-center integration table are obtained via a k space integral whose upper limit is about sqrt(lcao_ecut).
- **Default**: ecutwfc

### lcao_dk

- **Type**: Real
- **Description**: the interval of k points for two-center integrals. The two-center integration table are obtained via a k space integral on a uniform grid with spacing lcao_dk.
- **Default**: 0.01
- **Unit**: Bohr

### lcao_dr

- **Type**: Real
- **Description**: r spacing of the integration table of two-center integrals.
- **Default**: 0.01
- **Unit**: Bohr

### lcao_rmax

- **Type**: Real
- **Description**: Maximum distance for the two-center integration table.
- **Default**: 30
- **Unit**: Bohr

### search_radius

- **Type**: Real
- **Description**: Searching radius in finding the neighbouring atoms. By default the radius will be automatically determined by the cutoffs of orbitals and nonlocal beta projectors.
- **Default**: -1
- **Unit**: Bohr

### bx

- **Type**: Integer
- **Legal range**: value>=0 and value<=10
- **Description**: In the matrix operation of grid integral, bx/by/bz grids (in x, y, z directions) are treated as a whole as a matrix element. A different value will affect the calculation speed. The default is 0, which means abacus will automatically calculate these values.
- **Default**: 0

### by

- **Type**: Integer
- **Legal range**: value>=0 and value<=10
- **Description**: In the matrix operation of grid integral, bx/by/bz grids (in x, y, z directions) are treated as a whole as a matrix element. A different value will affect the calculation speed. The default is 0, which means abacus will automatically calculate these values.
- **Default**: 0

### bz

- **Type**: Integer
- **Legal range**: value>=0 and value<=10
- **Description**: In the matrix operation of grid integral, bx/by/bz grids (in x, y, z directions) are treated as a whole as a matrix element. A different value will affect the calculation speed. The default is 0, which means abacus will automatically calculate these values.
- **Default**: 0

### elpa_num_thread

- **Type**: Integer
- **Description**: Number of threads used in one elpa calculation.

  If the number is below 0 or 0 or beyond the max number of threads, all elpa calculation will be using all mpi threads
- **Default**: -1

### num_stream

- **Type**: Integer
- **Description**: The number of CUDA streams used in LCAO calculations with GPU acceleration.
- **Default**: 4

[back to top](#full-list-of-input-keywords)

## Electronic structure

### basis_type

- **Type**: String
- **Allowed values**: pw, lcao, lcao_in_pw

**Requirements**

| Option | Requirements |
| --- | --- |
| `pw`, `lcao_in_pw` | [`bx`](#bx)==1 and [`by`](#by)==1 and [`bz`](#bz)==1 |

- **Description**: Choose the basis set.
  - pw: Using plane-wave basis set only.
  - lcao: Using localized atomic orbital sets.
  - lcao_in_pw: Expand the localized atomic set in plane-wave basis, non-self-consistent field calculation not tested.
- **Default**: pw

### ks_solver

- **Type**: String
- **Allowed values**: cg, dav, bpcg, dav_subspace, ppcg, lobpcg, genelpa, elpa, lapack, scalapack_gvx, cusolver, cusolvermp, pexsi

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| `ppcg` | [`esolver_type`](#esolver_type)!=sdft and [`calculation`](#calculation)!=nscf and [`device`](#device)==cpu |
| `genelpa` | [`device`](#device)==cpu |
| [`basis_type`](#basis_type)==pw | [`ks_solver`](#ks_solver) in [cg, dav, bpcg, dav_subspace, ppcg, lobpcg] |
| [`basis_type`](#basis_type)==lcao | [`ks_solver`](#ks_solver) in [genelpa, elpa, lapack, scalapack_gvx, cusolver, cusolvermp, pexsi] |

- **Description**: Choose the diagonalization methods for the Hamiltonian matrix expanded in a certain basis set.

  For plane-wave basis,

  - cg: The conjugate-gradient (CG) method.
  - dav: The Davidson algorithm.
  - dav_subspace: The Davidson algorithm without orthogonalization operation, this method is the most recommended for efficiency. `pw_diag_ndim` can be set to 2 for this method.
  - ppcg: The projection preconditioned conjugate-gradient method. It supports CPU and CUDA plane-wave calculations. On CUDA, wavefunction-sized blocks and their operations remain on the device; only projected matrices and convergence scalars are transferred to the host. Other GPU backends are not supported. It is not supported for calculation=nscf or esolver_type=sdft, including mixed stochastic-deterministic calculations.
  - bpcg: The BPCG method, which is a block-parallel Conjugate Gradient (CG) method, typically exhibits higher acceleration in a GPU environment. The BPCG method is currently under testing and is not recommended for use.
  - lobpcg: The locally optimal block preconditioned conjugate gradient method for CPU and GPU.

  For numerical atomic orbitals basis,

  - lapack: Use LAPACK to diagonalize the Hamiltonian, only used for serial version
  - genelpa: Use the CPU-only GEN-ELPA interface to diagonalize the Hamiltonian.
  - scalapack_gvx: Use Scalapack to diagonalize the Hamiltonian.
  - cusolver: Use CUSOLVER to diagonalize the Hamiltonian, at least one GPU is needed.
  - cusolvermp: Use CUSOLVER to diagonalize the Hamiltonian, supporting multi-GPU devices. Note that you should set the number of MPI processes equal to the number of GPUs.
  - elpa: The ELPA solver supports both CPU and GPU. By setting the `device` to GPU, you can launch the ELPA solver with GPU acceleration (provided that you have installed a GPU-supported version of ELPA, which requires you to manually compile and install ELPA, and the ABACUS should be compiled with -DENABLE_ELPA=ON and -DUSE_CUDA=ON). The ELPA solver also supports multi-GPU acceleration.

  If you set ks_solver=`genelpa` for basis_type=`pw`, the program will stop with an error message:

  ``text genelpa can not be used with plane wave basis. ``

  Then the user has to correct the input file and restart the calculation.
- **Default**: 
    - PW basis: dav_subspace.
    - LCAO basis:
        - genelpa (if compiling option `ENABLE_ELPA` has been set)
        - lapack (if compiling option `ENABLE_MPI` has not been set)
        - scalapack_gvx (if compiling option `ENABLE_ELPA` has not been set and compiling option `ENABLE_MPI` has been set)
        - cusolver (if compiling option `USE_CUDA` has been set)

### lcao_sk_cut

- **Type**: Real
- **Legal range**: value>=0 and value<1
- **Availability**: *[`basis_type`](#basis_type)==lcao and [`ks_solver`](#ks_solver)!=pexsi*
- **Description**: At zero, use the original generalized eigensolver. For a positive threshold, at each k point discard overlap eigenvalues at or below the threshold times the largest eigenvalue at that k point. Solve in the retained subspace and express the wavefunctions in the original AO basis. The retained rank at each k point must be at least nbands. This setting applies to Hamiltonian diagonalization. Force, stress, and response equations do not include derivatives of the retained subspace.
- **Default**: 0.0

### nbands

- **Type**: Integer
- **Legal range**: value>=0
- **Description**: The number of Kohn-Sham orbitals to calculate. It is recommended to setup this value, especially when smearing techniques are utilized, more bands should be included.

### nelec

- **Type**: Real
- **Legal range**: value>=0
- **Description**: - 0.0: The total number of electrons will be calculated by the sum of valence electrons (i.e. assuming neutral system).
  - &gt;0.0: this denotes the total number of electrons in the system. Must be less than 2*nbands.
- **Default**: 0.0

### nelec_delta

- **Type**: Real
- **Description**: The total number of electrons will be calculated by nelec+nelec_delta.
- **Default**: 0.0

### nupdown

- **Type**: Real

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`nspin`](#nspin)==1 | [`nupdown`](#nupdown)==0 |

- **Description**: - 0.0: no constrain apply to system.
  - &gt;0.0: The different number of electrons between spin-up and spin-down channels. The range of value must be in [-nelec ~ nelec]. It is one type of constrainted DFT method, two Fermi energies will be calculated.
- **Default**: 0.0

### dft_functional

- **Type**: String

**Requirements**

| Option | Requirements |
| --- | --- |
| `hf`, `pbe0` | [`rdmft_power_alpha`](#rdmft_power_alpha)==1 |
| `muller` | [`rdmft_power_alpha`](#rdmft_power_alpha)==0.5 |

- **Description**: In our package, the XC functional can either be set explicitly using the dft_functional keyword in INPUT file. If dft_functional is not specified, ABACUS will use the xc functional indicated in the pseudopotential file. On the other hand, if dft_functional is specified, it will overwrite the functional from pseudopotentials and performs calculation with whichever functional the user prefers. We further offer two ways of supplying exchange-correlation functional. The first is using 'short-hand' names. A complete list of 'short-hand' expressions can be found in the source code. Supported density functionals are:
  - LDA functionals
  - LDA (equivalent with PZ and SLAPZNOGXNOGC), PWLDA
  - GGA functionals
  - PBE (equivalent with SLAPWPBXPBC), PBESOL, REVPBE, WC, BLYP, BP(referred to BP86), PW91, HCTH, OLYP, BLYP_LR
  - meta-GGA functionals
  - SCAN (require LIBXC)
  - Hybrid functionals
  - PBE0, HF
  - If LIBXC is available, additional short-hand names of hybrid functionals are supported: HSE(referred to HSE06), B3LYP, LC_PBE, LC_WPBE, LRC_WPBE, LRC_WPBEH, CAM_PBEH, WP22, CWP22, MULLER (equivalent with POWER)
  - Hybrid meta-GGA functionals
  - SCAN0 (require LIBXC)

  The other way is only available when compiling with LIBXC, and it allows for supplying exchange-correlation functionals as combinations of LIBXC keywords for functional components, joined by a plus sign, for example, dft_functional='LDA_X_1D_EXPONENTIAL+LDA_C_1D_CSC'.
- **Default**: Used the same as DFT functional as specified in the pseudopotential files.

### device_xc

- **Type**: String
- **Allowed values**: cpu, gpu

**Requirements**

| Option | Requirements |
| --- | --- |
| `gpu` | [`device`](#device)==gpu |

- **Description**: Selects CPU or CUDA evaluation of the Libxc LDA/GGA potential, including the semilocal part of HSE. GPU evaluation requires ABACUS built with ENABLE_LIBXC_CUDA=ON and CUDA-enabled Libxc &gt;= 7.1.0. Built-in functionals (except noncollinear PBE potential evaluation when the density PW basis runs on CUDA), meta-GGA, response kernels and separate force/stress evaluations retain their CPU implementation.
- **Default**: cpu

### xc_temperature

- **Type**: Real
- **Description**: Specifies temperature when using temperature-dependent XC functionals (KSDT and so on).
- **Default**: 0.0
- **Unit**: Ry

### xc_exch_ext

- **Type**: Integer followed by Real values
- **Description**: Customized parameterization of the exchange part of an XC functional. The first value should be the Libxc ID of the original functional, followed by the complete list of external parameters required by the linked Libxc version. If unset, Libxc's own default parameters are used. For functional IDs and parameter definitions, refer to the Libxc documentation and source code.

  > Note: Solely setting this keyword will take no effect on XC functionals. One should also set dft_functional to the corresponding functional to apply the customized parameterization. Presently this feature can only support parameterization on one exchange functional.

### xc_corr_ext

- **Type**: Integer followed by Real values
- **Description**: Customized parameterization of the correlation part of an XC functional. The first value should be the Libxc ID of the original functional, followed by the complete list of external parameters required by the linked Libxc version. If unset, Libxc's own default parameters are used. For functional IDs and parameter definitions, refer to the Libxc documentation and source code.

  > Note: Solely setting this keyword will take no effect on XC functionals. One should also set dft_functional to the corresponding functional to apply the customized parameterization. Presently this feature can only support parameterization on one correlation functional.

### pseudo_rcut

- **Type**: Real
- **Description**: Cut-off of radial integration for pseudopotentials.
- **Default**: 15
- **Unit**: Bohr

### pseudo_mesh

- **Type**: Boolean
- **Description**: - 0: Use a mesh for radial integration of pseudopotentials.
  - 1: Use the mesh that is consistent with quantum espresso
- **Default**: 0

### nspin

- **Type**: Integer
- **Allowed values**: 1, 2, 4

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`noncolin`](#noncolin)==true or [`lspinorb`](#lspinorb)==true | [`nspin`](#nspin)==4 |

- **Description**: The number of spin components of wave functions.
  - 1: Spin degeneracy
  - 2: Collinear spin polarized.
  - 4: Noncollinear or spin-orbit calculations. Set nspin to 4 explicitly when noncolin or lspinorb is enabled.
  - Note: With nspin=2 and no initial magnetization in STRU, a moment of 1.0 is autoset for every atom, unless symmetry is 1.
  - Note: With nspin=4 no moment is ever autoset. The calculation starts from zero magnetic moment and a warning is printed; set 'mag' explicitly in STRU for the magnetic atoms if a magnetic ground state is expected.
- **Default**: 1

### gga_grad

- **Type**: Integer
- **Allowed values**: 0, 1, 2
- **Description**: Selects the local spin mapping for LDA/GGA functionals in magnetic `nspin=4` calculations.
  - `0`: In the built-in GGA gradient correction, constructs spin densities using the local magnetization magnitude, with its sign determined by the projection onto the global quantization axis when that axis is enabled. Otherwise, uses the unsigned magnitude.
  - `1`: Always uses the unsigned local magnetization magnitude in the built-in GGA gradient correction, independent of the global quantization axis. For Libxc functionals, `0` and `1` are equivalent.
  - `2`: Uses the regularized spin densities $\rho_{\pm}=\frac{|n+\rho_{\mathrm{core}}|\pm\min(S_{\eta}(r),|n+\rho_{\mathrm{core}}|)}{2}$, where $n$ is the valence electron density, $\rho_{\mathrm{core}}$ is the NLCC core density, and $r=|\boldsymbol{m}|$. With $x=r/\eta$ and fixed $\eta=10^{-3}\,\mathrm{electrons}/\mathrm{bohr}^{3}$, the $C^2$ mapping is $S_{\eta}(r)=\eta x^3(3x^2-8x+6)$ for $r\lt\eta$, and $S_{\eta}(r)=r$ otherwise. GGA gradients use these mapped densities. This regularization affects both LDA and GGA and can change energies and magnetic responses.

  When omitted, the value is `2` for `esolver_type=tddft` and `0` otherwise. Explicit values are preserved.
- **Default**: `2` for `esolver_type=tddft`; `0` otherwise

### smearing_method

- **Type**: String
- **Description**: It indicates which occupation and smearing method is used in the calculation.
  - fixed: fixed occupations (available for non-coductors only)
  - gauss or gaussian: Gaussian smearing method.
  - mp: methfessel-paxton smearing method; recommended for metals.
  - mp2: 2-nd methfessel-paxton smearing method; recommended for metals.
  - mv or cold: marzari-vanderbilt smearing method.
  - fd: Fermi-Dirac smearing method: and smearing_sigma below is the temperature (in Ry).
- **Default**: gauss

### smearing_sigma

- **Type**: Real
- **Description**: Energy range for smearing.
- **Default**: 0.015
- **Unit**: Ry

### smearing_sigma_temp

- **Type**: Real
- **Description**: Energy range for smearing, smearing_sigma = 1/2 kB smearing_sigma_temp.
- **Default**: 2 * smearing_sigma / kB.
- **Unit**: K

### mixing_type

- **Type**: String
- **Description**: Charge mixing methods.
  - plain: Just simple mixing.
  - pulay: Standard Pulay method. P. Pulay Chemical Physics Letters, (1980)
  - broyden: Simplified modified Broyden method. D.D. Johnson Physical Review B (1988)

  In general, the convergence of the Broyden method is slightly faster than that of the Pulay method.
- **Default**: broyden

### mixing_beta

- **Type**: Real
- **Legal range**: value>=0
- **Description**: In general, the formula of charge mixing can be written as rho_new = rho_old + mixing_beta * drho, where rho_new represents the new charge density after charge mixing, rho_old represents the charge density in previous step, drho is obtained through various mixing methods, and mixing_beta is set by this parameter. A lower value of 'mixing_beta' results in less influence of drho on rho_new, making the self-consistent field (SCF) calculation more stable. However, it may require more steps to achieve convergence. We recommend the following options:
  - 0.8: nspin=1
  - 0.4: nspin=2 and nspin=4
  - 0: keep charge density unchanged, usually used for restarting with init_chg=file or testing.
  - 0.1 or less: if convergence of SCF calculation is difficult to reach, please try 0 &lt; mixing_beta &lt; 0.1.
  A progressive tuning strategy might help, for example, 0.4 -&gt; 0.1 -&gt; 0.025.

  Note: For low-dimensional large systems, the setup of mixing_beta=0.1, mixing_ndim=20, and mixing_gg0=1.0 usually works well.

  For spin-polarized calculations (nspin=2 or nspin=4) that are difficult to converge, try reducing both mixing_beta and mixing_beta_mag simultaneously, e.g., mixing_beta=0.1 and mixing_beta_mag=0.1 or lower.
- **Default**: 0.8 for nspin=1, 0.4 for nspin=2 and nspin=4.

### mixing_beta_mag

- **Type**: Real
- **Legal range**: value>=0
- **Description**: Mixing parameter of magnetic density.

  An explicit nonnegative value is preserved even when mixing_beta is omitted.

  If SCF convergence is difficult with spin polarization (nspin=2 or nspin=4), try reducing both mixing_beta and mixing_beta_mag simultaneously, e.g., mixing_beta=0.1 and mixing_beta_mag=0.1 or lower.
- **Default**: 4*mixing_beta, but the maximum value is 1.6.

### mixing_ndim

- **Type**: Integer
- **Description**: It indicates the mixing dimensions in Pulay or Broyden. Pulay and Broyden method use the density from previous mixing_ndim steps and do a charge mixing based on this density.

  For systems that are difficult to converge, one could try increasing the value of 'mixing_ndim' to enhance the stability of the self-consistent field (SCF) calculation.
- **Default**: 8

### mixing_restart

- **Type**: Real
- **Description**: If the density difference between input and output drho is smaller than mixing_restart, SCF will restart at next step which means SCF will restart by using output charge density from perivos iteration as input charge density directly, and start a new mixing. Notice that mixing_restart will only take effect once in one SCF.
- **Default**: 0

### mixing_dmr

- **Type**: Boolean
- **Availability**: *[`mixing_restart`](#mixing_restart)>0*
- **Description**: At n-th iteration which is calculated by drho&lt;mixing_restart, SCF will start a mixing for real-space density matrix by using the same coefficiences as the mixing of charge density.
- **Default**: false

### mixing_gg0

- **Type**: Real
- **Description**: Controls the Kerker preconditioner for charge-density mixing.
  - &gt;0: Enables Kerker scaling to suppress long-wavelength (small-G) charge-density fluctuations. Setting mixing_gg0 = 1.0 is normally a good starting point. This setting has no effect when mixing_beta &lt;= 0.1 because the charge-density Kerker preconditioner is bypassed.
  - 0: No Kerker scaling is performed.

  For systems that are difficult to converge, particularly metallic systems, enabling Kerker scaling may aid in achieving convergence.
- **Default**: 1.0

### mixing_gg0_mag

- **Type**: Real
- **Description**: Controls the Kerker preconditioner for magnetic-density mixing. It is disabled by default and is generally only recommended for systems whose magnetic density is difficult to converge.

  An explicit value is preserved even when mixing_beta is omitted.

  The magnetic-density Kerker preconditioner is bypassed when mixing_beta_mag &lt;= 0.1, so mixing_gg0_mag has no effect in that regime. It is also unavailable when the charge-density Kerker preconditioner itself is bypassed.
- **Default**: 0.0

### mixing_gg0_min

- **Type**: Real
- **Description**: Sets the lower bound used by the Kerker filter. The lower bound is evaluated as mixing_gg0_min / mixing_beta for charge-density mixing and mixing_gg0_min / mixing_beta_mag for magnetic-density mixing.

  In the current implementation, the automatic bypass thresholds are fixed independently of mixing_gg0_min: charge-density Kerker is bypassed when mixing_beta &lt;= 0.1, and magnetic-density Kerker is bypassed when mixing_beta_mag &lt;= 0.1. Changing mixing_gg0_min does not change these thresholds or re-enable Kerker.
- **Default**: 0.1

### mixing_angle

- **Type**: Real
- **Availability**: *[`nspin`](#nspin)==4*
- **Description**: Normal broyden mixing can give the converged result for a given magnetic configuration. If one is not interested in the energies of a given magnetic configuration but wants to determine the ground state by relaxing the magnetic moments' directions, one cannot rely on the standard Broyden mixing algorithm. To enhance the ability to find correct magnetic configuration for non-colinear calculations, ABACUS implements a promising mixing method proposed by J. Phys. Soc. Jpn. 82 (2013) 114706. Here, mixing_angle is the angle mixing parameter. In fact, only mixing_angle=1.0 is implemented currently.
  - &lt;=0: Normal broyden mixing
  - &gt;0: Angle mixing for the modulus with mixing_angle=1.0
- **Default**: -10.0

### mixing_tau

- **Type**: Boolean
- **Description**: Whether to mix the kinetic energy density.
  - True: The kinetic energy density will also be mixed. It seems for general cases, SCF converges fine even without this mixing. However, if there is difficulty in converging SCF for meta-GGA, it might be helpful to turn this on.
  - False: The kinetic energy density will not be mixed.

  This setting takes effect only when the selected exchange-correlation functional uses the kinetic energy density, such as a meta-GGA or hybrid meta-GGA functional.
- **Default**: False

### mixing_dftu

- **Type**: Boolean
- **Availability**: *[`dft_plus_u`](#dft_plus_u)==1*
- **Description**: Whether to mix the occupation matrices.
  - True: The occupation matrices will also be mixed by plain mixing. From experience this is not very helpful if the +U calculation does not converge.
  - False: The occupation matrices will not be mixed.
- **Default**: False

### gamma_only

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Whether to use gamma_only algorithm.
  - 0: more than one k-point is used and the ABACUS is slower compared to the gamma only algorithm.
  - 1: ABACUS uses gamma only, the algorithm is faster and you don't need to specify the k-points file.

  Note: If gamma_only is set to 1, the KPT file will be overwritten. So make sure to turn off gamma_only for multi-k calculations.
- **Default**: 0

### scf_nmax

- **Type**: Integer
- **Description**: Maximum number of electronic self-consistency iterations. In PW and LCAO RT-TDDFT, this controls initial-state calculations; real-time propagation uses the independent `td_scf_nmax` limit.
- **Default**: 100

### scf_thr

- **Type**: Real
- **Legal range**: value>=0
- **Description**: It's the density threshold for electronic iteration. It represents the charge density error between two sequential densities from electronic iterations. Usually for local orbitals, usually 1e-6 may be accurate enough.
- **Default**: 1.0e-9 (plane-wave basis), or 1.0e-7 (localized atomic orbital basis).
- **Unit**: Ry if scf_thr_type=1, dimensionless if scf_thr_type=2

### scf_ene_thr

- **Type**: Real
- **Description**: It's the energy threshold for electronic iteration. It represents the total energy error between two sequential densities from electronic iterations.
- **Default**: -1.0. If the user does not set this parameter, it will not take effect.
- **Unit**: eV

### scf_thr_type

- **Type**: Integer
- **Allowed values**: 1, 2
- **Description**: Choose the calculation method of convergence criterion.
  - 1: the criterion is defined in reciprocal space, which is used in SCF of PW basis with unit Ry.
  - 2: the criterion is defined in real space, where is the number of electron, which is used in SCF of LCAO with unit dimensionless.
- **Default**: 1 (plane-wave basis), or 2 (localized atomic orbital basis).

### scf_os_stop

- **Type**: Boolean
- **Description**: For systems that are difficult to converge, the SCF process may exhibit oscillations in charge density, preventing further progress toward the specified convergence criteria and resulting in continuous oscillation until the maximum number of steps is reached; this greatly wastes computational resources. To address this issue, this function allows ABACUS to terminate the SCF process early upon detecting oscillations, thus reducing subsequent meaningless calculations. The detection of oscillations is based on the slope of the logarithm of historical drho values. To this end, Least Squares Method is used to calculate the slope of the logarithmically taken drho for the previous scf_os_ndim iterations. If the calculated slope is larger than scf_os_thr, stop the SCF.

  - 0: The SCF will continue to run regardless of whether there is oscillation or not.
  - 1: If the calculated slope is larger than scf_os_thr, stop the SCF.
- **Default**: false

### scf_os_thr

- **Type**: Real
- **Legal range**: value<0
- **Description**: The slope threshold to determine if the SCF is stuck in a charge density oscillation. If the calculated slope is larger than scf_os_thr, stop the SCF.
- **Default**: -0.01

### scf_os_ndim

- **Type**: Integer
- **Description**: To determine the number of old iterations' drho used in slope calculations.
- **Default**: mixing_ndim

### sc_os_ndim

- **Type**: Integer
- **Description**: To determine the number of old iterations to judge oscillation, it occured, more accurate lambda with DeltaSpin method would be calculated, only for PW base.
- **Default**: 5

### lspinorb

- **Type**: Boolean
- **Description**: Whether to consider spin-orbit coupling (SOC) effect in the calculation.
  - True: Consider spin-orbit coupling effect. When enabled:
  - nspin must be explicitly set to 4 (noncollinear spin representation)
  - Symmetry is automatically disabled (SOC breaks inversion symmetry)
  - Requires full-relativistic pseudopotentials with has_so=true in the UPF header
  - False: Do not consider spin-orbit coupling effect.
  - Common Error: "no soc upf used for lspinorb calculation" - ensure you are using full-relativistic pseudopotentials
- **Default**: False

### noncolin

- **Type**: Boolean
- **Description**: Whether to allow non-collinear magnetic moments, where magnetization can point in arbitrary directions (x, y, z components) rather than being constrained to the z-axis.
  - True: Allow non-collinear polarization. When enabled:
  - nspin must be explicitly set to 4
  - Wave function dimension is doubled (npol=2), and the number of occupied states is doubled
  - Charge density has 4 components (Pauli spin matrices)
  - Cannot be used with gamma_only=true
  - Can be combined with lspinorb=true for SOC effects with non-collinear magnetism
  - False: Do not allow non-collinear polarization (magnetization constrained to z-axis).
  - Relationship with lspinorb:
  - noncolin=0, lspinorb=1: SOC with z-axis magnetism only (for non-magnetic materials with SOC)
  - noncolin=1, lspinorb=0: Non-collinear magnetism without SOC
  - noncolin=1, lspinorb=1: Both non-collinear magnetism and SOC
  - Note: When nspin=4 and noncolin=0, only the z component of the initial magnetization in STRU is used; x/y components are ignored and a warning is printed.
  - Note: When nspin=4 and no initial magnetization is set in STRU, the calculation starts from zero magnetic moment; no automatic magnetization is assigned.
- **Default**: False

### soc_lambda

- **Type**: Real
- **Availability**: *[`lspinorb`](#lspinorb)==true*
- **Description**: Modulates the strength of spin-orbit coupling effect. Sometimes, for some real materials, both scalar-relativistic and full-relativistic pseudopotentials cannot describe the exact spin-orbit coupling. Artificial modulation may help in such cases.

  soc_lambda, which has value range [0.0, 1.0], is used to modulate SOC effect:

  - soc_lambda 0.0: Scalar-relativistic case (no SOC)
  - soc_lambda 1.0: Full-relativistic case (full SOC)
  - Intermediate values: Partial-relativistic SOC (interpolation between scalar and full)

  Use case: When experimental or high-level theoretical results suggest that the SOC effect is weaker or stronger than what full-relativistic pseudopotentials predict, you can adjust this parameter to match the target behavior.
- **Default**: 1.0

### dfthalf_type

- **Type**: Integer
- **Allowed values**: 0, 1
- **Description**: DFT-1/2 type:
  - 0: DFT-1/2 is off.
  - 1: Shell DFT-1/2 method is used.
- **Default**: 0

[back to top](#full-list-of-input-keywords)

## Electronic structure (SDFT)

### method_sto

- **Type**: Integer
- **Allowed values**: 1, 2
- **Availability**: *[`esolver_type`](#esolver_type)==sdft*
- **Description**: Different methods to do stochastic DFT
  - 1: Calculate twice, this method cost less memory but is slower.
  - 2: Calculate once but needs much more memory. This method is much faster. Besides, it calculates with a smaller nche_sto. However, when the memory is not enough, only method 1 can be used.
- **Default**: 2

### nbands_sto

- **Type**: Integer or string
- **Availability**: *[`esolver_type`](#esolver_type)==sdft*
- **Description**: The number of stochastic orbitals
  - 1-1000000: Perform stochastic DFT. Increasing the number of bands improves accuracy and reduces stochastic errors; To perform mixed stochastic-deterministic DFT, you should set nbands, which represents the number of KS orbitals.
  - 0: Invalid. Use all for the complete-basis SDFT mode.
  - all: All complete basis sets are used to replace stochastic orbitals with the Chebyshev method (CT), resulting in the same results as KSDFT without stochastic errors.
- **Default**: 256

### nche_sto

- **Type**: Integer
- **Availability**: *[`esolver_type`](#esolver_type)==sdft*
- **Description**: Chebyshev expansion orders for stochastic DFT.
- **Default**: 100

### emin_sto

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==sdft*
- **Description**: Trial energy to guess the lower bound of eigen energies of the Hamiltonian Operator.
- **Default**: 0.0
- **Unit**: Ry

### emax_sto

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==sdft*
- **Description**: Trial energy to guess the upper bound of eigen energies of the Hamiltonian Operator.
- **Default**: 0.0
- **Unit**: Ry

### seed_sto

- **Type**: Integer
- **Availability**: *[`esolver_type`](#esolver_type)==sdft*
- **Description**: The random seed to generate stochastic orbitals.
  - &gt;= 0: Stochastic orbitals have the form of exp(i*theta), where theta is a uniform distribution in [0, 2*pi).
  - 0: the seed is decided by time(NULL).
  - &lt;= -1: Stochastic orbitals have the form of +1 or -1 with equal probability.
  - -1: the seed is decided by time(NULL).
- **Default**: 0

### initsto_ecut

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==sdft*
- **Description**: Stochastic wave functions are initialized in a large box generated by "4*initsto_ecut". initsto_ecut should be larger than ecutwfc. In this method, SDFT results are the same when using different cores. Besides, coefficients of the same G are the same when ecutwfc is rising to initsto_ecut. If it is smaller than ecutwfc, it will be turned off.
- **Default**: 0.0
- **Unit**: Ry

### initsto_freq

- **Type**: Integer
- **Availability**: *[`esolver_type`](#esolver_type)==sdft*
- **Description**: Frequency (once each initsto_freq steps) to generate new stochastic orbitals when running md.
  - positive integer: Update stochastic orbitals
  - 0: Never change stochastic orbitals.
- **Default**: 0

### npart_sto

- **Type**: Integer
- **Availability**: *[`esolver_type`](#esolver_type)==sdft and (([`method_sto`](#method_sto)==2 and [`out_dos`](#out_dos) contains 1) or ([`basis_type`](#basis_type)==pw and [`cal_cond`](#cal_cond)==true))*
- **Description**: Make memory cost to 1/npart_sto times of the previous one when running the post process of SDFT like DOS or conductivities.
- **Default**: 1

[back to top](#full-list-of-input-keywords)

## Geometry relaxation

### relax_method

- **Type**: String
- **Allowed values**: cg, cg_trad, bfgs, bfgs_trad, sd, cg_bfgs, lbfgs
- **Description**: The method used for geometry optimization. Select exactly one option:

  - cg: Simultaneously optimize ionic positions and cell parameters with conjugate gradient and line search (recommended default).
  - cg_trad: First optimize ionic positions at fixed cell, then update the cell, and repeat.
  - bfgs: Default BFGS that directly updates the inverse Hessian (recommended).
  - bfgs_trad: Traditional BFGS that updates the Hessian matrix B and then inverts it.
  - lbfgs: Limited-memory BFGS algorithm, suitable for large systems.
  - cg_bfgs: Mixed method starting with CG and switching to BFGS when force convergence reaches relax_cg_thr.
  - sd: Steepest descent algorithm. Not recommended for production use.
- **Default**: cg

### relax_scale_force

- **Type**: Real
- **Availability**: *[`relax_method`](#relax_method)==cg*
- **Description**: The paramether controls the size of the first conjugate gradient step. A smaller value means the first step along a new CG direction is smaller. This might be helpful for large systems, where it is safer to take a smaller initial step to prevent the collapse of the whole configuration.
- **Default**: 0.5

### relax_nmax

- **Type**: Integer
- **Description**: The maximal number of ionic iteration steps. If set to 0, the code performs a quick "dry run", stopping just after initialization. This is useful to check for input correctness and to have the summary printed.
- **Default**: 1 for SCF, 50 for relax and cell-relax calcualtions

### relax_cg_thr

- **Type**: Real
- **Availability**: *[`relax_method`](#relax_method)==cg_bfgs*
- **Description**: When relax_method is set to cg_bfgs, a mixed algorithm of conjugate gradient (CG) and Broyden–Fletcher–Goldfarb–Shanno (BFGS) is used. The ions first move according to the CG method, then switch to the BFGS method when the maximum force on atoms is reduced below this threshold.
- **Default**: 0.5
- **Unit**: eV/Angstrom

### force_thr

- **Type**: Real
- **Legal range**: value>=0
- **Description**: Threshold of the force convergence. The threshold is compared with the largest force among all of the atoms. The recommended value for using atomic orbitals is 0.04 eV/Angstrom (0.0016 Ry/Bohr). The parameter is equivalent to force_thr_ev except for the unit, you can choose either you like.
- **Default**: 0.001
- **Unit**: Ry/Bohr (25.7112 eV/Angstrom)

### force_thr_ev

- **Type**: Real
- **Legal range**: value>=0
- **Description**: Threshold of the force convergence. The threshold is compared with the largest force among all of the atoms. The recommended value for using atomic orbitals is 0.04 eV/Angstrom (0.0016 Ry/Bohr). The parameter is equivalent to force_thr except for the unit. You may choose either you like.
- **Default**: 0.0257112
- **Unit**: eV/Angstrom (0.03889 Ry/Bohr)

### force_zero_out

- **Type**: Real
- **Description**: The atomic forces that are smaller than force_zero_out will be treated as zero.
- **Default**: 0.0
- **Unit**: eV/Angstrom

### relax_bfgs_w1

- **Type**: Real
- **Availability**: *[`relax_method`](#relax_method) in [bfgs, bfgs_trad, cg_bfgs]*
- **Description**: Controls the Wolfe condition for the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm used in geometry relaxation. This parameter sets the sufficient decrease condition (c1 in Wolfe conditions). For more information, see Phys. Chem. Chem. Phys., 2000, 2, 2177.
- **Default**: 0.01

### relax_bfgs_w2

- **Type**: Real
- **Availability**: *[`relax_method`](#relax_method) in [bfgs, bfgs_trad, cg_bfgs]*
- **Description**: Controls the Wolfe condition for the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm used in geometry relaxation. This parameter sets the curvature condition (c2 in Wolfe conditions). For more information, see Phys. Chem. Chem. Phys., 2000, 2, 2177.
- **Default**: 0.5

### relax_bfgs_rmax

- **Type**: Real
- **Availability**: *[`relax_method`](#relax_method) in [bfgs, bfgs_trad, cg_bfgs]*
- **Description**: Maximum allowed total displacement of all atoms during geometry optimization. The sum of atomic displacements can increase during optimization steps but cannot exceed this value.
- **Default**: 0.8
- **Unit**: Bohr

### relax_bfgs_rmin

- **Type**: Real
- **Availability**: *[`relax_method`](#relax_method)==bfgs_trad*
- **Description**: Minimum allowed total displacement of all atoms. When the total atomic displacement falls below this value and force convergence is not achieved, the calculation will terminate. Note: This parameter is not used in the default BFGS algorithm (relax_method = bfgs).
- **Default**: 1e-5
- **Unit**: Bohr

### relax_bfgs_init

- **Type**: Real
- **Availability**: *[`relax_method`](#relax_method) in [bfgs, bfgs_trad, cg_bfgs]*
- **Description**: Initial total displacement of all atoms in the first BFGS step. This sets the scale for the initial movement.
- **Default**: 0.5
- **Unit**: Bohr

### stress_thr

- **Type**: Real
- **Description**: The threshold of the stress convergence. The threshold is compared with the largest component of the stress tensor.
- **Default**: 0.5
- **Unit**: kbar

### press1

- **Type**: Real
- **Description**: The external pressures along three axes. Positive input value is taken as compressive stress.
- **Default**: 0
- **Unit**: kbar

### press2

- **Type**: Real
- **Description**: The external pressures along three axes. Positive input value is taken as compressive stress.
- **Default**: 0
- **Unit**: kbar

### press3

- **Type**: Real
- **Description**: The external pressures along three axes. Positive input value is taken as compressive stress.
- **Default**: 0
- **Unit**: kbar

### fixed_axes

- **Type**: String

**Requirements**

| Option | Requirements |
| --- | --- |
| `shape`, `volume` | [`relax_method`](#relax_method)==cg |

- **Availability**: *[`calculation`](#calculation)==cell-relax*
- **Description**: Specifies which cell degrees of freedom are fixed during variable-cell relaxation. The available options depend on relax_method:

  With relax_method = cg (default), all options are available:

  - None: Default; all cell parameters can relax freely
  - volume: Relaxation with fixed volume (allows shape changes)
  - shape: Fix shape but allow volume changes (hydrostatic pressure only)
  - a: Fix the a-axis lattice vector during relaxation
  - b: Fix the b-axis lattice vector during relaxation
  - c: Fix the c-axis lattice vector during relaxation
  - ab: Fix both a and b axes during relaxation
  - ac: Fix both a and c axes during relaxation
  - bc: Fix both b and c axes during relaxation
  - abc: Fix all three lattice vectors during relaxation

  With relax_method set to cg_trad, bfgs, bfgs_trad, lbfgs, sd, or cg_bfgs, None and a, b, c, ab, ac, bc, abc are available. The shape and volume options require cg.

  > Note: For VASP users, see the ISIF correspondence table in the geometry optimization documentation.
- **Default**: None

### fixed_ibrav

- **Type**: Boolean

**Requirements**

| Option | Requirements |
| --- | --- |
| `true` | [`relax_method`](#relax_method)==cg and [`latname`](#latname)!=none |

- **Availability**: *[`relax_method`](#relax_method)==cg and [`latname`](#latname)!=none*
- **Description**: - True: the lattice type will be preserved during relaxation. The lattice vectors are reconstructed to match the specified Bravais lattice type after each update.
  - False: No restrictions are exerted during relaxation in terms of lattice type

  > Note: it is possible to use fixed_ibrav with fixed_axes, but please make sure you know what you are doing. For example, if we are doing relaxation of a simple cubic lattice (latname = "sc"), and we use fixed_ibrav along with fixed_axes = "volume", then the cell is never allowed to move and as a result, the relaxation never converges. When both are used, fixed_ibrav is applied first, then fixed_axes = "volume" rescaling is applied.
- **Default**: False

### fixed_atoms

- **Type**: Boolean

**Requirements**

| Option | Requirements |
| --- | --- |
| `true` | [`calculation`](#calculation)!=relax |

- **Description**: - True: The direct coordinates of atoms will be preserved during variable-cell relaxation.
  - False: No restrictions are exerted on positions of all atoms. However, users can still fix certain components of certain atoms by using the m keyword in STRU file. For the latter option, check the end of this instruction.
- **Default**: False

[back to top](#full-list-of-input-keywords)

## Output information

### out_freq_ion

- **Type**: Integer
- **Description**: Controls the output interval in ionic steps. When set to a positive integer, information such as charge density, local potential, electrostatic potential, Hamiltonian matrix, overlap matrix, density matrix, Mulliken population analysis, and periodic structure files (when out_stru is positive) is printed every n ionic steps.

  This parameter only controls how often a write happens, not how many files are kept: with out_app_flag = 0 each write overwrites the same fixed filename, with out_app_flag = 1 records are appended to one fixed filename, and with out_app_flag = 2 each written step gets its own g{step} file.

  In molecular dynamics calculations, positive out_freq_ion selects periodic structure frames starting at the first step. Zero disables periodic frames; STRU_FINAL or STRU_FINAL.cif is still written when out_stru is positive. MD checkpoints STRU_restart and Restart_md.txt follow md_restartfreq independently.

  For DFT+U calculations with out_occ_mat = 1, a separate occupation-matrix file occ_matg{geom_step}.txt is created for every output ionic step. The converged (or final, if not converged) electronic step is always recorded in that file; when out_freq_elec is set smaller than scf_nmax, additional electronic steps are appended as separate sections, each labelled only with the electronic-step number.

  In RT-TDDFT calculations, this parameter counts completed electronic evolution steps (`STEP OF ELECTRON EVOLVE`) instead, because one ionic step contains `estep_per_md` electronic steps. To write once per ionic step, set it to `estep_per_md`.
- **Default**: 0

### out_freq_elec

- **Type**: Integer
- **Description**: Output the charge density (only binary format, controlled by out_chg), wavefunction (controlled by out_wfc_pw) per out_freq_elec electronic iterations. Note that they are always output when converged or reach the maximum iterations scf_nmax.

  In DFT+U calculations with out_freq_ion &gt; 0 and out_occ_mat = 1, this parameter also selects the electronic iterations recorded as separate sections inside occ_matg{geom_step}.txt (the converged or final electronic step is recorded regardless of this parameter).
- **Default**: scf_nmax

### out_chg

- **Type**: Integer \[Integer\](optional)
- **Description**: The first integer controls whether to output the charge density on real space grids:
    - 1: Output the charge density (in Bohr^-3) on real space grids into the density files in the folder `OUT.${suffix}`. The files are named as:
        - nspin = 1: `chg.cube`;
        - nspin = 2: `chgs1.cube`, and `chgs2.cube`;
        - nspin = 4: `chgs1.cube`, `chgs2.cube`, `chgs3.cube`, and `chgs4.cube`;
        - When using the Meta-GGA functional, additional files containing the kinetic energy density are also output:
            - nspin = 1: `tau.cube`;
            - nspin = 2: `taus1.cube`, and `taus2.cube`;
            - nspin = 4: `taus1.cube`, `taus2.cube`, `taus3.cube`, and `taus4.cube`;
    - 2: On top of 1, also output the initial charge density files. The files are named as:
        - nspin = 1: `chg_ini.cube`;
        - nspin = 2: `chgs1_ini.cube` and `chgs2_ini.cube`;
        - nspin = 4: `chgs1_ini.cube`, `chgs2_ini.cube`, `chgs3_ini.cube`, and `chgs4_ini.cube`;
        - out_freq_ion = 0 writes them at every step; out_freq_ion &gt; 0 writes them every out_freq_ion steps.
        Only out_app_flag = 2 inserts a one-based geometry-step index before `_ini` (e.g., `chgg1_ini.cube`, `chgs1g1_ini.cube`); with out_app_flag = 0 the fixed file is truncated and overwritten at every write, and with out_app_flag = 1 each written step appends one cube frame.
    - -1: Disable the charge density auto-back-up file `{suffix}-CHARGE-DENSITY.restart`, useful for large systems.

  The auto-back-up restart file is never written when `calculation = nscf`: a non-self-consistent run must not overwrite the density converged by the preceding SCF calculation, so repeated nscf runs keep reusing the same input density. This is independent of the first integer above; `out_chg` still controls the cube output in an nscf run.

  The second integer controls the precision of the charge density output. If not given, `3` is used as default. For restarting from this file and other high-precision calculations, `10` is recommended.

  In molecular dynamics simulations, the output frequency is controlled by out_freq_ion.

  > Note: In the 3.10-LTS version, the file names are SPIN1_CHG.cube and SPIN1_CHG_INI.cube, etc.
- **Default**: 0 3

### out_occ_mat

- **Type**: Boolean
- **Description**: Whether to output the DFT+U occupation matrices. When set to 1 (default), the latest occupation matrix is written to occ_mat.txt at every electronic step, and a numbered file occ_matg{geom_step}.txt is created for every output ionic step selected by out_freq_ion, in which electronic-step sections are appended according to out_freq_elec. With out_app_flag=2 these files are written to the OCC/ sub-directory; in modes 0 and 1 they stay in the OUT directory. Sorted eigenvalues of the stored occupation matrix are appended as comment lines only to the latest occ_mat.txt, not to the numbered files. For nspin=1, one nonmagnetic spectrum is written.

  This parameter only takes effect for DFT+U calculations (dft_plus_u &gt; 0) and is independent of out_chg: disabling the charge density output does not disable the occupation-matrix output.
- **Default**: True

### out_pot

- **Type**: Integer \[Integer\](optional)
- **Description**: - 1: Output the total local potential (i.e., local pseudopotential + Hartree potential + XC potential + external electric field (if exists) + dipole correction potential (if exists) + ...) on real space grids (in Ry) into files in the folder OUT.{suffix}. The files are named as:
   - nspin = 1: pots1.cube;
   - nspin = 2: pots1.cube and pots2.cube;
   - nspin = 4: pots1.cube, pots2.cube, pots3.cube, and pots4.cube
  - 2: Output the electrostatic potential on real space grids into OUT.{suffix}/pot_es.cube. The Python script named tools/02_postprocessing/average_pot/aveElecStatPot.py can be used to calculate the average electrostatic potential along the z-axis and outputs it into ElecStaticPot_AVE. Please note that the total local potential refers to the local component of the self-consistent potential, excluding the non-local pseudopotential. The distinction between the local potential and the electrostatic potential is as follows: local potential = electrostatic potential + XC potential.
  - 3: Apart from 1, also output the total local potential of the initial charge density. The files are named as:
   - nspin = 1: `pot_ini.cube`;
   - nspin = 2: `pots1_ini.cube` and `pots2_ini.cube`;
   - nspin = 4: `pots1_ini.cube`, `pots2_ini.cube`, `pots3_ini.cube`, and `pots4_ini.cube`;
   - out_freq_ion = 0 writes them at every step; out_freq_ion &gt; 0 writes them every out_freq_ion steps.
   Only out_app_flag = 2 inserts a one-based geometry-step index before `_ini` (e.g., `potg1_ini.cube`, `pots1g1_ini.cube`); with out_app_flag = 0 the fixed file is truncated and overwritten at every write, and with out_app_flag = 1 each written step appends one cube frame.

  The optional second integer controls the output precision. If not provided, the default precision is 8.

  In molecular dynamics calculations, the output frequency is controlled by out_freq_ion.

  > Note: In the 3.10-LTS version, the file names are SPIN1_POT.cube and SPIN1_POT_INI.cube, etc.
- **Default**: 0

### out_sol

- **Type**: Integer \[Integer\](optional)
- **Description**: - 0: No output.
  - 1: Output the implicit-solvent fields of the last solvent correction on real space grids into files in the folder OUT.{suffix}, for imp_sol 1 (the original implicit solvation model) and imp_sol 2 (SCCS):
   - `sol_eps.cube`: the dielectric function epsilon(r), 1 in the solute and the bulk permittivity in the solvent.
   - `sol_cavity.cube`: the solute boundary s(r), 1 in the solute and 0 in the solvent; for imp_sol 1 it is 1 minus the solvent shape function (written only when eb_k &gt; 1). With the solvent-aware cavity (sccs_solvent_radius &gt; 0) it is the filled boundary.
   - `sol_cavity_local.cube` and `sol_filled_fraction.cube`: only with the solvent-aware cavity, the boundary before the filling and the solute fraction of the probe sphere around each point; points where this fraction exceeds sccs_filling_thr are filled.
   With out_freq_ion &gt; 0 the files are written every out_freq_ion ionic steps; with out_freq_ion = 0 they are written at every step. In out_app_flag 1, fixed names such as `sol_eps.cube` hold one complete frame per written step: ionic step 0 truncates the file and later steps append. In out_app_flag 2, positive out_freq_ion adds the geometry index, e.g. `sol_epsg1.cube`. In mode 0, and in mode 2 with out_freq_ion = 0, each written step overwrites the fixed name. Solvent files stay in OUT.{suffix} in all modes. Nothing is written while SCCS waits for its delayed start (sccs_start_drho).

  The optional second integer controls the output precision. If not provided, the default precision is 8.
- **Default**: 0

### out_dmk

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Whether to output the density matrix for each k-point into files in the folder OUT.${suffix}. For current develop versions, out_dmk writes *_nao.txt files:
    - For gamma only case:
     - nspin = 1 and 4: dm_nao.txt;
     - nspin = 2: dms1_nao.txt and dms2_nao.txt for the two spin channels.
    - For multi-k points case:
     - nspin = 1 and 4: dmk1_nao.txt, dmk2_nao.txt, ...;
     - nspin = 2: dmk1s1_nao.txt... and dmk1s2_nao.txt... for the two spin channels.

    The file names are fixed for out_app_flag = 0 (overwritten at every write) and out_app_flag = 1 (records appended). Only out_app_flag = 2 inserts a one-based geometry-step suffix before _nao (for example dmk1g1_nao.txt).

    The optional second integer specifies the text precision (must be a positive integer); it defaults to 8.

    > Note: Version difference (develop vs 3.10-LTS):
    - In develop, out_dmk supports both gamma-only and multi-k-point density-matrix output.
    - In 3.10-LTS, the corresponding keyword is out_dm, and the output files are SPIN1_DM and SPIN2_DM, etc.
- **Default**: False

### out_dmr

- **Type**: Integer \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao and [`gamma_only`](#gamma_only)==0*
- **Description**: Controls whether the density matrix with Bravias lattice vector R index is written to files in the folder OUT.${suffix}. The first value selects the output format:
  - 0: do not write DM(R);
  - 1: write the sparse matrix in the csr text format; the optional second integer sets the text precision (default 8);
  - 2: write the dense matrix in the npz format (requires a build with -DENABLE_CNPY=1); no precision is applied.

  For format 1, the files are named as dmr{s}{spin index}{g}{geometry index}{_nao} + {".csr"}. Here, 's' refers to spin, where s1 means spin up channel while s2 means spin down channel, and the sparse matrix format 'csr' is mentioned in out_hsr. Finally, the file name is fixed for out_app_flag = 0 (truncated and overwritten at every write) and out_app_flag = 1 (the first written step truncates it and later steps append complete records); only out_app_flag = 2 inserts a one-based geometry-step index for each ionic step that may have different geometries:

  - nspin = 1: dmrs1_nao.csr;
  - nspin = 2: dmrs1_nao.csr and dmrs2_nao.csr for the two spin channels.

  For format 2, the files are named dmrs{spin index}_nao.npz, where the spin index starts from 1. With out_app_flag = 2 the one-based geometry step is inserted, e.g. dmrs1g3_nao.npz.

  > Note: In the 3.10-LTS version, the parameter is named out_dm1, and the file names are data-DMR-sparse_SPIN0.csr and data-DMR-sparse_SPIN1.csr, etc. The legacy boolean spelling is still accepted: true maps to format 1 and false maps to format 0.
- **Default**: 0

### out_wfc_pw

- **Type**: Integer
- **Allowed values**: 0, 1, 2

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`out_wfc_pw`](#out_wfc_pw)!=0 | [`basis_type`](#basis_type)==pw |

- **Availability**: *[`basis_type`](#basis_type)==pw and [`esolver_type`](#esolver_type)==ksdft*
- **Description**: Controls whether plane-wave Kohn-Sham wavefunction coefficients are written to `OUT.${suffix}/`.

  Available values are:

  - `0`: Do not write wavefunction coefficients.
  - `1`: Write text files with the `.txt` suffix.
  - `2`: Write binary files with the `.dat` suffix.

  The file-name pattern is `wfk{k}[s{spin}][g{geometry step}][e{electronic iteration}]_pw.txt` for `out_wfc_pw=1` and `wfk{k}[s{spin}][g{geometry step}][e{electronic iteration}]_pw.dat` for `out_wfc_pw=2`. All PW output files include a `k*` label, including Gamma-only calculations. Without geometry-step or electronic-iteration indices, representative names are `wfk1_pw.txt` or `wfk1_pw.dat` for `nspin=1`, `wfk1s1_pw.txt` and `wfk1s2_pw.txt` or their `.dat` equivalents for `nspin=2`, and `wfk1s4_pw.txt` or `wfk1s4_pw.dat` for `nspin=4`.

  With `out_freq_ion=0`, files are written only when the electronic calculation converges or reaches `scf_nmax`; no `g*` or `e*` index is added. During structural relaxation or molecular dynamics with `out_app_flag=1`, the first written step truncates the unindexed files and later ionic steps append one frame per step (mirroring `out_wfc_lcao`); with `out_app_flag=0` the unindexed files are overwritten each step. With `out_freq_ion` &gt; 0, output is restricted to the ionic steps selected by `out_freq_ion`. For `out_app_flag=0` or `2`, output is written when the electronic iteration is a multiple of `out_freq_elec`, when the calculation converges, or when it reaches `scf_nmax`; for `out_app_flag=1` only the last electronic iteration of each selected ionic step is written (out_freq_elec is ignored), so the appended file holds exactly one frame per step. Both `g*` and `e*` indices are then added only when `out_app_flag=2`; with `out_app_flag=0` the fixed files are truncated and overwritten at every write, and with `out_app_flag=1` they accumulate one frame per written step.

  With `init_wfc file binary`, ABACUS reads only unindexed binary `wf*_pw.dat` files from `read_file_dir`, starting from the first frame. Such directly reusable files are normally generated with `out_wfc_pw=2` and `out_freq_ion=0`; multi-frame files accumulated under `out_app_flag=1` are trajectories and only their first frame is visible to the reader. Text `wf*_pw.txt` files and files containing `g*` or `e*` indices are not matched automatically.

  > Note: In the 3.10-LTS version, the binary files are named `WAVEFUNC1.dat`, `WAVEFUNC2.dat`, etc.
- **Default**: 0

### out_wfc_lcao

- **Type**: Integer
- **Allowed values**: 0, 1, 2

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`out_wfc_lcao`](#out_wfc_lcao)!=0 | [`basis_type`](#basis_type)==lcao |

- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Whether to output the electronic wavefunction coefficients into files and store them in the folder OUT.${suffix} (or its PSI/ subdirectory when out_app_flag is 2). The files are named as wf{s}{spin index}{k(optional)}{k-point index}{g(optional)}{geometry index1}{_nao} + {".txt"/".dat"}. Here, 's' refers to spin, where s1 means spin up channel while s2 means spin down channel, and 's12' refer to spinor wave functions that contains both spin channels with spin-orbital coupling or noncollinear calculations enabled. In addition, if 'gamma_only' is set to 0, then the optinoal k-point sampling index appears with the k-point index attached to the electronic wave function file names. Finally, only out_app_flag = 2 adds the optional 'g' index for each ionic step that may have different geometries, and the wave function files are saved into the PSI/ subdirectory of OUT.${suffix}; with out_app_flag = 0 the fixed file is truncated and overwritten at every write, and with out_app_flag = 1 the wave functions accumulate during ionic steps.
  - 0: no output
  - 1: (txt format)
   - gamma-only: wfs1_nao.txt or wfs2_nao.txt, ...;
   - non-gamma-only: wfs1k1_nao.txt or wfs1k2_nao.txt, ...;
  - 2: (binary format)
   - gamma-only: wfs1_nao.dat or wfs2_nao.dat, ...;
   - non-gamma-only: wfs1k1_nao.dat or wfs1k2_nao.dat, ....

  The corresponding sequence of the orbitals can be seen in Basis Set.

  Also controled by out_freq_ion and out_app_flag.

  > Note: In the 3.10-LTS version, the file names are WFC_NAO_GAMMA1_ION1.txt and WFC_NAO_K1_ION1.txt, etc.
- **Default**: 0

### out_dos

- **Type**: Integer \[Integer\](optional)
- **Description**: Whether to output the density of states (DOS) and projected density of states (PDOS). For more information, refer to the dos.md.
  - 0: no output
  - 1: output the density of states (DOS) and projected density of states (PDOS, LCAO only)
   - With out_app_flag = 0: fixed-name files (`doss{s}.txt`, `pdoss{s}.txt`) are truncated and overwritten at every write.
   - With out_app_flag = 1: the same fixed-name files are reused; the first written step truncates them and later steps append one record per step (prefixed with a `# Ionic_Step N` header, one-based).
   - With out_app_flag = 2: per-step files are named `doss{s}g{geom}.txt` and `pdoss{s}g{geom}.txt` where `{geom}` is the one-based geometry index (e.g. `doss1g3.txt` for the third ionic step).
   - nspin=1 or 4: one spin channel (`s1`). nspin=2: two channels (`s1`, `s2`). PW and LCAO use the same naming.
   - SDFT (`esolver_type = sdft`): the stochastic DOS is written once at the end of the calculation as `dos_sdft.txt`, or `dos_sdftg{geom}.txt` when `out_app_flag = 2`, in the same DOS directory. It is a single combined channel and is not written per ionic step.
  - 2: write total DOS (`dos.npy`) and projected DOS (`pdos.npy`) as NumPy arrays for a single-point LCAO KSDFT SCF or NSCF calculation. Both spin channels for nspin=2 share the same files.
    NumPy output preserves double-precision (`float64`) spectral values.
    For large PDOS datasets, NumPy output can also reduce write time and file size.
    If an older input uses `out_dos 2` for text PDOS, change it to `out_dos 1` to keep text output.
  - 3: Fermi surface output has been removed.
  The optional second integer controls the number of decimal places of the DOS and PDOS values in `doss{s}.txt` and `pdoss{s}.txt`, and defaults to 6.
- **Default**: 0 6

### out_ldos

- **Type**: Integer \[Integer\](optional)
- **Description**: Whether to output the local density of states (LDOS), optionally output precision can be set by a second parameter, default is 3.
  - 0: no output
  - 1: output the partial charge density for given bias (controlled by stm_bias) in cube file format, which can be used to plot scanning tunneling spectroscopys to mimick STM images using the Python script plot.py.
  - 2: output LDOS along a line in real space (controlled by ldos_line). Parameters used to control DOS output are also valid for LDOS.
  - 3: output both two LDOS modes above.

  The LDOS is evaluated once after all ionic steps finish; the cube header records the final one-based ionic step as "Ionic_Step N".
- **Default**: 0

### out_band

- **Type**: Boolean \[Integer\](optional)
- **Description**: Whether to output the eigenvalues of the Hamiltonian matrix (in eV) into the running log during electronic iterations and into a file at the end of calculations. The former can be used with the 'out_freq_elec' parameter while the latter option allows the output precision to be set via a second parameter, with a default value of 8. The output file names are:
   - nspin = 1 or 4: band.txt;
   - nspin = 2: bands1.txt and bands2.txt;
   - with out_app_flag = 2 the files are written to OUT.${suffix}/BANDS/ and carry a g{step} suffix (for example bands1g2.txt), while modes 0/1 reuse the fixed name (mode 0 truncates, mode 1 appends each written step);
   - For more information, refer to the band.md
- **Default**: False

### out_proj_band

- **Type**: Boolean
- **Description**: Whether to output the projected band structure. For more information, refer to the band.md. The files pbands{spin}.xml (out_app_flag = 0 and 1) or pbands{spin}g{step}.xml (out_app_flag = 2) describe the final ionic step only, because the projection is evaluated once after all ionic steps have finished.
- **Default**: False

### out_stru

- **Type**: Integer
- **Description**: Controls ordinary structure output in scf/nscf/relax/cell-relax and md calculations. Files are written to OUT.{suffix}/, or to STRUC/ when out_app_flag=2. The relaxation header records version, time, energy and stress; MD frames use a one-based "# MD step N" marker. In relax, STRU_NOW is overwritten each step, STRU_FINAL is written at completion, and positive out_freq_ion selects additional periodic files when out_app_flag is 1 or 2. In MD, STRU_FINAL or STRU_FINAL.cif is written at completion and positive out_freq_ion selects periodic frames for all three output modes. For scf/nscf only STRU_FINAL (or STRU_FINAL.cif) is written.

    - 0: No ordinary structure files are output. MD restart checkpoints remain controlled by md_restartfreq.
    - 1: ABACUS STRU format files are output. In relax/cell-relax the latest structure is written to STRU_NOW (overwritten each step), periodic STRU files are written when out_freq_ion is positive and out_app_flag is 1 or 2, and the final structure is written to STRU_FINAL. For scf/nscf only STRU_FINAL is written. In MD, positive out_freq_ion selects periodic STRU files in modes 0, 1 and 2; STRU_FINAL is always written at completion. Mode 1 appends one structure block per selected step to fixed-name STRU.
    - 2: CIF format files are output. In relax/cell-relax, STRU_NOW.cif is overwritten each step and STRU_FINAL.cif is written at completion; periodic CIF files are written with positive out_freq_ion when out_app_flag is 1 or 2. In MD, positive out_freq_ion selects periodic CIF files for all three modes and STRU_FINAL.cif is written at completion. Mode 2 writes numbered STRU{istep}.cif files; modes 0 and 1 overwrite one STRU.cif on each selected step. CIF contains geometry but no per-atom forces or velocities. MD restart checkpoints remain ABACUS STRU files.
  > Note: MD writes STRU_FINAL or STRU_FINAL.cif at the end when out_stru is positive. With out_freq_ion&gt;0 it also writes periodic frames from the first step. For ABACUS STRU, out_app_flag=0 overwrites STRU, mode 1 appends marked frames to STRU, and mode 2 writes numbered STRU{istep} files under STRUC/. With out_freq_ion=0 only the final structure is written. MD does not write STRU_NOW. Ordinary MD STRU structures include forces in eV/Angstrom and velocities in atomic units; STRU_restart keeps velocities but omits forces, and is written with Restart_md.txt according to md_restartfreq even when out_stru=0.
  > Note: For backward compatibility, true/false (case insensitive) are accepted and converted to 1/0.
- **Default**: 1

### out_level

- **Type**: String
- **Description**: Control the output level of information in OUT.{calculation}.log.
  - ie: electronic iteration level, which prints useful information for electronic iterations;
  - i: geometry relaxation level, which prints some information for geometry relaxations additionally;
  - m: molecular dynamics level, which does not print some information for simplicity.
- **Default**: ie

### out_hsk

- **Type**: Integer \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Output the Hamiltonian and overlap matrices in reciprocal space for each k-point into files in the directory OUT.${suffix}. The first integer selects the format:
  - 0: disabled;
  - 1: text output; the optional second integer controls precision (must be a positive integer) and defaults to 8;
  - 2: binary output in the native ABACUS .dat format;
  - 3: NPZ output, which is not implemented for H(k)/S(k).

  Text output (format 1) writes one self-describing record per ionic step: an Ionic_Step header, the k-point and basis metadata, a user_defined_lattice block, and then the complete dense N x N matrix in row-major order (all rows and columns, including both triangles), with four complex values for multi-k/spinor or eight real values for gamma-only per line. Binary output (format 2) stores the matrix dimension as an int followed by the row-major upper triangle; gamma-only elements are doubles, multi-k and spinor elements are pairs of doubles containing the real and imaginary parts. Native integer representation and byte order are used by the binary format.

  The output is also controlled by out_freq_ion and out_app_flag. For more information, refer to hs_matrix.md.

  - Gamma-only, nspin = 1: text writes h_nao.txt and s_nao.txt; binary writes hk_nao.dat and sk_nao.dat.
  - Gamma-only, nspin = 2: text writes hs1_nao.txt and hs2_nao.txt for the two spin channels of the Hamiltonian matrix and s_nao.txt for the overlap matrix; binary writes hks1_nao.dat, hks2_nao.dat and sk_nao.dat. Only one overlap matrix is written because it is identical for both spin channels.
  - Gamma-only, nspin = 4: not available with the gamma-only algorithm.
  - Multi-k, nspin = 1: text writes hk1_nao.txt and sk1_nao.txt for the first k-point; binary writes hk1_nao.dat and sk1_nao.dat.
  - Multi-k, nspin = 2: text writes hk1s1_nao.txt, hk1s2_nao.txt and sk1_nao.txt; binary writes the same names with the .dat suffix. Only one overlap matrix is written because it is identical for both spin channels.
  - Multi-k, nspin = 4: text writes one complex spinor matrix hk1_nao.txt and sk1_nao.txt; binary writes hk1s4_nao.dat and sk1_nao.dat.
  When out_app_flag is 0, the fixed file is truncated and overwritten at every write.
  When out_app_flag is 1, the first ionic step truncates the file and later steps append complete records.
  When out_app_flag is 2, g followed by the one-based ionic-step index is inserted before _nao, for example hk1s1g1_nao.txt or hg1_nao.txt.

  > Note: In the 3.10-LTS version, the file names are data-0-H and data-0-S, etc.
- **Default**: 0 8
- **Unit**: Ry

### out_mat_hs

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Legacy alias for out_hsk 1, which outputs Hamiltonian and overlap matrices in reciprocal space for each k-point. The optional second integer controls text precision. If both out_hsk and out_mat_hs are present, out_hsk takes precedence.
- **Default**: False 8
- **Unit**: Ry

### out_hsr

- **Type**: Integer \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Output Hamiltonian and overlap matrices in real space, indexed by the Bravais lattice vector R, in the directory OUT.${suffix}. The first integer selects the format:
  - 0: disabled;
  - 1: text CSR output; the optional second integer controls precision and defaults to 8;
  - 2: native binary CSR output using .dat files;
  - 3: NPZ output using hrs1_nao.npz, hrs2_nao.npz when needed, and sr_nao.npz.

  For multi-k calculations, the output contains the individual real-space blocks stored for the Bravais lattice vectors R. For gamma-only calculations, the internal real-space contributions are folded into a single R = (0, 0, 0) block. This folded result cannot recover the original R-resolved contributions or interpolate arbitrary k points. Terms added only while constructing H(k) are not guaranteed to be present.

  Standalone LCAO LR-TDDFT with [abs_gauge](#abs_gauge) set to `velocity_comm` reads the text CSR matrices from this output. For example, use `out_hsr 1 12`, `out_app_flag 0`, and `gamma_only 0` in the SCF or NSCF run supplying the wavefunctions. Copy `hrs1_nao.csr` and `sr_nao.csr` to `read_file_dir` for LR, with `hrs2_nao.csr` for `nspin 2`. With `nspin 1`, `hrs1_nao.csr` stores the common one-electron Hamiltonian block at its original scale.

  For binary output, each file uses the same basename as text output with a .dat suffix. Every native record starts with a five-int versioned header: the magic 0x48535242, the format version (currently 2), the one-based ionic step, the matrix dimension, and the number of R blocks. Files written before this versioned header was introduced (v3.11.0-beta9/beta10 stored a zero-based step, and development builds after that stored a one-based step without any version marker) cannot be interpreted from their content alone, so readers must not assume the current layout for old .dat files. Each R block contains three int coordinates, an int nonzero count, native double values (real/imaginary double pairs for complex matrices), int column indices, and long long row pointers. Native integer representation and byte order are used. When out_app_flag is 0, the fixed file is truncated and overwritten at every write; when out_app_flag is 1, the first ionic step truncates the file and later steps append complete records.

  > Note: In the 3.10-LTS version, the file names are data-HR-sparse_SPIN0.csr and data-SR-sparse_SPIN0.csr, etc.
- **Default**: 0 8
- **Unit**: Ry

### out_mat_hs2

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Legacy alias for out_hsr 1, which outputs Hamiltonian and overlap matrices in real space indexed by the Bravais lattice vector R. The optional second integer controls text precision. If both out_hsr and out_mat_hs2 are present, out_hsr takes precedence.
- **Default**: False 8
- **Unit**: Ry

### out_mat_tk

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Whether to print the kinetic-energy matrices T(k) for each k-point into OUT.${suffix}. Text output uses the same self-describing layout as out_hsk 1: an Ionic_Step header, the k-point and basis metadata, a user_defined_lattice block, and then the complete dense N x N matrix in row-major order, with four complex values for multi-k or eight real values for gamma-only per line. T(k) is spin-independent, so no spin suffix is used: gamma-only calculations write t_nao.txt, multi-k calculations write tk{k}_nao.txt, where {k} is the one-based k-point index, and out_app_flag = 2 inserts a g{step} index before _nao. The optional second parameter specifies the text precision (must be a positive integer).

  > Note: In the 3.10-LTS version, the file names are data-TR-sparse_SPIN0.csr, etc.
- **Default**: False [8]
- **Unit**: Ry

### out_mat_r

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao and [`gamma_only`](#gamma_only)==0*
- **Description**: Whether to print the matrix representation of the position matrix. The three Cartesian components are written to rrx_nao.csr, rry_nao.csr and rrz_nao.csr in the matrix output directory (OUT.${suffix}/ when out_app_flag is 0 or 1, MAT/ when it is 2); with out_app_flag = 2 a g{step} index is inserted before _nao.csr, where {step} is the one-based ionic-step index. With out_app_flag = 0 or 1 the fixed file names are used (mode 0 overwrites them at every write, mode 1 appends one record per written ionic step). Each file uses the same self-describing header and CSR layout as H(R)/S(R): an ionic-step record, the matrix label, the number of spin directions and the spin index, the basis size, the number of non-empty Bravais lattice vectors actually written, the user_defined_lattice cell block, and one CSR block per non-empty Bravais lattice vector (an R vector is kept when at least one of its three Cartesian components has an element above the sparse threshold). The optional second parameter controls text output precision. If calculation is set to get_s, the position matrix can be obtained without scf iterations. For more information, please refer to position_matrix.md.

  > Note: In the 3.10-LTS version, the file name is data-rR-sparse.csr.
- **Default**: False 8
- **Unit**: Bohr

### out_mat_t

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao and [`gamma_only`](#gamma_only)==0*
- **Description**: Generate files containing the kinetic energy matrix. The optional second parameter controls text output precision. A single file tr_nao.csr is written per ionic step: its header records the ionic step, the spin count (1, since T(R) is spin independent), the basis size, the number of non-empty Bravais lattice vectors actually written, and the unit cell, followed by one CSR block per non-empty R vector (values, column indices, row pointers). R vectors whose elements all fall below the sparse threshold are omitted. The name is trg{step}_nao.csr when out_app_flag = 2. Also controlled by out_freq_ion and out_app_flag.

  > Note: In the 3.10-LTS version, the file name is data-TR-sparse_SPIN0.csr.
- **Default**: False 8
- **Unit**: Ry

### out_mat_dh

- **Type**: Integer
- **Availability**: *[`basis_type`](#basis_type)==lcao and [`gamma_only`](#gamma_only)==0*
- **Description**: Whether to print files containing the Hamiltonian derivatives dH/dR. Only the k-space matrices are currently written, to MAT/ as dhk{k}{xyz}_ia{I}[s{spin}][g{step}]_nao.txt: one file per k point k (1-based, always present in the name), differentiated atom I, and Cartesian direction, with the s{spin} suffix when nspin = 2 and the g{step} suffix only when out_app_flag = 2. Also controlled by out_freq_ion and out_app_flag.

  Format: &lt;enable&gt; [precision] [iat1 iat2 ...]. The first value (0/1) enables/disables output. The second optional value sets the output precision (default: 8). Starting from the third value, 1-based atom indices can be listed to restrict output to derivatives with respect to those specific atoms only; if no atom indices are given, all atoms are written.

  > Note: In the 3.10-LTS version, the file name is data-dHRx-sparse_SPIN0.csr and so on.
- **Default**: 0 8
- **Unit**: Ry/Bohr

### out_mat_dh_t

- **Type**: Integer
- **Description**: Whether to print files containing the derivatives of the kinetic energy matrix dT/dR.

  See out_mat_dh for format details (enable, precision, atom indices).
- **Default**: 0 8
- **Unit**: Ry/Bohr

### out_mat_dh_vl

- **Type**: Integer
- **Description**: Whether to print files containing the derivatives of the local pseudopotential matrix dV^L/dR.

  See out_mat_dh for format details.
- **Default**: 0 8
- **Unit**: Ry/Bohr

### out_mat_dh_vnl

- **Type**: Integer
- **Description**: Whether to print files containing the derivatives of the nonlocal pseudopotential matrix dV^NL/dR.

  See out_mat_dh for format details.
- **Default**: 0 8
- **Unit**: Ry/Bohr

### out_mat_dh_vh

- **Type**: Integer
- **Description**: Whether to print files containing the derivatives of the Hartree matrix dV^H/dR.

  See out_mat_dh for format details.
- **Default**: 0 8
- **Unit**: Ry/Bohr

### out_mat_dh_vxc

- **Type**: Integer
- **Description**: Whether to print files containing the derivatives of the XC matrix dV^XC/dR.

  See out_mat_dh for format details.
- **Default**: 0 8
- **Unit**: Ry/Bohr

### out_mat_h_t

- **Type**: Integer
- **Description**: Legacy alias for out_mat_tk, which outputs the kinetic energy matrix T(k) for each k-point in the NAO basis. The optional second integer controls text precision. If both out_mat_tk and out_mat_h_t are present, out_mat_tk takes precedence.
- **Default**: 0 8
- **Unit**: Ry

### out_mat_vnlk

- **Type**: Integer
- **Description**: Whether to print the nonlocal pseudopotential matrix Vnl(k) for each k-point in the NAO basis, into text files OUT.${suffix}/vnlk*_nao.txt.

  The optional second integer controls text precision (default 8).
- **Default**: 0 8
- **Unit**: Ry

### out_mat_h_vnl

- **Type**: Integer
- **Description**: Legacy alias for out_mat_vnlk, which outputs the nonlocal pseudopotential matrix Vnl(k) for each k-point in the NAO basis. The optional second integer controls text precision. If both out_mat_vnlk and out_mat_h_vnl are present, out_mat_vnlk takes precedence.
- **Default**: 0 8
- **Unit**: Ry

### out_mat_vlk

- **Type**: Integer
- **Description**: Whether to print the local pseudopotential matrix Vl(k) for each k-point in the NAO basis, into text files OUT.${suffix}/vlk*_nao.txt.

  The optional second integer controls text precision (default 8).
- **Default**: 0 8
- **Unit**: Ry

### out_mat_h_vl

- **Type**: Integer
- **Description**: Legacy alias for out_mat_vlk, which outputs the local pseudopotential matrix Vl(k) for each k-point in the NAO basis. The optional second integer controls text precision. If both out_mat_vlk and out_mat_h_vl are present, out_mat_vlk takes precedence.
- **Default**: 0 8
- **Unit**: Ry

### out_mat_vhk

- **Type**: Integer
- **Description**: Whether to print the Hartree matrix Vh(k) for each k-point in the NAO basis, into text files OUT.${suffix}/vhk*_nao.txt.

  The optional second integer controls text precision (default 8).
- **Default**: 0 8
- **Unit**: Ry

### out_mat_h_vh

- **Type**: Integer
- **Description**: Legacy alias for out_mat_vhk, which outputs the Hartree matrix Vh(k) for each k-point in the NAO basis. The optional second integer controls text precision. If both out_mat_vhk and out_mat_h_vh are present, out_mat_vhk takes precedence.
- **Default**: 0 8
- **Unit**: Ry

### out_mat_vxck

- **Type**: Integer
- **Description**: Whether to print the exchange-correlation matrix Vxc(k) for each k-point in the NAO basis, into text files OUT.${suffix}/vxck*_nao.txt.

  The optional second integer controls text precision (default 8).
- **Default**: 0 8
- **Unit**: Ry

### out_mat_h_vxc

- **Type**: Integer
- **Description**: Legacy alias for out_mat_vxck, which outputs the exchange-correlation matrix Vxc(k) for each k-point in the NAO basis. The optional second integer controls text precision. If both out_mat_vxck and out_mat_h_vxc are present, out_mat_vxck takes precedence.
- **Default**: 0 8
- **Unit**: Ry

### out_mat_exxk

- **Type**: Integer
- **Description**: Whether to print the exact-exchange matrix Vexx(k) for each k-point in the NAO basis, into text files OUT.${suffix}/vexxk*_nao.txt.

  The optional second integer controls text precision (default 8). Only available for gamma-only calculations with exact exchange enabled.
- **Default**: 0 8
- **Unit**: Ry

### out_mat_h_exx

- **Type**: Integer
- **Description**: Legacy alias for out_mat_exxk, which outputs the exact-exchange matrix Vexx(k) for each k-point in the NAO basis. The optional second integer controls text precision. If both out_mat_exxk and out_mat_h_exx are present, out_mat_exxk takes precedence.
- **Default**: 0 8
- **Unit**: Ry

### out_mat_exx

- **Type**: Boolean \[Integer\](optional)
- **Description**: Whether to write the exact-exchange Hamiltonian matrix Hexx(R) in CSR text format, together with the EXX energy embedded in the file header, into OUT.${suffix}/hrs{is}_exx.csr (one file per spin channel, is = 1, 2, ...). The optional second integer controls the text precision (default 16). This output is the counterpart read back by init_exx = file. Like the other out_mat_* outputs it follows out_freq_ion and out_app_flag: out_app_flag = 2 inserts a g{step} index before _exx.csr, and out_app_flag = 1 appends later ionic steps to the same file. It only takes effect for LCAO calculations with exact exchange (dft_functional / xc_functional selects a hybrid functional).

  > Note: With positive out_freq_ion, an off-cadence final geometry is not written to the EXX file, while the automatic charge checkpoint can advance to that geometry. To obtain matching geometry, charge and EXX snapshots for NSCF, set out_freq_ion = 0 so the final geometry is written.
- **Default**: 0 16

### out_mat_ds

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao and [`gamma_only`](#gamma_only)==0*
- **Description**: Whether to print files containing the derivatives of the overlap matrix. The optional second parameter controls text output precision. The format will be the same as the overlap matrix as mentioned in out_mat_dh. The name of the files will be dsrx_nao.csr, dsry_nao.csr and dsrz_nao.csr (a g{step} index is inserted when out_app_flag = 2); the output is spin-independent. Also controlled by out_freq_ion and out_app_flag. This feature can be used with calculation get_s.

  > Note: In the 3.10-LTS version, the file name is data-dSRx-sparse_SPIN0.csr and so on.
- **Default**: False 8
- **Unit**: 1/Bohr

### out_mat_xc

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type) in [lcao, lcao_in_pw]*
- **Description**: Write exchange-correlation matrices in the Kohn-Sham orbital basis and their diagonal expectation values. The diagonal energies are saved in OUT.${suffix}/eband_vxc.txt. When out_app_flag = 2 the energy files carry a g{step} suffix (for example eband_vxcg2.txt) and the full matrices are written to OUT.${suffix}/MAT/, while modes 0/1 reuse the fixed names (mode 0 truncates, mode 1 appends one frame per written step). When EXX is calculated, its local and EXX contributions are also saved as eband_vxc_local.txt and eband_vxc_exx.txt in the same directory. The full MO-basis matrices are named vxcmok{ik}s{spin}_nao.txt, where ik is the one-based k-point index and spin is omitted for nspin = 1; with gamma_only the k-point index is dropped (vxcmo_nao.txt). With basis_type = lcao_in_pw the matrices and eband_vxc*.txt files are written once to the MAT directory (OUT.${suffix}/MAT/ when out_app_flag = 2, else OUT.${suffix}/), as fixed names without a g{step} suffix: vxc_nao.txt for Gamma-only, vxck{ik}_nao.txt for multi-k (spin-resolved as vxck{ik}s{spin}_nao.txt for nspin = 2). Each energy file begins with nk, nspin, and nbands, followed by nk*nspin*nbands rows of energies in Hartree and eV. The optional second integer controls the precision of the MO-basis matrices (vxcmok*_nao.txt) and defaults to 8; the eband_vxc*.txt energy files keep their full precision.

  > Note: In the 3.10-LTS version, the file name is k-$k-Vxc and so on.
- **Default**: False 8
- **Unit**: Ry

### out_mat_xc2

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Whether to print the exchange-correlation matrices in numerical orbital representation: in CSR format in the directory OUT.${suffix}. The name of the files will be vxcrs1_nao.csr and so on, with a one-based spin index. The matrix is a final-step snapshot, so no g{step} suffix is added.

  > Note: In the 3.10-LTS version, the file name is Vxc_R_spin$s and so on.
- **Default**: False 8
- **Unit**: Ry

### out_mat_l

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Whether to print the expectation value of the angular momentum operators Lx, Ly and Lz in the basis of the localized atomic orbitals. The three components are written as sparse matrices into lrx_nao.csr, lry_nao.csr and lrz_nao.csr (or lrxg{step+1}_nao.csr etc. when out_app_flag = 2), using the same self-describing header and CSR layout as the H(R)/S(R) output, so the values are indexed by the global NAO orbital indices. Because the NAO basis functions are real, every matrix element is purely imaginary: the files store only the imaginary part of the matrix element, and its real part is identically zero. This output is not supported for nspin = 4; an INPUT file that enables out_mat_l with nspin = 4 is rejected during parameter parsing. It is also honored when calculation = get_s, where the matrices are built directly from the orbital tables without an SCF cycle. The second integer controls the precision of the output.
- **Default**: False 8

### out_mat_p

- **Type**: Boolean \[Integer\](optional)
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Whether to print the momentum operator matrices px, py and pz in the basis of the localized atomic orbitals, including the nonlocal pseudopotential commutator term i[V_nl, r]. The three components are written as sparse matrices into prx_nao.csr, pry_nao.csr and prz_nao.csr (or prxg{step+1}_nao.csr etc. when out_app_flag = 2), using the same self-describing header and CSR layout as the H(R)/S(R) output. Because the NAO basis functions are real, every matrix element is purely imaginary: the files store the complex element with its real part identically zero. This output is not supported for nspin = 4; an INPUT file that enables out_mat_p with nspin = 4 is rejected during parameter parsing. The second integer controls the precision of the output.
- **Default**: False 8

### out_xc_r

- **Type**: Integer \[Integer\](optional)
- **Description**: The first integer controls whether to output the exchange-correlation (in Bohr^-3) on real space grids using Libxc:
  - 0: rho, amag, sigma, exc
  - 1: vrho, vsigma
  - 2: v2rho2, v2rhosigma, v2sigma2
  - 3: v3rho3, v3rho2sigma, v3rhosigma2, v3sigma3
  - 4: v4rho4, v4rho3sigma, v4rho2sigma2, v4rhosigma3, v4sigma4 The meaning of the files is presented in Libxc

  The files are written to OUT.${suffix}/CHG/ when out_app_flag = 2 and to OUT.${suffix}/ otherwise, as xc_&lt;quantity&gt;[&lt;channel&gt;][g{step}].cube, where &lt;channel&gt; depends on the quantity:

  - scalar quantities (exc, amag) carry no channel suffix, for example xc_exc.cube;
  - spin-resolved rho and vrho carry _s{spin} with the one-based spin index, for example xc_rho_s1.cube;
  - density-gradient channels carry their Libxc component tuple joined by "_": _00/_01/_11 for sigma, vsigma and v2rho2, _0_00 for v2rhosigma, _00_00 for v2sigma2, and the analogous multi-segment tuples for the mixed v3* and v4* quantities, for example xc_v2rhosigma_0_00.cube and xc_v3rhosigma2_0_00_01.cube.
  Each file is a standard Gaussian cube file whose header carries the one-based ionic step as "Ionic_Step N"; with out_app_flag = 2 the g{step} suffix selects one file per written step, and with out_app_flag = 1 every written step appends one complete cube frame while the first written step truncates the file.

  The second integer controls the precision of the charge density output, if not given, will use 3 as default.

  The circle order of the charge density on real space grids is: x is the outer loop, then y and finally z (z is moving fastest).
- **Default**: -1 3

### out_eband

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Whether to print the band-decomposed energy of each Hamiltonian term in the files eband_kin.txt, eband_vl.txt, eband_vnl.txt, eband_hart.txt and eband_vxc.txt under the output directory. With out_app_flag = 2 each written step gets its own file with a g{step} suffix (for example eband_king2.txt), while modes 0/1 reuse the fixed names (mode 0 truncates, mode 1 appends one frame per written step). Each file starts with comment lines giving the ABACUS version, the timestamp, the ionic step and total energy, the expectation-value formula, and the units. The terms include the kinetic, pseudopotential (local + nonlocal), Hartree and exchange-correlation (including exact exchange if calculated).
- **Default**: False

### out_eband_terms

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Legacy alias for out_eband, which outputs the band-decomposed energy of each Hamiltonian term. If both out_eband and out_eband_terms are present, out_eband takes precedence.
- **Default**: False

### out_hsr_npz

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Legacy alias for out_hsr 3, writing hrs1_nao.npz, hrs2_nao.npz when needed, and sr_nao.npz. If both out_hsr and out_hsr_npz are present, out_hsr takes precedence.

  For gamma-only calculations, the internal real-space contributions are folded into a single R = (0, 0, 0) block. This folded result cannot recover the original R-resolved contributions or interpolate arbitrary k points.
- **Default**: False
- **Unit**: Ry

### out_dm_npz

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==lcao and [`gamma_only`](#gamma_only)==0*
- **Description**: Deprecated alias for writing DM(R) in npz format. Use out_dmr 2 instead. When out_dmr is not set explicitly, this flag is mapped to out_dmr with format 2; if both are present, out_dmr takes precedence. This feature does not work for gamma-only calculations.
- **Default**: False

### out_mul

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Whether to print the Mulliken population analysis result into OUT.${suffix}/mulliken.txt. In molecular dynamics calculations, the output frequency is controlled by out_freq_ion.
- **Default**: False

### out_app_flag

- **Type**: Integer
- **Description**: Controls output file organization during multi-step calculations (MD, relax, RT-TDDFT). The directory routing applies to both LCAO and PW basis calculations.
  - 0: Write directly to the OUT directory under a fixed filename. Every write truncates the previous content, so only the most recently written step is kept on disk. out_freq_ion only controls how often a write happens; it does not change the number of fixed-name files (default, disk-friendly). MD periodic structure frames overwrite STRU in this mode.
  - 1: Reuse fixed filenames across steps: text outputs append new records, cube outputs accumulate one frame per written step
  In mode 1 the first output step of a fresh (non-restart) run truncates the fixed-name file so a rerun does not keep stale records from a previous run; later steps and restarted runs keep appending.
  - 2: Write to subdirectory (STRUC/ for structure files, PSI/, CHG/, POT/, ELF/, DOS/, DIP/, OCC/, MAT/, BANDS/), output data files carry a g{step} suffix (structures use STRU{istep})
  RT-TDDFT time-series outputs (`current_tot.txt`, `current_s[spin]k[kpoint].txt`, `efield_total.txt`, `efield_[index].txt`, `vector_pot.txt`, and the spin-current/magnetization files) are exempt from these modes: they keep a fixed filename in OUT.{suffix}/ and append one record per completed electronic step, independently of out_freq_ion.
  For MD periodic ABACUS STRU frames, modes 0 and 1 both use STRU (overwritten or appended respectively), while mode 2 writes numbered files under STRUC/. With out_stru=2, MD writes CIF geometry instead: modes 0 and 1 overwrite STRU.cif and mode 2 writes numbered STRU{istep}.cif files. MD also writes STRU_FINAL or STRU_FINAL.cif when out_stru is positive, and a separate STRU_restart checkpoint according to md_restartfreq; see out_stru.
  The legacy Boolean spellings (true/false, yes/no, on/off, t/f, y/n, and the dotted forms) are still accepted: true maps to mode 1 and preserves the old append behavior; false maps to mode 0, which now overwrites a fixed file instead of the old g{step} per-step files, so use mode 2 to reproduce that old behavior.
  For more information, refer to the documentation of out_mat_r, out_hsr, out_mat_t, out_mat_dh, out_hsk, out_wfc_lcao, out_chg, out_pot, out_elf, out_dos, out_dipole, out_stru.
- **Default**: 0

### out_element_info

- **Type**: Boolean
- **Description**: Whether to print element information into files in the directory OUT.{element_label}, including pseudopotential and orbital information of the element (in atomic Ryberg units).
- **Default**: False

### rpa

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Generate output files used in rpa calculations.

  > Note: If symmetry is set to 1, additional files containing the necessary information for exploiting symmetry in the subsequent rpa calculation will be output: irreducible_sector.txt, symrot_k.txt and symrot_R.txt.
- **Default**: False

### rpa_out_vel

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Velocity matrix in KS basis (in unit of eV *Angstrom). Loop layer: spin -&gt; k -&gt; direction -&gt; KS_basis1 -&gt; KS_basis2.
- **Default**: False
- **Unit**: eV * A

### rpa_outdir

- **Type**: String
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: The directory to save files for LibRPA.
- **Default**: "OUT.librpa"

### out_librpa_ver

- **Type**: Integer
- **Allowed values**: 0, 1
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Select the LibRPA file protocol: 0 for legacy text output and 1 for reader-v1 output. Reader-v1 supports symmetry-reduced Monkhorst-Pack grids and requires a uniform Monkhorst-Pack KPT grid.
- **Default**: 0

### out_pchg

- **Type**: String
- **Availability**: *[`basis_type`](#basis_type)==pw or ([`basis_type`](#basis_type)==lcao and [`calculation`](#calculation)==get_pchg)*
- **Description**: Selects electronic states for partial (band-decomposed) charge-density output using a space-separated string of `0`s and `1`s, where `1` selects a state and `0` skips it. Repetition follows the `ocp_set` syntax, for example `1 4*0 5*1 0`; the expanded list must not exceed `nbands`. Each output represents a complete one-particle state. The spin degeneracy is 2 for `nspin=1` and 1 for `nspin=2` or `nspin=4`. For `nspin=1`, `s1` contains the charge density. For `nspin=2`, `s1` and `s2` contain the spin-up and spin-down charge densities, respectively. For `nspin=4`, `s1`, `s2`, `s3`, and `s4` respectively contain $\rho_0$, $m_x$, $m_y$, and $m_z$. With `if_separate_k=true`, files are named `pchgi[state]s[component]k[kpoint].cube`; otherwise, the weighted k-point sum is named `pchgi[state]s[component].cube`.

  For PW calculations with ultrasoft pseudopotentials (USPP), the single-state valence density includes the augmentation contribution:

  $$
  \rho_{n\boldsymbol{k}}(\boldsymbol{r})=\left\vert\tilde{\psi}_{n\boldsymbol{k}}(\boldsymbol{r})\right\vert^2+\sum_{Iij}Q_{ij}^{I}(\boldsymbol{r})\Braket{\tilde{\psi}_{n\boldsymbol{k}} | \beta_i^I}\Braket{\beta_j^I | \tilde{\psi}_{n\boldsymbol{k}}}.
  $$

  Here $\tilde{\psi}$ is the pseudo-wavefunction, $\beta_i^I$ are the atomic projectors, and $Q_{ij}^I$ are the augmentation functions. Each separate-k output has a cell integral equal to the spin degeneracy. The merged output uses k-point weights including spin degeneracy, and its integral equals their sum for the corresponding spin channel.

  > Note: Enabling symmetry may produce unintended partial charge densities because of reduced k-point weights and real-space symmetry operations. If the desired symmetry treatment is uncertain, set `symmetry = -1`. Use the same symmetry setting as in the SCF calculation. In PW calculations each write follows `out_freq_ion` (in RT-TDDFT the counter is the completed electronic step). `out_app_flag=0` overwrites the fixed filename, `1` appends one complete cube frame per written step, and `2` adds a `g[step]` suffix, for example `pchgi1s1k1g2.cube`.
- **Default**: none

### out_wfc_norm

- **Type**: String
- **Availability**: *[`basis_type`](#basis_type)==pw or ([`basis_type`](#basis_type)==lcao and [`calculation`](#calculation)==get_wf)*
- **Description**: Selects electronic states for real-space wavefunction-modulus output using the selection syntax of `out_pchg`. Each output contains single-particle wavefunction amplitudes. In PW calculations, norm-conserving pseudo-wavefunctions satisfy $\Braket{\psi_{n\boldsymbol{k}} | \psi_{n\boldsymbol{k}}}=1$, while USPP pseudo-wavefunctions satisfy $\Braket{\tilde{\psi}_{n\boldsymbol{k}} | \hat{S} | \tilde{\psi}_{n\boldsymbol{k}}}=1$, where $\hat{S}=1+\sum_{Iij}q_{ij}^I\Ket{\beta_i^I}\Bra{\beta_j^I}$ is the USPP overlap operator, $q_{ij}^I=\int Q_{ij}^I(\boldsymbol{r})\,\mathrm{d}\boldsymbol{r}$, and $\beta_i^I$ are the atomic projectors. For `nspin=1`, `s1` contains the wavefunction modulus. For `nspin=2`, `s1` and `s2` contain the spin-up and spin-down wavefunction moduli, respectively. For `nspin=4`, `s1` contains the total spinor modulus. Files are named `wfi[state]s[spin]k[kpoint].cube`. In PW calculations each write follows `out_freq_ion` (in RT-TDDFT the counter is the completed electronic step). `out_app_flag=0` overwrites the fixed filename, `1` appends one complete cube frame per written step, and `2` adds a `g[step]` suffix, for example `wfi1s1k1g2.cube`.
- **Default**: none

### out_wfc_re_im

- **Type**: String
- **Availability**: *[`basis_type`](#basis_type)==pw or ([`basis_type`](#basis_type)==lcao and [`calculation`](#calculation)==get_wf)*
- **Description**: Selects electronic states for real-space wavefunction real- and imaginary-part output using the selection syntax of `out_pchg`. Each output contains single-particle wavefunction amplitudes. In PW calculations, norm-conserving pseudo-wavefunctions satisfy $\Braket{\psi_{n\boldsymbol{k}} | \psi_{n\boldsymbol{k}}}=1$, while USPP pseudo-wavefunctions satisfy $\Braket{\tilde{\psi}_{n\boldsymbol{k}} | \hat{S} | \tilde{\psi}_{n\boldsymbol{k}}}=1$, where $\hat{S}=1+\sum_{Iij}q_{ij}^I\Ket{\beta_i^I}\Bra{\beta_j^I}$ is the USPP overlap operator, $q_{ij}^I=\int Q_{ij}^I(\boldsymbol{r})\,\mathrm{d}\boldsymbol{r}$, and $\beta_i^I$ are the atomic projectors. For `nspin=1`, `s1` contains the wavefunction. For `nspin=2`, `s1` and `s2` contain the spin-up and spin-down wavefunctions, respectively. For `nspin=4`, `s1` and `s2` contain the upper and lower spinor components, respectively. Files are named `wfi[state]s[spin]k[kpoint][re/im].cube`. In PW calculations each write follows `out_freq_ion` (in RT-TDDFT the counter is the completed electronic step). `out_app_flag=0` overwrites the fixed filename, `1` appends one complete cube frame per written step, and `2` adds a `g[step]` suffix, for example `wfi1s1k1reg2.cube`.
- **Default**: none

### if_separate_k

- **Type**: Boolean
- **Availability**: *([`basis_type`](#basis_type)==pw and [`out_pchg`](#out_pchg)!=none) or ([`basis_type`](#basis_type)==lcao and [`calculation`](#calculation)==get_pchg and [`gamma_only`](#gamma_only)==0)*
- **Description**: Specifies whether to write partial charge densities for individual k-points or merge them.
- **Default**: false

### out_elf

- **Type**: Integer \[Integer\](optional)
- **Availability**: *[`esolver_type`](#esolver_type) in [ksdft, ofdft]*
- **Description**: Whether to output the electron localization function (ELF) in the folder `OUT.${suffix}`. The files are named as
  - nspin = 1:
    - elftot.cube: ${\rm{ELF}} = \frac{1}{1+\chi^2}$, $\chi = \frac{\frac{1}{2}\sum_{i}{f_i |\nabla\psi_{i}|^2} - \frac{|\nabla\rho|^2}{8\rho}}{\frac{3}{10}(3\pi^2)^{2/3}\rho^{5/3}}$;
  - nspin = 2:
    - elfs1.cube, elfs2.cube: ${\rm{ELF}}_\sigma = \frac{1}{1+\chi_\sigma^2}$, $\chi_\sigma = \frac{\frac{1}{2}\sum_{i}{f_i |\nabla\psi_{i,\sigma}|^2} - \frac{|\nabla\rho_\sigma|^2}{8\rho_\sigma}}{\frac{3}{10}(6\pi^2)^{2/3}\rho_\sigma^{5/3}}$;
    - elftot.cube: ${\rm{ELF}} = \frac{1}{1+\chi^2}$, $\chi = \frac{\frac{1}{2}\sum_{i,\sigma}{f_i |\nabla\psi_{i,\sigma}|^2} - \sum_{\sigma}{\frac{|\nabla\rho_\sigma|^2}{8\rho_\sigma}}}{\sum_{\sigma}{\frac{3}{10}(6\pi^2)^{2/3}\rho_\sigma^{5/3}}}$;
  - nspin = 4 (noncollinear):
    - elftot.cube: ELF for total charge density, ${\rm{ELF}} = \frac{1}{1+\chi^2}$, $\chi = \frac{\frac{1}{2}\sum_{i}{f_i |\nabla\psi_{i}|^2} - \frac{|\nabla\rho|^2}{8\rho}}{\frac{3}{10}(3\pi^2)^{2/3}\rho^{5/3}}$

  With `out_app_flag=0` the fixed-name files (`elftot.cube`, `elfs1.cube`) are truncated and overwritten at every write.
  With `out_app_flag=1` the geometry step suffix is omitted and the same ELF files accumulate one complete cube frame per written ionic step (`Ionic_Step {#}` as the first comment line, one-based); the first written step truncates them.
  With `out_app_flag=2`, every written step gets its own suffixed file (e.g., `elftotg1.cube`, `elfs1g1.cube`) routed to the `ELF/` subdirectory.

  The second integer controls the precision of the kinetic energy density output, if not given, will use 3 as default. For purpose restarting from this file and other high-precision involved calculation, recommend to use 10.

  In molecular dynamics calculations, the output frequency is controlled by out_freq_ion.
- **Default**: 0 3

### out_spillage

- **Type**: Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ksdft and [`basis_type`](#basis_type)==pw*
- **Description**: This output is only intentively needed by the ABACUS numerical atomic orbital generation workflow. This parameter is used to control whether to output the overlap integrals between truncated spherical Bessel functions (TSBFs) and plane-wave basis expanded wavefunctions (named as OVERLAP_Q), and between TSBFs (named as OVERLAP_Sq), also their first order derivatives. The output files are named starting with orb_matrix. A value of 2 would enable the output.
- **Default**: 0

### out_alllog

- **Type**: Boolean
- **Description**: Whether to print information into individual logs from all ranks in an MPI run.
  - True: Information from each rank will be written into individual files named OUT.{calculation}_{suffix}/running_${calculation}.log.
- **Default**: False

[back to top](#full-list-of-input-keywords)

## Density of states

### dos_edelta_ev

- **Type**: Real
- **Description**: The step size in writing Density of States (DOS). The default value was changed from 0.01 to 0.03 eV.
- **Default**: 0.03
- **Unit**: eV

### dos_sigma

- **Type**: Real
- **Description**: The width of the Gaussian factor when obtaining smeared Density of States (DOS)
- **Default**: 0.07
- **Unit**: eV

### dos_scale

- **Type**: Real
- **Description**: Defines the energy range of DOS output as (emax-emin)*(1+dos_scale), centered at (emax+emin)/2. This parameter will be used when dos_emin and dos_emax are not set.
- **Default**: 0.01
- **Unit**: eV

### dos_emin_ev

- **Type**: Real
- **Description**: The minimal range for Density of States (DOS)
  - If set, "dos_scale" will be ignored.
- **Default**: Minimal eigenenergy of
- **Unit**: eV

### dos_emax_ev

- **Type**: Real
- **Description**: The maximal range for Density of States (DOS)
  - If set, "dos_scale" will be ignored.
- **Default**: Maximal eigenenergy of
- **Unit**: eV

### dos_nche

- **Type**: Integer
- **Description**: The order of Chebyshev expansions when using Stochastic Density Functional Theory (SDFT) to calculate DOS.
- **Default**: 100

### stm_bias

- **Type**: Real Real(optional) Integer(optional)
- **Description**: The bias voltage used to calculate local density of states to simulate scanning tunneling microscope, see details in out_ldos. When using three parameters:

  - The first parameter specifies the initial bias voltage value.
  - The second parameter defines the voltage increment (step size between consecutive bias values).
  - The third parameter determines the total number of voltage points
- **Default**: 1.0
- **Unit**: V

### ldos_line

- **Type**: Real*6 Integer(optional)
- **Description**: Specify the path of the three-dimensional space and display LDOS in the form of a two-dimensional color chart, see details in out_ldos. The first three paramenters are the direct coordinates of the start point, the next three paramenters are the direct coordinates of the end point, and the final one is the number of points along the path, whose default is 100.
- **Default**: 0.0 0.0 0.0 0.0 0.0 1.0 100

[back to top](#full-list-of-input-keywords)

## NAOs

### bessel_nao_ecut

- **Type**: String
- **Description**: "Energy cutoff" (in Ry) of spherical Bessel functions. The number of spherical Bessel functions that constitute the radial parts of NAOs is determined by sqrt(bessel_nao_ecut)*bessel_nao_rcut/.
- **Default**: ecutwfc

### bessel_nao_tolerence

- **Type**: Real
- **Description**: Tolerance when searching for the zeros of spherical Bessel functions.
- **Default**: 1.0e-12

### bessel_nao_rcut

- **Type**: Vector of Real (N values)
- **Description**: Cutoff radius (in Bohr) and the common node of spherical Bessel functions used to construct the NAOs.
- **Default**: 6.0

### bessel_nao_smooth

- **Type**: Boolean
- **Description**: If True, NAOs will be smoothed near the cutoff radius. See bessel_nao_rcut and bessel_nao_sigma for parameters.
- **Default**: True

### bessel_nao_sigma

- **Type**: Real
- **Description**: Smoothing range (in Bohr). See also bessel_nao_smooth.
- **Default**: 0.1

[back to top](#full-list-of-input-keywords)

## DeePKS

### deepks_out_labels

- **Type**: Integer
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Print labels and descriptors for DeePKS in OUT.${suffix}. The names of these files start with "deepks".
  - 0 : No output.
  - 1 : Output intermediate files needed during DeePKS training.
  - 2 : Output target labels for label preperation. The label files are named as deepks_&lt;property&gt;.npy or deepks_&lt;property&gt;.csr, where the units and formats are the same as label files &lt;property&gt;.npy or &lt;property&gt;.csr required for training, except that the first dimension (nframes) is excluded. System structrue files are also given in deepks_atom.npy and deepks_box.npy in the unit of Bohr, which means lattice_constant should be set to 1 when training.

  > Note: When deepks_out_labels equals 1, the path of a numerical descriptor (an orb file) is needed to be specified under the NUMERICAL_DESCRIPTOR tag in the STRU file. This is not needed when deepks_out_labels equals 2.
- **Default**: 0

### deepks_out_freq_elec

- **Type**: Integer
- **Legal range**: value>=0

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`deepks_out_freq_elec`](#deepks_out_freq_elec)&gt;0 | [`deepks_out_labels`](#deepks_out_labels)&gt;0 |

- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Requires deepks_out_labels&gt;0 when enabled. 0 disables periodic electronic-step output. A positive value additionally saves the first electronic state and every deepks_out_freq_elec steps. Applies to both direct and gradient labels. Intermediate states contain electronic quantities and their precalculation operators. If convergence occurs on a scheduled output step, that state is written only as final labels, without an additional intermediate-state output. Converged SCF states produce final labels; an unconverged final state is saved with the _efinal suffix. Force and stress labels follow the corresponding postprocessing calculations when enabled, including unconverged SCF runs.
- **Default**: 0

### deepks_out_base

- **Type**: String

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`deepks_out_base`](#deepks_out_base)!=none | [`deepks_out_labels`](#deepks_out_labels)&gt;0 and [`deepks_bandgap`](#deepks_bandgap)==0 |

- **Availability**: *[`basis_type`](#basis_type)==lcao and [`deepks_out_freq_elec`](#deepks_out_freq_elec)>0*
- **Description**: Print labels and descriptors calculated by base functional ( determined by deepks_out_base ) and target functional ( determined by dft_functional ) for DeePKS in per deepks_out_freq_elec electronic iterations. The SCF process, labels and descriptors output of the target functional are all consistent with those when the target functional is used alone. The only additional output under this configuration is the labels of the base functional. Often used with deepks_out_labels equals 1.
- **Default**: None

### deepks_scf

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: perform self-consistent field iteration in DeePKS method

  > Note: A trained, traced model file is needed.
- **Default**: False

### deepks_grad

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Output descriptor-gradient intermediates for training: gevdm, the real-space Hamiltonian Gram matrix, and base/tot Hamiltonian projections at the same density. Force and virial operators and Gram matrices are included when cal_force and cal_stress are enabled. ABACUS does not form differences between separate calculations. Requires deepks_out_labels=1, nspin=1, eigenvalue descriptors and deepks_v_delta=0. Inactive with deepks_out_labels=0.
- **Default**: False

### deepks_equiv

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: whether to use equivariant version of DeePKS

  > Note: The equivariant version of DeePKS-kit is still under development, so this feature is currently only intended for internal usage.
- **Default**: False

### deepks_model

- **Type**: String
- **Availability**: *[`basis_type`](#basis_type)==lcao and [`deepks_scf`](#deepks_scf)==true*
- **Description**: the path of the trained, traced neural network model file generated by deepks-kit
- **Default**: None

### bessel_descriptor_lmax

- **Type**: Integer
- **Availability**: *[`calculation`](#calculation)==gen_bessel*
- **Description**: the maximum angular momentum of the Bessel functions generated as the projectors in DeePKS - NOte: To generate such projectors, set calculation type to gen_bessel in ABACUS. See also calculation.
- **Default**: 2

### bessel_descriptor_ecut

- **Type**: String
- **Availability**: *[`calculation`](#calculation)==gen_bessel*
- **Description**: energy cutoff of Bessel functions
- **Default**: same as ecutwfc
- **Unit**: Ry

### bessel_descriptor_tolerence

- **Type**: Real
- **Availability**: *[`calculation`](#calculation)==gen_bessel*
- **Description**: tolerance for searching the zeros of Bessel functions
- **Default**: 1.0e-12

### bessel_descriptor_rcut

- **Type**: Real
- **Legal range**: value>=0
- **Availability**: *[`calculation`](#calculation)==gen_bessel*
- **Description**: cutoff radius of Bessel functions
- **Default**: 6.0
- **Unit**: Bohr

### bessel_descriptor_smooth

- **Type**: Boolean
- **Availability**: *[`calculation`](#calculation)==gen_bessel*
- **Description**: smooth the Bessel functions at radius cutoff
- **Default**: False

### bessel_descriptor_sigma

- **Type**: Real
- **Availability**: *[`calculation`](#calculation)==gen_bessel*
- **Description**: smooth parameter at the cutoff radius of projectors
- **Default**: 0.1
- **Unit**: Bohr

### deepks_bandgap

- **Type**: Integer
- **Allowed values**: 0, 1, 2, 3
- **Availability**: *[`basis_type`](#basis_type)==lcao and [`deepks_scf`](#deepks_scf)==true*
- **Description**: include bandgap label for DeePKS training
  - 0: Don't include bandgap label
  - 1: Include target bandgap label (see deepks_band_range for more details)
  - 2: Include multiple bandgap label (see deepks_band_range for more details)
  - 3: Used for systems containing H atoms. Here HOMO is defined as the max occupation except H atoms and the bandgap label is the energy between HOMO and (HOMO + 1)
- **Default**: 0

### deepks_band_range

- **Type**: Integer*2
- **Availability**: *[`basis_type`](#basis_type)==lcao and [`deepks_scf`](#deepks_scf)==true and [`deepks_bandgap`](#deepks_bandgap) in [1, 2]*
- **Description**: The first value should not be larger than the second one and the meaning differs in different cases below
  - deepks_bandgap is 1: Bandgap label is the energy between LUMO + deepks_band_range[0] and LUMO + deepks_band_range[1]. If not set, it will calculate energy between HOMO and LUMO states.
  - deepks_bandgap is 2: Bandgap labels are energies between HOMO and all states in range [LUMO + deepks_band_range[0], LUMO + deepks_band_range[1]] (Thus there are deepks_band_range[1] - deepks_band_range[0] + 1 bandgaps in total). If HOMO is included in the setting range, it will be ignored since it will always be zero and has no valuable messages (deepks_band_range[1] - deepks_band_range[0] bandgaps in this case). NOTICE: The set range can be greater than, less than, or include the value of HOMO. In the bandgap label, we always calculate the energy of the state in the set range minus the energy of HOMO state, so the bandgap can be negative if the state is lower than HOMO.
- **Default**: -1 0

### deepks_v_delta

- **Type**: Integer
- **Allowed values**: -2, -1, 0, 1, 2
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Include V_delta/V_delta_R (Hamiltonian in k/real space) label for DeePKS training. When deepks_out_labels is true and deepks_v_delta &gt; 0 (k space), ABACUS will output deepks_hbase.npy, deepks_vdelta.npy and deepks_htot.npy(htot=hbase+vdelta). When deepks_out_labels is true and deepks_v_delta &lt; 0 (real space), ABACUS will output deepks_hrtot.csr, deepks_hrdelta.csr. Some more files output for different settings. NOTICE: To match the unit Normally used in DeePKS, the unit of Hamiltonian in k space is Hartree. However, currently in R space the unit is still Ry.
  - deepks_v_delta = 1: deepks_vdpre.npy, which is used to calculate V_delta during DeePKS training.
  - deepks_v_delta = 2: deepks_phialpha.npy and deepks_gevdm.npy, which can be used to calculate deepks_vdpre.npy. A recommanded method for memory saving.
  - deepks_v_delta = -1: deepks_vdrpre.npy, which is used to calculate V_delta_R during DeePKS training.
  - deepks_v_delta = -2: deepks_phialpha_r.npy and deepks_gevdm.npy, which can be used to calculate deepks_vdrpre.npy. A recommanded method for memory saving.

  This parameter selects direct labels only. Leave it at 0 when deepks_grad is true; real-space Hamiltonian gradient intermediates are then selected automatically.
- **Default**: 0

### deepks_out_unittest

- **Type**: Boolean

**Requirements**

| Option | Requirements |
| --- | --- |
| `true` | [`deepks_out_labels`](#deepks_out_labels)==1 and [`deepks_scf`](#deepks_scf)==true |

- **Description**: generate files for constructing DeePKS unit test

  > Note: Not relevant when running actual calculations. When set to 1, ABACUS needs to be run with only 1 process.
- **Default**: False

[back to top](#full-list-of-input-keywords)

## OFDFT: orbital free density functional theory

### of_kinetic

- **Type**: String

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`of_kinetic`](#of_kinetic)!=wt | [`of_read_kernel`](#of_read_kernel)==false |

- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Kinetic energy functional type:
  - tf: Thomas-Fermi (TF) functional
  - vw: von Weizsacker (vW) functional
  - tf+: TF + vW functional
  - wt: Wang-Teter (WT) functional
  - ext-wt: Extended Wang-Teter functional
  - xwm: XWM functional
  - lkt: Luo-Karasiev-Trickey (LKT) functional
  - ml: Machine learning KEDF
  - mpn: MPN KEDF (automatically sets ml parameters)
  - cpn5: CPN5 KEDF (automatically sets ml parameters)
- **Default**: wt

### of_method

- **Type**: String
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: The optimization method used in OFDFT.
  - cg1: Polak-Ribiere. Standard CG algorithm.
  - cg2: Hager-Zhang (generally faster than cg1).
  - tn: Truncated Newton algorithm.
- **Default**: tn

### of_conv

- **Type**: String
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Criterion used to check the convergence of OFDFT.
  - energy: Total energy changes less than of_tole.
  - potential: The norm of potential is less than of_tolp.
  - both: Both energy and potential must satisfy the convergence criterion.
- **Default**: energy

### of_tole

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Tolerance of the energy change for determining the convergence.
- **Default**: 2e-6
- **Unit**: Ry

### of_tolp

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Tolerance of potential for determining the convergence.
- **Default**: 1e-5
- **Unit**: Ry

### of_tf_weight

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_kinetic`](#of_kinetic) in [tf, tf+, wt, ext-wt, xwm]*
- **Description**: Weight of TF KEDF (kinetic energy density functional).
- **Default**: 1.0

### of_vw_weight

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_kinetic`](#of_kinetic) in [vw, tf+, wt, ext-wt, lkt, xwm]*
- **Description**: Weight of vW KEDF (kinetic energy density functional).
- **Default**: 1.0

### of_wt_alpha

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_kinetic`](#of_kinetic) in [wt, ext-wt]*
- **Description**: Parameter alpha of WT KEDF (kinetic energy density functional).

### of_wt_beta

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_kinetic`](#of_kinetic) in [wt, ext-wt]*
- **Description**: Parameter beta of WT KEDF (kinetic energy density functional).

### of_extwt_kappa

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_kinetic`](#of_kinetic)==ext-wt*
- **Description**: Parameter kappa for EXT-WT KEDF.
- **Default**: 1.0 / (2.0 * std::pow(4./3., 1./3.) - 1.0)

### of_wt_rho0

- **Type**: Real

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`of_wt_rho0`](#of_wt_rho0)!=0 | [`of_hold_rho0`](#of_hold_rho0)==true |

- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_kinetic`](#of_kinetic)==wt*
- **Description**: The average density of system.
- **Default**: 0.0
- **Unit**: Bohr^-3

### of_hold_rho0

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_kinetic`](#of_kinetic)==wt*
- **Description**: Whether to fix the average density rho0.
  - True: rho0 will be fixed even if the volume of system has changed, it will be set to True automatically if of_wt_rho0 is not zero.
  - False: rho0 will change if volume of system has changed.
- **Default**: False

### of_lkt_a

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_kinetic`](#of_kinetic)==lkt*
- **Description**: Parameter a of LKT KEDF (kinetic energy density functional).
- **Default**: 1.3

### of_xwm_rho_ref

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_kinetic`](#of_kinetic)==xwm*
- **Description**: Reference charge density for XWM kinetic energy functional. If set to 0, the program will use average charge density.
- **Default**: 0.0

### of_xwm_kappa

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_kinetic`](#of_kinetic)==xwm*
- **Description**: Parameter for XWM kinetic energy functional. See PHYSICAL REVIEW B 100, 205132 (2019) for optimal values.
- **Default**: 0.0

### of_read_kernel

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_kinetic`](#of_kinetic)==wt*
- **Description**: Whether to read in the kernel file.
  - True: The kernel of WT KEDF (kinetic energy density functional) will be filled from the file specified by of_kernel_file.
  - False: The kernel of WT KEDF (kinetic energy density functional) will be filled from formula.
- **Default**: False

### of_kernel_file

- **Type**: String
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_kinetic`](#of_kinetic)==wt and [`of_read_kernel`](#of_read_kernel)==true*
- **Description**: The name of WT kernel file.
- **Default**: WTkernel.txt

### of_full_pw

- **Type**: Boolean

**Requirements**

| Option | Requirements |
| --- | --- |
| `false` | [`of_full_pw_dim`](#of_full_pw_dim)==0 |

- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Whether to use full planewaves.
  - True: Ecut will be ignored while collecting planewaves, so that all planewaves will be used in FFT.
  - False: Only use the planewaves inside ecut, the same as KSDFT.
- **Default**: True

### of_full_pw_dim

- **Type**: Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft and [`of_full_pw`](#of_full_pw)==true*
- **Description**: Specify the parity of FFT dimensions.
  - 0: either odd or even.
  - 1: odd only.
  - 2: even only.

  Note: Even dimensions may cause slight errors in FFT. It should be ignorable in ofdft calculation, but it may make Cardinal B-spline interpolation unstable, so please set of_full_pw_dim = 1 if nbspline != -1.
- **Default**: 0

[back to top](#full-list-of-input-keywords)

## ML-KEDF: machine learning based kinetic energy density functional for OFDFT

### of_ml_gene_data

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==ksdft and [`basis_type`](#basis_type)==pw*
- **Description**: Controls the generation of machine learning training data. When enabled, training data in .npy format will be saved in the directory OUT.${suffix}/.
- **Default**: False

### of_ml_device

- **Type**: String
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Run Neural Network on GPU or CPU.
  - cpu: CPU
  - gpu: GPU
- **Default**: cpu

### of_ml_feg

- **Type**: Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: The method to incorporate the Free Electron Gas (FEG) limit.
  - 0: Do not incorporate the FEG limit.
  - 1: Incorporate the FEG limit by translation.
  - 3: Incorporate the FEG limit by nonlinear transformation using softplus function.
- **Default**: 0

### of_ml_nkernel

- **Type**: Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Number of kernel functions.
- **Default**: 1

### of_ml_kernel

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element specifies the type of the i-th kernel function.
  - 1: Wang-Teter kernel function.
  - 2: Modified Yukawa function, and alpha is specified by of_ml_yukawa_alpha.
  - 3: Truncated kinetic kernel (TKK), the file containing TKK is specified by of_ml_kernel_file.
- **Default**: 1

### of_ml_kernel_scaling

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element specifies the RECIPROCAL of scaling parameter of the i-th kernel function.
- **Default**: 1.0

### of_ml_yukawa_alpha

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element specifies the parameter alpha of i-th kernel function. ONLY used for Yukawa kernel function.
- **Default**: 1.0

### of_ml_kernel_file

- **Type**: Vector of String
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element specifies the file containing the i-th kernel function. ONLY used for TKK.
- **Default**: none

### of_ml_gamma

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Local descriptor: gamma = (rho / rho0)^(1/3).
- **Default**: False

### of_ml_p

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Semi-local descriptor: p = |nabla rho|^2 / [2 (3 pi^2)^(1/3) rho^(4/3)]^2.
- **Default**: False

### of_ml_q

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Semi-local descriptor: q = nabla^2 rho / [4 (3 pi^2)^(2/3) rho^(5/3)].
- **Default**: False

### of_ml_tanhp

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Semi-local descriptor: tanhp = tanh(chi_p * p).
- **Default**: False

### of_ml_tanhq

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Semi-local descriptor: tanhq = tanh(chi_q * q).
- **Default**: False

### of_ml_chi_p

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Hyperparameter chi_p: tanhp = tanh(chi_p * p).
- **Default**: 1.0

### of_ml_chi_q

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Hyperparameter chi_q: tanhq = tanh(chi_q * q).
- **Default**: 1.0

### of_ml_gammanl

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element controls the non-local descriptor gammanl defined by the i-th kernel function.
- **Default**: 0

### of_ml_pnl

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element controls the non-local descriptor pnl defined by the i-th kernel function.
- **Default**: 0

### of_ml_qnl

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element controls the non-local descriptor qnl defined by the i-th kernel function.
- **Default**: 0

### of_ml_xi

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element controls the non-local descriptor xi defined by the i-th kernel function.
- **Default**: 0

### of_ml_tanhxi

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element controls the non-local descriptor tanhxi defined by the i-th kernel function.
- **Default**: 0

### of_ml_tanhxi_nl

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element controls the non-local descriptor tanhxi_nl defined by the i-th kernel function.
- **Default**: 0

### of_ml_tanh_pnl

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element controls the non-local descriptor tanh_pnl defined by the i-th kernel function.
- **Default**: 0

### of_ml_tanh_qnl

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element controls the non-local descriptor tanh_qnl defined by the i-th kernel function.
- **Default**: 0

### of_ml_tanhp_nl

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element controls the non-local descriptor tanhp_nl defined by the i-th kernel function.
- **Default**: 0

### of_ml_tanhq_nl

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element controls the non-local descriptor tanhq_nl defined by the i-th kernel function.
- **Default**: 0

### of_ml_chi_xi

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element specifies the hyperparameter chi_xi of non-local descriptor tanhxi defined by the i-th kernel function.
- **Default**: 1.0

### of_ml_chi_pnl

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element specifies the hyperparameter chi_pnl of non-local descriptor tanh_pnl defined by the i-th kernel function.
- **Default**: 1.0

### of_ml_chi_qnl

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: Containing nkernel (see of_ml_nkernel) elements. The i-th element specifies the hyperparameter chi_qnl of non-local descriptor tanh_qnl defined by the i-th kernel function.
- **Default**: 1.0

### of_ml_local_test

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==ofdft*
- **Description**: FOR TEST. Read in the density, and output the F and Pauli potential.
- **Default**: False

### ml_exx

- **Type**: Boolean
- **Description**: Whether to use machine learning based exact exchange (ML-EXX).
- **Default**: False

[back to top](#full-list-of-input-keywords)

## TDOFDFT: time dependent orbital free density functional theory

### of_cd

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==tdofdft*
- **Description**: Added the current dependent(CD) potential. (https://doi.org/10.1103/PhysRevB.98.144302)
  - True: Added the CD potential.
  - False: Not added the CD potential.
- **Default**: False

### of_mcd_alpha

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==tdofdft*
- **Description**: The value of the parameter alpha in modified CD potential method. mCDPotential=alpha*CDPotential (proposed in paper PhysRevB.98.144302)
- **Default**: 1.0

[back to top](#full-list-of-input-keywords)

## Electric field and dipole correction

### efield_flag

- **Type**: Boolean
- **Description**: Added the electric field.
  - True: A saw-like potential simulating an electric field is added to the bare ionic potential.
  - False: Not added the electric field.
  > Note: LR-TDDFT excited-state forces and relaxation do not support this external field: the moving-AO correction is not implemented.
- **Default**: False

### dip_cor_flag

- **Type**: Boolean

**Requirements**

| Option | Requirements |
| --- | --- |
| `true` | [`efield_flag`](#efield_flag)==true |

- **Availability**: *[`efield_flag`](#efield_flag)==true*
- **Description**: Added a dipole correction to the bare ionic potential.
  - True: A dipole correction is also added to the bare ionic potential.
  - False: A dipole correction is not added to the bare ionic potential.

  > Note: If you do not want any electric field, the parameter efield_amp should be set to zero. This should ONLY be used in a slab geometry for surface calculations, with the discontinuity FALLING IN THE EMPTY SPACE.
- **Default**: False

### efield_dir

- **Type**: Integer

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`gate_flag`](#gate_flag)==true and [`efield_flag`](#efield_flag)==true | [`dip_cor_flag`](#dip_cor_flag)==true |

- **Availability**: *[`efield_flag`](#efield_flag)==true*
- **Description**: The direction of the electric field or dipole correction is parallel to the reciprocal lattice vector, so the potential is constant in planes defined by FFT grid points, efield_dir can set to 0, 1 or 2.
  - 0: parallel to the first reciprocal lattice vector
  - 1: parallel to the second reciprocal lattice vector
  - 2: parallel to the third reciprocal lattice vector
- **Default**: 2

### efield_pos_max

- **Type**: Real
- **Availability**: *[`efield_flag`](#efield_flag)==true*
- **Description**: Position of the maximum of the saw-like potential along crystal axis efield_dir, within the unit cell, 0 &lt;= efield_pos_max &lt; 1.
- **Default**: Autoset to center of vacuum - width of vacuum / 20

### efield_pos_dec

- **Type**: Real
- **Availability**: *[`efield_flag`](#efield_flag)==true*
- **Description**: Zone in the unit cell where the saw-like potential decreases, 0 &lt; efield_pos_dec &lt; 1.
- **Default**: Autoset to width of vacuum / 10

### efield_amp

- **Type**: Real
- **Availability**: *[`efield_flag`](#efield_flag)==true*
- **Description**: Amplitude of the electric field. The saw-like potential increases with slope efield_amp in the region from efield_pos_max+efield_pos_dec-1) to (efield_pos_max), then decreases until (efield_pos_max+efield_pos_dec), in units of the crystal vector efield_dir.

  > Note: The change of slope of this potential must be located in the empty region, or else unphysical forces will result.
- **Default**: 0.0
- **Unit**: a.u., 1 a.u. = 51.4220632*10^10 V/m.

[back to top](#full-list-of-input-keywords)

## Gate field (compensating charge)

### gate_flag

- **Type**: Boolean
- **Description**: Controls the addition of compensating charge by a charged plate for charged cells.
  - true: A charged plate is placed at the zgate position to add compensating charge. The direction is determined by efield_dir.
  - false: No compensating charge is added.
- **Default**: false

### zgate

- **Type**: Real
- **Description**: Position of the charged plate in the unit cell
- **Default**: 0.5
- **Unit**: Unit cell size

### block

- **Type**: Boolean
- **Description**: Controls the addition of a potential barrier to prevent electron spillover.
  - true: A potential barrier is added from block_down to block_up with a height of block_height. If dip_cor_flag is set to true, efield_pos_dec is used to smoothly increase and decrease the potential barrier.
  - false: No potential barrier is added.
- **Default**: false

### block_down

- **Type**: Real
- **Description**: Lower beginning of the potential barrier
- **Default**: 0.45
- **Unit**: Unit cell size

### block_up

- **Type**: Real
- **Description**: Upper beginning of the potential barrier
- **Default**: 0.55
- **Unit**: Unit cell size

### block_height

- **Type**: Real
- **Description**: Height of the potential barrier
- **Default**: 0.1
- **Unit**: Rydberg

[back to top](#full-list-of-input-keywords)

## Exact Exchange (Common)

### exx_fock_alpha

- **Type**: Real
- **Description**: Fraction of full-ranged Fock exchange $1/r$ in range-separated hybrid functionals.
- **Default**: see hybrid_func_params

### init_exx

- **Type**: String
- **Allowed values**: none, file
- **Description**: This variable controls whether the exact-exchange Hamiltonian matrix Hexx(R) and the corresponding EXX energy are read back from a previously written CSR file, so that a new SCF run can skip rebuilding Hexx(R) in the first outer loop.

  - none: do not read Hexx(R) from file.
  - file: read hrs{is}_exx.csr (one file per spin channel, is = 1, 2, ...) from the directory specified by read_file_dir, together with the E_exx value embedded in the CSR header. The calculation stops with an error if the file or the E_exx field is missing. Only available for LCAO calculations with exact exchange, and it is the read counterpart of out_mat_exx = 1.
  - out_app_flag = 0: the fixed file name is written and holds a single frame, so it can be read directly.
  - out_app_flag = 1: the fixed file name is kept, but later ionic steps are appended to it, so init_exx = file rejects a multi-frame file; provide a single-frame copy instead.
  - out_app_flag = 2: a numbered hrs{is}g{step}_exx.csr is written and the fixed file name is absent; copy or rename the desired frame to hrs{is}_exx.csr.
- **Default**: none

### exx_erfc_alpha

- **Type**: Real
- **Description**: Fraction of short-ranged Fock exchange $\mathrm{erfc}(\omega r)/r$ in range-separated hybrid functionals.
- **Default**: see hybrid_func_params

### exx_erfc_omega

- **Type**: Real
- **Description**: Range-separation parameter $\omega$ in the short-ranged Fock term $\mathrm{erfc}(\omega r)/r$.
- **Default**: see hybrid_func_params

### exx_separate_loop

- **Type**: Boolean
- **Description**: There are two types of iterative approaches provided by ABACUS to evaluate Fock exchange.
  - False: Start with a GGA-Loop, and then Hybrid-Loop, in which EXX Hamiltonian is updated with electronic iterations.
  - True: A two-step method is employed, i.e. in the inner iterations, density matrix is updated, while in the outer iterations, is calculated based on density matrix that converges in the inner iteration.
- **Default**: True

### exx_hybrid_step

- **Type**: Integer
- **Availability**: *[`exx_separate_loop`](#exx_separate_loop)==1*
- **Description**: The maximal iteration number of the outer-loop, where the Fock exchange is calculated
- **Default**: 100

### exx_mixing_beta

- **Type**: Real
- **Availability**: *[`exx_separate_loop`](#exx_separate_loop)==1*
- **Description**: Mixing parameter for densty matrix in each iteration of the outer-loop
- **Default**: 1.0

### exx_singularity_correction

- **Type**: String

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`exx_singularity_correction`](#exx_singularity_correction)==limits and [`basis_type`](#basis_type)==pw | [`exx_gamma_extra`](#exx_gamma_extra)==false |

- **Description**: Scheme for Coulomb singularity / zero-transfer treatment in exact exchange.
  - limits: use the finite screened Coulomb-kernel limit, without an auxiliary correction. Default for HSE and cwp22 in both PW and LCAO. PW requires screened exchange and exx_gamma_extra=false; the latter defaults to false for this scheme.
  - gygi: retain the historical PW Gygi-Baldereschi auxiliary-function correction. PW only; default for unscreened PW hybrids. For independent-k screened hybrid NSCF this can cause discontinuities at source k points.
  - spencer: LCAO spherical truncation, Phys. Rev. B 77, 193110 (2008).
  - revised_spencer: LCAO, Phys. Rev. Mater. 5, 013807 (2021).
  - massidda / carrier: LCAO auxiliary singularity corrections.
  Use the same scheme for consistent SCF and NSCF bands. A source configuration mismatch produces a warning and does not prevent reading the existing SCF files.
- **Default**: default

[back to top](#full-list-of-input-keywords)

## Exact Exchange (LCAO in PW)

### exx_fock_lambda

- **Type**: Real
- **Availability**: *[`basis_type`](#basis_type)==lcao_in_pw*
- **Description**: It is used to compensate for divergence points at G=0 in the evaluation of Fock exchange using lcao_in_pw method.
- **Default**: 0.3

[back to top](#full-list-of-input-keywords)

## Exact Exchange (LCAO)

### device_exx

- **Type**: String
- **Allowed values**: cpu, gpu
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Selects the LibRI tensor-contraction device for LCAO Kohn-Sham exact exchange.
  - cpu: retain CPU contractions, including when device=gpu.
  - gpu: use the experimental GPU backend; requires ENABLE_LIBRI_GPU=ON and device=gpu.
  LR and RDMFT exchange engines retain CPU contractions, including when LR reuses
  Kohn-Sham exchange geometry.
  For GPU contractions, all MPI ranks on a node must see the same allocated GPU
  list, with at least as many visible GPUs as local ranks; per-rank single-GPU
  masking is unsupported.
- **Default**: cpu

### exx_pca_threshold

- **Type**: Real
- **Description**: To accelerate the evaluation of four-center integrals (), the product of atomic orbitals are expanded in the basis of auxiliary basis functions (ABF): . The size of the ABF (i.e. number of ) is reduced using principal component analysis. When a large PCA threshold is used, the number of ABF will be reduced, hence the calculation becomes faster. However, this comes at the cost of computational accuracy. A relatively safe choice of the value is 1e-4.
- **Default**: 1E-4

### exx_c_threshold

- **Type**: Real
- **Description**: See also the entry exx_pca_threshold. Smaller components (less than exx_c_threshold) of the matrix are neglected to accelerate calculation. The larger the threshold is, the faster the calculation and the lower the accuracy. A relatively safe choice of the value is 1e-4.
- **Default**: 1E-4

### exx_cs_inv_thr

- **Type**: Real
- **Description**: By default, the Coulomb matrix inversion required for obtaining LRI coefficients is performed using Cholesky factorization. However, this approach may suffer from numerical instabilities when a large set of auxiliary basis functions (ABFs) is employed. When exx_cs_inv_thr &gt; 0, the inversion is instead carried out via matrix diagonalization. Eigenvalues at or below exx_cs_inv_thr times the largest eigenvalue are discarded to improve numerical stability. A relatively safe and commonly recommended value is 1e-5. Force derivatives assume that modes remain on the same side of the cutoff. Eigenvalue crossings can make the truncated model nonsmooth during relaxation or molecular dynamics.
- **Default**: -1

### exx_v_threshold

- **Type**: Real
- **Description**: See also the entry exx_pca_threshold. With the approximation , the four-center integral in Fock exchange is expressed as , where is a double-center integral. Smaller values of the V matrix can be truncated to accelerate calculation. The larger the threshold is, the faster the calculation and the lower the accuracy. A relatively safe choice of the value is 0, i.e. no truncation.
- **Default**: 1E-1

### exx_dm_threshold

- **Type**: Real
- **Description**: The Fock exchange can be expressed as where D is the density matrix. Smaller values of the density matrix can be truncated to accelerate calculation. The larger the threshold is, the faster the calculation and the lower the accuracy. A relatively safe choice of the value is 1e-4. LR-TDDFT exchange operators and excited-state force contractions retain all density blocks to preserve linearity; this threshold still applies to the ground-state SCF.
- **Default**: 1E-4

### exx_c_grad_threshold

- **Type**: Real
- **Description**: See also the entry exx_pca_threshold. is used in force. Smaller components (less than exx_c_grad_threshold) of the matrix are neglected to accelerate calculation. The larger the threshold is, the faster the calculation and the lower the accuracy. A relatively safe choice of the value is 1e-4.
- **Default**: 1E-4

### exx_v_grad_threshold

- **Type**: Real
- **Description**: See also the entry exx_pca_threshold. With the approximation , the four-center integral in Fock exchange is expressed as , where is a double-center integral. is used in force. Smaller values of the V matrix can be truncated to accelerate calculation. The larger the threshold is, the faster the calculation and the lower the accuracy. A relatively safe choice of the value is 0, i.e. no truncation.
- **Default**: 1E-1

### exx_c_grad_r_threshold

- **Type**: Real
- **Description**: See also the entry exx_pca_threshold. is used in stress. Smaller components (less than exx_c_grad_r_threshold) of the matrix are neglected to accelerate calculation. The larger the threshold is, the faster the calculation and the lower the accuracy. A relatively safe choice of the value is 1e-4.
- **Default**: 1E-4

### exx_v_grad_r_threshold

- **Type**: Real
- **Description**: See also the entry exx_pca_threshold. With the approximation , the four-center integral in Fock exchange is expressed as , where is a double-center integral. is used in force and stress. Smaller values of the V matrix can be truncated to accelerate calculation. The larger the threshold is, the faster the calculation and the lower the accuracy. A relatively safe choice of the value is 0, i.e. no truncation.
- **Default**: 1E-1

### exx_ccp_rmesh_times

- **Type**: String
- **Description**: This parameter determines how many times larger the radial mesh required for calculating Columb potential is to that of atomic orbitals. The value should be larger than 0. Reducing this value can effectively increase the speed of self-consistent calculations using hybrid functionals.

### exx_opt_orb_lmax

- **Type**: Integer
- **Availability**: *[`calculation`](#calculation)==gen_opt_abfs*
- **Description**: The maximum l of the spherical Bessel functions, when the radial part of opt-ABFs are generated as linear combinations of spherical Bessel functions. A reasonable choice is 2.
- **Default**: 0

### exx_opt_orb_ecut

- **Type**: Real
- **Availability**: *[`calculation`](#calculation)==gen_opt_abfs*
- **Description**: The cut-off of plane wave expansion, when the plane wave basis is used to optimize the radial ABFs. A reasonable choice is 60.
- **Default**: 0
- **Unit**: Ry

### exx_opt_orb_tolerence

- **Type**: Real
- **Availability**: *[`calculation`](#calculation)==gen_opt_abfs*
- **Description**: The threshold when solving for the zeros of spherical Bessel functions. A reasonable choice is 1e-12.
- **Default**: 1E-12

### exx_real_number

- **Type**: String
- **Description**: - True: Enforce LibRI to use double data type.
  - False: Enforce LibRI to use complex data type. Setting it to True can effectively improve the speed of self-consistent calculations with hybrid functionals.
  - LCAO RT-TDDFT exact exchange with td_stype=2 requires exx_real_number=0 to represent the input density phase.
- **Default**: depends on the gamma_only option

### rpa_ccp_rmesh_times

- **Type**: Real
- **Description**: How many times larger the radial mesh required is to that of atomic orbitals in the postprocess calculation of the bare Coulomb matrix for RPA, GW, etc.
- **Default**: 10

### rpa_cut_coulomb

- **Type**: String
- **Allowed values**: hard, log_erfc
- **Description**: Post-SCF cut-Coulomb kernel: hard preserves Spencer truncation; log_erfc uses erfc(log(r/Rc)/log(rpa_cut_width))/2r. Applies to Fock components in compressed and uncompressed cut exports; Erfc components retain their existing kernel. Non-default kernel/radius requests require a Fock component. Full Coulomb is unchanged. Forces and stresses for log_erfc are not validated.
- **Default**: hard

### rpa_cut_radius

- **Type**: String
- **Allowed values**: legacy, inscribed
- **Description**: legacy preserves the existing cutoff radius. inscribed uses half the shortest nonzero BvK superlattice vector, including the lattice scale in Bohr. Applies only to Fock components; inscribed is rejected if the RPA Coulomb configuration has no Fock component. Independent of rpa_cut_coulomb; intended for controlled radius-versus-smoothing comparisons.
- **Default**: legacy

### rpa_cut_width

- **Type**: Real
- **Legal range**: value>1 and value<=1.25
- **Description**: Width factor for log_erfc. Must be finite and greater than 1 and at most 1.25. The default matches the logged Si FHI-aims width; it is not a universal FHI-aims constant. The finite radial integration range must resolve the smooth tail.
- **Default**: 1.091868692359

### exx_symmetry_realspace

- **Type**: Boolean
- **Availability**: *[`symmetry`](#symmetry)==1 and ([`dft_functional`](#dft_functional) in [hse, hf, pbe0, scan0] or ([`basis_type`](#basis_type)==lcao and [`rpa`](#rpa)==true))*
- **Description**: - False: only rotate k-space density matrix D(k) from irreducible k-points to accelerate diagonalization
  - True: rotate both D(k) and Hexx(R) to accelerate both diagonalization and EXX calculation
  For multi-k calculations, D(k) is averaged over the unitary little group of each irreducible k point before star expansion, for either setting.
- **Default**: True

### out_ri_cv

- **Type**: Boolean
- **Description**: Whether to output the coefficient tensor C(R) and ABFs-representation Coulomb matrix V(R) for each atom pair and cell in real space.
- **Default**: false

[back to top](#full-list-of-input-keywords)

## Exact Exchange (PW)

### exxace

- **Type**: Boolean
- **Availability**: *[`exx_separate_loop`](#exx_separate_loop)==true*
- **Description**: Whether to use the ACE method (https://doi.org/10.1021/acs.jctc.6b00092) to accelerate the calculation the Fock exchange matrix. Should be set to true most of the time.
  - True: Use the ACE method to calculate the Fock exchange operator.
  - False: Use the traditional method to calculate the Fock exchange operator.
- **Default**: True

### exx_gamma_extra

- **Type**: Boolean
- **Description**: Whether to use the gamma point extrapolation method to calculate the Fock exchange operator. See https://doi.org/10.1103/PhysRevB.79.205114 for details. Defaults to false for PW exx_singularity_correction=limits (finite screened kernel), and true otherwise. Explicit true is incompatible with the PW limits scheme.
- **Default**: False for PW limits; True otherwise

### ecutexx

- **Type**: Real
- **Legal range**: value>=0
- **Description**: The energy cutoff for EXX (Fock) exchange operator in plane wave basis calculations. The pair-density G-sphere of the exchange operator, the EXX energy, and the EXX stress are all truncated at this value. If ecutexx yields a smaller FFT box and every |k+G|^2 of the wavefunctions fits inside it (i.e. ecutexx should not be smaller than ecutwfc), all EXX FFTs run on that smaller grid (QE ecutfock-style), which can significantly accelerate EXX computations. If the small grid is not usable (box not smaller, wavefunctions do not fit, or the FFT box is distributed over MPI), a warning is printed and the full grid is used. Reducing ecutexx below ecutrho reduces the numerical accuracy of the exchange contribution.
- **Default**: same as ecutrho
- **Unit**: Ry

### exx_batch_size

- **Type**: Integer
- **Legal range**: value>=0
- **Description**: Number of bands processed per round of the EXX batched FFT path. 0 (the default) processes all bands in one round, which is fastest but needs nbands * nxyz work buffers; a positive value processes the bands in chunks of that width, trading some performance for a proportionally smaller memory footprint. The result is independent of the chunking.
- **Default**: 0

### exx_thr_type

- **Type**: String
- **Description**: The type of threshold used to judge whether the outer loop has converged in the separate loop EXX calculation.
  - energy: use the change of exact exchange energy to judge convergence.
  - density: if the change of charge density difference between two successive outer loop iterations is seen as converged according to scf_thr, then the outer loop is seen as converged.
- **Default**: density

### exx_ene_thr

- **Type**: Real
- **Legal range**: value>0
- **Availability**: *[`exx_thr_type`](#exx_thr_type)==energy*
- **Description**: The threshold for the change of exact exchange energy to judge convergence of the outer loop in the separate loop EXX calculation.
- **Default**: 1e-5
- **Unit**: Ry

[back to top](#full-list-of-input-keywords)

## Molecular dynamics

### md_type

- **Type**: String
- **Allowed values**: fire, nve, nvt, npt, langevin, msst

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`md_type`](#md_type) in [msst, npt] and [`calculation`](#calculation)==md | [`cal_stress`](#cal_stress)==true |

- **Description**: Control the algorithm to integrate the equation of motion for molecular dynamics (MD), see md.md in detail.

  - fire: a MD-based relaxation algorithm, named fast inertial relaxation engine.
  - nve: NVE ensemble with velocity Verlet algorithm.
  - nvt: NVT ensemble, see md_thermostat in detail.
  - npt: Nose-Hoover style NPT ensemble, see md_pmode in detail.
  - langevin: NVT ensemble with Langevin thermostat, see md_damp in detail.
  - msst: MSST method, see msst_direction, msst_vel, msst_qmass, msst_vis, msst_tscale in detail.
- **Default**: nvt

### md_nstep

- **Type**: Integer
- **Description**: The total number of molecular dynamics steps.
- **Default**: 10

### md_dt

- **Type**: Real
- **Description**: The time step used in molecular dynamics calculations.
- **Default**: 1.0
- **Unit**: fs

### md_thermostat

- **Type**: String
- **Allowed values**: nhc, anderson, berendsen, rescaling, rescale_v, csvr
- **Description**: Specify the temperature control method used in NVT ensemble.

  - nhc: Nose-Hoover chain, see md_tfreq and md_tchain in detail.
  - anderson: Anderson thermostat, see md_nraise in detail.
  - berendsen: Berendsen thermostat, see md_nraise in detail.
  - rescaling: velocity Rescaling method 1, see md_tolerance in detail.
  - rescale_v: velocity Rescaling method 2, see md_nraise in detail.
  - csvr: Canonical Sampling through Velocity Rescaling, see md_csvr_tau in detail.
- **Default**: nhc

### md_tfirst

- **Type**: Real

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`md_tfirst`](#md_tfirst)&lt;0 and [`calculation`](#calculation)==md | [`init_vel`](#init_vel)==true |

- **Description**: The temperature used in molecular dynamics calculations.

  If md_tfirst is unset or less than zero, init_vel is autoset to be true. If init_vel is true, the initial temperature will be determined by the velocities read from STRU. In this case, if velocities are unspecified in STRU, the initial temperature is set to zero.

  If md_tfirst is set to a positive value and init_vel is true simultaneously, please make sure they are consistent, otherwise abacus will exit immediately.

  Note that md_tlast is only used in NVT/NPT simulations. If md_tlast is unset or less than zero, md_tlast is set to md_tfirst. If md_tlast is set to be different from md_tfirst, ABACUS will automatically change the temperature from md_tfirst to md_tlast.
- **Default**: No default
- **Unit**: K

### md_tlast

- **Type**: Real
- **Description**: The temperature used in molecular dynamics calculations.

  If md_tfirst is unset or less than zero, init_vel is autoset to be true. If init_vel is true, the initial temperature will be determined by the velocities read from STRU. In this case, if velocities are unspecified in STRU, the initial temperature is set to zero.

  If md_tfirst is set to a positive value and init_vel is true simultaneously, please make sure they are consistent, otherwise abacus will exit immediately.

  Note that md_tlast is only used in NVT/NPT simulations. If md_tlast is unset or less than zero, md_tlast is set to md_tfirst. If md_tlast is set to be different from md_tfirst, ABACUS will automatically change the temperature from md_tfirst to md_tlast.
- **Default**: No default
- **Unit**: K

### md_prec_level

- **Type**: Integer
- **Description**: Determine the precision level of variable-cell molecular dynamics calculations.
  - 0: FFT grids do not change, only G vectors and K vectors are changed due to the change of lattice vector. This level is suitable for cases where the variation of the volume and shape is not large, and the efficiency is relatively higher.
  - 2: FFT grids change per step. This level is suitable for cases where the variation of the volume and shape is large, such as the MSST method. However, accuracy comes at the cost of efficiency.
- **Default**: 0

### md_restart

- **Type**: Boolean

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`md_restart`](#md_restart)==true and [`calculation`](#calculation)==md | [`init_vel`](#init_vel)==true |

- **Description**: Control whether to restart molecular dynamics calculations and time-dependent density functional theory calculations.
  - True: ABACUS reads the step in Restart_md.txt and the matching structure from STRU_restart in read_file_dir. If STRU_restart is absent, legacy numbered or cumulative MD STRU frames with velocities are accepted when the recorded step matches. For tddft, ABACUS will also read in the LCAO wavefunction file of the last step (OUT.{suffix}/PSI/wf{k-point index}{spin?}g{step}_nao.txt). You need to set out_wfc_lcao=1 and out_app_flag=2 to obtain this per-step wavefunction snapshot (modes 0 and 1 write fixed-name files without a step suffix, which cannot be mapped to a specific restart step and are therefore not accepted for istep&gt;0).
  A structure frame with velocities is required for {istep}. New runs write it to STRU_restart whenever Restart_md.txt is updated, regardless of out_stru and out_freq_ion. Older outputs using cumulative or numbered STRU frames are still accepted when the matching frame exists.

  - False: ABACUS will start molecular dynamics calculations normally from the first step.
- **Default**: False

### md_restartfreq

- **Type**: Integer
- **Description**: The period (in ionic steps) of writing the MD restart file (Restart_md.txt). This cadence is independent of out_freq_ion: Restart_md.txt and STRU_restart are overwritten every md_restartfreq steps regardless of out_stru and out_freq_ion. STRU_restart contains the atomic velocities needed to resume MD. Set to 0 to disable checkpoint output.
- **Default**: 5

### out_thermo_freq

- **Type**: Integer
- **Description**: The output frequency of MD step, energy, temperature, and pressure information in OUT.${suffix}/running_md.log and on screen. When cal_stress is enabled, the virial and total stress tensors are written to the running log at this frequency. This parameter only affects MD. Set to 0 to disable these summaries; force and stress calculations continue every step.
- **Default**: 1

### md_neighbor_skin

- **Type**: Real
- **Description**: The extra neighbor-list radius in Angstrom for MDCell molecular dynamics. This parameter is only used for classical potentials or machine-learned interatomic potentials. A positive value reuses the cutoff-plus-skin candidate list until an atom has moved by half this distance; 0 rebuilds the list every force evaluation.
- **Default**: 0.0
- **Unit**: Angstrom

### md_seed

- **Type**: Integer
- **Description**: The random seed to initialize random numbers used in molecular dynamics calculations.
  - &lt; 0: Each MPI rank uses the default seed 1 plus its rank.
  - &gt;= 0: Each MPI rank uses md_seed plus its rank.
- **Default**: -1

### md_tfreq

- **Type**: Real
- **Description**: Control the frequency of temperature oscillations during the simulation. If it is too large, the temperature will fluctuate violently; if it is too small, the temperature will take a very long time to equilibrate with the atomic system.

  Note: It is a system-dependent empirical parameter, ranging from 1/(40*md_dt) to 1/(100*md_dt). An improper choice might lead to the failure of jobs.
- **Default**: 1/40/md_dt

### md_tchain

- **Type**: Integer
- **Description**: Number of thermostats coupled with the particles in the NVT/NPT ensemble based on the Nose-Hoover style non-Hamiltonian equations of motion.
- **Default**: 1

### md_pmode

- **Type**: String

**Requirements**

| Option | Requirements |
| --- | --- |
| `iso` | [`md_pcouple`](#md_pcouple)==xyz |

- **Description**: Determine the precision level of variable-cell molecular dynamics calculations.
  - 0: FFT grids do not change, only G vectors and K vectors are changed due to the change of lattice vector. This level is suitable for cases where the variation of the volume and shape is not large, and the efficiency is relatively higher.
  - 2: FFT grids change per step. This level is suitable for cases where the variation of the volume and shape is large, such as the MSST method. However, accuracy comes at the cost of efficiency.
- **Default**: iso

### ref_cell_factor

- **Type**: Real
- **Description**: Construct a reference cell bigger than the initial cell. The reference cell has to be large enough so that the lattice vectors of the fluctuating cell do not exceed the reference lattice vectors during MD. Typically, 1.02 ~ 1.10 is sufficient. However, the cell fluctuations depend on the specific system and thermodynamic conditions. So users must test for a proper choice. This parameters should be used in conjunction with erf_ecut, erf_height, and erf_sigma.
- **Default**: 1.0

### md_pcouple

- **Type**: String
- **Allowed values**: none, xyz, xy, xz, yz
- **Description**: The coupled lattice vectors will scale proportionally in NPT ensemble based on the Nose-Hoover style non-Hamiltonian equations of motion.
  - none: Three lattice vectors scale independently.
  - xyz: Lattice vectors x, y, and z scale proportionally.
  - xy: Lattice vectors x and y scale proportionally.
  - xz: Lattice vectors x and z scale proportionally.
  - yz: Lattice vectors y and z scale proportionally.
- **Default**: none

### md_pfirst

- **Type**: Real
- **Description**: The target pressure used in NPT ensemble simulations, the default value of md_plast is md_pfirst. If md_plast is set to be different from md_pfirst, ABACUS will automatically change the target pressure from md_pfirst to md_plast.
- **Default**: -1.0
- **Unit**: kbar

### md_plast

- **Type**: Real
- **Description**: The target pressure used in NPT ensemble simulations, the default value of md_plast is md_pfirst. If md_plast is set to be different from md_pfirst, ABACUS will automatically change the target pressure from md_pfirst to md_plast.
- **Default**: -1.0
- **Unit**: kbar

### md_pfreq

- **Type**: Real
- **Description**: The frequency of pressure oscillations during the NPT ensemble simulation. If it is too large, the pressure will fluctuate violently; if it is too small, the pressure will take a very long time to equilibrate with the atomic system.

  Above the default frequency, a cell deformation component exceeding 1% in one MD step triggers a warning.

  Note: It is a system-dependent empirical parameter. An improper choice might lead to the failure of jobs.
- **Default**: 1/400/md_dt

### md_pchain

- **Type**: Integer
- **Description**: The number of thermostats coupled with the barostat in the NPT ensemble based on the Nose-Hoover style non-Hamiltonian equations of motion.
- **Default**: 1

### lj_rule

- **Type**: Integer
- **Description**: The Lennard-Jones potential between two atoms equals: $\sigma_k\sigma(i,j)$
- **Default**: 2

### lj_eshift

- **Type**: Boolean
- **Description**: It True, the LJ potential is shifted by a constant such that it is zero at the cut-off distance.
- **Default**: False

### lj_rcut

- **Type**: Real
- **Description**: Cut-off radius for Leonard Jones potential, beyond which the interaction will be neglected. It can be a single value, which means that all pairs of atoms types share the same cut-off radius. Otherwise, it should be a multiple-component vector, containing values, see details in lj_rule.
- **Default**: No default
- **Unit**: Angstrom

### lj_epsilon

- **Type**: Real
- **Description**: The vector representing the matrix for Leonard Jones potential. See details in lj_rule.
- **Default**: No default
- **Unit**: eV

### lj_sigma

- **Type**: Real
- **Description**: The vector representing the matrix for Leonard Jones potential. See details in lj_rule.
- **Default**: No default
- **Unit**: Angstrom

### pot_file

- **Type**: String
- **Description**: The filename of DP/NEP potential files, see md.md in detail.
- **Default**: graph.pb

### snap_param_file

- **Type**: String
- **Availability**: *[`esolver_type`](#esolver_type)==snap*
- **Description**: The SNAP parameter file used with pot_file as the SNAP coefficient file.
- **Default**: snap.param

### dp_rescaling

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==dp*
- **Description**: Rescaling factor to use a temperature-dependent DP. Energy, stress and force calculated by DP will be multiplied by this factor.
- **Default**: 1.0

### dp_fparam

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==dp*
- **Description**: The frame parameter for dp potential. The array size is dim_fparam, then all frames are assumed to be provided with the same fparam.
- **Default**: {}

### dp_aparam

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==dp*
- **Description**: The atomic parameter for dp potential. The array size can be (1) natoms x dim_aparam, then all frames are assumed to be provided with the same aparam; (2) dim_aparam, then all frames and atoms are assumed to be provided with the same aparam.
- **Default**: {}

### msst_direction

- **Type**: Integer
- **Description**: The direction of the shock wave in the MSST method.
  - 0: x direction
  - 1: y direction
  - 2: z direction
- **Default**: 2

### msst_vel

- **Type**: Real
- **Description**: The velocity of the shock wave in the MSST method.
- **Default**: 0.0
- **Unit**: Angstrom/fs

### msst_vis

- **Type**: Real
- **Description**: Artificial viscosity in the MSST method.
- **Default**: 0.0
- **Unit**: g/(mol*Angstrom*fs)

### msst_tscale

- **Type**: Real
- **Description**: The reduction percentage of the initial temperature used to compress volume in the MSST method.
- **Default**: 0.01

### msst_qmass

- **Type**: Real
- **Legal range**: value>0
- **Description**: Inertia of the extended system variable. You should set a number larger than 0.
- **Default**: No default

### md_damp

- **Type**: Real
- **Description**: The damping parameter used to add fictitious force in the Langevin method.
- **Default**: 1.0
- **Unit**: fs

### md_csvr_tau

- **Type**: Real
- **Availability**: *[`md_thermostat`](#md_thermostat)==csvr*
- **Description**: The characteristic time scale for the CSVR (Canonical Sampling through Velocity Rescaling) thermostat. Larger values give weaker coupling, smaller values give stronger coupling. Recommended value: 100 * md_dt.
- **Default**: 100.0
- **Unit**: fs

### md_tolerance

- **Type**: Real
- **Description**: The temperature tolerance for velocity rescaling. Velocities are rescaled if the current and target temperature differ more than md_tolerance.
- **Default**: 100.0
- **Unit**: K

### md_nraise

- **Type**: Integer
- **Description**: - Anderson: The "collision frequency" parameter is given as 1/md_nraise.
  - Berendsen: The "rise time" parameter is given in units of the time step: tau = md_nraise*md_dt, so md_dt/tau = 1/md_nraise.
  - Rescale_v: Every md_nraise steps the current temperature is rescaled to the target temperature.
- **Default**: 1

### cal_syns

- **Type**: Boolean \[Integer\](optional)
- **Description**: Whether to calculate and output asynchronous overlap matrix for Hefei-NAMD interface. When enabled, calculates &lt;phi(t-1)|phi(t)&gt; by computing overlap between basis functions at atomic positions from previous time step and current time step. The overlap is calculated by shifting atom positions backward by velocity x md_dt. Output file: OUT.*/syns_nao.csr in CSR format.

  - 0 or false: disable
  - 1 or true: enable with default precision (8 digits)
  - 1 5: enable with custom precision (5 digits)

  > Note: Only works with LCAO basis and molecular dynamics calculations. Requires atomic velocities. Output starts from the second MD step (istep &gt; 0).
- **Default**: False

### dmax

- **Type**: Real
- **Description**: The maximum displacement of all atoms in one step. This parameter is useful when cal_syns = True.
- **Default**: 0.01
- **Unit**: bohr

### plumed

- **Type**: Boolean
- **Description**: Whether to use PLUMED (https://www.plumed.org) to compute collective variables, biasing potentials and free-energy methods during an MD run. ABACUS must be compiled with -DENABLE_PLUMED=ON and linked against a PLUMED installation (discovered through pkg-config or PLUMED_ROOT) to enable this feature. The PLUMED interface currently supports a single MPI rank only.
- **Default**: False

### plumed_file

- **Type**: String
- **Availability**: *[`plumed`](#plumed)==true*
- **Description**: The input file of PLUMED, read when `plumed` is enabled. Relative paths are resolved against the working directory of the run.
- **Default**: plumed.dat

[back to top](#full-list-of-input-keywords)

## DFT+U correction

### dft_plus_u

- **Type**: Integer
- **Description**: Determines whether to calculate the plus U correction, which is especially important for correlated electrons.
  - 1: Calculate plus U correction with radius-adjustable localized projections (with parameter onsite_radius).
  - 2: Calculate plus U correction using first zeta of NAOs as projections (this is old method for testing).
  - 0: Do not calculate plus U correction.
- **Default**: 0

### dftu_dc

- **Type**: String
- **Allowed values**: fll, amf, mixed
- **Description**: Double counting: `fll` preserves the legacy path; `amf` and `mixed` opt into a Full-only extension (`dft_plus_u=1`).
  Full denotes the existing radius-adjustable localized projection implemented by DFTU_onsite, not an anisotropic U/J functional. hubbard_u is Ueff=U-J.
  AMF subtracts Tr(n_sigma)/(2l+1) separately in each spin channel, using the existing projected occupation without additional normalization.
  `mixed` uses fixed dftu_alpha: 0 is AMF, 1 is FLL. Both local interaction energy and potential are mixed, not two SCF results.
  For nspin=1 the spin-summed occupation is halved and the shell energy doubled, but the potential is not doubled. The band correction is E_corr-ReTr(V*n).
  New modes require explicit PBE, CPU double-precision LCAO KS SCF, nspin=1/2, symmetry=0/-1, a single k pool and atomic cold start. Supported solvers are genelpa, elpa, lapack and scalapack_gvx.
  SOC, spin constraints, force/stress, restart, EXX, U ramping, Yukawa U, occupation/DMR mixing and matrix/Wannier/QO exports are not supported. These restrictions also apply to mixed endpoints, but not to fll.
- **Default**: fll

### dftu_alpha

- **Type**: Real
- **Legal range**: value>=0 and value<=1
- **Availability**: *[`dftu_dc`](#dftu_dc)==mixed*
- **Description**: Explicit finite weight in [0,1] for dftu_dc=mixed. Zero gives AMF and one gives FLL. Not accepted for other DC modes. This weight is fixed, not determined self-consistently.
- **Default**: explicitly required for mixed; otherwise unused

### dft_plus_dmft

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==lcao*
- **Description**: Whether to enable DFT+DMFT calculation. True: DFT+DMFT; False: standard DFT calculation.
- **Default**: False

### orbital_corr

- **Type**: Vector of Integer (n values where n is the number of atomic types)
- **Description**: Specifies which orbits need plus U correction for each atom type ( for atom type 1, 2, 3, respectively).
  - -1: The plus U correction will not be calculated for this atom.
  - 1: For p-electron orbits, the plus U correction is needed.
  - 2: For d-electron orbits, the plus U correction is needed.
  - 3: For f-electron orbits, the plus U correction is needed.
- **Default**: -1

### hubbard_u

- **Type**: Vector of Real (n values where n is the number of atomic types)
- **Description**: Specifies the Hubbard Coulomb interaction parameter U (eV) in plus U correction, which should be specified for each atom unless the Yukawa potential is used.

  > Note: Since only the simplified scheme by Duradev is implemented, the 'U' here is actually U-effective, which is given by Hubbard U minus Hund J.
- **Default**: 0.0

### yukawa_potential

- **Type**: Boolean
- **Description**: Determines whether to use the local screen Coulomb potential method to calculate the values of U and J.
  - True: hubbard_u does not need to be specified.
  - False: hubbard_u does need to be specified.
- **Default**: False

### yukawa_lambda

- **Type**: Real
- **Availability**: *[`dft_plus_u`](#dft_plus_u)==1 and [`yukawa_potential`](#yukawa_potential)==true*
- **Description**: The screen length of Yukawa potential. If left to default, the screen length will be calculated as an average of the entire system. It's better to stick to the default setting unless there is a very good reason.
- **Default**: Calculated on the fly.

### uramping

- **Type**: Real
- **Availability**: *[`dft_plus_u`](#dft_plus_u)==1 and [`mixing_restart`](#mixing_restart)>0*
- **Description**: Once uramping &gt; 0.15 eV. DFT+U calculations will start SCF with U = 0 eV, namely normal LDA/PBE calculations. Once SCF restarts when drho&lt;mixing_restart, U value will increase by uramping eV. SCF will repeat above calcuations until U values reach target defined in hubbard_u. As for uramping=1.0 eV, the recommendations of mixing_restart is around 5e-4.
- **Default**: -1.0.
- **Unit**: eV

### init_occ_mat

- **Type**: Integer
- **Description**: The parameter controls how the DFT+U occupation matrix is initialized.
  - 0: No occupation-matrix initialization is performed, and the onsite density matrix will be calculated from wavefunctions in each SCF step.
  - 1: The first SCF step will use an initial density matrix read from a file, but for later steps, the onsite density matrix will be updated.
  - 2: The same onsite density matrix read from the file will be used throughout the entire calculation.

  > Note: The occupation-matrix file is read from the directory specified by read_file_dir. The search order is dm_onsite_ini.txt -&gt; occ_mat.txt. Input must use the current compact format written by ABACUS; legacy Atom=/L=/spin= files such as dm_onsite.txt are not supported. The easiest way to obtain a valid file is to run a DFT+U calculation with out_occ_mat=1 (the default); the resulting occ_mat.txt in the OUT.prefix directory (which always holds the occupation matrix of the latest electronic step) can be placed in read_file_dir as-is. When out_freq_ion is positive, separate occ_matg{geom_step}.txt files are also written, one per output ionic step; they may contain several electronic-step sections separated by comment headers.
- **Default**: 0

### omc

- **Type**: Integer
- **Description**: Legacy alias for init_occ_mat with the same meaning. If both omc and init_occ_mat are present, init_occ_mat takes precedence.
- **Default**: 0

### onsite_radius

- **Type**: Real
- **Legal range**: value>0
- **Availability**: *[`basis_type`](#basis_type) in [pw, lcao]*
- **Description**: Cutoff radius for numerical atomic orbitals used in onsite projections.
  - Controls the localized projections for `dft_plus_u=1` and spin constraints (`sc_mag_switch=true`) in PW and LCAO calculations.
  - Enables onsite population analysis in ordinary PW calculations when set to a positive value.
  - Controls atomic magnetic moment projections for `nspin=4` PW RT-TDDFT with `td_out_mag=onsite`.

  When omitted, the value is `3.0` for `dft_plus_u=1`, `sc_mag_switch=true`, or `nspin=4` PW RT-TDDFT with `td_out_mag=onsite`; otherwise it is `0.0`. Explicit values must be positive.

  Provide numerical atomic orbital files through `NUMERICAL_ORBITAL` in `STRU`, with their directory specified by `orbital_dir`. Projected magnetic moments depend on the chosen orbitals and radius.
- **Default**: `3.0` for `dft_plus_u=1`, `sc_mag_switch=true`, or `nspin=4` PW RT-TDDFT with `td_out_mag=onsite`; `0.0` otherwise
- **Unit**: Bohr

[back to top](#full-list-of-input-keywords)

## Spin-Constrained DFT

### sc_mag_switch

- **Type**: Boolean

**Requirements**

| Option | Requirements |
| --- | --- |
| `true` | [`nspin`](#nspin) in [2, 4] |

- **Description**: Switch to control spin-constrained DFT calculation
- **Default**: False

### decay_grad_switch

- **Type**: Boolean
- **Description**: Switch to control gradient break condition in spin-constrained DFT
- **Default**: False

### sc_thr

- **Type**: Real
- **Legal range**: value>=0
- **Availability**: *[`sc_mag_switch`](#sc_mag_switch)==true*
- **Description**: Convergence criterion of spin-constrained iteration (RMS) in uB
- **Default**: 1.0e-6
- **Unit**: uB

### nsc

- **Type**: Integer
- **Legal range**: value>0
- **Availability**: *[`sc_mag_switch`](#sc_mag_switch)==true*
- **Description**: Maximal number of spin-constrained iteration
- **Default**: 100

### nsc_min

- **Type**: Integer
- **Legal range**: value>0
- **Availability**: *[`sc_mag_switch`](#sc_mag_switch)==true*
- **Description**: Minimum number of spin-constrained iteration
- **Default**: 2

### alpha_trial

- **Type**: Real
- **Legal range**: value>0
- **Availability**: *[`sc_mag_switch`](#sc_mag_switch)==true*
- **Description**: Initial trial step size for lambda in eV/uB^2
- **Default**: 0.01
- **Unit**: eV/uB^2

### sccut

- **Type**: Real
- **Legal range**: value>0
- **Availability**: *[`sc_mag_switch`](#sc_mag_switch)==true*
- **Description**: Maximal step size for lambda in eV/uB
- **Default**: 3.0
- **Unit**: eV/uB

### sc_drop_thr

- **Type**: Real
- **Availability**: *[`sc_mag_switch`](#sc_mag_switch)==true*
- **Description**: Convergence criterion ratio of lambda iteration in Spin-constrained DFT
- **Default**: 1.0e-2

### sc_scf_thr

- **Type**: Real
- **Legal range**: value>0
- **Availability**: *[`sc_mag_switch`](#sc_mag_switch)==true*
- **Description**: Density error threshold for inner loop of spin-constrained SCF
- **Default**: 1.0e-4

### sc_direction_only

- **Type**: Boolean
- **Availability**: *[`sc_mag_switch`](#sc_mag_switch)==true*
- **Description**: When true, only the direction of the magnetic moment is constrained to the target direction, while the magnitude is allowed to vary freely. This is useful for studying magnetic anisotropy or when the magnitude of the moment is determined by the electronic structure rather than an external constraint.

  When false (default), both the direction and magnitude of the magnetic moment are constrained to the target values.
- **Default**: False

### sc_lambda_strategy

- **Type**: String
- **Allowed values**: bfgs, bfgs2, linear_response, augmented_lagrangian, hybrid_delayed, linear_scan
- **Availability**: *[`sc_mag_switch`](#sc_mag_switch)==true*
- **Description**: Lambda update strategy for spin-constrained DFT:
  - bfgs: BFGS quasi-Newton method
  - linear_response: linear response (Scheme B)
  - augmented_lagrangian: augmented Lagrangian (Scheme C)
  - hybrid_delayed: hybrid delayed update (Scheme D)
  - linear_scan: linear sweep of lambda for testing magnetic moment response
- **Default**: bfgs

### sc_scan_lambda_start

- **Type**: Float
- **Availability**: *[`sc_mag_switch`](#sc_mag_switch)==true and [`sc_lambda_strategy`](#sc_lambda_strategy)==linear_scan*
- **Description**: Starting lambda value for linear_scan strategy. Only used when sc_lambda_strategy=linear_scan.
- **Default**: 0.0
- **Unit**: eV/uB

### sc_scan_lambda_end

- **Type**: Float
- **Availability**: *[`sc_mag_switch`](#sc_mag_switch)==true and [`sc_lambda_strategy`](#sc_lambda_strategy)==linear_scan*
- **Description**: Ending lambda value for linear_scan strategy. Only used when sc_lambda_strategy=linear_scan.
- **Default**: 1.0
- **Unit**: eV/uB

### sc_scan_steps

- **Type**: Integer
- **Availability**: *[`sc_mag_switch`](#sc_mag_switch)==true and [`sc_lambda_strategy`](#sc_lambda_strategy)==linear_scan*
- **Description**: Number of lambda values to scan. Only used when sc_lambda_strategy=linear_scan.
- **Default**: 20

[back to top](#full-list-of-input-keywords)

## vdW correction

### vdw_method

- **Type**: String
- **Allowed values**: none, d2, d3_0, d3_bj, d4
- **Description**: Specifies the method used for Van der Waals (VdW) correction. Available options are:
  - d2: Grimme's D2 dispersion correction method
  - d3_0: Grimme's DFT-D3(0) dispersion correction method (zero-damping)
  - d3_bj: Grimme's DFTD3(BJ) dispersion correction method (BJ-damping)
  - d4: Grimme's DFT-D4 dispersion correction method using the external DFT-D4 library
  - none: no vdW correction

  > Note: ABACUS automatically loads DFT-D3 parameters for supported functionals according to dft_functional setting. Individual user values overwrite the corresponding tabulated values. Setting all four of vdw_s6, vdw_s8, vdw_a1 and vdw_a2 defines a fully custom set and bypasses functional lookup.
- **Default**: none

### vdw_d4_xc

- **Type**: String
- **Availability**: *[`vdw_method`](#vdw_method)==d4*
- **Description**: Functional name used to load DFT-D4 damping parameters from the DFT-D4 library.
  If set to default, ABACUS infers the functional name from dft_functional or pseudopotential metadata.
- **Default**: default

### vdw_d4_model

- **Type**: String
- **Allowed values**: d4, d4s, D4, D4S
- **Availability**: *[`vdw_method`](#vdw_method)==d4*
- **Description**: DFT-D4 dispersion model used by the external DFT-D4 library.
  Available options are:

  - d4: standard D4 model
  - d4s: smooth D4S model
- **Default**: d4

### vdw_s6

- **Type**: String
- **Availability**: *[`vdw_method`](#vdw_method) in [d2, d3_0, d3_bj]*
- **Description**: Scale factor s6, which is used to optimize the interaction energy deviations in van der Waals (vdW) corrected calculations. The recommended values of this parameter are dependent on the chosen vdW correction method and the DFT functional being used. For DFT-D2, the recommended values are 0.75 (PBE), 1.2 (BLYP), 1.05 (B-P86), 1.0 (TPSS), and 1.05 (B3LYP); if not set, will use values of PBE functional by default. For DFT-D3, ABACUS will search in built-in dataset based on the dft_functional setting by default; user set value will overwrite the searched value.

### vdw_s8

- **Type**: String
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj]*
- **Description**: Scale factor s8 for D3(0) and D3(BJ). By default, ABACUS will search in built-in dataset based on the dft_functional setting. User set value will overwrite the searched value.

### vdw_a1

- **Type**: String
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj]*
- **Description**: Damping parameter rs6 for D3(0), or a1 for D3(BJ). If not set, ABACUS loads the s-dftd3 value for dft_functional. A user value overwrites the tabulated value.

### vdw_a2

- **Type**: String
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj]*
- **Description**: Damping parameter rs8 for D3(0), or a2 for D3(BJ). If not set, ABACUS loads the s-dftd3 value for dft_functional. A user value overwrites the tabulated value.

### vdw_d

- **Type**: Real
- **Availability**: *[`vdw_method`](#vdw_method)==d2*
- **Description**: Controls the damping rate of the damping function in the DFT-D2 method.
- **Default**: 20

### vdw_abc

- **Type**: Boolean
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj]*
- **Description**: Determines whether three-body terms are calculated for DFT-D3 methods.
  - True: ABACUS will calculate the three-body term.
  - False: The three-body term is not included.
- **Default**: False

### vdw_c6_file

- **Type**: String
- **Availability**: *[`vdw_method`](#vdw_method)==d2*
- **Description**: Specifies the name of the file containing parameters for each element when using the D2 method. If not set, ABACUS uses the default parameters (Jnm6/mol) stored in the program. To manually set the parameters, provide a file containing the parameters. An example is given by:

  H 0.1 Si 9.0

  Namely, each line contains the element name and the corresponding parameter.
- **Default**: default

### vdw_c6_unit

- **Type**: String
- **Allowed values**: Jnm6/mol, eVA6
- **Availability**: *[`vdw_method`](#vdw_method)==d2 and [`vdw_c6_file`](#vdw_c6_file)!=default*
- **Description**: Specifies the unit of the provided parameters in the D2 method. Available options are:
  - Jnm6/mol (J nm^6/mol)
  - eVA (eV Angstrom)
- **Default**: Jnm6/mol

### vdw_r0_file

- **Type**: String
- **Availability**: *[`vdw_method`](#vdw_method)==d2*
- **Description**: Specifies the name of the file containing parameters for each element when using the D2 method. If not set, ABACUS uses the default parameters (Angstrom) stored in the program. To manually set the parameters, provide a file containing the parameters. An example is given by:

  Li 1.0 Cl 2.0

  Namely, each line contains the element name and the corresponding parameter.
- **Default**: default

### vdw_r0_unit

- **Type**: String
- **Allowed values**: A, Bohr
- **Availability**: *[`vdw_method`](#vdw_method)==d2 and [`vdw_r0_file`](#vdw_r0_file)!=default*
- **Description**: Specifies the unit for the parameters in the D2 method when manually set by the user. Available options are:
  - A (Angstrom)
  - Bohr
- **Default**: A

### vdw_cutoff_type

- **Type**: String
- **Allowed values**: radius, period

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`vdw_method`](#vdw_method) in [d3_0, d3_bj, d4] | [`vdw_cutoff_type`](#vdw_cutoff_type)==radius |

- **Description**: Determines the method used for specifying the cutoff radius in periodic systems when applying Van der Waals correction. Available options are:
  - radius: The supercell is selected within a sphere centered at the origin with a radius defined by vdw_cutoff_radius.
  - period: The extent of the D2 supercell is explicitly specified using the vdw_cutoff_period keyword. DFT-D3 and DFT-D4 require radius.
- **Default**: radius

### vdw_cutoff_radius

- **Type**: String
- **Availability**: *[`vdw_cutoff_type`](#vdw_cutoff_type)==radius*
- **Description**: Defines the radius of the cutoff sphere when vdw_cutoff_type is set to radius. The default values depend on the chosen vdw_method.
- **Unit**: defined by vdw_radius_unit (default Bohr)

### vdw_radius_unit

- **Type**: String
- **Allowed values**: A, Bohr
- **Availability**: *[`vdw_cutoff_type`](#vdw_cutoff_type)==radius*
- **Description**: Specify the unit of vdw_cutoff_radius. Available options are:
  - A(Angstrom)
  - Bohr
- **Default**: Bohr

### vdw_cutoff_width2

- **Type**: Real
- **Legal range**: value>=0
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj, d4]*
- **Description**: Width of the smooth switching region for the two-body pairwise dispersion real-space cutoff.
  A value of zero disables smoothing for the two-body contribution.
- **Default**: 0.05
- **Unit**: Bohr

### vdw_cutoff_width3

- **Type**: Real
- **Legal range**: value>=0
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj, d4]*
- **Description**: Width of the smooth switching region for the three-body Axilrod-Teller-Muto (ATM) dispersion real-space cutoff.
  A value of zero disables smoothing for the three-body contribution.
- **Default**: 0.0
- **Unit**: Bohr

### vdw_cutoff_period

- **Type**: Integer Integer Integer
- **Availability**: *[`vdw_cutoff_type`](#vdw_cutoff_type)==period*
- **Description**: The three integers supplied here explicitly specify the extent of the supercell in the directions of the three basis lattice vectors.
- **Default**: 3 3 3

### vdw_cn_thr

- **Type**: Real
- **Legal range**: value>0
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj, d4]*
- **Description**: The cutoff radius when calculating coordination numbers.
- **Default**: 40
- **Unit**: defined by vdw_cn_thr_unit (default: Bohr)

### vdw_cn_thr_unit

- **Type**: String
- **Allowed values**: A, Bohr
- **Description**: Unit of the coordination number cutoff (vdw_cn_thr). Available options are:
  - A(Angstrom)
  - Bohr
- **Default**: Bohr

[back to top](#full-list-of-input-keywords)

## Berry phase and wannier90 interface

### berry_phase

- **Type**: Boolean
- **Description**: Controls the calculation of Berry phase
  - true: Calculate Berry phase.
  - false: Do not calculate Berry phase.
- **Default**: false

### gdir

- **Type**: Integer
- **Description**: The direction of the polarization in the lattice vector for Berry phase calculation
  - 1: Calculate the polarization in the direction of the lattice vector a_1 defined in the STRU file.
  - 2: Calculate the polarization in the direction of the lattice vector a_2 defined in the STRU file.
  - 3: Calculate the polarization in the direction of the lattice vector a_3 defined in the STRU file.
- **Default**: 3

### towannier90

- **Type**: Boolean
- **Description**: Controls the generation of files for the Wannier90 code.
  - 1: Generate files for the Wannier90 code.
  - 0: Do not generate files for the Wannier90 code.
- **Default**: 0

### nnkpfile

- **Type**: String
- **Description**: The file name generated when running "wannier90 -pp ..." command
- **Default**: seedname.nnkp

### wannier_method

- **Type**: Integer
- **Description**: Only available on LCAO basis, using different methods to generate "\.mmn" file and "\.amn" file.
  - 1: Calculated using the lcao_in_pw method, the calculation accuracy can be improved by increasing ecutwfc to maintain consistency with the pw basis set results.
  - 2: The overlap between atomic orbitals is calculated using grid integration. The radial grid points are generated using the Gauss-Legendre method, while the spherical grid points are generated using the Lebedev-Laikov method.
- **Default**: 1

### wannier_spin

- **Type**: String
- **Description**: The spin direction for the Wannier function calculation when nspin is set to 2
  - up: Calculate spin up for the Wannier function.
  - down: Calculate spin down for the Wannier function.
- **Default**: up

### out_wannier_mmn

- **Type**: Boolean
- **Description**: Write the "*.mmn" file or not.
  - 0: don't write the "*.mmn" file.
  - 1: write the "*.mmn" file.
- **Default**: 1

### out_wannier_amn

- **Type**: Boolean
- **Description**: Write the "*.amn" file or not.
  - 0: don't write the "*.amn" file.
  - 1: write the "*.amn" file.
- **Default**: 1

### out_wannier_eig

- **Type**: Boolean
- **Description**: Write the "*.eig" file or not.
  - 0: don't write the "*.eig" file.
  - 1: write the "*.eig" file.
- **Default**: 1

### out_wannier_spn

- **Type**: Boolean

**Requirements**

| Option | Requirements |
| --- | --- |
| `true` | [`towannier90`](#towannier90)==true and [`calculation`](#calculation)==nscf and [`basis_type`](#basis_type)==lcao and [`wannier_method`](#wannier_method)==2 and [`nspin`](#nspin)==4 |

- **Description**: Write &lt;seedname&gt;.spn with the x, y, z Pauli matrix elements. Set spinors=true and spn_formatted=true in the Wannier90 input.
- **Default**: 1 when the output requirements are met, 0 otherwise

### out_wannier_unk

- **Type**: Boolean
- **Description**: Write the "UNK.*" file or not.
  - 0: don't write the "UNK.*" file.
  - 1: write the "UNK.*" file.
- **Default**: 0

### out_wannier_wvfn_formatted

- **Type**: Boolean
- **Description**: Write the "UNK.*" file in ASCII format or binary format.
  - 0: write the "UNK.*" file in binary format.
  - 1: write the "UNK.*" file in ASCII format (text file format).
- **Default**: 1

[back to top](#full-list-of-input-keywords)

## Real-Time TDDFT (Common)

### td_scf_nmax

- **Type**: Integer
- **Legal range**: value>=2
- **Availability**: *[`esolver_type`](#esolver_type)==tddft*
- **Description**: Maximum number of electronic self-consistency iterations per real-time propagation interval in PW and LCAO calculations. This parameter is independent of `scf_nmax`.
- **Default**: 100

### estep_per_md

- **Type**: Integer
- **Legal range**: value>0
- **Availability**: *[`esolver_type`](#esolver_type)==tddft*
- **Description**: The number of electronic propagation steps between two ionic steps.
- **Default**: 1

### td_dt

- **Type**: Real
- **Legal range**: value>0
- **Availability**: *[`esolver_type`](#esolver_type)==tddft*
- **Description**: The time step used for electronic propagation. If `td_dt` is not specified, it is set to `md_dt / estep_per_md`. If `td_dt` is specified explicitly, `md_dt` is reset to `td_dt * estep_per_md`.
- **Default**: md_dt / estep_per_md
- **Unit**: fs

### td_print_eij

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft*
- **Description**: Controls output of the propagated-state Hamiltonian matrix elements $E_{ij}=\Braket{\psi_i | \hat{H} | \psi_j}$ to the running log. The printed band indices $i$ and $j$ are global indices. Both the threshold and the printed matrix elements are in Ry.
  - $\lt 0$: Disable the output.
  - $\geqslant 0$: Print an element when either $\left|\operatorname{Re}E_{ij}\right|$ or $\left|\operatorname{Im}E_{ij}\right|$ is greater than or equal to `td_print_eij`.
- **Default**: -1
- **Unit**: Ry

### td_propagator

- **Type**: Integer
- **Allowed values**: 0, 1, 2, 3

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw | [`td_propagator`](#td_propagator) in [0, 2] |
| [`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==lcao and [`device`](#device)==gpu | [`td_propagator`](#td_propagator)==0 |

- **Availability**: *[`esolver_type`](#esolver_type)==tddft*
- **Description**: Method used to propagate the electronic states. The formulas below use Hartree atomic units, with $\Delta t$ denoting the electronic propagation time step and $S$ the LCAO overlap matrix. The Hamiltonian $H$ and overlap matrix $S$ are evaluated as required by each approximation.

  For a plane-wave (PW) basis:

  - `0`: Crank-Nicolson, $\left[I+\mathrm{i}H\Delta t/2\right]\psi(t+\Delta t)=\left[I-\mathrm{i}H\Delta t/2\right]\psi(t)$. The linear system uses the same midpoint Hamiltonian on both sides.
  - `2`: Enforced time-reversal symmetry (ETRS), $U(t+\Delta t,t)=\exp\left[-\mathrm{i}H(t+\Delta t)\Delta t/2\right]\exp\left[-\mathrm{i}H(t)\Delta t/2\right]$. Select the exponential algorithm with `td_exp_method`.

  For a nonorthogonal LCAO basis:

  - `0`: Crank-Nicolson, $U=\left[S+\mathrm{i}H\Delta t/2\right]^{-1}\left[S-\mathrm{i}H\Delta t/2\right]$. The evolution matrix is constructed explicitly and applied to the wavefunctions.
  - `1`: Fourth-order Taylor approximation to the exponential. With $\mathcal{A}=-\mathrm{i}S^{-1}H\Delta t$, $U=I+\mathcal{A}+\mathcal{A}^2/2+\mathcal{A}^3/6+\mathcal{A}^4/24$.
  - `2`: Enforced time-reversal symmetry (ETRS), $U(t+\Delta t,t)=\exp\left[-\mathrm{i}S^{-1}H(t+\Delta t)\Delta t/2\right]\exp\left[-\mathrm{i}S^{-1}H(t)\Delta t/2\right]$. Each exponential uses the fourth-order Taylor approximation from method `1` with a half time step.
  - `3`: Crank-Nicolson, $\left[S+\mathrm{i}H\Delta t/2\right]\psi(t+\Delta t)=\left[S-\mathrm{i}H\Delta t/2\right]\psi(t)$. The linear system is solved directly.

  > Note: PW supports methods `0` and `2` on CPU and GPU. LCAO supports methods `0` through `3` on CPU and only method `0` on GPU.
- **Default**: 0

### td_vext

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false*
- **Description**: Controls the analytic time-dependent electric field or periodic dipole sources. With `init_vecpot=True`, the external field is supplied through the vector-potential file, independently of `td_vext`.
  - `True`: Enable the analytic electric field or dipole sources.
  - `False`: Disable the analytic electric field or dipole sources.
- **Default**: False

### td_vext_dire

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false*
- **Description**: Specifies the Cartesian electric-field direction for `td_stype=0`, `1`, or `2`, and the source dipole-moment direction for `td_stype=3`, when `td_vext` is enabled. Supply one direction per `td_ttype` entry, in input order. Repeated directions are allowed, and source contributions are added. For example, `td_vext_dire 1 2` assigns the first electric field or dipole moment to Cartesian x and the second to Cartesian y.
  - `1`: Cartesian x.
  - `2`: Cartesian y.
  - `3`: Cartesian z.
- **Default**: 1

### td_stype

- **Type**: Integer
- **Allowed values**: 0, 1, 2, 3

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw | [`td_stype`](#td_stype) in [0, 1, 3] |

- **Availability**: *[`esolver_type`](#esolver_type)==tddft*
- **Description**: Spatial coupling of the external field, including the gauge used with a vector-potential file.
  - `0`: Length gauge, available for PW and LCAO.
  - `1`: Velocity gauge, available for PW and LCAO.
  - `2`: Hybrid gauge, available only for LCAO. See J. Chem. Theory Comput. 2025, 21, 3335-3341 for more information.
  - `3`: Three-dimensionally periodic Gaussian dipoles, available for PW and LCAO. Supply one Cartesian position triplet and one width per `td_ttype` entry. `td_dipole_moment` supplies the signed moment in e*Bohr for each component along `td_vext_dire`.
- **Default**: 0

### td_dipole_position

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`td_stype`](#td_stype)==3*
- **Description**: One Cartesian x y z position triplet in Bohr per entry in the full `td_ttype` list, in input order. Translating a source by a lattice vector gives the same potential.
- **Default**: empty
- **Unit**: Bohr

### td_dipole_width

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`td_stype`](#td_stype)==3*
- **Description**: One finite, strictly positive Gaussian standard deviation in Bohr per entry in the full `td_ttype` list, in input order.
- **Default**: empty
- **Unit**: Bohr

### td_efield_amp

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_stype`](#td_stype) in [0, 1, 2]*
- **Description**: For analytic fields (`init_vecpot=false`), supply one signed electric-field coefficient per entry in the full `td_ttype` list, in input order. If omitted, every component uses `0.25` V/Angstrom.
- **Default**: 0.25
- **Unit**: V/Angstrom

### td_dipole_moment

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`td_stype`](#td_stype)==3*
- **Description**: For `td_stype=3`, supply one signed source dipole-moment coefficient per entry in the full `td_ttype` list, in input order. Multiply this coefficient by the dimensionless time waveform to obtain the instantaneous moment.
- **Default**: empty
- **Unit**: e*Bohr

### td_ttype

- **Type**: Vector of Integer
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false*
- **Description**: Select one time waveform per component, in the same order as `td_vext_dire`. Waveform-specific parameters follow the occurrence order of that waveform type. For example, `td_ttype 0 4 0` uses three amplitude coefficients, two Gaussian frequencies, and one supersine frequency.

  For component $s$, let $w_s(t)$ be its dimensionless waveform. For `td_stype=0`, `1`, or `2`, the electric field is $E_s(t)=E_{s,0}w_s(t)$, where `td_efield_amp` supplies $E_{s,0}$ in V/Angstrom. For `td_stype=3`, the source dipole moment is $p_s(t)=p_{s,0}w_s(t)$, where `td_dipole_moment` supplies $p_{s,0}$ in e*Bohr along `td_vext_dire`.

  The formulas below omit the component index $s$. An ordinary frequency $f$ gives $\omega=2\pi f$; $\Delta t$ is the electronic time step, and a step index $n$ gives the time $n\Delta t$.

  - `0`: Gaussian. $w(t)=\cos[\omega(t-t_0)+\varphi]\exp[-(t-t_0)^2/(2\sigma^2)]$, with $t_0=\mathtt{td\_gauss\_t0}\Delta t$.
  - `1`: Trapezoid. $w(t)=g(t)\cos(\omega t+\varphi)$, with $t_1,t_2,t_3$ given by `td_trape_t1`, `td_trape_t2`, `td_trape_t3` times $\Delta t$. The envelope is $t/t_1$ for $0\leqslant t\lt t_1$, one for $t_1\leqslant t\lt t_2$, $(t_3-t)/(t_3-t_2)$ for $t_2\leqslant t\lt t_3$, and zero otherwise.
  - `2`: Trigonometric. $w(t)=\cos(\omega_1t+\varphi_1)\sin^2(\omega_2t+\varphi_2)$.
  - `3`: Heaviside. At electronic step $n$, $w=1$ for $n\lt \mathtt{td\_heavi\_t0}$ and $w=0$ otherwise.
  - `4`: Supersine. The pulse boundaries are $t_{\mathrm{s}}=\mathtt{td\_supsine\_tstart}\Delta t$ and $t_{\mathrm{e}}=\mathtt{td\_supsine\_tend}\Delta t$; `default` inherits `td_tstart` and `td_tend`, respectively. Define $u=(t-t_{\mathrm{s}})/(t_{\mathrm{e}}-t_{\mathrm{s}})$ and $\theta=\omega[t-(t_{\mathrm{s}}+t_{\mathrm{e}})/2]+\varphi$. Inside the pulse, $g(t)=[\sin(\pi u)]^{(\pi/\sigma)|u-1/2|}$ and $w(t)=g(t)\cos\theta+\dot g(t)\sin\theta/\omega$, where $\dot g$ is the time derivative of $g$. The waveform is zero at both boundaries and outside the pulse.

  For an electric field with supersine shape, the analytic vector potential along the selected direction is $A(t)=-E_0g(t)\sin\theta/\omega$ in Hartree atomic units, with $E=-\partial A/\partial t$.
- **Default**: 0

### td_tstart

- **Type**: Integer
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false*
- **Description**: First active electronic-step index of the analytic electric-field or dipole-source waveforms. Index $n$ corresponds to time $n\Delta t$, where $\Delta t=\mathtt{td\_dt}$. The interval from `td_tstart` through `td_tend` includes both endpoints. In velocity and hybrid gauges, each active index $n$ selects the integration interval $[n\Delta t,(n+1)\Delta t]$; its result is used at the next endpoint. Applies when `init_vecpot=False`.
- **Default**: 1

### td_tend

- **Type**: Integer
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false*
- **Description**: Last active electronic-step index of the analytic electric-field or dipole-source waveforms, using the time convention defined by `td_tstart`. The interval includes both endpoints. In velocity and hybrid gauges, the last selected integration interval is $[\mathtt{td\_tend}\Delta t,(\mathtt{td\_tend}+1)\Delta t]$. Applies when `init_vecpot=False`.
- **Default**: 1000

### td_lcut1

- **Type**: Real
- **Description**: Lower fractional-coordinate cutoff for the spatial modulation used in the length gauge. The default pair `td_lcut1=0.0`, `td_lcut2=1.0` gives a linear potential throughout the cell, with a jump at the periodic boundary. Let $c_1=\mathtt{td\_lcut1}$, $c_2=\mathtt{td\_lcut2}$, $D=c_2-c_1$, and $G=c_1+1-c_2$. For $G\gt 0$, the field factor is $\eta(x)=1$ when $c_1\leqslant x\lt c_2$ and $\eta(x)=-D/G$ elsewhere.
- **Default**: 0.0

### td_lcut2

- **Type**: Real
- **Description**: Upper fractional-coordinate cutoff for the spatial modulation used in the length gauge. See `td_lcut1` for the field profile.
- **Default**: 1.0

### td_gauss_freq

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 0*
- **Description**: Ordinary frequency $f$ in the Gaussian-pulse formula, with $\omega=2\pi f$. Supply exactly one value for each `td_ttype 0` occurrence, in occurrence order.
- **Default**: 22.13
- **Unit**: 1/fs

### td_gauss_phase

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 0*
- **Description**: Carrier phase $\varphi$ in the Gaussian-pulse formula. Supply exactly one value for each `td_ttype 0` occurrence, in occurrence order.
- **Default**: 0.0
- **Unit**: rad

### td_gauss_sigma

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 0*
- **Description**: Nonzero standard deviation $\sigma$ of the Gaussian envelope. Supply exactly one value for each `td_ttype 0` occurrence, in occurrence order.
- **Default**: 30.0
- **Unit**: fs

### td_gauss_t0

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 0*
- **Description**: Electronic-step position of the Gaussian center, which defines $t_0=\mathtt{td\_gauss\_t0}\Delta t$. Supply exactly one value for each `td_ttype 0` occurrence, in occurrence order.
- **Default**: 100

### td_trape_freq

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 1*
- **Description**: Ordinary carrier frequency $f$ in the trapezoid-pulse formula, with $\omega=2\pi f$. Supply exactly one value for each `td_ttype 1` occurrence, in occurrence order.
- **Default**: 1.60
- **Unit**: 1/fs

### td_trape_phase

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 1*
- **Description**: Carrier phase $\varphi$ in the trapezoid-pulse formula. Supply exactly one value for each `td_ttype 1` occurrence, in occurrence order.
- **Default**: 0.0
- **Unit**: rad

### td_trape_t1

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 1*
- **Description**: Electronic step defining the end of the linear rise, $t_1=\mathtt{td\_trape\_t1}\Delta t$. The value must be a nonnegative integer; integer-valued real inputs such as `2.0` are accepted. Each field must satisfy $\mathtt{td\_trape\_t1}\leqslant\mathtt{td\_trape\_t2}\leqslant\mathtt{td\_trape\_t3}$. Supply exactly one value for each `td_ttype 1` occurrence, in occurrence order.
- **Default**: 1875

### td_trape_t2

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 1*
- **Description**: Electronic step defining the end of the plateau, $t_2=\mathtt{td\_trape\_t2}\Delta t$. The value must be a nonnegative integer; integer-valued real inputs such as `2.0` are accepted. Each field must satisfy $\mathtt{td\_trape\_t1}\leqslant\mathtt{td\_trape\_t2}\leqslant\mathtt{td\_trape\_t3}$. Supply exactly one value for each `td_ttype 1` occurrence, in occurrence order.
- **Default**: 5625

### td_trape_t3

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 1*
- **Description**: Electronic step defining the end of the linear fall, $t_3=\mathtt{td\_trape\_t3}\Delta t$. The value must be a nonnegative integer; integer-valued real inputs such as `2.0` are accepted. Each field must satisfy $\mathtt{td\_trape\_t1}\leqslant\mathtt{td\_trape\_t2}\leqslant\mathtt{td\_trape\_t3}$. Supply exactly one value for each `td_ttype 1` occurrence, in occurrence order.
- **Default**: 7500

### td_trigo_freq1

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 2*
- **Description**: First ordinary frequency $f_1$ in the trigonometric-pulse formula, with $\omega_1=2\pi f_1$. Supply exactly one value for each `td_ttype 2` occurrence, in occurrence order.
- **Default**: 1.164656
- **Unit**: 1/fs

### td_trigo_freq2

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 2*
- **Description**: Second ordinary frequency $f_2$ in the trigonometric-pulse formula, with $\omega_2=2\pi f_2$. Supply exactly one value for each `td_ttype 2` occurrence, in occurrence order.
- **Default**: 0.029116
- **Unit**: 1/fs

### td_trigo_phase1

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 2*
- **Description**: Carrier phase $\varphi_1$ in the cosine factor of the trigonometric-pulse formula. Supply exactly one value for each `td_ttype 2` occurrence, in occurrence order.
- **Default**: 0.0
- **Unit**: rad

### td_trigo_phase2

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 2*
- **Description**: Envelope phase $\varphi_2$ in the sine-squared factor of the trigonometric-pulse formula. Supply exactly one value for each `td_ttype 2` occurrence, in occurrence order.
- **Default**: 0.0
- **Unit**: rad

### td_heavi_t0

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 3*
- **Description**: Electronic switch step $n_0$ in the Heaviside-pulse definition. The dimensionless waveform is $w=1$ for $n\lt n_0$ and $w=0$ for $n\geqslant n_0$. The active interval is bounded by `td_tstart` and `td_tend`. Supply exactly one value for each `td_ttype 3` occurrence, in occurrence order.
- **Default**: 100

### td_supsine_freq

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 4*
- **Description**: Nonzero ordinary carrier frequency $f$ of each supersine pulse, with $\omega=2\pi f$. Supply exactly one value for each `td_ttype 4` occurrence, in occurrence order.
- **Default**: 0.18737028625
- **Unit**: 1/fs

### td_supsine_phase

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 4*
- **Description**: Waveform carrier phase $\varphi$ at the center of each supersine envelope. A value of `0` places a cosine carrier maximum at the envelope center. Supply exactly one value for each `td_ttype 4` occurrence, in occurrence order.
- **Default**: 0.0
- **Unit**: rad

### td_supsine_sigma

- **Type**: Vector of Real
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 4*
- **Description**: Dimensionless shape parameter $\sigma$ of each supersine envelope. It must satisfy $0\lt\sigma\lt\pi/2$ so that the waveform approaches zero at the pulse boundaries. Supply exactly one value for each `td_ttype 4` occurrence, in occurrence order.
- **Default**: 0.75

### td_supsine_tstart

- **Type**: Vector of String
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 4*
- **Description**: Integer electronic step at the left, exactly zero boundary of each supersine pulse, defining $t_{\mathrm{s}}=\mathtt{td\_supsine\_tstart}\Delta t$. Supply exactly one integer or `default` token for each `td_ttype 4` occurrence, in occurrence order; each `default` token inherits `td_tstart`. The complete pulse support must lie inside the inclusive global `td_tstart` to `td_tend` interval.
- **Default**: default

### td_supsine_tend

- **Type**: Vector of String
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`init_vecpot`](#init_vecpot)==false and [`td_ttype`](#td_ttype) contains 4*
- **Description**: Integer electronic step at the right, exactly zero boundary of each supersine pulse, defining $t_{\mathrm{e}}=\mathtt{td\_supsine\_tend}\Delta t$. Supply exactly one integer or `default` token for each `td_ttype 4` occurrence, in occurrence order; each `default` token inherits `td_tend`. The complete pulse support must lie inside the inclusive global `td_tstart` to `td_tend` interval.
- **Default**: default

### init_vecpot

- **Type**: Boolean

**Requirements**

| Option | Requirements |
| --- | --- |
| `true` | [`esolver_type`](#esolver_type)==tddft and [`td_stype`](#td_stype) in [1, 2] |

- **Availability**: *[`esolver_type`](#esolver_type)==tddft*
- **Description**: Selects the source of the vector potential $\boldsymbol{A}$. The input file `vector_pot.txt` is read from the calculation working directory. Each non-comment line contains four columns: an integer label followed by $A_x$, $A_y$, and $A_z$ in Hartree atomic units. Rows are read in order; labels are not used for lookup. The first row corresponds to time zero, and subsequent rows are separated by `td_dt`. After the last row, $\boldsymbol{A}$ remains constant.

  The file takes precedence over analytic waveforms, independently of `td_vext`, `td_tstart`, and `td_tend`.

  - `True`: Read the vector potential from file.
  - `False`: Obtain the vector potential from the configured analytic electric field.
- **Default**: False

### ocp

- **Type**: Boolean
- **Description**: Controls fixed band occupations. In PW RT-TDDFT and calculations other than LCAO RT-TDDFT, fixed values from `ocp_set` are applied during electronic-state setup. PW real-time propagation preserves these initial occupations. In LCAO RT-TDDFT, the initial ground-state SCF determines occupations normally, and fixed values are applied during the subsequent real-time propagation steps.
  - `True`: Use the fixed occupations specified by `ocp_set` at the stage described above.
  - `False`: Determine occupations normally; real-time propagation preserves the initial SCF occupations.
- **Default**: False

### ocp_set

- **Type**: String
- **Availability**: *[`ocp`](#ocp)==true*
- **Description**: Fixed occupation weights used when `ocp` is `true`. Values are assigned in band order for each k-point, following k-point order. In PW RT-TDDFT and other calculations outside LCAO RT-TDDFT, this array is applied during electronic-state setup. PW propagation preserves these occupations. In LCAO RT-TDDFT, the initial ground-state SCF uses its normally determined occupations, and this array is applied only during subsequent real-time propagation steps. The repetition syntax `N*x` expands to `N` copies of `x`.
  - Example: `1 10*1 0 1` expands to 13 values, with the 12th value equal to `0` and all other values equal to `1`.
  - After expansion, provide one block of `nbands` values for each k-point. If `nspin` is `2`, provide all k-point blocks for spin up followed by all k-point blocks for spin down; otherwise, provide one block per k-point.
  - The sum of all weights must equal `nelec`; otherwise the calculation terminates with an error.
- **Default**: None

### out_freq_td

- **Type**: Integer
- **Availability**: *[`esolver_type`](#esolver_type)==tddft*
- **Description**: Deprecated alias for out_freq_ion in RT-TDDFT calculations. It counted completed electronic evolution steps and is now mapped to out_freq_ion when out_freq_ion is not set explicitly. If both parameters are present, out_freq_ion takes precedence.

  > Note: This parameter is ignored outside RT-TDDFT mode (`esolver_type = tddft`).
- **Default**: 0

### out_dipole

- **Type**: Boolean
- **Description**: Output the electronic dipole moment to `OUT.{suffix}/dipole_s[spin].txt`. In Hartree atomic units,

  $$\boldsymbol{P}(t)=-\int_{\Omega}\boldsymbol{r}\,\rho(\boldsymbol{r},t)\,\mathrm{d}^3r,$$

  where the integral is over the simulation cell and $\rho$ is the electron number density. For `nspin=2`, the two spin channels are written separately; for `nspin=1` or `4`, a single file contains the dipole of the total electron density.

  Each row contains the step index followed by $P_x$, $P_y$, and $P_z$. The running log additionally reports the ionic and combined dipoles.

  In RT-TDDFT, this is a time series: one record is appended per completed electronic step to a fixed filename (`OUT.{suffix}/dipole_s[spin].txt`, or `OUT.{suffix}/DIP/` when `out_app_flag=2`), independently of `out_freq_ion` and without a `g[step]` suffix. In other calculations the dipole follows `out_freq_ion` and `out_app_flag`: `0` overwrites the fixed filename, `1` appends one record per written step, and `2` writes `dipole_s[spin]g[step].txt`.

  - `True`: Enable dipole output.
  - `False`: Disable dipole output.
- **Default**: False

### out_current

- **Type**: Integer
- **Allowed values**: 0, 1, 2

**Requirements**

| Option / condition | Requirements |
| --- | --- |
| [`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw | [`out_current`](#out_current) in [0, 1] |

- **Availability**: *[`esolver_type`](#esolver_type)==tddft*
- **Description**: Output the RT-TDDFT charge current density. In Hartree atomic units,

  $$\boldsymbol{J}(t)=-\frac{1}{\Omega}\sum_{n\boldsymbol{k}}f_{n\boldsymbol{k}}\operatorname{Re}\Braket{\psi_{n\boldsymbol{k}}(t)|\hat{\boldsymbol{v}}(t)|\psi_{n\boldsymbol{k}}(t)},$$

  where $\Omega$ is the cell volume, $f_{n\boldsymbol{k}}$ includes occupations and k-point weights, and $\hat{\boldsymbol{v}}$ is the velocity operator.

  - `0`: Disable current output.
  - `1`: Available for PW and LCAO. Evaluate the transport velocity from momentum and the nonlocal pseudopotential position commutator, including coupling to the vector potential in the velocity gauge. Other nonlocal terms, such as exact exchange, are not included. Write the total current to `OUT.{suffix}/current_tot.txt`.
  - `2`: Available only for LCAO. Construct the velocity matrix from the full Hamiltonian in the nonorthogonal atomic-orbital basis: $\widetilde{v}_{\alpha}=\partial_{k_{\alpha}}H+\mathrm{i}HS^{-1}\mathcal{R}_{\alpha}-\mathrm{i}\mathcal{R}_{\alpha}S^{-1}H-HS^{-1}\partial_{k_{\alpha}}S$, where $H$, $S$, and $\mathcal{R}_{\alpha}$ are the Hamiltonian, overlap, and position matrices in k space. This automatically includes nonlocal contributions present in the Hamiltonian, including exact exchange. Write the total current to `OUT.{suffix}/current_tot_comm.txt`.

  Each row contains the step index followed by $J_x$, $J_y$, and $J_z$. These files are RT-TDDFT time series: one record is appended per completed electronic step to a fixed filename in `OUT.{suffix}/`.
- **Default**: 0

### out_current_k

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`out_current`](#out_current)>0*
- **Description**: Controls whether RT-TDDFT current density is also resolved by spin and k-point. PW supports `out_current=1`; LCAO supports `out_current=1` or `2`. The total-current file is always written when current output is enabled.
  - `True`: In addition to the total, `out_current=1` writes `OUT.{suffix}/current_s[spin]k[kpoint].txt`; `out_current=2` writes `OUT.{suffix}/current_s[spin]k[kpoint]_comm.txt`. These weighted contributions sum to the total current.
  - `False`: Output only `current_tot.txt` for `out_current=1` or `current_tot_comm.txt` for `out_current=2`.

  These per-spin/k-point files are part of the same RT-TDDFT time series: fixed names, one record appended per completed electronic step.
- **Default**: False

### out_efield

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==tddft*
- **Description**: Controls time-dependent electric-field output in `OUT.{suffix}/`. `efield_total.txt` contains time in fs followed by the total-field components $E_x$, $E_y$, and $E_z$ in V/Angstrom. Each uniform analytic field is additionally written to `efield_[index].txt`, containing time in fs and the field value in V/Angstrom. The index follows the occurrence order in `td_ttype` and `td_vext_dire`; fields assigned to the same direction remain in separate files. For `td_stype=3`, the signed external source moments are written to `dfield_[index].txt` in e*Bohr and contribute zero to the macroscopic field. Samples include zeros outside the analytic time window. Fresh calculations overwrite the output; runs with `md_restart=True` append to it. These files are time series with fixed names; one record is appended per completed electronic step.
  - `True`: Output electric-field values.
  - `False`: Do not output electric-field values.
- **Default**: False

### out_vecpot

- **Type**: Boolean

**Requirements**

| Option | Requirements |
| --- | --- |
| `true` | [`esolver_type`](#esolver_type)==tddft and [`td_stype`](#td_stype) in [1, 2] |

- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`td_stype`](#td_stype) in [1, 2]*
- **Description**: Controls vector-potential output to `OUT.{suffix}/vector_pot.txt`. Each row contains the step index followed by $A_x$, $A_y$, and $A_z$ in Hartree atomic units. The file can be used as input for `init_vecpot` with the same `td_dt`. Fresh calculations overwrite the output; runs with `md_restart=True` append to it. This file is a time series with a fixed name; one record is appended per completed electronic step.
  - `True`: Output the vector potential.
  - `False`: Do not output the vector potential.
- **Default**: False

[back to top](#full-list-of-input-keywords)

## Real-Time TDDFT (LCAO)

### td_edm

- **Type**: Integer
- **Allowed values**: 0, 1
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==lcao*
- **Description**: Method used to calculate the energy-density matrix for the overlap contribution to forces in LCAO RT-TDDFT.
  - `0`: Use $\mathrm{EDM}_{\boldsymbol{k}}=\frac{1}{2}\left(S_{\boldsymbol{k}}^{-1}H_{\boldsymbol{k}}\rho_{\boldsymbol{k}}+\rho_{\boldsymbol{k}}H_{\boldsymbol{k}}S_{\boldsymbol{k}}^{-1}\right)$.
  - `1`: Use the ground-state eigenvalue-weighted expression $\mathrm{EDM}_{\mu\nu,\boldsymbol{k}}=\sum_i w_{i\boldsymbol{k}}\epsilon_{i\boldsymbol{k}}C_{\mu i,\boldsymbol{k}}C_{\nu i,\boldsymbol{k}}^*$. This expression is deprecated for RT-TDDFT and is generally not valid when the propagated wave functions are not Hamiltonian eigenstates.
- **Default**: 0

[back to top](#full-list-of-input-keywords)

## Real-Time TDDFT (PW)

### td_orthonormal

- **Type**: String
- **Allowed values**: cholesky, lowdin, newton_schulz, none
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw*
- **Description**: Orthonormalize each propagated wavefunction before constructing its density. With the wavefunctions as columns of $\boldsymbol{\Psi}$, define the Gram matrix $\boldsymbol{S}=\boldsymbol{\Psi}^{\dagger}\boldsymbol{\Psi}$ and apply $\boldsymbol{\Psi}\leftarrow\boldsymbol{\Psi}\boldsymbol{C}$.
  - `cholesky`: Cholesky orthonormalization. Factor $\boldsymbol{S}=\boldsymbol{R}^{\dagger}\boldsymbol{R}$ with upper-triangular $\boldsymbol{R}$ and use $\boldsymbol{C}=\boldsymbol{R}^{-1}$.
  - `lowdin`: Löwdin symmetric orthonormalization. Compute $\boldsymbol{C}=\boldsymbol{S}^{-1/2}$ by eigendecomposition.
  - `newton_schulz`: Newton-Schulz iteration for a Gram matrix close to the identity. Starting from $\boldsymbol{C}_0=\boldsymbol{I}$, approximate $\boldsymbol{S}^{-1/2}$ using $\boldsymbol{C}_{j+1}=\boldsymbol{C}_j(3\boldsymbol{I}-\boldsymbol{S}\boldsymbol{C}_j^2)/2$.
  - `none`: Disable orthonormalization.

  > Note: Orthonormalization is applied after each wavefunction propagation. With orthonormalization enabled, the propagated Gram matrix must differ from the identity by at most `1e-6` (single precision) or `1e-12` (double precision) per element; unsuccessful corrections stop the calculation. Wavefunctions within this tolerance are left unchanged. Nonfinite or nonpositive orbital norms are rejected even with `none`.
- **Default**: cholesky

### td_out_stat

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw*
- **Description**: Write wavefunction and density electron counts, their changes from the initial state, and orthogonality errors before and after correction to the running log after each electronic evolution step. Orthogonality errors are omitted when `td_orthonormal=none`.

  The file `OUT.{suffix}/td_energy.txt` records the electronic step, time in fs, and the following energies in Rydberg:

  - `potential`: Energy supplied to MD before adding ionic kinetic energy, $E_{\mathrm{potential}}=F-E_{\mathrm{e,field}}-E_{\mathrm{ion,field}}+E_{\mathrm{vel}}$.
  - `total`: Total energy excluding scalar external-field coupling, $E_{\mathrm{total}}=E_{\mathrm{potential}}+K_{\mathrm{ion}}$.
  - `total_field`: Total energy including scalar external-field coupling, $E_{\mathrm{total,field}}=E_{\mathrm{total}}+E_{\mathrm{e,field}}+E_{\mathrm{ion,field}}$.
  - `ionic_kinetic`: Ionic kinetic energy, $K_{\mathrm{ion}}=\frac12\sum_I M_I|\boldsymbol{v}_I|^2$.
  - `velocity_corr`: Energy correction from traveling pseudopotentials, $E_{\mathrm{vel}}=-\sum_I\boldsymbol{v}_I\cdot\boldsymbol{\Pi}_I$.
  - `smearing`: Signed smearing contribution, $E_{\mathrm{sm}}$, already included in `potential`, `total`, and `total_field`.
  - `electronic_field`: Electronic scalar-field energy, $E_{\mathrm{e,field}}=\int_\Omega\rho(\boldsymbol{r},t)V_{\mathrm{ext}}(\boldsymbol{r},t)\,\mathrm{d}\boldsymbol{r}$.
  - `ionic_field`: Ionic scalar-field energy, $E_{\mathrm{ion,field}}=-\sum_I Z_I V_{\mathrm{ext}}(\boldsymbol{R}_I,t)$.

  The energies use the generalized Kohn-Sham free-energy functional $F$, including electronic and ionic scalar-field coupling and the smearing contribution. Here $M_I$ and $\boldsymbol{v}_I$ are the ionic mass and velocity, and $\boldsymbol{\Pi}_I=\partial F/\partial\boldsymbol{v}_I$. With `td_nl_motion=false`, `velocity_corr` is zero.

  For Fermi-Dirac smearing, $E_{\mathrm{sm}}=-T_{\mathrm{e}}S$ is the electronic entropy term; other smearing methods use their corresponding generalized entropy contribution.

  Here $\rho$, $Z_I$, and $\boldsymbol{R}_I$ denote the electron number density, ionic valence charge, and ionic position. The electron's external scalar potential energy is $V_{\mathrm{ext}}(\boldsymbol{r},t)=e\boldsymbol{E}(t)\cdot\boldsymbol{r}$ for a uniform field in the length gauge, where $e$ is the positive elementary charge. In the velocity gauge, $V_{\mathrm{ext}}=0$.
- **Default**: false

### td_max_halvings

- **Type**: Integer
- **Legal range**: value>=0 and value<31
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw*
- **Description**: Maximum number of recursive halvings of an electronic propagation interval when self-consistency fails. Zero disables retries. The smallest internal time step is `td_dt / 2^td_max_halvings`.
- **Default**: 0

### td_out_mag

- **Type**: String
- **Allowed values**: voronoi, onsite, none
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`nspin`](#nspin)==4*
- **Description**: Write total and atomic magnetic moments to `mag_tot.txt` and `mag_atom.txt` at every step.
  - `voronoi`: Integrate magnetization over periodic nearest-atom regions, including vacuum.
  - `onsite`: Project onto the smoothed single-zeta numerical atomic orbitals. `onsite_radius` controls their cutoff.
  - `none`: Disable these two files.

  Total moments always come from the magnetization density. Atomic onsite moments need not sum to the total. Moments follow the ABACUS Pauli convention in Bohr magnetons.
- **Default**: voronoi

### td_out_torque

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`nspin`](#nspin)==4*
- **Description**: Write total exchange-correlation and SOC torques to `torque_tot.txt` and the atomic SOC contributions to `torque_atom.txt` at every step. In Hartree atomic units,

  $$\boldsymbol{\tau}_{\mathrm{xc}}=\mathrm{i}\sum_{n\boldsymbol{k}}f_{n\boldsymbol{k}}\Braket{\psi_{n\boldsymbol{k}}|\left[\hat{V}_{\mathrm{xc}},\hat{\boldsymbol{S}}\right]|\psi_{n\boldsymbol{k}}},$$

  $$\boldsymbol{\tau}_{\mathrm{SOC}}=\mathrm{i}\sum_{n\boldsymbol{k}}f_{n\boldsymbol{k}}\Braket{\psi_{n\boldsymbol{k}}|\left[\hat{V}_{\mathrm{SOC}},\hat{\boldsymbol{S}}\right]|\psi_{n\boldsymbol{k}}}.$$

  Here $\hat{\boldsymbol{S}}=\boldsymbol{\sigma}/2$, with $\boldsymbol{\sigma}$ the Pauli matrices, and $f_{n\boldsymbol{k}}$ includes occupations and k-point weights. $\hat{V}_{\mathrm{xc}}$ is the spin-dependent exchange-correlation potential, and $\hat{V}_{\mathrm{SOC}}$ is the SOC part of the nonlocal pseudopotential.

  The torques describe changes in spin angular momentum $\boldsymbol{S}=\boldsymbol{M}/2$, where $\boldsymbol{M}$ follows the ABACUS Pauli convention. Atomic SOC contributions use the corresponding atomic pseudopotential terms.
- **Default**: false

### td_out_spincur

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`nspin`](#nspin)==4*
- **Description**: Write the nine macroscopic spin angular momentum current components to `spincur_tot.txt` at every step. In Hartree atomic units,

  $$J_i^a=\frac{1}{2\Omega}\sum_{n\boldsymbol{k}}f_{n\boldsymbol{k}}\Braket{\psi_{n\boldsymbol{k}}|\left\{\hat{v}_i,\hat{S}_a\right\}|\psi_{n\boldsymbol{k}}},\qquad \hat{S}_a=\frac{\sigma_a}{2}.$$

  Here $\Omega$ is the cell volume, $f_{n\boldsymbol{k}}$ includes occupations and k-point weights, $\sigma_a$ is a Pauli matrix, and $\hat{v}_i$ is the velocity operator including the nonlocal pseudopotential contribution.

  Components are ordered $xx,xy,xz,yx,yy,yz,zx,zy,zz$, with flow direction first and spin polarization second.
- **Default**: false

### lin_solver

- **Type**: String
- **Allowed values**: bicgstab, cgs, gmres
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`td_propagator`](#td_propagator)==0*
- **Description**: Iterative linear solver used for PW real-time propagation.
  - `bicgstab`: Biconjugate gradient stabilized (BiCGSTAB) method.
  - `cgs`: Conjugate gradient squared (CGS) method.
  - `gmres`: Restarted generalized minimal residual (GMRES) method, controlled by `lin_gmres_restart`.

  The initial ground-state diagonalization is controlled by `ks_solver`.
- **Default**: gmres

### lin_precond

- **Type**: String
- **Allowed values**: kinetic, kinetic_recycle, kinetic_subspace, none
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`td_propagator`](#td_propagator)==0*
- **Description**: Right preconditioner used by PW real-time linear solvers. The Crank-Nicolson operator is $\boldsymbol{L}=\boldsymbol{I}+\mathrm{i}\Delta t\,\boldsymbol{H}/2$, with the propagation Hamiltonian $\boldsymbol{H}$ in Hartree and time step $\Delta t$ in atomic units. Below, $\boldsymbol{M}^{-1}$ denotes the inverse preconditioner and $\boldsymbol{D}$ the kinetic diagonal inverse.
  - `kinetic`: Apply $\boldsymbol{M}^{-1}=\boldsymbol{D}$, with diagonal entries $D_{\boldsymbol{G}\boldsymbol{G}}=(1+\mathrm{i}\Delta t\,T_{\boldsymbol{G}}/2)^{-1}$, where $T_{\boldsymbol{G}}=\lVert\boldsymbol{k}+\boldsymbol{G}+\boldsymbol{A}_{\mathrm{mid}}\rVert^2/2$ is the kinetic energy in Hartree. In the velocity gauge, $\boldsymbol{A}_{\mathrm{mid}}=(\boldsymbol{A}_n+\boldsymbol{A}_{n+1})/2$ is the propagation vector potential in Hartree atomic units; in the length gauge, set $\boldsymbol{A}_{\mathrm{mid}}=\boldsymbol{0}$.
  - `kinetic_recycle`: Apply $\boldsymbol{M}^{-1}=\boldsymbol{D}+(\boldsymbol{Z}_{\mathrm{hist}}-\boldsymbol{D}\boldsymbol{W}_{\mathrm{hist}})\boldsymbol{W}_{\mathrm{hist}}^{\dagger}$, where $\boldsymbol{Z}_{\mathrm{hist}}$ and $\boldsymbol{W}_{\mathrm{hist}}$ are paired response directions and approximate operator images from the preceding successful solve at the same k point, with $\boldsymbol{W}_{\mathrm{hist}}^{\dagger}\boldsymbol{W}_{\mathrm{hist}}\approx\boldsymbol{I}$. The images belong to the historical solve, not necessarily the current $\boldsymbol{L}$. Falls back to `kinetic` when no reliable history is available.
  - `kinetic_subspace`: Apply $\boldsymbol{M}^{-1}=\boldsymbol{D}+(\boldsymbol{U}-\boldsymbol{D}\boldsymbol{L}\boldsymbol{U})(\boldsymbol{U}^{\dagger}\boldsymbol{L}\boldsymbol{U})^{-1}\boldsymbol{U}^{\dagger}$, where the columns of $\boldsymbol{U}$ are the previous-time wavefunctions defining the coarse subspace.
  - `none`: Disable preconditioning.

  Preconditioning changes the convergence rate, while `lin_thr` still controls the residual of the original equation.
- **Default**: kinetic_recycle

### lin_thr

- **Type**: Real
- **Legal range**: value>=0
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`td_propagator`](#td_propagator)==0*
- **Description**: Nonnegative finite residual tolerance for each band in a PW real-time Crank-Nicolson solve $\boldsymbol{L}\boldsymbol{x}=\boldsymbol{b}$, with residual $\boldsymbol{r}=\boldsymbol{b}-\boldsymbol{L}\boldsymbol{x}$. A value of `0` selects $\tau=\max(10^{-10},100\epsilon)$, where $\epsilon$ is machine epsilon for the wavefunction precision. This gives a tolerance of approximately $1.19209\times10^{-5}$ in single precision and $10^{-10}$ in double precision. A positive value specifies $\tau$ directly.
  - `bicgstab` and `gmres`: Require $\lVert\boldsymbol{r}\rVert\leqslant\tau\max(1,\lVert\boldsymbol{b}\rVert)$.
  - `cgs`: Require $\lVert\boldsymbol{r}\rVert\leqslant\tau\lVert\boldsymbol{b}\rVert$ for nonzero $\boldsymbol{b}$, or $\lVert\boldsymbol{r}\rVert\leqslant\tau$ for zero $\boldsymbol{b}$.

  All methods check the residual at the end of the linear solve, before orthonormalization. GMRES can use explicit residual reconstruction with periodic independent checks when `lin_reconstruct` is enabled. Subsequent orthonormalization uses a separate orthogonality tolerance and does not guarantee that the corrected wavefunctions satisfy the same linear residual tolerance.
- **Default**: 0

### lin_maxiter

- **Type**: Integer
- **Legal range**: value>0
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`td_propagator`](#td_propagator)==0*
- **Description**: Positive maximum number of iterations for each PW real-time linear solve. Failure to converge stops the calculation. Initial-state self-consistency uses `scf_nmax`; real-time self-consistency uses `td_scf_nmax`.
- **Default**: 500

### lin_gmres_restart

- **Type**: Integer
- **Legal range**: value>0
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`td_propagator`](#td_propagator)==0 and [`lin_solver`](#lin_solver)==gmres*
- **Description**: Positive maximum Arnoldi dimension per GMRES cycle. `lin_maxiter` limits the total iterations across all cycles.
- **Default**: 20

### td_cn_init

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`td_propagator`](#td_propagator)==0*
- **Description**: Project the Crank-Nicolson equation $\boldsymbol{L}\boldsymbol{x}=\boldsymbol{b}$ onto the previous-time wavefunction subspace to initialize the first propagation solve of each time step. With those wavefunctions as the columns of $\boldsymbol{U}$, the projected initial guess is $\boldsymbol{x}_0=\boldsymbol{U}(\boldsymbol{U}^{\dagger}\boldsymbol{L}\boldsymbol{U})^{-1}\boldsymbol{U}^{\dagger}\boldsymbol{b}$. Evaluate and reuse the initial residual $\boldsymbol{r}_0=\boldsymbol{b}-\boldsymbol{L}\boldsymbol{x}_0$ using the stored subspace operator images $\boldsymbol{L}\boldsymbol{U}$, without an additional Hamiltonian application. Available with all linear solvers and preconditioners; later self-consistency iterations retain their current wavefunction guess.
- **Default**: true

### lin_reconstruct

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`td_propagator`](#td_propagator)==0 and [`lin_solver`](#lin_solver)==gmres*
- **Description**: Reconstruct the GMRES residual for $\boldsymbol{L}\boldsymbol{x}=\boldsymbol{b}$ as $\boldsymbol{r}=\boldsymbol{r}_0-(\boldsymbol{L}\boldsymbol{Z})\boldsymbol{y}$ for the update $\boldsymbol{x}=\boldsymbol{x}_0+\boldsymbol{Z}\boldsymbol{y}$, where $\boldsymbol{r}_0=\boldsymbol{b}-\boldsymbol{L}\boldsymbol{x}_0$ is the initial residual, $\boldsymbol{Z}$ contains the current preconditioned search directions, and $\boldsymbol{y}$ contains their update coefficients. Reusing the stored, unmodified operator images $\boldsymbol{L}\boldsymbol{Z}$ reduces Hamiltonian applications.

  Use an internal tolerance of 0.8 times the effective `lin_thr` and independently verify the first solve at each k point and every 16 solves thereafter, with additional independent checks when needed. Failed reconstruction checks trigger a true-residual restart within `lin_maxiter`.

  Only effective for `lin_solver=gmres`; ignored otherwise.
- **Default**: true

### td_exp_method

- **Type**: String
- **Allowed values**: lanczos, taylor
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`td_propagator`](#td_propagator)==2*
- **Description**: Algorithm used to evaluate $\exp(-\mathrm{i}\tau\boldsymbol{H})\boldsymbol{\psi}$ for Enforced time-reversal symmetry (ETRS) propagation with a plane-wave basis. The Hamiltonian $\boldsymbol{H}$ is held fixed over the evolution interval $\tau$. The formulas below use Hartree atomic units.
  - `lanczos`: Adaptive Lanczos approximation with automatic reorthogonalization when needed. The estimated error relative to the input wavefunction norm is controlled by `td_exp_thr`, and the maximum Krylov dimension by `td_exp_krylov_dim`. The half-step and full-step predictor share a Krylov basis. If the error target cannot be met within the maximum dimension, the frozen-Hamiltonian interval is subdivided internally.
  - `taylor`: Fixed-order Taylor approximation, $\exp(-\mathrm{i}\tau\boldsymbol{H})\boldsymbol{\psi}\approx\sum_{k=0}^{p}(-\mathrm{i}\tau\boldsymbol{H})^k\boldsymbol{\psi}/k!$, where the order $p$ is specified by `td_exp_order`.
- **Default**: lanczos

### td_exp_order

- **Type**: Integer
- **Legal range**: value>=2
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`td_propagator`](#td_propagator)==2 and [`td_exp_method`](#td_exp_method)==taylor*
- **Description**: Taylor polynomial order $p$ used by `td_exp_method=taylor`. Must be an integer of at least 2.
- **Default**: 4

### td_exp_thr

- **Type**: Real
- **Legal range**: value>=0
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`td_propagator`](#td_propagator)==2 and [`td_exp_method`](#td_exp_method)==lanczos*
- **Description**: Target for the estimated error in each Lanczos exponential calculation, relative to the input wavefunction norm. Must be nonnegative and finite. Zero selects $\max(10^{-10},100\epsilon)$, where $\epsilon$ is machine epsilon for the wavefunction precision, giving `1e-10` in double precision and approximately `1.19209e-5` in single precision. A positive value specifies the target directly.
- **Default**: 0

### td_exp_krylov_dim

- **Type**: Integer
- **Legal range**: value>=2
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`td_propagator`](#td_propagator)==2 and [`td_exp_method`](#td_exp_method)==lanczos*
- **Description**: Maximum number of Krylov basis vectors used in each Lanczos exponential calculation. Must be an integer of at least 2. Larger values increase wavefunction storage and orthogonalization work.
- **Default**: 32

### td_nl_motion

- **Type**: Boolean
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw*
- **Description**: Controls traveling pseudopotentials, which introduce nuclear velocity dependence into norm-conserving nonlocal pseudopotentials in PW RT-TDDFT.

  - `True`: Include the nuclear velocity phase in electronic propagation, the nuclear velocity derivative force and effective inertia in instantaneous ionic acceleration, and the corresponding material-energy correction.
  - `False`: Use position-dependent pseudopotentials without nuclear velocity dependence.

  This setting applies in both length and velocity gauges, as well as without an external field. In velocity gauge, `td_vg_nl` controls the electromagnetic coupling separately.

  See M. Stengel, M. Royo, and E. Artacho, Phys. Rev. Lett. 136, 196401 (2026), for more information.
- **Default**: True

### td_vg_nl

- **Type**: Integer
- **Allowed values**: 0, 1, 2
- **Availability**: *[`esolver_type`](#esolver_type)==tddft and [`basis_type`](#basis_type)==pw and [`td_stype`](#td_stype)==1*
- **Description**: Controls the vector-potential coupling of the nonlocal pseudopotential in PW RT-TDDFT, $\hat{V}_{\mathrm{NL}}^{\boldsymbol{A}}(t)=\mathrm{e}^{-\mathrm{i}\boldsymbol{A}(t)\cdot\boldsymbol{r}}\hat{V}_{\mathrm{NL}}\mathrm{e}^{\mathrm{i}\boldsymbol{A}(t)\cdot\boldsymbol{r}}$, which shifts the projector momentum argument by $\boldsymbol{A}(t)$.

  - `0`: Omit the shift in both the Hamiltonian and the ionic position force.
  - `1`: Include the shift in the Hamiltonian and omit it in the ionic position force.
  - `2`: Include the shift in both, giving the complete electromagnetic coupling.
- **Default**: 2

[back to top](#full-list-of-input-keywords)

## Variables useful for debugging

### nurse

- **Type**: Integer
- **Description**: Debugging flag for developers
- **Default**: 0

### t_in_h

- **Type**: Boolean
- **Description**: Specify whether to include kinetic term in obtaining the Hamiltonian matrix.
  - 0: No.
  - 1: Yes.
- **Default**: 1

### vl_in_h

- **Type**: Boolean
- **Description**: Specify whether to include local pseudopotential term in obtaining the Hamiltonian matrix.
  - 0: No.
  - 1: Yes.
- **Default**: 1

### vnl_in_h

- **Type**: Boolean
- **Description**: Specify whether to include non-local pseudopotential term in obtaining the Hamiltonian matrix.
  - 0: No.
  - 1: Yes.
- **Default**: 1

### vh_in_h

- **Type**: Boolean
- **Description**: Specify whether to include Hartree potential term in obtaining the Hamiltonian matrix.
  - 0: No.
  - 1: Yes.
- **Default**: 1

### vion_in_h

- **Type**: Boolean
- **Description**: Specify whether to include local ionic potential term in obtaining the Hamiltonian matrix.
  - 0: No.
  - 1: Yes.
- **Default**: 1

### test_force

- **Type**: Boolean
- **Description**: Specify whether to output the detailed components in forces.
  - 0: No.
  - 1: Yes.
- **Default**: 0

### test_stress

- **Type**: Boolean
- **Description**: Specify whether to output the detailed components in stress.
  - 0: No.
  - 1: Yes.
- **Default**: 0

### test_skip_ewald

- **Type**: Boolean
- **Description**: Specify whether to skip the calculation of the ewald energy.
  - 0: No.
  - 1: Yes.
- **Default**: 0

[back to top](#full-list-of-input-keywords)

## Electronic conductivities

### cal_cond

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==pw*
- **Description**: Whether to calculate electronic conductivities.
- **Default**: False

### cond_che_thr

- **Type**: Real
- **Availability**: *[`esolver_type`](#esolver_type)==sdft*
- **Description**: Control the error of Chebyshev expansions for conductivities.
- **Default**: 1e-8

### cond_dw

- **Type**: Real
- **Availability**: *[`basis_type`](#basis_type)==pw*
- **Description**: Frequency interval () for frequency-dependent conductivities.
- **Default**: 0.1
- **Unit**: eV

### cond_wcut

- **Type**: Real
- **Availability**: *[`basis_type`](#basis_type)==pw*
- **Description**: Cutoff frequency for frequency-dependent conductivities.
- **Default**: 10.0
- **Unit**: eV

### cond_dt

- **Type**: Real
- **Availability**: *[`basis_type`](#basis_type)==pw*
- **Description**: Time interval () to integrate Onsager coefficients.
- **Default**: 0.02
- **Unit**: a.u.

### cond_dtbatch

- **Type**: Integer
- **Availability**: *[`esolver_type`](#esolver_type)==sdft*
- **Description**: exp(iH\dt\cond_dtbatch) is expanded with Chebyshev expansion to calculate conductivities. It is faster but costs more memory.
  - If cond_dtbatch = 0: Autoset this parameter to make expansion orders larger than 100.
- **Default**: 0

### cond_smear

- **Type**: Integer
- **Description**: Smearing method for conductivities
  - 1: Gaussian smearing
  - 2: Lorentzian smearing
- **Default**: 1

### cond_fwhm

- **Type**: Real
- **Availability**: *[`basis_type`](#basis_type)==pw*
- **Description**: FWHM for conductivities. For Gaussian smearing, ; for Lorentzian smearing, .
- **Default**: 0.4
- **Unit**: eV

### cond_nonlocal

- **Type**: Boolean
- **Availability**: *[`basis_type`](#basis_type)==pw*
- **Description**: Whether to consider nonlocal potential correction when calculating velocity matrix .
  - True: .
  - False: .
- **Default**: True

[back to top](#full-list-of-input-keywords)

## Implicit solvation model

### imp_sol

- **Type**: Integer
- **Description**: Implicit solvation model:
  - 0: no implicit solvent.
  - 1: the original ABACUS implicit solvation model.
  - 2: the self-consistent continuum solvation model (SCCS). Supported scope: CPU KS-DFT (esolver_type ksdft, device cpu) with basis_type pw or lcao; calculation scf (energies and forces) or fixed-cell relax, no stress (cal_stress and cell-relax are rejected); nspin 1 or 2; assume_isolated none, pcc_0d or pcc_2d; no electric/gate field, DFT-1/2, DeePKS or dm_to_rho. Use assume_isolated pcc_0d or pcc_2d for charged systems: with assume_isolated none a charged cell only prints a warning and runs, and its energy then depends on the cell size because the periodic Poisson solver drops the G = 0 net charge. With pcc_0d or pcc_2d, see sccs_lowpass_p1 for the accuracy of forces.

  Legacy Boolean values (true/false) are read as 1/0.
- **Default**: 0

### eb_k

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==1*
- **Description**: The relative permittivity of the bulk solvent, 80 for water
- **Default**: 80

### tau

- **Type**: Real
- **Description**: The effective surface tension parameter that describes the cavitation, the dispersion, and the repulsion interaction between the solute and the solvent which are not captured by the electrostatic terms
- **Default**: 1.0798e-05

### sigma_k

- **Type**: Real
- **Description**: The width of the diffuse cavity that is implicitly determined by the electronic structure of the solute
- **Default**: 0.6

### nc_k

- **Type**: Real
- **Description**: The value of the electron density at which the dielectric cavity forms
- **Default**: 0.00037

### sccs_preset

- **Type**: String
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: SCCS parameter preset. Allowed values: custom, vacuum, water-neutral, water-cation, water-anion. Non-custom presets override sccs_epsilon, sccs_rho_min, sccs_rho_max, sccs_gamma and sccs_pressure; solver controls and surface regularization remain user-controlled.
- **Default**: custom

### sccs_epsilon

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Bulk dielectric constant &gt;= 1 for the custom preset. The default 1 (no dielectric) follows the Environ env_static_permittivity default for environ_type input. Water presets use 78.3 and vacuum uses 1.
- **Default**: 1.0

### sccs_rho_min

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Lower electronic-density cavity threshold for the custom preset. Water-neutral/vacuum: 1e-4; water-cation: 2e-4; water-anion: 2.4e-3.
- **Default**: 1e-4
- **Unit**: e/bohr^3

### sccs_rho_max

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Upper electronic-density cavity threshold for the custom preset. Water-neutral/vacuum: 5e-3; water-cation: 3.5e-3; water-anion: 1.55e-2.
- **Default**: 5e-3
- **Unit**: e/bohr^3

### sccs_gamma

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Surface coefficient for the custom preset. Water-neutral: 47.9; water-cation: 5; water-anion/vacuum: 0.
- **Default**: 0.0
- **Unit**: dyn/cm

### sccs_pressure

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Volume coefficient for the custom preset. Water-neutral: -0.36; water-cation: 0.125; water-anion: 0.45; vacuum: 0.
- **Default**: 0.0
- **Unit**: GPa

### sccs_maxiter

- **Type**: Integer
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Positive maximum number of SCCS sqrt-CG iterations. Failure to satisfy both residual tolerances terminates the calculation.
- **Default**: 200

### sccs_tol_rms

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Positive RMS charge-residual tolerance for the SCCS sqrt-CG solver.
- **Default**: 1e-10
- **Unit**: e/bohr^3

### sccs_tol_max

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Positive maximum charge-residual tolerance for the SCCS sqrt-CG solver.
- **Default**: 1e-8
- **Unit**: e/bohr^3

### sccs_surface_eta

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Positive regularization of the SCCS surface gradient norm.
- **Default**: 1e-8
- **Unit**: bohr^-1

### sccs_lowpass_p1

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Low-pass filter of the SCCS switching-function derivatives, as Environ deriv_lowpass_p1 with deriv_method fft. Only with assume_isolated pcc_0d or pcc_2d. The default -1 turns it off, which reproduces Environ deriv_method fft (continuum cavity potential) for the plain cavity; the solvent-aware cavity then differentiates the filling analytically on the FFT derivatives of the local cavity. With lowpass disabled (the default), analytical forces may differ from finite differences of the self-consistent energy. For geometry optimization with PCC, consider enabling lowpass and check force accuracy against finite differences. With lowpass disabled, the cavity potential uses the FFT gradient of the PCC-corrected potential, which oscillates around the potential step at the cell boundary half a cell from the system center; keep the dielectric transition region several bohr away from that boundary. Typical values are sccs_lowpass_p1 10 and sccs_lowpass_p2 5. The filter changes the model energy, so compare only results computed with the same values.
- **Default**: -1

### sccs_lowpass_p2

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Offset of the SCCS switching-function low-pass filter, as Environ deriv_lowpass_p2; see sccs_lowpass_p1. Both must be positive or both non-positive. Default -1 (off).
- **Default**: -1

### sccs_solvent_mode

- **Type**: String
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Allowed values: electronic (default) and full, as Environ solvent_mode. electronic builds the dielectric cavity from the valence electron density. full adds valence-charge Gaussians selected by sccs_corespread.
- **Default**: electronic

### sccs_corespread

- **Type**: Vector of Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Widths of the valence-charge Gaussians used only with sccs_solvent_mode full. One value applies to every atom except those whose known atomic number equals the pseudopotential valence charge (within 1e-8). More than one value requires exactly nat values in STRU atom order (grouped by atom type), and overrides this automatic exclusion. A value &lt;= 0 disables the cavity Gaussian on that atom. A per-atom list sets symmetry 1 to 0, because the symmetry analysis does not distinguish equivalent atoms by their widths.
- **Default**: 0.5
- **Unit**: bohr

### sccs_solvent_radius

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Solvent radius in bohr of the solvent-aware SCCS cavity, as Environ solvent_radius (Andreussi et al., J. Chem. Theory Comput. 15, 1996 (2019)). A positive value fills the parts of the cavity that a probe sphere of radius sccs_radial_scale * sccs_solvent_radius cannot reach, for example small voids between atoms. Unlike Environ, the probe sums all periodic images within its cutoff, so cells narrower than the probe are not truncated. With PCC, see also sccs_lowpass_p1. Non-negative; default 0 (off).
- **Default**: 0.0
- **Unit**: bohr

### sccs_radial_scale

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Probe radius of the solvent-aware SCCS cavity in units of sccs_solvent_radius, as Environ radial_scale; at least 1, default 2. Used only when sccs_solvent_radius is positive.
- **Default**: 2.0

### sccs_radial_spread

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: erfc spread of the solvent-aware probe sphere, as Environ radial_spread; positive, default 0.5 bohr. Used only when sccs_solvent_radius is positive.
- **Default**: 0.5
- **Unit**: bohr

### sccs_filling_thr

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Solute fraction of the solvent-aware probe sphere above which a point is filled, as Environ filling_threshold; between 0 and 1 (exclusive), default 0.825. Used only when sccs_solvent_radius is positive.
- **Default**: 0.825

### sccs_filling_spread

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Width of the erfc step of the solvent-aware filling in the probe solute fraction, as Environ filling_spread; positive, default 0.02. Used only when sccs_solvent_radius is positive. As in Environ, open solvent is filled by erfc(sccs_filling_thr / sccs_filling_spread) / 2, which lowers the bulk permittivity: below 1e-17 up to a spread of sccs_filling_thr / 6, but 1e-2 at 0.5.
- **Default**: 0.02

### sccs_start_drho

- **Type**: Real
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: Delays the start of SCCS until DRHO is at or below this value; until then the SCF runs without the solvent, while PCC, if set, stays on. 0 (default) starts SCCS immediately. A positive value must be larger than scf_thr, so that the SCF cannot converge before SCCS starts. When SCCS starts, the charge mixing restarts, that iteration does not count as converged, and the iteration is printed on the screen. SCCS then stays on for the rest of the run, including later ionic steps. Not set by sccs_preset.
- **Default**: 0.0

### sccs_start_nmax

- **Type**: Integer
- **Availability**: *[`imp_sol`](#imp_sol)==2*
- **Description**: With sccs_start_drho &gt; 0, starts SCCS at this electronic iteration at the latest, if DRHO has not yet reached sccs_start_drho. Must be positive, and smaller than scf_nmax when sccs_start_drho &gt; 0. Default 30. Not set by sccs_preset.
- **Default**: 30

### sccs_debug

- **Type**: Integer
- **Description**: Level of the SCCS reports, written to the running log (running_*.log in OUT.{suffix}): 0 (default) writes none; 1 writes the sqrt-CG iteration count and the correction energies of every SCF iteration; 2 also writes the residuals, warm start, cavity volume and surface (with the solvent-aware filled volume), the FFT counts of the Coulomb operator in the sqrt-CG solve and the count of reused fixed sources, and with PCC the Gauss-law check (far-field polarization charge and its expected value), the charge moments and the energy components.
- **Default**: 0

[back to top](#full-list-of-input-keywords)

## Quasiatomic Orbital (QO) analysis

### qo_switch

- **Type**: Boolean

**Requirements**

| Option | Requirements |
| --- | --- |
| `true` | [`out_wfc_lcao`](#out_wfc_lcao)==1 |

- **Description**: Whether to let ABACUS output QO analysis required files
- **Default**: False

### qo_basis

- **Type**: String
- **Description**: Type of QO basis function:
  - hydrogen: hydrogen-like basis
  - pswfc: read basis from pseudopotential
  - szv: single-zeta valence basis
- **Default**: szv

### qo_strategy

- **Type**: Vector of String (1 or n values where n is the number of atomic types)
- **Description**: Strategy to generate radial orbitals for QO analysis. For hydrogen: energy-valence, for pswfc and szv: all
- **Default**: for hydrogen: energy-valence, for pswfc and szv: all

### qo_screening_coeff

- **Type**: Vector of Real (n values where n is the number of atomic types; 1 value allowed for qo_basis=pswfc)
- **Description**: The screening coefficient for each atom type to rescale the shape of radial orbitals
- **Default**: 0.1
- **Unit**: Bohr^-1

### qo_thr

- **Type**: Real
- **Description**: The convergence threshold determining the cutoff of generated orbital. Lower threshold will yield orbital with larger cutoff radius.
- **Default**: 1.0e-6

[back to top](#full-list-of-input-keywords)

## PEXSI

### pexsi_npole

- **Type**: Integer
- **Description**: The number of poles used in the pole expansion method, should be a even number.
- **Default**: 40

### pexsi_inertia

- **Type**: Boolean
- **Description**: Whether inertia counting is used at the very beginning.
- **Default**: True

### pexsi_nmax

- **Type**: Integer
- **Description**: Maximum number of PEXSI iterations after each inertia counting procedure.
- **Default**: 80

### pexsi_comm

- **Type**: Boolean
- **Description**: Whether to construct PSelInv communication pattern.
- **Default**: True

### pexsi_storage

- **Type**: Boolean
- **Description**: Whether to use symmetric storage space used by the Selected Inversion algorithm for symmetric matrices.
- **Default**: True

### pexsi_ordering

- **Type**: Integer
- **Description**: Ordering strategy for factorization and selected inversion. 0: Parallel ordering using ParMETIS, 1: Sequential ordering using METIS, 2: Multiple minimum degree ordering
- **Default**: 0

### pexsi_row_ordering

- **Type**: Integer
- **Description**: Row permutation strategy for factorization and selected inversion, 0: No row permutation, 1: Make the diagonal entry of the matrix larger than the off-diagonal entries.
- **Default**: 1

### pexsi_nproc

- **Type**: Integer
- **Description**: Number of processors for PARMETIS. Only used if pexsi_ordering == 0.
- **Default**: 1

### pexsi_symm

- **Type**: Boolean
- **Description**: Whether the matrix is symmetric.
- **Default**: True

### pexsi_trans

- **Type**: Boolean
- **Description**: Whether to factorize the transpose of the matrix.
- **Default**: False

### pexsi_method

- **Type**: Integer
- **Description**: The pole expansion method to be used. 1 for Cauchy Contour Integral method, 2 for Moussa optimized method.
- **Default**: 1

### pexsi_nproc_pole

- **Type**: Integer
- **Description**: The point parallelizaion of PEXSI. Recommend two points parallelization.
- **Default**: 1

### pexsi_temp

- **Type**: Real
- **Description**: Temperature in Fermi-Dirac distribution, in Ry, should have the same effect as the smearing sigma when smearing method is set to Fermi-Dirac.
- **Default**: 0.015

### pexsi_gap

- **Type**: Real
- **Description**: Spectral gap, this can be set to be 0 in most cases.
- **Default**: 0

### pexsi_delta_e

- **Type**: Real
- **Description**: Upper bound for the spectral radius of S^{-1}H.
- **Default**: 20

### pexsi_mu_lower

- **Type**: Real
- **Description**: Initial guess of lower bound for mu.
- **Default**: -10

### pexsi_mu_upper

- **Type**: Real
- **Description**: Initial guess of upper bound for mu.
- **Default**: 10

### pexsi_mu

- **Type**: Real
- **Description**: Initial guess for mu (for the solver).
- **Default**: 0

### pexsi_mu_thr

- **Type**: Real
- **Description**: Stopping criterion in terms of the chemical potential for the inertia counting procedure.
- **Default**: 0.05

### pexsi_mu_expand

- **Type**: Real
- **Description**: If the chemical potential is not in the initial interval, the interval is expanded by this value.
- **Default**: 0.3

### pexsi_mu_guard

- **Type**: Real
- **Description**: Safe guard criterion in terms of the chemical potential to reinvoke the inertia counting procedure.
- **Default**: 0.2

### pexsi_elec_thr

- **Type**: Real
- **Description**: Stopping criterion of the PEXSI iteration in terms of the number of electrons compared to numElectronExact.
- **Default**: 0.001

### pexsi_zero_thr

- **Type**: Real
- **Description**: if the absolute value of CCS matrix element is less than this value, it will be considered as zero.
- **Default**: 1e-10

[back to top](#full-list-of-input-keywords)

## Linear Response TDDFT

### xc_kernel

- **Type**: String
- **Description**: The exchange-correlation kernel used in the calculation. Currently supported: RPA, LDA, PWLDA, PBE, and the hybrids HF, PBE0, HSE, B3LYP, CAM_PBEH, LC_PBE, LC_WPBE, LRC_WPBE, LRC_WPBEH. A hybrid kernel needs the ground state to use the same functional: the exact-exchange operator $[\alpha+\beta\,\mathrm{erfc}(\mu r)]/r$ is built from exx_fock_alpha ($\alpha$), exx_erfc_alpha ($\beta$) and exx_erfc_omega ($\mu$), which are keyed off dft_functional, not off this parameter.
- **Default**: LDA

### lr_init_xc_kernel

- **Type**: Vector of String (&gt;=1 values)
- **Description**: The method to initalize the xc kernel.
  - "default": Calculate xc kernel from the ground-state charge density.
  - "file": Read the xc kernel on grid from the provided files. The following words should be the paths of ".cube" files, where the first 1 (nspin==1) or 3 (nspin==2, namely spin-aa, spin-ab and spin-bb) will be read in. For `nspin=1, lr_target_spin=triplet`, provide three spin-resolved files (aa, ab, bb) as well. The parameter xc_kernel will be invalid. Now only LDA-type kernel is supported as the potential will be calculated by directly multiplying the transition density.
  > Note: The "file" and "from_charge_file" modes support spectra only. Excited-state forces and relaxation require the consistent ground-state density and its response; externally supplied kernels or frozen densities do not provide these derivatives.

  - "from_charge_file": Calculate fxc from the charge density read from the provided files. The following words should be the paths of ".cube" files, where the first nspin files will be read in.
- **Default**: "default"

### lr_solver

- **Type**: String
- **Description**: The method to solve the Casida equation in LR-TDDFT under Tamm-Dancoff approximation (TDA).
  - dav/dav_subspace/cg: Construct and diagonalize the Hamiltonian matrix iteratively with Davidson/Non-ortho-Davidson/CG algorithm.
  - lapack: Construct the full matrix and directly diagonalize with LAPACK.
  - spectrum: Calculate absorption spectrum only without solving Casida equation.
- **Default**: dav

### lr_thr

- **Type**: Real
- **Description**: The convergence threshold of iterative diagonalization solver for LR-TDDFT. It is a pure-math number with the same meaning as pw_diag_thr, but since the Casida equation is a one-shot eigenvalue problem, it is also the convergence threshold of LR-TDDFT.
- **Default**: 1e-2

### nocc

- **Type**: Integer
- **Description**: The number of occupied orbitals (up to HOMO) retained in the majority-spin LR-TDDFT window. A positive value selects a shared core prefix to discard from both spin channels; it does not change the ground-state occupations.
  - If omitted, non-positive, or larger than the occupied majority-spin channel, all occupied orbitals are used.
  - The full occupied window is determined by the effective electron number (including nelec_delta once) and the ground-state spin populations. For nspin=2, the minority-spin window has abs(N_up-N_down) fewer occupied orbitals.

  > Note: Retain all occupied orbitals for reliable excited-state forces and relaxation: response from omitted occupied orbitals is not restored. For real-Gamma calculations, the force includes the response of a truncated virtual window within the available KS bands, provided the retained/discarded virtual boundary is nondegenerate. This correction does not recover uncomputed KS bands (nbands &lt; NLOCAL) or converge the excitation model with respect to its orbital window. Check window convergence.
- **Default**: all occupied orbitals

### nvirt

- **Type**: Integer
- **Description**: The number of virtual orbitals (starting from LUMO) used in the LR-TDDFT calculation.

  > Note: For real-Gamma calculations with all occupied orbitals, analytic forces include the retained/discarded virtual-subspace response without changing the selected truncated excitation energy. The Z equation spans the available KS virtuals. The orbital-energy gap across the retained/discarded virtual boundary must be nonzero: a degenerate boundary is rejected; increase nvirt to include the complete multiplet. The correction does not recover omitted occupied orbitals or uncomputed KS bands. Use nbands = NLOCAL (the AO basis size) to make every AO-supported virtual available. Complex/multi-k force requests with a truncated virtual window are rejected; use the full available virtual window to avoid this restriction. Changing nvirt generally changes energies and forces, so convergence of the excitation window remains necessary, especially before optimization.
- **Default**: 1

### lr_nstates

- **Type**: Integer
- **Description**: The number of 2-particle states to be solved.
- **Default**: 0

### lr_target_state

- **Type**: Integer
- **Description**: Initial excited-state index for `calculation = relax`, counted from 0 within the spin channel selected by `lr_target_spin`.

  The gradient of the followed state (or its degenerate multiplet selected by `lr_degen_mode`) is computed, since solving the Z-vector equation dominates the cost of an excited-state gradient. It also selects the state whose excitation energy is added to the ground-state total energy, which is the quantity the energy-based relaxation algorithms (`cg`, `bfgs`, `lbfgs`) line-search on.

  Ignored outside `calculation = relax`: a single-point run solves and reports the gradients of every state.

  > Note: This index seeds the first ionic step. Subsequent steps compute cross-geometry AO overlaps and transform them with the saved and current KS orbitals to compare excitation amplitudes in a common occupied/virtual basis. Orbital sign changes and rotations within those subspaces do not change the overlap criterion. Index changes and low overlaps are reported. In JT mode the selected normalized multiplet mixture and its orbital basis become the reference. The projection is not renormalized, so window leakage remains visible. Tracking currently requires a fixed cell and unchanged orbital windows; degeneracy and a state leaving the solved window still limit state identification. Increase `lr_nstates` or reduce the ionic step when the overlap is low.
- **Default**: 0

### lr_degen_thr

- **Type**: Real
- **Description**: Excited states whose excitation energies lie within this threshold of each other are treated as one degenerate multiplet, and the full gradient matrix $G^{(A\alpha)}_{kl}=\langle X_k|\partial A/\partial R_{A\alpha}|X_l\rangle$ is computed for it in addition to the per-state gradients. Zero (the default) disables this and leaves the per-state gradients as the only output.

  At a $d$-fold degeneracy no single state has a gradient vector: the branch slopes along a displacement $u$ are the eigenvalues of $\sum_{A\alpha}u_{A\alpha}G^{(A\alpha)}$, and the eigenvectors that diagonalise it depend on $u$. The per-state gradients are the diagonal of $G$ in whichever basis the eigensolver happened to return, so only their sum (the trace) is basis-independent, while $G$ itself is the complete first-order information -- it is the linear vibronic coupling Hamiltonian of the multiplet. The extra cost is $d(d-1)/2$ further Z-vector solves per multiplet.

  The threshold proposes candidates; it cannot tell a true degeneracy from an accidental near-degeneracy, where the states have genuinely different excitation energies and the construction does not apply. Each multiplet's actual energy spread and the orthonormality of its eigenvectors are reported in the running log so the distinction can be made there.

  > Note: In `lr_degen_mode = jt`, all members of a threshold-defined group are approximated as sharing one energy: relaxation reports their mean excitation energy but uses the selected JT mixed-state force. At an exact degeneracy this force gives the first-order branch slope; no additional mixing-coefficient response is required. With a finite energy spread below this threshold, however, the mean energy and JT force are generally not derivatives of the same surface. Energy-based line searches can therefore be inconsistent within this grouping interval, even if the spread is small. The ordinary single-root energy and force resume when the tracked group becomes a singleton after threshold-based splitting. This threshold does not bound the resulting force error. Check the reported spreads against numerical accuracy and test sensitivity to the grouping threshold before relying on JT relaxation convergence.

  > Note: A sensible value is a few times the eigensolver threshold `lr_thr`, so that states split by real physics are not merged.
- **Default**: 0
- **Unit**: Ry

### lr_degen_mode

- **Type**: String
- **Description**: What `calculation = relax` follows when `lr_target_state` sits inside a degenerate multiplet, as identified by `lr_degen_thr`. It has no effect when the target state is non-degenerate.

  - state: follow the gradient of that one state, as returned by the eigensolver. This is the historical behaviour and is what reproduces earlier results, but inside a multiplet it is not a well-defined quantity: the per-state gradients are the diagonal of the subspace gradient matrix in whichever basis the eigensolver happened to return, so they depend on numerical details of the diagonalisation rather than on physics.
  - average: follow the multiplet average $\bar\Omega=\frac{1}{d}\sum_k\Omega_k$, whose gradient is $\operatorname{Tr}G/d$. For a fixed complete multiplet the average is basis-independent and its gradient respects the multiplet symmetry. Tracking allows groups to split or merge: split groups are not recombined to enforce symmetry, so changing group membership can change the average surface and lose geometric symmetry. Groups larger than three are tracked but use the selected single-state energy and force with a warning. Both the reported energy and the reported gradient switch to the average together, which the energy-based optimisers (`cg`, `bfgs`, `lbfgs`) require -- a gradient of one surface line-searched against the energy of another does not converge. This mode deliberately does NOT find the Jahn-Teller distortion, which is orthogonal to the totally symmetric average gradient.
  - jt: descend the Jahn-Teller branch for a two- or three-state multiplet; larger JT force groups are rejected before gradient construction. Solves $\min_{\|u\|=1}\lambda_{\min}(\sum_{A\alpha}u_{A\alpha}G^{(A\alpha)})$ -- a joint optimisation over the displacement and the mixing inside the multiplet, since the two are determined together -- and follows the force of the resulting branch. This needs the off-diagonal part of the gradient matrix, so it costs $d(d-1)/2$ further Z-vector solves per step on top of the $d$ diagonal ones. The running log reports the branch's force, its mixing coefficients, and its split into the part common to the multiplet and the part that actually breaks the degeneracy.

  > Note: Groups have no tracking dimension cap. `average` ranks groups by total cross-geometry subspace overlap; `jt` instead ranks by the projection weight of the previous actual JT mixture in each current group. The running log records both dimensions, coverage and singular values. Lost coverage is diagnosed and tracking continues; this does not guarantee a continuous energy surface. For `average`, ties use the previous selected-state projection weight; for `jt`, ties use total subspace overlap.

  > Note: The usual sequence is `average` first, to reach the symmetric stationary point, then `jt` from there: at a stationary point of the average surface the common part vanishes and the whole force is Jahn-Teller. `jt` returns to the ordinary single-state energy and force once threshold-based splitting leaves the tracked group with one member; smaller splittings remain subject to the approximation described under `lr_degen_thr`.

  > Note: `jt` gives the first-order DIRECTION. The distortion amplitude also needs the harmonic term, and the step norm is Cartesian rather than mass-weighted. A linear molecule has no first-order term at all (the effect is second-order Renner-Teller) and the log says so.
- **Default**: state

### lr_grad_solver

- **Type**: String
- **Description**: The method to solve the Z-vector (relaxed-density) equation $(A+B)Z=R$ in LR-TDDFT force and relaxation calculations, the linear-equation counterpart of `lr_solver`. Its dimension is $n_k n_{occ} n_{virt}$ summed over spin, where $n_{virt}$ counts every virtual band of the ground state, not only the `nvirt` window of the excitation.
  - cg: Solve iteratively with the conjugate-gradient method, applying the orbital Hessian $A+B$ to a vector at each step. The matrix is never built.
  - lapack: Construct the full matrix and solve directly with LAPACK (LU). Every MPI process holds the whole matrix and solves the same system.
  - scalapack: Construct the matrix distributed over the MPI processes (2D block-cyclic) and solve with ScaLAPACK (LU).
  - scalapack_chol: Construct the matrix distributed as for scalapack and solve by a ScaLAPACK Cholesky factorization, about half the flops of the LU and in place.

  > Note: The direct solvers build the matrix column by column, at the cost of one application of $A+B$ per column, which usually dominates the cost of the solve itself; scalapack and scalapack_chol need an MPI build.

  > Note: scalapack_chol requires $A+B$ to be positive definite. A non-positive-definite matrix causes an error on every MPI rank; use lr_grad_solver=scalapack (LU) instead. The LU solver does not require positive definiteness, but still requires a nonsingular matrix. The former elpa option has been removed; use scalapack_chol for distributed Cholesky.
- **Default**: cg

### lr_target_spin

- **Type**: String
- **Description**: Which spin channel `lr_target_state` indexes.

  - singlet / triplet: the two closed-shell channels solved at `nspin = 2`. At `nspin = 1`, only the channel selected here is solved (default: `singlet`).
  - updown: the single spin-conserving channel of an open-shell calculation (`lr_unrestricted`, or a spin-polarised ground state with a non-zero moment).

  An open-shell calculation has only one channel, so any value is accepted there and relaxes that channel; an explicit `triplet` is reported as ignored. A closed-shell calculation rejects `updown`, since singlet and triplet are separate states with separate gradients.

  At `nspin = 2` this selects only the relaxation target; single-point runs still solve both closed-shell channels.
- **Default**: singlet

### lr_unrestricted

- **Type**: Boolean
- **Description**: Whether to use unrestricted construction for LR-TDDFT (the matrix size will be doubled).
  - True: Always use unrestricted LR-TDDFT.
  - False: Use unrestricted LR-TDDFT only when the system is open-shell.
- **Default**: False

### abs_wavelen_range

- **Type**: Real Real
- **Description**: The range of the wavelength for the absorption spectrum calculation.
- **Default**: 0.0 0.0
- **Unit**: nm

### out_wfc_lr

- **Type**: Boolean
- **Description**: Whether to output the eigenstates (excitation energy) and eigenvectors (excitation amplitude) of the LR-TDDFT calculation. The output files are OUT.{suffix}/Excitation_Amplitude_${processor_rank}.dat.
- **Default**: False

### abs_gauge

- **Type**: String
- **Allowed values**: length, velocity, velocity_comm, none
- **Description**: Optical gauge for LR-TDDFT and BSE.

  - `velocity`: integrate the momentum and nonlocal pseudopotential commutator directly. Recommended for local and semilocal functionals without exact exchange, since direct integration avoids inserting a finite AO resolution of the identity between the operators. For HSE and other functionals with exact exchange, this omits the commutator of the nonlocal Fock operator with position.
  - `velocity_comm`: build the velocity from the full ground-state Hamiltonian in the nonorthogonal AO basis, including the Fock commutator when exact exchange is present. Available for MPI LCAO LR-TDDFT with [gamma_only](#gamma_only) set to `0`.
  - `length`: use position matrix elements.
  - `none`: skip transition dipoles, oscillator strengths, transition analysis and absorption spectra. Excitation energies, requested charge output, and LR forces or relaxation are still available.

  If this keyword is omitted, supported LR-TDDFT calculations whose ground-state [dft_functional](#dft_functional) includes exact exchange automatically select `velocity_comm`. BSE, gamma-only and non-MPI builds use the `velocity` default. Explicit selections take precedence over the automatic selection. [RI Hartree benchmarks](#ri_hartree_benchmark) skip spectrum output, automatic optical gauge selection and optical CSR file checks.

  With `esolver_type ks-lr`, the commutator uses the ground-state matrices already in memory. For standalone `esolver_type lr`, enable text CSR with [out_hsr](#out_hsr) set to `1` in the SCF or NSCF calculation supplying the orbitals. For example, `out_hsr 1 12` uses 12-digit precision. Use [out_app_flag](#out_app_flag) set to `0` to write one frame with the standard filenames. Use `gamma_only 0` there as well. Place the text CSR files `hrs1_nao.csr` and `sr_nao.csr` in [read_file_dir](#read_file_dir) alongside the wavefunctions. Add `hrs2_nao.csr` for `nspin 2`. Use matrices from the same geometry, basis, spin setting and Hamiltonian as the wavefunctions. ABACUS computes the position integrals internally.

  For `nspin 1`, ABACUS uses the single Hamiltonian block as written. Spin degeneracy enters the singlet transition amplitude through a factor of $\sqrt{2}$.
- **Default**: velocity (velocity_comm for supported LR-TDDFT with exact exchange)

### abs_broadening

- **Type**: Real
- **Description**: The broadening factor for the absorption spectrum calculation.
- **Default**: 0.01

### plot_istate

- **Type**: Integer
- **Description**: The index of the excited state to plot, starting from 0.
- **Default**: 0

### exciton_plot_type

- **Type**: String
- **Description**: Exciton density represented when lr_solver is 'plot': 'average' integrates out the other particle, while 'conditional' fixes one particle at exciton_fixed_coordinate and plots a slice of the other particle's density.
- **Default**: average

### exciton_plot_format

- **Type**: String
- **Availability**: *[`lr_solver`](#lr_solver)==plot*
- **Description**: The exciton-density output format. Average density supports cube, slice, and both; conditional density supports slice only.
- **Default**: cube

### exciton_fixed_coordinate

- **Type**: Vector of Real (6 values)
- **Description**: Cartesian coordinates in Bohr used by conditional exciton plotting, in the order hole_x hole_y hole_z electron_x electron_y electron_z.
- **Default**: 0.0 0.0 0.0 0.0 0.0 0.0

### exciton_slice_plane

- **Type**: String
- **Description**: Pair of lattice-vector directions spanning the cross section: 'ab', 'bc', or 'ca'.
- **Default**: ab

### exciton_slice_pos

- **Type**: Real
- **Description**: Offset in Bohr along the remaining lattice-vector direction: c for an ab slice, a for bc, and b for ca.
- **Default**: 0.0

### exciton_slice_npoints

- **Type**: Integer
- **Description**: Target in-plane grid resolution. The final grid uses a uniform number of points per primitive cell over `exciton_slice_range` and includes both endpoints.
- **Default**: 200

### exciton_slice_range

- **Type**: Vector of Integer (4 values)
- **Availability**: *[`lr_solver`](#lr_solver)==plot and [`exciton_plot_format`](#exciton_plot_format) in [slice, both]*
- **Description**: The in-plane primitive-cell range of an exciton slice: ustart uend vstart vend. The end values are exclusive cell boundaries, while grid data include both range endpoints.
- **Default**: -1 2 -1 2
- **Unit**: primitive cells

### ri_hartree_benchmark

- **Type**: String
- **Description**: Whether to use the RI approximation for the Hartree term in LR-TDDFT for benchmark (with FHI-aims/ABACUS read-in style)
- **Default**: none

### aims_nbasis

- **Type**: A number(ntype) of Integers
- **Availability**: *[`ri_hartree_benchmark`](#ri_hartree_benchmark)==aims*
- **Description**: Atomic basis set size for each atom type (with the same order as in STRU) in FHI-aims.
- **Default**: {} (empty list, where ABACUS use its own basis set size)

[back to top](#full-list-of-input-keywords)

## Bethe-Salpeter Equation

### bse_tda

- **Type**: String
- **Description**: Whether the Tamm-Dancoff approximation is used: 'tda', 'full', or 'both'.
- **Default**: tda

### bse_spin_types

- **Type**: Vector of String (&gt;=1 values)
- **Description**: Spin types for a closed-shell calculation in one task: 'singlet', 'triplet', and the test modes 'rpa' and 'ipa'.
- **Default**: singlet triplet

### bse_mem_save

- **Type**: Boolean

**Requirements**

| Option | Requirements |
| --- | --- |
| `true` | [`bse_continue`](#bse_continue)==0 and [`bse_ri_hartree`](#bse_ri_hartree)==true |

- **Description**: Whether to save memory by adding V and W directly to the BSE matrix.
- **Default**: false

### bse_ri_hartree

- **Type**: Boolean
- **Description**: Whether to use the RI approximation for the Hartree term in BSE.
- **Default**: true

### bse_use_fine_kgrid

- **Type**: Integer
- **Description**: Fine k-grid mode for BSE: 0 uses the coarse k-grid, 1 uses a uniform fine k-grid, and 2 uses a non-uniform fine k-grid. Modes 1 and 2 require band_kpath_info, band_KS_eigenvector_k_{index}.txt, KS_band_spin_{index}.txt, and GW_band_spin_{index}.txt.
- **Default**: 0

### bse_q_approx_mode

- **Type**: Integer
- **Description**: q-to-k-pair mapping mode for W: 0=exact, 1=coarse q grid, 2=mixed, 3=truncate pairs with |q|&gt;threshold (W elements dropped)
- **Default**: 0

### bse_q_approx_threshold

- **Type**: Real
- **Description**: Threshold radius in unit of 2*pi/lat0 (same unit system as kvec_c) for exact q-to-k-pair mapping when bse_q_approx_mode is 2; in mode 3 pairs with larger |q| are dropped entirely.
- **Default**: 0.1

### out_bse_ab

- **Type**: Boolean
- **Description**: Whether to output the AB matrix to a file.
- **Default**: false

### bse_continue

- **Type**: Integer
- **Description**: Step from which to continue a previous BSE calculation: 0 starts a new calculation; 1 reads A_V; 2 reads A_V and A_W; 3 reads A_V, A_W, and B_V; 4 reads A_V, A_W, B_V, and B_W.
- **Default**: 0

[back to top](#full-list-of-input-keywords)

## Reduced Density Matrix Functional Theory

### rdmft

- **Type**: Boolean
- **Description**: Whether to perform rdmft calculation (reduced density matrix funcional theory). The physical quantities that RDMFT temporarily expects to output are the kinetic energy, total energy, and 1-RDM of the system in the ground state, etc.
- **Default**: false

### rdmft_power_alpha

- **Type**: Real
- **Legal range**: value>=0 and value<=1
- **Description**: The alpha parameter of power-functional(or other exx-type/hybrid functionals) which used in RDMFT, g(occ_number) = occ_number^alpha
- **Default**: 0.656

[back to top](#full-list-of-input-keywords)

## Density functional perturbation theory

### dfpt_qmesh

- **Type**: Vector of Int (1 or 3 values)
- **Description**: Set the Monkhorst-Pack q mesh (gamma-centered) for DFPT phonon calculations. Any q mesh is supported: q points need not be commensurate with the ground-state k mesh (the k+q occupied states are obtained by an nscf diagonalization). For example, a 4x4x4 KPT mesh admits dfpt_qmesh values of 1, 2, 3, or 4 along each direction. This parameter is ignored when dfpt_qfile is set.
- **Default**: 1 1 1

### dfpt_qfile

- **Type**: String
- **Description**: Set the file containing the q points for DFPT, in the same format as the KPT file (Q_POINTS card: Gamma/Monkhorst-Pack mesh, or an explicit Direct/Cartesian list; symmetry reduction is not applied to file q lists). When set, it overrides dfpt_qmesh. Any q point is supported: q points need not be commensurate with the ground-state k mesh. When dfpt_compute_q0 is true, Gamma must be the FIRST q point and must appear exactly once (the run rejects [X, Gamma] and [Gamma, X, Gamma] orderings at input time, regardless of dfpt_out_dyn); arbitrary orderings are allowed when dfpt_compute_q0 is false.
- **Default**: ""

### dfpt_compute_q0

- **Type**: Boolean
- **Description**: Whether to compute the macroscopic dielectric tensor (epsilon_inf) and the Born effective charges at q = 0 within the same DFPT run. Requires Gamma as the FIRST q point, exactly once (the default dfpt_qmesh 1 1 1 satisfies this); orderings such as [X, Gamma] or [Gamma, X, Gamma] are rejected at input time, independently of dfpt_out_dyn.
- **Default**: false

### dfpt_loto

- **Type**: Boolean
- **Description**: Whether to apply the Lyddane-Sachs-Teller non-analytic correction to the Gamma-point dynamical matrix, which splits the longitudinal and transverse optical modes. Requires dfpt_compute_q0 to be true, since the correction is built from epsilon_inf and the Born effective charges.
- **Default**: false

### dfpt_out_dyn

- **Type**: Boolean
- **Description**: Write one QE-compatible dyn file per q point into the output directory: OUT.&lt;suffix&gt;/dyn.q&lt;i&gt;. Each file contains the unreduced (pre-ASR, pre-LO-TO) force-constant matrix Phi in Ry/bohr^2, the same content and layout as Quantum ESPRESSO's ph.x output (fildyn), so the files can be diffed element-by-element against QE references or post-processed by external tools. At Gamma with dfpt_compute_q0 the Born effective charges and dielectric tensor are appended in the QE convention.
- **Default**: false

### dfpt_conv_thr

- **Type**: Real
- **Description**: Set the convergence threshold of the self-consistent DFPT cycle: the iteration stops when the relative residual of the mixed variable drops below this value. With the ordinary symmetry -1 solver the residual is checked per displacement. With the joint symmetry-1 Gamma solver the 3N displacement family (or the three field directions) share one residual and one history. With dfpt_mix_type = v_sc_plain or v_sc_broyden (the default) the residual is the screening-potential residual ||v_out - v_in|| / ||v_out||; with rho_plain, rho_kerker or rho_broyden it is the first-order density residual ||drho_out - drho_in|| / ||drho_out||. The ordinary electric-field solve always mixes the density; the joint Gamma electric-field solve follows the selected mixing space (potential mixing is permitted).
- **Default**: 1.0e-8

### dfpt_max_iter

- **Type**: Integer
- **Legal range**: value>=1
- **Description**: Set the maximum number of self-consistent DFPT iterations. With the ordinary symmetry -1 solver the limit applies per displacement; with the joint symmetry-1 Gamma solver the 3N displacement family (or the three field directions) share one joint history and one limit.
- **Default**: 100

### dfpt_lin_conv_thr

- **Type**: Real
- **Description**: Dedicated convergence threshold of the projected CG solve of the Sternheimer equation inside every DFPT response iteration, as the relative residual ||P_c r|| / ||P_c b|| of the projected system (r: CG residual, b: projected right-hand side, P_c: complement of the occupied subspace at k+q). Non-positive values (the default) inherit dfpt_conv_thr, which reproduces the historical single-knob behavior. Accuracy tradeoff of truncating the inner solve: the outer mixing residual does NOT check the achieved Sternheimer residual, so a loose inner threshold or a small dfpt_lin_max_iter can shift converged observables; the same controls also affect the one-shot Gamma position response (the bare q = 0 operator legs inherit them as well). When the knobs are tightened for a hard response, validate the phonons, dielectric tensor and Born charges against tighter inner settings to quantify the truncation error. Decouple them when a flat semicore band system needs a loose inner solve to keep the outer mixing stable: the shifted operator is then near-singular and a very deep inner solve amplifies the response beyond what the outer mixing can damp.
- **Default**: -1.0 (inherit dfpt_conv_thr)

### dfpt_lin_max_iter

- **Type**: Integer
- **Description**: Dedicated iteration cap of the projected CG solve of the Sternheimer equation inside every DFPT response iteration. Non-positive values (the default) inherit dfpt_max_iter, which reproduces the historical single-knob behavior. Lower it to truncate the CG before it drives into near-singular directions of a flat-band system; raise it for otherwise unconverged inner solves without enlarging the outer mixing budget. The cap has the same accuracy tradeoff as dfpt_lin_conv_thr: the outer mixing residual does not check the achieved Sternheimer residual, the one-shot Gamma position response shares the cap, and truncated inner solves should be validated against tighter settings on the phonons, dielectric tensor and Born charges.
- **Default**: 0 (inherit dfpt_max_iter)

### dfpt_mix_beta

- **Type**: Real
- **Description**: Set the plain-mixing coefficient of the DFPT response SCF. It scales the preliminary step of the chosen dfpt_mix_type (the plain mix itself, or the initial guess pushed into the Broyden history). The response Jacobian has strongly negative eigenvalues on the smallest-G shells (Coulomb stiffness), so beta must stay below 2 / (1 + |lambda_min|); the default 0.4 keeps margin up to |lambda_min| ~ 3. A larger value accelerates convergence for weakly screened systems but may diverge.
- **Default**: 0.4

### dfpt_asr

- **Type**: String
- **Description**: Enforce the translational acoustic sum rule (sum over atoms of the Gamma force-constant rows = 0) on the RAW Gamma dynamical matrix, before the LO-TO nonanalytic term, together with the Z* sum rule sum_a Z*_a = 0 on the Born effective charges. Unconstrained linear-response self-consistency violates both at the percent to tens-of-percent level (QE ph.x shows the same), and the reference workflow post-processes with asr='crystal'. simple: subtract each row sum from its diagonal element. crystal: the optimized minimal-norm symmetric projection (keeps Hermiticity and symmetry-equivalent atoms equivalent). no: leave the matrix as computed.
- **Default**: no

### dfpt_mix_type

- **Type**: String
- **Allowed values**: rho_plain, rho_kerker, rho_broyden, v_sc_plain, v_sc_broyden
- **Description**: Set the mixing scheme of the DFPT response SCF. rho_plain: the first-order density is mixed with the same coefficient dfpt_mix_beta on every shell. rho_kerker: the Kerker screen f_g = |G+q|^2 / (|G+q|^2 + a^2) damps the Coulomb-stiff smallest shells, stabilizing polar / small-gap systems at beta up to 1; a^2 is set by dfpt_kerker_a2. rho_broyden: Modified Broyden mixing (Johnson 1988) on the density, history depth dfpt_broyden_ndim. v_sc_plain / v_sc_broyden: mix the screening potential v_sc = v_H[drho] + v_xc[drho] instead of the density, with plain or Modified Broyden coefficients; v_sc_broyden is the default (the metric the Broyden least squares works in is K-weighted, which stabilizes the Coulomb-stiff shells that destabilize plain density mixing).
- **Default**: v_sc_broyden

### dfpt_kerker_a2

- **Type**: Real
- **Legal range**: value>0
- **Description**: Set the Kerker screening parameter a^2 (in 1/lat0^2 units) used by dfpt_mix_type = rho_kerker. The screen f_g = |G+q|^2 / (|G+q|^2 + a^2) freezes the stiff long-wavelength shells; larger a^2 damps more shells. Ignored by the other schemes.
- **Default**: 1.0

### dfpt_broyden_ndim

- **Type**: Integer
- **Legal range**: value>=1
- **Description**: Set the number of history steps used by the Modified Broyden mixing (Johnson 1988) when dfpt_mix_type = rho_broyden or v_sc_broyden. Under v_sc_broyden it sizes both Broyden instances: the screening-potential mixer of the displacement loop and the density mixer of the electric-field (LO-TO) loop. More history generally accelerates convergence at the cost of memory.
- **Default**: 8

[back to top](#full-list-of-input-keywords)
