User Tools

Site Tools


howto:newtonx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
howto:newtonx [2023/08/31 12:27] – [Brief theory recap] ahehnhowto:newtonx [2023/08/31 14:09] – [A) Initial conditions and photoabsorption spectra] ahehn
Line 17: Line 17:
 The corresponding excited-state gradient is obtained setting up a variational Lagrangian and taking the derivative with respect to the nuclear coordinates $\mathbf{R}$ (see also https://www.cp2k.org/howto:tddft). The corresponding excited-state gradient is obtained setting up a variational Lagrangian and taking the derivative with respect to the nuclear coordinates $\mathbf{R}$ (see also https://www.cp2k.org/howto:tddft).
  
-By performing a TDDFPT computation, excitation energies $\Omega^M$, excited-state eigenvectors $\mathbf{X}^M$ and corresponding excited-state gradients $\nabla \Omega^M (\mathbf{R})$ are provided by CP2K. On the so-defined potential energy surfaces, the nuclei are propagated classically relying on the surface hopping code of NEWTONX,+By performing a TDDFPT computation, excitation energies $\Omega^M (\mathbf{R}(t))$, excited-state eigenvectors $\mathbf{X}^M (\mathbf{R}(t))$ and corresponding excited-state gradients $\nabla \Omega^M (\mathbf{R}(t))$ are provided by CP2K. On the so-defined potential energy surfaces, the nuclei are propagated classically relying on the surface hopping code of NEWTONX,
  
 \begin{equation} \label{newtons_eom} \begin{equation} \label{newtons_eom}
Line 27: Line 27:
 \end{equation} \end{equation}
  
-The coefficients $c^M$ of the total wave function $\Psi$ are obtained implying hopping probabilities $P_{M\rightarrow N}$ of Tully's surface hopping,+The coefficients $c^M (t)$ of the total wave function $\Psi (\mathbf{R}(t))$ over all excited states $M$ are obtained implying hopping probabilities $P_{M\rightarrow N}$ of Tully's surface hopping,
  
 \begin{equation}\label{surface_hopping} \begin{equation}\label{surface_hopping}
 \begin{aligned} \begin{aligned}
-%\Psi (\mathbf{R}(t)) &= \sum_{M} c^{M} (t) \Psi^M (\mathbf{R}(t)) \\ +\Psi (\mathbf{R}(t)) &= \sum_{M} c^{M} (t) \Psi^M (\mathbf{R}(t)) \\ 
-%i \frac{{\rm{d}} c^M (t)}{{\rm{d}} c^M (t)}{\rm{d}}t} &= \sum_N c^N (t) ( \delta_{MN} E_N (\mathbf{R}(t)) - i \sigma_{MN} (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}} [ 0, \frac{-2 \Delta t}{| c^M|^2} {\rm{Re}} (c^M c^{N \ast}) \sigma_{MN} ] \, .+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{aligned}
 \end{equation} \end{equation}
  
-The therefore required non-adiabatic time derivative couplings $\sigma_{MN}$ can be obtained relying on semi-empirical models (Baeck-An; please cite Barbatti et al., //Open Research Europe// 1, 49 (2021).) or as numerical time derivative couplings (orbital time derivative (OD); please cite Ryabinkin et al., //J. Phys. Chem. Lett.// 6, 4200 (2015); Barbatti et al., //Molecules// 21, 1603 (2021).), with the corresponding molecular orbital overlap matrix $\mathbf{S}^{{\rm{\tiny{t-\Delta t,t}}}}$ being provided by CP2K,+The therefore required non-adiabatic time derivative couplings $\sigma_{MN}$ can be obtained relying on semi-empirical models (Baeck-An; please cite Barbatti //et al.//, //Open Research Europe// 1, 49 (2021).) or as numerical time derivative couplings (orbital time derivative (OD); please cite Ryabinkin //et al.//, //J. Phys. Chem. Lett.// 6, 4200 (2015); Barbatti //et al.//, //Molecules// 21, 1603 (2021).), with the corresponding molecular orbital overlap matrix $\mathbf{S}^{{\rm{\tiny{t-\Delta t,t}}}}$ being provided by CP2K,
  
 \begin{equation}\label{ot_time_deriverative_couplings} \begin{equation}\label{ot_time_deriverative_couplings}
Line 59: Line 59:
 ===== A) Initial conditions and photoabsorption spectra ===== ===== A) Initial conditions and photoabsorption spectra =====
  
