diff --git a/sample_inputs/input.in.sh b/sample_inputs/input.in.sh index fa49af8e..548ec0b0 100644 --- a/sample_inputs/input.in.sh +++ b/sample_inputs/input.in.sh @@ -23,7 +23,7 @@ inose=0, ! NVE ensemble (thermostat turned OFF) istate_init=2, ! initial electronic state (1 is ground state) nstate=3, ! number of electronic states couplings='analytic', ! non-adiabatic coupling terms 'analytic', 'baeck-an', 'none' -mom_adjust='nac' ! momentum adjustment along either 'nac' or 'velocity' +velocity_rescaling='nac_then_velocity' ! momentum adjustment along either 'nac_then_velocity' or 'velocity' deltaE=2.0, ! maximum energy difference (eV) between states for which we calculate NA coupling PopThr=0.001, ! minimum population of either state, for which we compute NA coupling EnergyDifThr=0.50, ! maximum energy difference between two consecutive steps diff --git a/src/surfacehop.F90 b/src/surfacehop.F90 index 9bf92f8a..5de72c0f 100644 --- a/src/surfacehop.F90 +++ b/src/surfacehop.F90 @@ -45,12 +45,11 @@ module mod_sh integer :: nohop = 0 ! How to adjust velocity after hop: - ! mom_adjust = 'nac' (adjmom=0) - Adjust velocity along the NAC vector (default) - ! mom_adjust = 'velocity' (adjmom=1) - Simple velocity rescale - ! NOTE: Simple v-rescale is invoked as a fallback - ! if there is not enough momentum along the NAC vector. + ! velocity_rescaling = 'nac_then_velocity' (adjmom=0) - Adjust velocity along the NAC vector, if not possible, + ! try the velocity vector (default) + ! velocity_rescaling = 'velocity' (adjmom=1) - Rescale along the velocity vector integer :: adjmom = 0 ! for working within the code - character(len=50) :: mom_adjust = 'nac' ! for reading the input file + character(len=50) :: velocity_rescaling = 'nac_then_velocity' ! for reading the input file ! 1 - Reverse momentum direction after frustrated hop integer :: revmom = 0 @@ -100,7 +99,7 @@ module mod_sh integer :: ignore_state = 0 namelist /sh/ istate_init, nstate, substep, deltae, integ, couplings, nohop, phase, decoh_alpha, popthr, ignore_state, & - nac_accu1, nac_accu2, popsumthr, energydifthr, energydriftthr, mom_adjust, revmom, & + nac_accu1, nac_accu2, popsumthr, energydifthr, energydriftthr, velocity_rescaling, revmom, & dE_S0S1_thr, correct_decoherence save @@ -259,23 +258,24 @@ subroutine check_sh_parameters() error = .true. end select - ! converting input 'mom_adjust' into inac which is used in the code - select case (mom_adjust) - case ('nac') + ! converting input 'velocity_rescaling' into inac which is used in the code + select case (velocity_rescaling) + case ('nac_then_velocity') adjmom = 0 write (stdout, '(A)') 'Rescaling velocity along the NAC vector after hop.' + write (stdout, '(A)') 'If there is not enough energy, try rescaling along the velocity vector.' case ('velocity') adjmom = 1 write (stdout, '(A)') 'Rescaling velocity along the momentum vector after hop.' case default - write (stderr, '(A)') 'Parameter "mom_adjust" must be "nac" or "velocity".' + write (stderr, '(A)') 'Parameter "velocity_rescaling" must be "nac_then_velocity" or "velocity".' error = .true. end select if (adjmom == 0 .and. inac == 1) then - write (stderr, '(A)') 'Combination of adjmom=0 and couplings="baeck-an" is not possible.' + write (stderr, '(A)') 'Combination of velocity_rescaling="nac_then_velocity" and couplings="baeck-an" is not possible.' write (stderr, '(A)') 'Velocity cannot be rescaled along NAC when using Baeck-An.' - write (stderr, '(A)') 'Change adjmom=1 to rescale along momentum vector.' + write (stderr, '(A)') 'Change velocity_rescaling="velocity" to rescale along the velocity vector.' error = .true. end if diff --git a/tests/INIT/input.in.sh b/tests/INIT/input.in.sh index 94b850e2..b6f13bf8 100644 --- a/tests/INIT/input.in.sh +++ b/tests/INIT/input.in.sh @@ -15,7 +15,7 @@ inose=0, nstate=100 istate_init=101 integ='invalid' -mom_adjust='nac' +velocity_rescaling='nac_then_velocity' ! momentum adjustment along either 'nac_then_velocity' or 'velocity' couplings='baeck-an' nac_accu1=7 nac_accu2=8 diff --git a/tests/SH_BAECK-AN/input.in b/tests/SH_BAECK-AN/input.in index 2554cf01..03aaf28e 100644 --- a/tests/SH_BAECK-AN/input.in +++ b/tests/SH_BAECK-AN/input.in @@ -29,7 +29,7 @@ PopThr=0.00001, ! minimum population of either state, for which we compu EnergyDifThr=0.01, ! maximum energy difference between two consecutive steps EnergyDriftThr=0.01, ! maximum energy drift from initial total energy couplings='baeck-an' -mom_adjust='velocity' +velocity_rescaling='velocity' / &system diff --git a/tests/SH_FRUSTRATED/input.in b/tests/SH_FRUSTRATED/input.in index 6834f570..88737b6d 100644 --- a/tests/SH_FRUSTRATED/input.in +++ b/tests/SH_FRUSTRATED/input.in @@ -21,7 +21,7 @@ inose=0, / &sh -mom_adjust='nac' +velocity_rescaling='nac_then_velocity' ! momentum adjustment along either 'nac_then_velocity' or 'velocity' revmom=1, ! Reverse momentum after frustrated hop istate_init=2, ! initial electronic state nstate=3, ! number of electronic states diff --git a/tests/SH_FRUSTRATED/input.in2 b/tests/SH_FRUSTRATED/input.in2 index 20d75276..1cbc7024 100644 --- a/tests/SH_FRUSTRATED/input.in2 +++ b/tests/SH_FRUSTRATED/input.in2 @@ -21,7 +21,7 @@ inose=0, / &sh -mom_adjust='nac' +velocity_rescaling='nac_then_velocity' ! momentum adjustment along either 'nac_then_velocity' or 'velocity' istate_init=3, ! initial electronic state nstate=3, ! number of electronic states substep=100, ! number of substeps for solving ESCH diff --git a/tests/SH_SIMPLE_RESCALE/input.in b/tests/SH_SIMPLE_RESCALE/input.in index a8ade811..b3fc66ac 100644 --- a/tests/SH_SIMPLE_RESCALE/input.in +++ b/tests/SH_SIMPLE_RESCALE/input.in @@ -21,7 +21,7 @@ inose=0, / &sh -mom_adjust='velocity' +velocity_rescaling='velocity' istate_init=3, ! initial electronic state nstate=3, ! number of electronic states substep=100, ! number of substeps for solving ESCH diff --git a/tests/SH_SIMPLE_RESCALE/input.in2 b/tests/SH_SIMPLE_RESCALE/input.in2 index e926b26d..59bdf3be 100644 --- a/tests/SH_SIMPLE_RESCALE/input.in2 +++ b/tests/SH_SIMPLE_RESCALE/input.in2 @@ -21,7 +21,7 @@ inose=0, / &sh -mom_adjust='velocity' +velocity_rescaling='velocity' istate_init=3, ! initial electronic state nstate=3, ! number of electronic states substep=100, ! number of substeps for solving ESCH