Skip to content

Input File System with PyOQP

Cheol Ho Choi edited this page Aug 18, 2024 · 78 revisions

PyOQP is initiated by Prof. Jingbai Li at Hoffmann Institute of Advanced Materials, Shenzhen, China.

Full input sections and keywords

General Keywords [INPUT]

[INPUT] Defaults
Keyword Default Description
charge 0 Specifies the molecular charge.
basis (none) Defines the basis set.
functional (none) Specifies the exchange-correlation functional.
method hf Defines the quantum mechanical method.
runtype energy Indicates the type of calculation to perform.
system (none) Defines the molecular geometry, which can be provided as coordinates or an external XYZ file.
system2 (none) Specifies a second molecular geometry, if needed.
d4 False Enables or disables DFT-D4 correction.
[INPUT] Details

The **input** section manages the fundamental information about the molecular system.

  • charge: Specifies the total molecular charge.
    • Default: 0
  • basis: Sets the basis set for the calculation.
    • Details: Check available options in the opq/share/basis_sets directory.
    • Default: None (no default value)
  • functional: Defines the functional to be used.
    • Details: Use DTCAM-TUNE for tuning and optimizing the functionals. For more information, visit the DTCAM-Functionals page. Special functionals like DTCAM-VEE, DTCAM-AEE, DTCAM-XI, DTCAM-XIV, DTCAM-VAEE are available.
    • Default: None (will default to Hartree-Fock if not set)
  • method: Specifies the type of HF/DFT calculation to perform.
    • Options:
      • hf: Time-independent calculations, including HF and DFT. (Default)
      • tdhf: Time-dependent calculations, including TDDFT and MRSF-TDDFT.
  • runtype: Selects the type of OQP calculation to perform.
    • Options:
      • energy: Single-point energy calculation. (Default)
      • grad: Single-point energy calculation along with gradients.
      • hess: Frequency calculation.
      • nac: Non-adiabatic coupling calculation.
      • nacme: Computes NAC along the distortion dt.
      • soc: Spin-orbit coupling calculation. (Not available yet)
      • optimize: Local minimum geometry optimization.
      • meci: Minimum energy conical intersection optimization.
      • mep: Minimum energy path calculation.
      • ts: Transition state optimization.
      • neb: Nudged elastic band calculation. (Not available yet)
  • system: Specifies the molecular structure or the XYZ file containing it.
    • Options:
      • system=filename.xyz: Opens a specified XYZ file.

      • Alternatively, you can input coordinates directly in the next lines as shown below:

        system=
             O  -0.0000000000   0.0000000000  -0.0410615540
             H  -0.5331943294   0.5331943294  -0.6144692230
             H   0.5331943294  -0.5331943294  -0.6144692230
        
  • d4: Applies DFT-D4 dispersion correction.
    • Options:
      • False: Do not compute DFT-D4 corrections based on the functional. (Default)
      • True: Compute DFT-D4 corrections for energy and gradients. Note that some functionals may not be supported.

Initial Guess Settings [GUESS]

[GUESS] Defaults
Keyword Default Description
type huckel Method for generating the initial guess.
file (none) Name of the JSON checkpoint file.
file2 (none) Name of the second JSON checkpoint file.
save_mol False Option to save a JSON file after the job is completed.
continue_geom False Specifies whether to use molecular geometry from a JSON file.
[GUESS] Details

The guess section handles the guess orbitals.

  • type: Choose the type of guess orbital.
    • Options:
      • huckel: Huckel guess. (Default)
      • hcore: Hcore guess.
      • model: Read orbitals from a Molden file.
      • json: Load data from a JSON file.
  • file: Specify the guess orbital or data file.
    • Details: Provide the name or absolute path to the Molden or JSON file.
  • save_mol: Save complete data to a JSON file.
    • Options:
      • True: Save the complete calculation data to a JSON file.
      • False: Do not save data. (Default)
  • continue_geom: Choose the structure for calculations.
    • Options:
      • True: Use the structure saved in the JSON file.
      • False: Use the input structure. (Default)

Self-Consistent Field (SCF) Options [SCF]