-The following tutorial to obtain photoabsorption spectra is based on https://vdv.dcf.mybluehost.me/nx/wp-content/uploads/2020/02/tutorial-2_2.pdf. +The following tutorial to obtain photoabsorption spectra is based on section 2 of https://vdv.dcf.mybluehost.me/nx/wp-content/uploads/2020/02/tutorial-2_2.pdf. 
-For the electronic-structure calculation with CP2K, a ''cp2k.inp'' and ''cp2k.par'' file as well as a coordinate file named ''coord.cp2k'' has to be provided in a subdirectory called JOB_AD, with ''cp2k.inp'' including all required print sections stated above. Furthermore, to generate the initial conditions, the ''initqp_input'' file requires to specify ''iprog = 10'' for CP2K and ''file_nmodes = cp2k.eig'' to refer to the corresponding output file comprising the normal modes provided by CP2K. All other keywords are to be chosen as outlined in the corresponding NEWTONX tutorial.+For the electronic-structure calculation with CP2K, a ''cp2k.inp'' and ''cp2k.par'' file as well as a coordinate file named ''coord.cp2k'' has to be provided in a subdirectory called ''JOB_AD''. Furthermore, a vibrational analysis computation has to be performed to provide cartesian normal modeswith the input file including the corresponding ''NAMD print'' section
  
-Examplary input files for computing the absorption spectrum of a water molecule are given below: +Examplary input files for computing the absorption spectrum as well as for performing vibrational analysis for a single water molecule with CP2K are given below: 
-<code - h2o_cp2k.inp>+<code - cp2k_excitedstates.inp
 +&GLOBAL 
 +  PROJECT excited_states_for_h2o  
 +  RUN_TYPE ENERGY 
 +  PREFERRED_DIAG_LIBRARY SL 
 +  PRINT_LEVEL medium 
 +&END GLOBAL 
 +&FORCE_EVAL 
 + &PRINT                      # print statement for ground-state or excited-state forces 
 +  &FORCES 
 +  &END FORCES 
 + &END PRINT 
 + METHOD Quickstep 
 + &PROPERTIES 
 +  &TDDFPT                    # TDDFPT input section to compute 10 excited states 
 +   &DIPOLE_MOMENTS 
 +    DIPOLE_FORM LENGTH 
 +   &END DIPOLE_MOMENTS 
 +   KERNEL FULL 
 +   NSTATES 10 
 +   MAX_ITER   100 
 +   MAX_KV 20 
 +   CONVERGENCE [eV] 1.0e-5 
 +   RKS_TRIPLETS F 
 +   &PRINT                     # NAMD print section to print excited-state eigenvectors 
 +    &NAMD_PRINT 
 +     PRINT_VIRTUALS T 
 +     PRINT_PHASES T 
 +    &END NAMD_PRINT 
 +   &END PRINT 
 +  &END TDDFPT 
 + &END PROPERTIES 
 +  &DFT 
 +    &QS 
 +      METHOD GAPW 
 +     EPS_DEFAULT 1.0E-17 
 +    &END QS 
 +    &SCF 
 +      SCF_GUESS restart 
 +      &OT 
 +        PRECONDITIONER FULL_ALL 
 +        MINIMIZER DIIS 
 +      &END OT 
 +      &OUTER_SCF 
 +        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 
 +    &MGRID 
 +      CUTOFF 1000 
 +      REL_CUTOFF 100 
 +      NGRIDS 5 
 +    &END MGRID 
 +    &POISSON 
 +      PERIODIC NONE 
 +      PSOLVER MT 
 +    &END 
 +    &XC 
 +     &XC_FUNCTIONAL PBE 
 +     &END XC_FUNCTIONAL 
 +    &END XC 
 +  &END DFT 
 +  &SUBSYS 
 +    &CELL 
 +      ABC 8.0 8.0 8.0 
 +      PERIODIC NONE 
 +    &END CELL 
 +                                    # Coordinates are provided externally for the interface 
 +     &COORD 
 +      @include coord.cp2k 
 +     &END COORD 
 +    &TOPOLOGY 
 +     &CENTER_COORDINATES T 
 +     &END 
 +     NATOMS 3                       # specifying number of atoms for NEWTONX 
 +     CONNECTIVITY OFF 
 +    &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> 
 +<code - cp2k_vib.inp> 
 +&GLOBAL 
 +  PROJECT normal_modes_for_h2o 
 +  RUN_TYPE VIBRATIONAL_ANALYSIS      #computing normal modes to generate initial conditions 
 +  PREFERRED_DIAG_LIBRARY SL 
 +  PRINT_LEVEL medium 
 +&END GLOBAL 
 +&FORCE_EVAL 
 + &PRINT 
 +  &FORCES 
 +  &END FORCES 
 + &END PRINT 
 +  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 
 +      &OUTER_SCF 
 +        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 
 +    &MGRID 
 +      CUTOFF 1000 
 +      REL_CUTOFF 100 
 +      NGRIDS 5 
 +    &END MGRID 
 +    &POISSON 
 +      PERIODIC NONE 
 +      PSOLVER MT 
 +    &END 
 +    &XC 
 +     &XC_FUNCTIONAL PBE 
 +     &END XC_FUNCTIONAL 
 +    &END XC 
 +  &END DFT 
 +  &SUBSYS 
 +    &CELL 
 +      ABC 8.0 8.0 8.0 
 +      PERIODIC NONE 
 +    &END CELL 
 +                                    # coordinates must be provided as external file for NEWTONX 
 +     &COORD 
 +     @include coord.cp2k 
 +     &END COORD 
 +     &TOPOLOGY 
 +      &CENTER_COORDINATES T 
 +      &END 
 +      NATOMS 3 
 +      CONNECTIVITY OFF 
 +     &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 
 +&VIBRATIONAL_ANALYSIS 
 + &PRINT 
 +  &NAMD_PRINT                      # keyword to enable printing of cartesian normal modes 
 +  &END NAMD_PRINT 
 + &END PRINT 
 + DX 0.001 
 +&END VIBRATIONAL_ANALYSIS 
 +</code> 
 + 
 +The input file ''cp2k.par'' includes all specifications regarding the executable and parallelization setup. 
 +<code - cp2k.par> 
 + parallel = 16 
 + exec = cp2k.psmp 
 +</code> 
 + 
 +Furthermore, a ''initqp_input'' file has to be generated for NEWTONX following the instructions given in the NEWTONX tutorial. Specifications for CP2K in the ''initqp_input'' file are the following: 
 +  * The file comprising the normal modes of the CP2K frequency computation -- for the above input provided as ''normal_modes_for_h2o-VIBRATIONS-1.eig''-- has to be specified as ''file_nmodes = normal_modes_for_h2o-VIBRATIONS-1.eig''
 +  * The electronic structure program has to be specified as CP2K by defining ''iprog = 10''
 + 
 +<code - initqp_input> 
 +&dat 
 + nact = 2 
 + iprog = 10 
 + numat = 3 
 + npoints = 500 
 + file_geom = geom 
 + file_nmodes = normal_modes_for_h2o-VIBRATIONS-1.eig 
 + anh_f = 1 
 + rescale = n 
 + temp = 0 
 + ics_flg = n 
 + chk_e = 1 
 + nis = 1 
 + nfs = 11 
 + kvert = 1 
 + de = 100 
 + prog = 14 
 + iseed = 0 
 + lvprt = 1 
 +
 +</code>
  
