mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 22:25:32 -04:00
HELIUM: Performance improvement for worm algorithm
This commit is contained in:
parent
6888e07a54
commit
78cea8eeeb
4 changed files with 17 additions and 21 deletions
|
|
@ -161,8 +161,10 @@ CONTAINS
|
|||
helium%energy_inst(e_id_kinetic) = (en-pot+kin)/n
|
||||
helium%energy_inst(e_id_interact) = interac
|
||||
helium%energy_inst(e_id_thermo) = (en+kin)/n+helium%e_corr
|
||||
helium%energy_inst(e_id_virial) = 0.0_dp !(en+vkin)/n+helium%e_corr
|
||||
helium%energy_inst(e_id_total) = (en+vkin)/n+helium%e_corr
|
||||
helium%energy_inst(e_id_virial) = vkin ! 0.0_dp at the moment
|
||||
helium%energy_inst(e_id_total) = helium%energy_inst(e_id_thermo)
|
||||
! Once vkin is properly implemented, switch to:
|
||||
! helium%energy_inst(e_id_total) = (en+vkin)/n+helium%e_corr
|
||||
|
||||
RETURN
|
||||
END SUBROUTINE helium_calc_energy
|
||||
|
|
|
|||
|
|
@ -202,13 +202,6 @@ CONTAINS
|
|||
! Accumulate statistics if we are in the Z-sector:
|
||||
IF (helium%worm_is_closed) THEN
|
||||
nstat = nstat+1
|
||||
|
||||
CALL helium_calc_energy(helium, pint_env)
|
||||
helium%energy_avrg(:) = helium%energy_avrg(:)+helium%energy_inst(:)
|
||||
|
||||
CALL helium_calc_plength(helium)
|
||||
helium%plength_avrg(:) = helium%plength_avrg(:)+helium%plength_inst(:)
|
||||
|
||||
IF (helium%solute_present) THEN
|
||||
IF (helium%get_helium_forces == helium_forces_average) THEN
|
||||
!TODO needs proper averaging!
|
||||
|
|
@ -253,13 +246,6 @@ CONTAINS
|
|||
! Accumulate statistics if we are in closed configurations (which we always are)
|
||||
nstat = nstat+1
|
||||
ntot = ntot+1
|
||||
|
||||
CALL helium_calc_energy(helium, pint_env)
|
||||
helium%energy_avrg(:) = helium%energy_avrg(:)+helium%energy_inst(:)
|
||||
|
||||
CALL helium_calc_plength(helium)
|
||||
helium%plength_avrg(:) = helium%plength_avrg(:)+helium%plength_inst(:)
|
||||
|
||||
IF (helium%solute_present) THEN
|
||||
IF (helium%get_helium_forces == helium_forces_average) THEN
|
||||
! TODO: needs proper averaging
|
||||
|
|
@ -277,6 +263,14 @@ CONTAINS
|
|||
nmoveheadatt+nmovetailatt+ncrawlfwdatt+ncrawlbwdatt
|
||||
helium%worm_nstat = nstat
|
||||
|
||||
! Calculate energy and permutation path length
|
||||
! Multiply times helium%worm_nstat for consistent averaging in helium_sampling
|
||||
CALL helium_calc_energy(helium, pint_env)
|
||||
helium%energy_avrg(:) = helium%energy_inst(:)*REAL(helium%worm_nstat, dp)
|
||||
|
||||
CALL helium_calc_plength(helium)
|
||||
helium%plength_avrg(:) = helium%plength_inst(:)*REAL(helium%worm_nstat, dp)
|
||||
|
||||
! Calculate last_force
|
||||
IF (helium%solute_present) THEN
|
||||
IF (helium%get_helium_forces == helium_forces_last) THEN
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ h2o_pint_exact_harm.inp 9 3e-14 2.854
|
|||
h2o_pint_rpmd.inp 9 2e-14 1.1503487725277912E-002
|
||||
h2o_pint_constraints_nose.inp 9 2e-14 9.7527488124538198E-003
|
||||
h2o_pint_constraints_exact.inp 9 2e-14 2.8127812079331727E-003
|
||||
he32_only.inp 40 2e-14 -6.8432379611995943E-005
|
||||
he32_only_restart.inp 40 2e-14 -6.9355037438372283E-005
|
||||
he32_only.inp 40 2e-14 -2.1415575929544138E-005
|
||||
he32_only_restart.inp 40 2e-14 -1.4377236656991897E-005
|
||||
water-in-helium.inp 9 7e-14 1.0717546824070511E-003
|
||||
water-in-helium-restart.inp 9 1e-13 1.0716120146125518E-003
|
||||
water-in-helium-lastforce.inp 9 1e-13 1.0708166830830485E-003
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ w512_pint_qtb_fp0.inp 9 3e-12
|
|||
w512_pint_qtb_fp1.inp 9 3e-11 3.1102704018032394
|
||||
w512_pint_qtb_fp1-1.restart 9 4e-10 8.5170440538048666
|
||||
centroid_velocity_init.inp 9 1.0E-14 0.32999751991202331
|
||||
he32_density.inp 40 2e-14 -6.8432379611995943E-005
|
||||
he32_only_worm.inp 40 1e-11 -7.1964673900364254E-005
|
||||
he32_only_worm_restart.inp 40 1e-11 -7.0863224005139337E-005
|
||||
he32_density.inp 40 2e-14 -2.1415575929544138E-005
|
||||
he32_only_worm.inp 40 1e-11 3.2848032583585659E-004
|
||||
he32_only_worm_restart.inp 40 1e-11 3.1056893819001927E-004
|
||||
water-in-helium-worm.inp 9 1e-11 -4.2435303435780906E-004
|
||||
water-in-helium-striding.inp 9 1e-11 9.2149634888323367E-002
|
||||
#EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue