howto:newtonx
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
howto:newtonx [2023/08/31 14:09] – [A) Initial conditions and photoabsorption spectra] ahehn | howto:newtonx [2024/01/03 13:09] (current) – oschuett | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to run NAMD computations using the CP2K-NEWTONX interface ====== | + | This page has been moved to: https://manual.cp2k.org/trunk/methods/sampling/newton-x.html |
- | + | ||
- | This is a short tutorial on how to use the CP2K-NEWTONX interface to a) generate initial conditions to compute photoabsorption spectra and b) to run non-adiabatic dynamics simulations using orbital derivative couplings. A more comprehensive tutorial on all NEWTONX features, including a documentation of the required specifications for the CP2K interface, can be found on the NEWTONX homepage, https:// | + | |
- | + | ||
- | ===== Brief theory recap ===== | + | |
- | + | ||
- | The interface enables to use electronic-structure data from CP2K and combine it with the surface hopping module of NEWTONX. Excitation energies ΩM and excited-state eigenvectors XM to describe the excited state M are provided by CP2K, relying on the Tamm-Dancoff eigenvalue problem, | + | |
- | + | ||
- | \begin{equation} \label{tda_equation} | + | |
- | \begin{aligned} | + | |
- | \mathbf{A} \mathbf{X}^M &= \Omega^M \mathbf{S} \mathbf{X}^M \, , \\ | + | |
- | \sum_{\kappa k} [ F_{\mu \kappa \sigma} \delta_{ik} - F_{ik \sigma} S_{\mu \kappa} ] X^M_{\kappa k \sigma} + \sum_{\lambda} K_{\mu \lambda \sigma} [\mathbf{D}^{{\rm{\tiny{X}}}M}] C_{\lambda i \sigma} & | + | |
- | \end{aligned} | + | |
- | \end{equation} | + | |
- | + | ||
- | with S representing the conventional atomic-orbital overlap matrix, F the Kohn-Sham matrix, K the kernel comprising -- depending on the chosen functional -- Coulomb, exchange and exchange-correlation contributions, | + | |
- | The corresponding excited-state gradient is obtained setting up a variational Lagrangian and taking the derivative with respect to the nuclear coordinates R (see also https://www.cp2k.org/howto: | + | |
- | + | ||
- | By performing a TDDFPT computation, | + | |
- | + | ||
- | \begin{equation} \label{newtons_eom} | + | |
- | \begin{aligned} | + | |
- | \mathbf{R}(t + \Delta t) &= \mathbf{R} (t) + \mathbf{v} (t) \Delta t + \frac{1}{2} \mathbf{a}(t) \Delta t^2 \, ,\\ | + | |
- | \mathbf{v} (t + \Delta t) &= \mathbf{v} (t) + \frac{1}{2} (\mathbf{a} (t) + \mathbf{a} (t+ \Delta t) ) \Delta t \, , \\ | + | |
- | \mathbf{a} (t) &= - \frac{1}{m} \nabla \Omega^M (\mathbf{R}(t)) \, . | + | |
- | \end{aligned} | + | |
- | \end{equation} | + | |
- | + | ||
- | The coefficients cM(t) of the total wave function Ψ(R(t)) over all excited states M are obtained implying hopping probabilities PM→N of Tully' | + | |
- | + | ||
- | \begin{equation}\label{surface_hopping} | + | |
- | \begin{aligned} | + | |
- | \Psi (\mathbf{R}(t)) &= \sum_{M} c^{M} (t) \Psi^M (\mathbf{R}(t)) \\ | + | |
- | i \frac{{\rm{d}} c^M (t)}{{\rm{d}}t} &= \sum_N c^N (t) \left ( \delta_{MN} E_N (\mathbf{R}(t)) - i \sigma_{MN} (t) \right ) \, , \\ | + | |
- | P_{M \rightarrow N} &= {\rm{max}} \left [ 0, \frac{-2 \Delta t}{| c^M|^2} {\rm{Re}} (c^M c^{N \ast}) \sigma_{MN} \right ] \, . | + | |
- | \end{aligned} | + | |
- | \end{equation} | + | |
- | + | ||
- | The therefore required non-adiabatic time derivative couplings σMN can be obtained relying on semi-empirical models (Baeck-An; please cite Barbatti | + | |
- | + | ||
- | \begin{equation}\label{ot_time_deriverative_couplings} | + | |
- | \begin{aligned} | + | |
- | \sigma_{MN}^{{\rm{\tiny{OD}}}} &= \sum_{ia} X_{ia}^{M} \frac{\partial }{\partial t} X_{ia}^N + \sum_{iab} X_{ia}^M X_{ib}^N | + | |
- | | + | |
- | S_{pq}^{{\rm{\tiny{t - \Delta t , t}}}} &= \frac{\langle \phi_i (\mathbf{R}(t- \Delta t )) | \phi_j (\mathbf{R} (t)) \rangle}{\Delta t} \, . | + | |
- | \end{aligned} | + | |
- | \end{equation} | + | |
- | a,b,… denote virtual molecular orbitals. | + | |
- | + | ||
- | ===== General input setup ===== | + | |
- | + | ||
- | The input sections for TDDFPT energy and gradient computations are described in the CP2K tutorial https:// | + | |
- | To furthermore provide the required CP2K output, subsequently read in by NEWTONX, the following print statements have to be added to the CP2K input files: | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | It should furthermore be noted that cartesian coordinates have to be provided in terms of the external file " | + | |
- | + | ||
- | ===== A) Initial conditions and photoabsorption spectra ===== | + | |
- | + | ||
- | The following tutorial to obtain photoabsorption spectra is based on section 2 of https:// | + | |
- | For the electronic-structure calculation with CP2K, a '' | + | |
- | + | ||
- | Examplary input files for computing the absorption spectrum as well as for performing a vibrational analysis for a single water molecule with CP2K are given below: | + | |
- | <code - cp2k_excitedstates.inp> | + | |
- | & | + | |
- | PROJECT excited_states_for_h2o | + | |
- | RUN_TYPE ENERGY | + | |
- | PREFERRED_DIAG_LIBRARY SL | + | |
- | PRINT_LEVEL medium | + | |
- | &END GLOBAL | + | |
- | & | + | |
- | & | + | |
- | & | + | |
- | &END FORCES | + | |
- | & | + | |
- | | + | |
- | & | + | |
- | & | + | |
- | & | + | |
- | DIPOLE_FORM LENGTH | + | |
- | & | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | & | + | |
- | & | + | |
- | | + | |
- | | + | |
- | &END NAMD_PRINT | + | |
- | & | + | |
- | &END TDDFPT | + | |
- | & | + | |
- | &DFT | + | |
- | &QS | + | |
- | METHOD GAPW | + | |
- | | + | |
- | &END QS | + | |
- | &SCF | + | |
- | SCF_GUESS restart | + | |
- | &OT | + | |
- | PRECONDITIONER FULL_ALL | + | |
- | MINIMIZER DIIS | + | |
- | &END OT | + | |
- | & | + | |
- | MAX_SCF 900 | + | |
- | EPS_SCF 1.0E-7 | + | |
- | &END OUTER_SCF | + | |
- | MAX_SCF 10 | + | |
- | EPS_SCF 1.0E-7 | + | |
- | &END SCF | + | |
- | POTENTIAL_FILE_NAME POTENTIAL | + | |
- | BASIS_SET_FILE_NAME EMSL_BASIS_SETS | + | |
- | & | + | |
- | CUTOFF 1000 | + | |
- | REL_CUTOFF 100 | + | |
- | NGRIDS 5 | + | |
- | &END MGRID | + | |
- | & | + | |
- | PERIODIC NONE | + | |
- | PSOLVER MT | + | |
- | &END | + | |
- | &XC | + | |
- | & | + | |
- | & | + | |
- | &END XC | + | |
- | &END DFT | + | |
- | & | + | |
- | &CELL | + | |
- | ABC 8.0 8.0 8.0 | + | |
- | PERIODIC NONE | + | |
- | &END CELL | + | |
- | # Coordinates are provided externally for the interface | + | |
- | & | + | |
- | @include coord.cp2k | + | |
- | & | + | |
- | & | + | |
- | & | + | |
- | & | + | |
- | | + | |
- | | + | |
- | &END TOPOLOGY | + | |
- | &KIND H | + | |
- | BASIS_SET 6-311Gxx | + | |
- | POTENTIAL ALL | + | |
- | &END KIND | + | |
- | &KIND O | + | |
- | BASIS_SET 6-311Gxx | + | |
- | POTENTIAL ALL | + | |
- | &END KIND | + | |
- | &END SUBSYS | + | |
- | &END FORCE_EVAL | + | |
- | </ | + | |
- | <code - cp2k_vib.inp> | + | |
- | & | + | |
- | PROJECT normal_modes_for_h2o | + | |
- | RUN_TYPE VIBRATIONAL_ANALYSIS | + | |
- | PREFERRED_DIAG_LIBRARY SL | + | |
- | PRINT_LEVEL medium | + | |
- | &END GLOBAL | + | |
- | & | + | |
- | & | + | |
- | & | + | |
- | &END FORCES | + | |
- | & | + | |
- | METHOD Quickstep | + | |
- | &DFT | + | |
- | &QS | + | |
- | METHOD GAPW # GAPW enables comparison with all-electron molecular program codes like Turbomole | + | |
- | EPS_DEFAULT 1.0E-17 | + | |
- | &END QS | + | |
- | &SCF | + | |
- | SCF_GUESS restart | + | |
- | &OT | + | |
- | PRECONDITIONER FULL_ALL | + | |
- | MINIMIZER DIIS | + | |
- | &END OT | + | |
- | & | + | |
- | MAX_SCF 900 | + | |
- | EPS_SCF 1.0E-7 | + | |
- | &END OUTER_SCF | + | |
- | MAX_SCF 10 | + | |
- | EPS_SCF 1.0E-7 | + | |
- | &END SCF | + | |
- | POTENTIAL_FILE_NAME POTENTIAL | + | |
- | BASIS_SET_FILE_NAME EMSL_BASIS_SETS | + | |
- | & | + | |
- | CUTOFF 1000 | + | |
- | REL_CUTOFF 100 | + | |
- | NGRIDS 5 | + | |
- | &END MGRID | + | |
- | & | + | |
- | PERIODIC NONE | + | |
- | PSOLVER MT | + | |
- | &END | + | |
- | &XC | + | |
- | & | + | |
- | & | + | |
- | &END XC | + | |
- | &END DFT | + | |
- | & | + | |
- | &CELL | + | |
- | ABC 8.0 8.0 8.0 | + | |
- | PERIODIC NONE | + | |
- | &END CELL | + | |
- | # coordinates must be provided as external file for NEWTONX | + | |
- | & | + | |
- | | + | |
- | & | + | |
- | & | + | |
- | & | + | |
- | &END | + | |
- | NATOMS 3 | + | |
- | CONNECTIVITY OFF | + | |
- | & | + | |
- | & | + | |
- | BASIS_SET 6-311Gxx | + | |
- | POTENTIAL ALL | + | |
- | & | + | |
- | & | + | |
- | BASIS_SET 6-311Gxx | + | |
- | POTENTIAL ALL | + | |
- | & | + | |
- | &END SUBSYS | + | |
- | &END FORCE_EVAL | + | |
- | & | + | |
- | & | + | |
- | & | + | |
- | &END NAMD_PRINT | + | |
- | & | + | |
- | DX 0.001 | + | |
- | &END VIBRATIONAL_ANALYSIS | + | |
- | </ | + | |
- | + | ||
- | The input file '' | + | |
- | <code - cp2k.par> | + | |
- | | + | |
- | exec = cp2k.psmp | + | |
- | </ | + | |
- | + | ||
- | Furthermore, | + | |
- | * The file comprising the normal modes of the CP2K frequency computation -- for the above input provided as '' | + | |
- | * The electronic structure program has to be specified as CP2K by defining '' | + | |
- | + | ||
- | <code - initqp_input> | + | |
- | &dat | + | |
- | nact = 2 | + | |
- | iprog = 10 | + | |
- | numat = 3 | + | |
- | | + | |
- | | + | |
- | | + | |
- | anh_f = 1 | + | |
- | | + | |
- | temp = 0 | + | |
- | | + | |
- | chk_e = 1 | + | |
- | nis = 1 | + | |
- | nfs = 11 | + | |
- | kvert = 1 | + | |
- | de = 100 | + | |
- | prog = 14 | + | |
- | iseed = 0 | + | |
- | lvprt = 1 | + | |
- | / | + | |
- | </ | + | |
- | + | ||
- | After providing the excited-state CP2K computation based on input file '' | + | |
- | + | ||
- | <code cp2k> | + | |
- | Cartesian normal modes (1/ | + | |
- | + | ||
- | 0.00 0.00 0.00 0.00 0.00 0.00 | + | |
- | + | ||
- | 0.0000 | + | |
- | | + | |
- | | + | |
- | 0.0001 | + | |
- | 0.7043 | + | |
- | | + | |
- | 0.0000 | + | |
- | 0.7043 | + | |
- | | + | |
- | + | ||
- | | + | |
- | + | ||
- | 0.0712 | + | |
- | | + | |
- | 0.0000 | + | |
- | | + | |
- | 0.0000 | + | |
- | | + | |
- | | + | |
- | 0.0000 | + | |
- | 0.4222 | + | |
- | + | ||
- | Mass weighted normal modes | + | |
- | Frequencies will be multiplied by ANH_F = 1.00000 | + | |
- | + | ||
- | 0.00 0.00 0.00 0.00 0.00 0.00 | + | |
- | + | ||
- | 0.0001 | + | |
- | | + | |
- | | + | |
- | 0.0001 | + | |
- | 0.7071 | + | |
- | | + | |
- | 0.0000 | + | |
- | 0.7071 | + | |
- | | + | |
- | + | ||
- | | + | |
- | + | ||
- | 0.2847 | + | |
- | | + | |
- | 0.0000 | + | |
- | | + | |
- | 0.0000 | + | |
- | | + | |
- | | + | |
- | 0.0000 | + | |
- | 0.4238 | + | |
- | </ | + | |
- | + | ||
- | The thereon based initial conditions are summarized in external output files for each state, dubbed " | + | |
- | + | ||
- | <code cp2k> | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | 0.000417197 | + | |
- | 0.000997296 | + | |
- | Epot of initial state (eV): 0.0865 | + | |
- | | + | |
- | Ekin of initial state (eV): 0.0479 | + | |
- | | + | |
- | | + | |
- | </ | + | |
- | + | ||
- | Based on the initial conditions, the broadened photoabsorption spectrum can be computed with the nxinp script. As outlined in section 2.7 of the cited NEWTONX tutorial, the so-obtained output file '' | + | |
- | + | ||
- | + | ||
- | ===== B) Non-adiabatic dynamics using orbital determinant derivatives ===== | + | |
- | + |
howto/newtonx.txt · Last modified: 2024/01/03 13:09 by oschuett