Skip to content

Commit

Permalink
PINT: Pretty imag. time striding + comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cschran authored and hforbert committed Sep 3, 2019
1 parent 2e6ac99 commit d83ef15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/motion/helium_interactions.F
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ END FUNCTION helium_total_inter_action
!> \param helium_r_opt explicit helium bead coordinates (optional)
!> \param energy calculated energy
!> \param force calculated force (if requested)
!> \par History
!> 2019-09 Added multiple-time striding in imag. time [cschran]
!> \author Lukasz Walewski
! **************************************************************************************************
SUBROUTINE helium_bead_solute_e_f(pint_env, helium, helium_part_index, &
Expand Down Expand Up @@ -363,11 +365,10 @@ SUBROUTINE helium_bead_solute_e_f(pint_env, helium, helium_part_index, &

! Account for Imaginary time striding in forces:
IF (PRESENT(force)) THEN
stride = 1
IF (hbeads < pint_env%p) THEN
stride = pint_env%p/hbeads
force = force*REAL(stride, dp)
END IF
force = force*REAL(stride,dp)
END IF

RETURN
Expand Down
8 changes: 4 additions & 4 deletions src/motion/helium_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -635,18 +635,18 @@ SUBROUTINE helium_create(helium_env, input, solute)
IF (helium_env(k)%helium%solute_present) THEN
IF (helium_env(k)%helium%solute_beads > helium_env(k)%helium%beads) THEN
! Imaginary time striding for solute:
helium_env(k)%helium%bead_ratio = helium_env(k)%helium%solute_beads/&
helium_env(k)%helium%beads
helium_env(k)%helium%bead_ratio = helium_env(k)%helium%solute_beads/ &
helium_env(k)%helium%beads
! check if bead numbers are commensurate:
i = helium_env(k)%helium%bead_ratio*helium_env(k)%helium%beads-helium_env(k)%helium%solute_beads
IF (i /= 0) THEN
msg_str = "Adjust number of solute beads to multiple of solvent beads."
CPABORT(msg_str)
END IF
msg_str = "Using multiple-time stepping in imaginary time for solute to couple "// &
"to fewer solvent beads. Warning: Avoid too large coupling factors."
"to fewer solvent beads. Warning: Avoid too large coupling factors."
CPWARN(msg_str)
ELSE IF (helium_env(k)%helium%solute_beads < helium_env(k)%helium%beads)
ELSE IF (helium_env(k)%helium%solute_beads < helium_env(k)%helium%beads) THEN
msg_str = "Solute beads < solvent beads: Not supported."
CPABORT(msg_str)
END IF
Expand Down

0 comments on commit d83ef15

Please sign in to comment.