dft¶
Run an energy-only single-point DFT calculation on the ML region using GPU4PySCF (or CPU PySCF), then recombine the high-level energy with MM evaluations to obtain the ML(dft)/MM total energy. DFT gradients and forces are not requested. Use it to evaluate stationary-point energies (R / TS / P / IM) at the DFT level after an MLIP path search, or to sanity-check an MLIP barrier against a benchmark functional / basis. The default functional/basis is wb97m-v/def2-tzvpd. Results include energy and population analysis (Mulliken, meta-Lowdin, IAO charges).
E_total = E_REAL_low + E_ML(DFT) - E_MODEL_low
Examples¶
Minimal single-point DFT on the ML region:
# Minimal single-point DFT on the ML region
mlmm dft -i enzyme.pdb --parm real.parm7 --model-pdb ml_region.pdb \
-q 0 -m 1 --out-dir ./result_dft
Change functional/basis for a higher-level single point:
# Change functional/basis for a higher-level single point
mlmm dft -i enzyme.pdb --parm real.parm7 --model-pdb ml_region.pdb \
-q 0 -m 1 --func-basis "wb97m-v/def2-tzvpd" --out-dir ./result_dft_tz
Tighten the SCF convergence if needed:
mlmm dft -i enzyme.pdb --parm real.parm7 --model-pdb ml_region.pdb \
-q 0 -m 1 --conv-tol 1e-10 --max-cycle 200 --out-dir ./result_dft_tight
Workflow¶
Input handling –
MLMMCoreloads the full enzyme PDB (-i), Amber topology (--parm), and ML-region definition (--model-pdbor--model-indicesor B-factor detection via--detect-layer). Unless YAML supplies explicitlink_mlmmpairs, it appends link hydrogens at parm7 bonds that cross the ML/MM selection; distance is not used to perceive those bonds.SCF build –
--func-basisis parsed into functional and basis. The GPU4PySCF backend is used when available; closed-shell GPU runs additionally use the low-memorygpu4pyscf.dft.rks_lowmem.RKSSCF when--lowmemis on (default). Use--engine cputo force CPU mode. The experimental--embedchargeoption embeds MM point charges directly in the PySCF Hamiltonian; the DFT workflow does not apply the optional xTB correction used by MLIP workflows. (For the SCF JK /density_fit()behavior see the--lowmemrow in the CLI options table.)ML(dft)/MM recombination – DFT replaces only
MLMMCore’s high-level MODEL energy.MLMMCoreevaluates REAL-low and MODEL-low with the selected MM backend and applies the subtractive expression. This workflow has no separate topology builder, MM calculator path, or DFT force evaluation.Population analysis & outputs – Mulliken, meta-Lowdin, and IAO charges and spin densities (UKS only) are written alongside the combined energy block in
result.yaml.
Outputs¶
out_dir/ (default: ./result_dft/)
├── ml_region_without_linkH.xyz # Exact ML selection before generated link-H
├── ml_region_with_linkH.xyz # PySCF input snapshot after generated link-H
├── ml_region_without_linkH.pdb # PDB input with --convert-files; topology-bearing companion
├── ml_region_with_linkH.pdb # PDB input with --convert-files; generated link-H as HL/LKH
├── result.yaml # DFT + ML(dft)/MM energy summary, charges, spin densities
├── result.json # only when --out-json is passed
└── (stdout) # Pretty-printed configuration blocks and energies
result.yamlexpands to:energy: Hartree/kcal/mol values, convergence flag, wall time, backend info (engine:gpu4pyscf(rks_lowmem)/gpu4pyscf/pyscf(cpu);used_gpu;used_lowmem).mlmm_energy: REAL-low / MODEL-low MM evaluations and the recombinedE_total = E_REAL_low + E_ML(DFT) - E_MODEL_lowin Hartree and kcal/mol.charges [index, element, mulliken, lowdin, iao]: Mulliken, meta-Lowdin, and IAO atomic charges (nullwhen a method fails).spin_densities [index, element, mulliken, lowdin, iao]: Mulliken, meta-Lowdin, and IAO spin densities (UKS-only for spins).
It also summarizes charge, multiplicity, functional, basis, convergence knobs, and resolved output directory.
CLI options¶
mlmm dft --help shows core options; mlmm dft --help-advanced shows the full option list. The full flag list is in the generated command reference; the table below covers the options that need explanation.
Option |
Description |
Default |
|---|---|---|
|
Full enzyme structure (PDB/mmCIF, or XYZ with |
Required |
|
Reference PDB topology when input is XYZ. |
None |
|
Amber parm7 topology for the full system. |
Required |
|
PDB defining the ML region (atom IDs must match the enzyme PDB). Optional when |
None |
|
Comma-separated atom indices for the ML region (ranges allowed, e.g. |
None |
|
Interpret |
|
|
Automatically detect ML/MM layers from input PDB B-factors (B=0/10/20). |
Enabled |
|
Charge of the ML region. Required unless |
Required unless |
|
Total charge or per-resname mapping (e.g. |
None |
|
Spin multiplicity (2S+1) for the ML region. |
|
|
Functional/basis pair as |
|
|
SCF-iteration cap. |
|
|
SCF convergence tolerance (Hartree). |
|
|
DFT integration grid level (0=coarse, 3=default, 5=fine, 9=very fine). |
|
|
Force GPU4PySCF ( |
|
|
Use |
|
|
Experimental direct PySCF electrostatic embedding of MM point charges. No xTB correction is used in |
|
|
Include MM point charges within this distance of the ML region. |
|
|
Output directory. |
|
|
Base YAML configuration file applied before explicit CLI options. |
None |
|
Print resolved configuration and continue execution. |
|
|
Link-atom placement: |
|
|
MM backend for the low-level ONIOM evaluation. Hessians use finite differences by default; set |
|
|
Preserve CMAP in both REAL and MODEL MM layers. |
|
|
Write a machine-readable |
|
|
Validate options and print execution plan without running DFT. Shown in |
|
|
Toggle XYZ/TRJ to PDB companions when a PDB template is available. |
|
YAML configuration¶
Accepts a mapping root; the dft section (and optional geom, calc/mlmm) is applied when present. Merge order is:
defaults
--configexplicit CLI options
geom:
coord_type: cart # optional geom_loader settings
calc:
model_charge: 0 # ML region charge
model_mult: 1 # spin multiplicity 2S+1
real_parm7: real.parm7 # Amber parm7 topology
model_pdb: ml_region.pdb # ML-region definition
embedcharge: false # PySCF electrostatic embedding; no xTB in dft
embedcharge_cutoff: 12.0 # MM point-charge cutoff from ML region (Å)
dft:
func_basis: wb97m-v/def2-tzvpd # exchange-correlation functional / basis set
conv_tol: 1.0e-09 # SCF convergence tolerance (Hartree)
max_cycle: 100 # SCF iteration cap
grid_level: 3 # PySCF grid level
verbose: 0 # PySCF verbosity (0-9); CLI -v 2/3 raises runtime PySCF verbosity to >=4
out_dir: ./result_dft/ # output directory root
Full schema (every key and default): YAML Reference.
Notes¶
A matching def2 effective core potential is auto-attached whenever the basis name begins with
def2(no element-presence check).Blackwell-architecture GPUs (RTX 50xx): verify that the installed GPU4PySCF/CuPy stack supports the device. If the GPU path fails, use
--engine cpuor an external DFT program.Out-of-memory with def2-TZVPD: memory depends on atom types, basis, functional, grid, and software stack. Pilot the target system and, if necessary, choose a smaller basis only after validating its effect on the quantities of interest.
Compiled GPU4PySCF wheels may not support non-x86 systems; build from source in that case (see https://github.com/pyscf/gpu4pyscf).
See Also¶
Common Error Recipes — Symptom-first failure routing
Troubleshooting — Detailed troubleshooting guide
freq — Vibrational frequency analysis (often precedes DFT single-point evaluation)
opt — Single-structure geometry optimization
all — End-to-end workflow with
--dftYAML Reference — Full
dftconfiguration optionsGlossary — Definitions of DFT, SP (Single Point)