-The resulting output file of the initcond.pl script of NEWTONX states that the read-in cartesian normal modes are first transfered to mass-weighted normal modes.+After providing the excited-state CP2K computation based on input file ''h2o_cp2k.inp'' in the subdirectory ''JOB_AD'', the normal modes ''normal_modes_for_h2o-VIBRATIONS-1.eig'' of the frequency computation and the ''initqp_input'' file for NEWTONX, the script initcond.pl of NEWTONX can be executed to generate initial conditions. The resulting initcond-output file of NEWTONX, it is first stated that the read-in cartesian normal modes are transferred to mass-weighted normal modes.
  
 <code cp2k> <code cp2k>
Line 122: Line 326:
 </code> </code>
  
-The thereon based initial conditions are summarized in the output files dubbed "final_output", comprising geometries and velocitiesas examplarily given below,+The thereon based initial conditions are summarized in external output files for each state, dubbed "final_output_XXX", comprising information on the various geometries and velocities as examplarily given below:
  
 <code cp2k> <code cp2k>
Line 141: Line 345:
 </code> </code>
  
-Moreover, the output file ''cross-section.dat'' comprises the data points of the computing photoabsorption spectrumas shown below.+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 ''cross-section.dat'' comprises the data points of the computed photoabsorption spectrum as visualized below:
    
  
 ===== B) Non-adiabatic dynamics using orbital determinant derivatives ===== ===== B) Non-adiabatic dynamics using orbital determinant derivatives =====
                                                                                                                                                            
howto/newtonx.txt · Last modified: 2024/01/03 13:09 by oschuett