\SCF] Defaults | \*\*Keyword\*\* | \*\*Default\*\* | \*\*Description\*\* | |--------------------|-------------|-----------------| | \*\*type\*\* | rhf | Type of SCF calculation. | | \*\*maxit\*\* | 30 | Maximum number of SCF iterations. | | \*\*maxdiis\*\* | 7 | Maximum size of the DIIS matrix. | | \*\*diis_reset_mod\*\* | 10 | Number of iterations before DIIS reset. | | \*\*diis_reset_conv\*\* | 0.005 | DIIS reset criteria based on error threshold. | | \*\*diis_method_threshold\*\* | 2.0 | Threshold for switching between DIIS methods. | | \*\*diis_type\*\* | cdiis | Default DIIS method. | | \*\*vdiis_cdiis_switch\*\* | 0.3 | Threshold for selecting cDIIS. | | \*\*vdiis_vshift_switch\*\* | 0.003 | Threshold for applying vshift. | | \*\*vshift_cdiis_switch\*\* | 0.3 | Threshold for cDIIS with vshift. | | \*\*vshift\*\* | 0.0 | VSHIFT value. | | \*\*mom\*\* | False | Enables the Maximum Overlap Method (MOM). | | \*\*mom_switch\*\* | 0.003 | MOM activation threshold based on DIIS error. | | \*\*multiplicity\*\* | 1 | Specifies the multiplicity for SCF. | | \*\*conv\*\* | 1.0e-6 | Convergence criteria for DIIS. | | \*\*incremental\*\* | True | Enables incremental Fock build. | | \*\*init_scf\*\* | no | Initial SCF setting. | | \*\*init_it\*\* | 0 | Initial iteration count. | | \*\*save_molden\*\* | True | Option to save a Molden file. |
[SCF] Details

The scf section handles time-independent calculations.

  • type: Choose the type of wavefunction.
    • Options:
      • rhf: Restricted Hartree-Fock/Kohn-Sham. (Default)
      • uhf: Unrestricted Hartree-Fock/Kohn-Sham.
      • rohf: Restricted Open Hartree-Fock/Kohn-Sham.
  • maxit: Set the maximum number of SCF iterations.
    • Default: 30
  • maxdiis: Set the maximum number of dimensions for the DIIS converger.
    • Default: 7
  • diis_reset_mod: Specify the number of iterations before checking for a DIIS reset.
    • Default: 10
  • diis_reset_conv: Set the threshold for the DIIS reset.
    • Default: 0.005
  • multiplicity: Set the multiplicity of the reference state.
    • Default: 1
  • conv: Set the energy convergence criteria.
    • Default: 1.0e-6
  • incremental: Use the incremental Fock method.
    • Options:
      • True: Use the incremental method. (Default)
      • False: Do not use the incremental method.
  • init_scf: Perform an initial SCF iteration to aid convergence.
    • Options:
      • rhf: Perform an initial RHF-type HF calculation, regardless of the functional.
      • uhf: Perform an initial UHF-type HF calculation, regardless of the functional.
      • rohf: Perform an initial ROHF-type HF calculation, regardless of the functional.
      • rks: Perform an initial RKS-type DFT calculation according to the functional.
      • uks: Perform an initial UKS-type DFT calculation according to the functional.
      • roks: Perform an initial ROKS-type DFT calculation according to the functional.
      • no: Do not perform an initial SCF iteration. (Default)
  • init_it: Set the maximum number of initial SCF iterations.
    • Default: 0
  • save_molden: Save orbitals.
    • Options:
      • True: Save orbitals to a Molden file.
      • False: Do not save orbitals.

DFT Grid Settings [DFTGRID]

[DFTGRID] Defaults
Keyword Default Description
hfscale -1.0 Exact exchange scale factor.
cam_flag False Enables CAM functional.
cam_alpha -1.0 Alpha parameter for CAM.
cam_beta -1.0 Beta parameter for CAM.
cam_mu -1.0 Mu parameter for CAM.
rad_type mhl Type of radial grid.
rad_npts 50 Number of radial grid points.
ang_npts 194 Number of angular grid points.
partfun ssf Partition function type in grid-based DFT.
pruned sg1 Pruning method.
grid_ao_pruned True Enables AO-based pruning.
grid_ao_threshold 1.0e-15 Threshold for AO pruning.
grid_ao_sparsity_ratio 0.9 Sparsity ratio for AO pruning.
[DFTGRID] Details ### \[dftgrid\]

The dftgrid section handles the accuracy of DFT calculations.

  • rad_type: Choose the radial point sampling method for electronic integrals.
    • Default: mhl
  • rad_npts: Set the number of radial points for electronic integrals.
    • Default: 50
  • ang_npts: Set the number of angular points for electronic integrals.
    • Default: 194
  • partfun: Choose the partition function for electronic integrals.
    • Default: ssf
  • pruned: Choose the orbital pruning method for electronic integrals.
    • Options:
      • empty: No pruning.
      • sg1: SG-1 pruning. (Default)
      • ao: Prune atomic orbitals.

Time-Dependent Hartree-Fock (TDHF) Options [TDHF]

[TDHF] Defaults
Keyword Default Description
type rpa Type of TDHF calculation.
maxit 50 Maximum number of Davidson iterations.
maxit_zv 50 Maximum number of Z-vector iterations.
multiplicity 1 Spin multiplicity.
conv 1.0e-6 Convergence criteria for Davidson.
nstate 1 Number of states to compute.
zvconv 1.0e-6 Convergence criteria for Z-vector.
nvdav 50 Number of Davidson vectors.
tlf 2 TLF method.
hfscale -1.0 Exact exchange scale factor.
cam_flag False Enables CAM functional.
cam_alpha -1.0 Alpha parameter for CAM.
cam_beta -1.0 Beta parameter for CAM.
cam_mu -1.0 Mu parameter for CAM.
spc_coco 1.0 Spin-pair coupling parameter for closed and open virtual MOs (MRSF).
spc_ovov -1.0 Spin-pair coupling parameter for open virtual MOs (MRSF).
spc_coov -1.0 Spin-pair coupling parameter for closed and open virtual MOs (MRSF).
conf_threshold 5.0e-2 Threshold for printing important configurations.
[TDHF] Details

The tdhf section handles time-dependent calculations.

  • type: Choose the type of time-dependent wavefunction.
    • Options:
      • rpa: Use Random Phase Approximation. (Default)
      • tda: Use Tam-Dancoff Approximation.
      • sf: Use Spin-Flip.
      • mrsf: Use Mixed-Reference Spin-Flip.
  • maxit: Set the maximum number of CI iterations.
    • Default: 50
  • multiplicity: Set the multiplicity of the response state.
    • Default: 1
  • conv: Set the energy convergence criteria for the response state.
    • Default: 1.0e-6
  • nstate: Set the number of response states to compute.
    • Default: 1
  • zvconv: Set the convergence criteria for Z-vector calculation.
    • Default: 1.0e-10
  • nvdav: Set the dimension of the Davidson subspace.
    • Default: 50

Properties Calculation [Properties]

[Properties] Defaults
Keyword Default Description
scf_prop el_mom,mulliken Properties to calculate for the reference SCF.
td_prop False Properties related to response theory.
grad 0 Specifies the state for gradient calculation.
nac (none) States between which NAC is computed.
soc (none) States between which SOC is computed (TBA).
export False Export option.
title (none) Title for the output.
back_door False Enables backdoor settings.
[PROPERTIES] Details

The properties section handles property calculations.

  • scf_prop: Compute properties of the reference state.
    • Options:
      • el_mom: Electronic moments.
      • mulliken: Mulliken charges.
    • Default: scf_prop=el_mom,Mulliken (computes both)
  • td_prop: Compute properties of the response state.
    • Options:
      • True: Compute electronic properties for the response state. (Not available yet)
      • False: Do not compute electronic properties for the response state.
  • grad: Compute the gradient for specified states.
    • Options:
      • 0: The reference state. (Default)
      • 1,2,3: The first, second, and third response states.
    • Note: Currently, time-dependent calculations (\[input\]method=tdhf) do not compute gradients for the reference state (grad=0).
  • nac: Compute non-adiabatic coupling for two specified states.
    • Note: (Not available yet)
  • soc: Compute spin-orbit coupling for two specified states.
    • Note: (Not available yet)
  • export: Save the computed data to text files.
    • Options:
      • True: Save energies, gradients, etc.
      • False: Do not save data.

Optimization Options [OPTIMIZE]

[OPTIMIZE] Defaults
Keyword Default Description
lib scipy Optimization engine.
optimizer bfgs Optimization algorithm.
step_size 0.1 Step size for optimization.
step_tol 1e-2 Tolerance for step size.
maxit 30 Maximum number of optimization iterations.
mep_maxit 10 Maximum iterations for MEP optimization.
rmsd_grad 1e-4 RMSD criteria for gradients.
rmsd_step 1e-3 RMSD criteria for step size.
max_grad 3e-4 Maximum gradient criteria.
max_step 2e-3 Maximum step size criteria.
istate 0 First state for optimization.
jstate 1 Second state for optimization.
energy_shift 1e-6 Energy shift criteria.
energy_gap 1e-5 Energy gap criteria.
meci_search penalty Method for MECI searching.
pen_sigma 1.0 Sigma value for penalty method.
pen_alpha 0.0 Alpha value for penalty method.
pen_incre 1.0 Increment for penalty method.
gap_weight 1.0 Weight for energy gap in optimization.
init_scf False Initial SCF option.
[OPTIMIZE] Details

The optimize section handles geometry optimization.

  • lib: Choose the optimization library.
    • Options:
      • scipy: Use the scipy.optimize library. (Default)
      • dlfind: Use the DL-FIND library.
  • optimizer: Choose the scipy optimizer.
    • Options:
      • bfgs: Use the BFGS method. (Default)
      • cg: Use Conjugate Gradient.
      • l-bfgs-b: Use L-BFGS-b method.
      • newton-cg: Use Newton Conjugate Gradient.
  • step_size: Set the radius of the constraining hypersphere from the starting structure.
    • Default: 0.1 (the largest distance between the mass-weighted coordinates)
  • step_tol: Set the threshold for the radius on a hypersphere from the starting structure.
    • Default: 1e-2 (the smallest distance between the mass-weighted coordinates)
  • maxit: Set the maximum number of geometry optimization iterations.
    • Default: 30
  • mep_maxit: Set the maximum number of MEP steps.
    • Default: 10
  • rmsd_grad: Set the convergence threshold for RMSD of gradients.
    • Default: 1e-4
  • rmsd_step: Set the convergence threshold for RMSD of structure changes.
    • Default: 1e-3
  • max_grad: Set the convergence threshold for the maximum gradient.
    • Default: 3e-4
  • max_step: Set the convergence threshold for the maximum structure changes.
    • Default: 2e-3
  • istate: Choose the state for single-state optimization.
    • Default: 1
  • jstate: Choose the second state for conical intersection optimization.
    • Default: 2
  • energy_shift: Set the convergence threshold for electronic energy changes.
    • Default: 1e-6
  • energy_gap: Set the convergence threshold for energy gap changes.
    • Default: 1e-5
  • meci-search: Choose the algorithm for conical intersection optimization.
    • Options:
      • penalty: Use the modified penalty method. (Default)
      • ubp: Use the Update Branching Plane method.

hybrid: Use the penalty function, then switch to ubp after the energy gap is below the threshold.

  • pen_sigma: Set the sigma in the penalty function.
    • Default: 1.0
  • pen_alpha: Set the alpha in the penalty function.
    • Default: 0.0
  • pen_incre: Set the incremental factor in the penalty function.
    • Default: 1.0
  • init_scf: Perform initial SCF iterations during geometry optimization.
    • Options:
      • True: Perform initial SCF iterations at every optimization step.
      • False: Do not perform initial SCF iterations after the first optimization step.

DLFIND Options [DLFIND]

\[DLFIND\]
Keyword Default Description
printl 2 Level of detail in DLFIND output.
icoord 3 Coordinate system used during optimization.
opt 3 Optimization method selection.
ims 0 (No description provided)
\[DLFIND\]
Keyword Default Description
printl 2 Level of detail in DLFIND output.
icoord 3 Coordinate system used during optimization.
opt 3 Optimization method selection.
ims 0 (No description provided)

Hessian Calculation Options [HESS]

\[HESS\]
Keyword Default Description
type numerical Method for Hessian calculation.
state 0 Specifies the state for the calculation.
dx 0.01 Step size for numerical differentiation.
nproc 1 Number of processors to use.
read False Option to read Hessian from a file.
restart False Option to restart from a previous Hessian calculation.
temperature 298.15 Temperature for thermodynamic calculations.
clean False Option to clean up intermediate files.

Non-Adiabatic Coupling (NAC) Options [NAC]

\[NAC\]
Keyword Default Description
type numerical Method for NAC calculation.
dt 1 Time step for NAC calculation.
dx 0.0001 Step size for coordinate displacement.
bp False (No description provided)
nproc 1 Number of processors to use.
restart False Option to restart NAC calculation.
clean False Option to clean up intermediate files.
states 1 2 Specifies the states between which NAC is computed.
alignreorder (none) Option to reorder molecular orbitals (MO) and X components.
\[NAC\]
Keyword Default Description
type numerical Method for NAC calculation.
dt 1 Time step for NAC calculation.
dx 0.0001 Step size for coordinate displacement.
bp False (No description provided)
nproc 1 Number of processors to use.
restart False Option to restart NAC calculation.
clean False Option to clean up intermediate files.
states 1 2 Specifies the states between which NAC is computed.
alignreorder (none) Option to reorder molecular orbitals (MO) and X components.

[dlfind]

The dlfind section handles the DL-FIND library for geometry optimization.

  • printl: Set the DL-FIND printing level.
    • Default: 2
  • icoord: Choose the coordinate system.
    • Options:
      • 0: Cartesian coordinates.
      • 1: Hybrid delocalized internal coordinates, primitive internal coordinate scheme.
      • 2: Hybrid delocalized internal coordinates, total connection scheme.
      • 3: Delocalized internal coordinates, primitive internal coordinate scheme. (Default)
      • 4: Delocalized internal coordinates, total connection scheme.
      • 10–14: Lagrange–Newton conical intersection search, with the second digit referring to the above options.
  • iopt: Choose the optimization method.
    • Options:
      • 0: Steepest descent.
      • 1: Polak-Ribiere Conjugate Gradient with automatic restart.
      • 2: Polak-Ribiere Conjugate Gradient with restart every 10 steps.
      • 3: L-BFGS method. (Default)
      • 9: P-RFO, for transition state searches. (Requires \[input\]runtype=ts)
  • ims: Set the multistate gradient calculations.
    • Options:
      • 0: Single-state calculation. (Default)
      • 1: Conical intersection optimization with penalty function algorithm. (Requires \[input\]runtype=meci)
      • 2: Conical intersection optimization with gradient projection algorithm. (Requires \[input\]runtype=meci)
      • 3: Conical intersection optimization with Lagrange–Newton algorithm. (Requires \[input\]runtype=meci)

[hess]

The hess section handles Hessian and frequency calculations.

  • type: Set the type of Hessian calculation.
    • Options:
      • numerical: Compute the Hessian numerically by evaluating the gradient with a small displacement. (Default)
  • state: Set the state for frequency calculation.
    • Default: 0
  • dx: Set the small displacement for numerical Hessian calculation.
    • Default: 0.01 (Each coordinate is moved forward and backward with the displacement. The unit is in Bohr.)
  • nproc: Set the number of subprocesses for numerical Hessian calculation.
    • Default: 1 (The total number of running CPUs is nproc \* OMP_NUM_THREADS.)
  • read: Read previously computed Hessian data.
    • Options:
      • False: Do not read the .hess.json file. (Default)
      • True: Read the .hess.json file to retrieve the computed frequency data.
  • restart: Restart Hessian calculation.
    • Options:
      • False: Do not restart the calculation. (Default)
      • True: Read the stretch data in the \_num_hess folder to continue the calculation.

[nac]

The nac section handles Non-Adiabatic Coupling (NAC) calculations.

  • dt: Set the distortion time in atomic units (1 au = 0.02418884254 fs) for runtype=NACME.
    • Details: If dt=1, the NACME value is just the state overlap difference, which can be divided either by time or geometric distortion.
    • Note: Computes all combinations of states of nstate from \[tdhf\]. runtype=NACME requires a previous point as a JSON file provided by the FILE2 keyword.
  • dx: Set the distortion for runtype=NAC (in Bohr).
  • states: Specifies the combination of states for each NAC calculation.

Going back to Users' Guides

Clone this wiki locally