42#include "../base/base_uses.f90"
53 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'pint_qtb'
71 CHARACTER(LEN=rng_record_length) :: rng_record
74 REAL(kind=
dp) :: dti2, ex
75 REAL(kind=
dp),
DIMENSION(3, 2) :: initial_seed
79 cpabort(
"QTB is designed to work with the RPMD propagator only")
82 pint_env%e_qtb = 0.0_dp
84 qtb_therm%thermostat_energy = 0.0_dp
96 dti2 = 0.5_dp*pint_env%dt
97 ALLOCATE (qtb_therm%c1(p))
98 ALLOCATE (qtb_therm%c2(p))
99 ALLOCATE (qtb_therm%g_fric(p))
100 ALLOCATE (qtb_therm%massfact(p, pint_env%ndim))
103 qtb_therm%g_fric(1) = 1.0_dp/qtb_therm%tau
105 qtb_therm%g_fric(i) = sqrt((1.d0/qtb_therm%tau)**2 + (qtb_therm%lamb)**2* &
106 normalmode_env%lambda(i))
109 ex = -dti2*qtb_therm%g_fric(i)
110 qtb_therm%c1(i) = exp(ex)
111 ex = qtb_therm%c1(i)*qtb_therm%c1(i)
112 qtb_therm%c2(i) = sqrt(1.0_dp - ex)
114 DO j = 1, pint_env%ndim
116 qtb_therm%massfact(i, j) = sqrt(1.0_dp/pint_env%mass_fict(i, j))
121 NULLIFY (rng_section)
123 subsection_name=
"RNG_INIT")
127 i_rep_val=1, c_val=rng_record)
130 initial_seed(:, :) = real(pint_env%thermostat_rng_seed,
dp)
132 name=
"qtb_rng_gaussian", distribution_type=
gaussian, &
133 extended_precision=.true., &
138 CALL pint_qtb_forces_init(pint_env, normalmode_env, qtb_therm, restart)
152 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: vold, vnew
153 INTEGER,
INTENT(IN) :: p, ndim
154 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(IN) :: masses
157 CHARACTER(len=*),
PARAMETER :: routinen =
'pint_qtb_step'
159 INTEGER :: handle, i, ibead, idim
160 REAL(kind=
dp) :: delta_ekin
162 CALL timeset(routinen, handle)
167 qtb_therm%cpt(ibead) = qtb_therm%cpt(ibead) + 1
169 IF (qtb_therm%cpt(ibead) == 2*qtb_therm%step(ibead))
THEN
172 DO i = 1, qtb_therm%nf - 1
173 qtb_therm%rng_status(i) = qtb_therm%rng_status(i + 1)
175 CALL qtb_therm%gaussian_rng_stream%dump(qtb_therm%rng_status(qtb_therm%nf))
179 DO i = 1, qtb_therm%nf - 1
180 qtb_therm%r(i, ibead, idim) = qtb_therm%r(i + 1, ibead, idim)
182 qtb_therm%r(qtb_therm%nf, ibead, idim) = qtb_therm%gaussian_rng_stream%next()
184 qtb_therm%rf(ibead, idim) = 0.0_dp
185 DO i = 1, qtb_therm%nf
186 qtb_therm%rf(ibead, idim) = qtb_therm%rf(ibead, idim) + &
187 qtb_therm%h(i, ibead)*qtb_therm%r(i, ibead, idim)
190 qtb_therm%cpt(ibead) = 0
197 vnew(ibead, idim) = qtb_therm%c1(ibead)*vold(ibead, idim) + &
198 qtb_therm%massfact(ibead, idim)*qtb_therm%c2(ibead)* &
199 qtb_therm%rf(ibead, idim)
200 delta_ekin = delta_ekin + masses(ibead, idim)*( &
201 vnew(ibead, idim)*vnew(ibead, idim) - &
202 vold(ibead, idim)*vold(ibead, idim))
206 qtb_therm%thermostat_energy = qtb_therm%thermostat_energy - 0.5_dp*delta_ekin
208 CALL timestop(handle)
219 DEALLOCATE (qtb_therm%c1)
220 DEALLOCATE (qtb_therm%c2)
221 DEALLOCATE (qtb_therm%g_fric)
222 DEALLOCATE (qtb_therm%massfact)
223 DEALLOCATE (qtb_therm%rf)
224 DEALLOCATE (qtb_therm%h)
225 DEALLOCATE (qtb_therm%r)
226 DEALLOCATE (qtb_therm%cpt)
227 DEALLOCATE (qtb_therm%step)
228 DEALLOCATE (qtb_therm%rng_status)
239 IF (
ASSOCIATED(pint_env%qtb_therm))
THEN
240 pint_env%e_qtb = pint_env%qtb_therm%thermostat_energy
253 SUBROUTINE pint_qtb_forces_init(pint_env, normalmode_env, qtb_therm, restart)
259 CHARACTER(len=*),
PARAMETER :: routinen =
'pint_qtb_forces_init'
261 COMPLEX(KIND=dp) :: tmp1
262 COMPLEX(KIND=dp),
CONTIGUOUS,
DIMENSION(:), &
263 POINTER :: filter_in, filter_out
264 INTEGER :: handle, i, ibead, idim, log_unit, ndim, &
265 nf, p, print_level, step
266 REAL(kind=
dp) :: aa, bb, correct, dt, dw, fcut, h, kt, &
268 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: fp
269 REAL(kind=
dp),
DIMENSION(:),
POINTER :: fp1
273 CALL timeset(routinen, handle)
278 IF (mod(qtb_therm%nf, 2) /= 0) qtb_therm%nf = qtb_therm%nf + 1
281 para_env => pint_env%logger%para_env
283 ALLOCATE (qtb_therm%rng_status(nf))
284 ALLOCATE (qtb_therm%h(nf, p))
285 ALLOCATE (qtb_therm%step(p))
288 IF (para_env%is_source())
THEN
292 print_level = logger%iter_info%print_level
295 kt = pint_env%kT*pint_env%propagator%temp_sim2phys
298 CALL fft_alloc(filter_in, [nf])
299 CALL fft_alloc(filter_out, [nf])
303 CALL open_file(file_name=trim(logger%iter_info%project_name)//
".qtbLog", &
304 file_action=
"WRITE", file_status=
"UNKNOWN", unit_number=log_unit)
305 WRITE (log_unit,
'(A)')
' # Log file for the QTB random forces generation'
306 WRITE (log_unit,
'(A)')
' # ------------------------------------------------'
307 WRITE (log_unit,
'(A,I5)')
' # Number of beads P = ', p
308 WRITE (log_unit,
'(A,I6)')
' # Number of dimension 3*N = ', ndim
309 WRITE (log_unit,
'(A,I4)')
' # Number of filter parameters Nf=', nf
315 fcut = sqrt((1.d0/qtb_therm%taucut)**2 + (qtb_therm%lambcut)**2* &
316 normalmode_env%lambda(ibead))
319 qtb_therm%step(ibead) = nint(1.0_dp/(2.0_dp*fcut*dt))
320 IF (qtb_therm%step(ibead) == 0) qtb_therm%step(ibead) = 1
321 step = qtb_therm%step(ibead)
328 IF (qtb_therm%fp == 0)
THEN
329 CALL pint_qtb_computefp0(pint_env, fp, fp1, dw, aa, bb, log_unit, ibead, print_level)
331 CALL pint_qtb_computefp1(pint_env, fp, fp1, dw, aa, bb, log_unit, ibead, print_level)
336 WRITE (log_unit,
'(A,I4,A)')
' # -------- NM ', ibead,
' --------'
337 WRITE (log_unit,
'(A,I4,A)')
' # New random forces every ', step,
' MD steps'
338 WRITE (log_unit,
'(A,ES13.3,A)')
' # Angular cutoff freq. = ',
twopi*fcut*4.1341e4_dp,
' rad/ps'
339 WRITE (log_unit,
'(A,ES13.3,A)')
' # Free ring polymer angular freq.= ', &
340 sqrt(normalmode_env%lambda(ibead))*4.1341e4_dp,
' rad/ps'
341 WRITE (log_unit,
'(A,ES13.3,A)')
' # Friction coeff. = ', qtb_therm%g_fric(ibead)*4.1341e4_dp,
' THz'
342 WRITE (log_unit,
'(A,ES13.3,A)')
' # Angular frequency step dw = ', dw*4.1341e4_dp,
' rad/ps'
347 filter_in(1) = sqrt(kt)*(1.0_dp, 0.0_dp)
348 ELSE IF (qtb_therm%fp == 1 .AND. ibead == 1)
THEN
349 filter_in(1) = sqrt(p*kt)*(1.0_dp, 0.0_dp)
351 filter_in(1) = sqrt(p*kt*fp1(1))*(1.0_dp, 0.0_dp)
356 correct = sin(tmp)/tmp
357 filter_in(i + 1) = sqrt(fp(i))/correct*(1.0_dp, 0.0_dp)
358 filter_in(nf - i + 1) = conjg(filter_in(i + 1))
362 CALL pint_qtb_fft(filter_in, filter_out, nf)
369 tmp1 = filter_out(i)/(nf*sqrt(2.0_dp*step))
370 filter_out(i) = filter_out(nf/2 + i)/(nf*sqrt(2.0_dp*step))
371 filter_out(nf/2 + i) = tmp1
375 qtb_therm%h(i, ibead) = real(filter_out(i),
dp)
379 CALL fft_dealloc(filter_in)
380 CALL fft_dealloc(filter_out)
382 IF (p > 1)
DEALLOCATE (fp1)
385 CALL para_env%bcast(qtb_therm%h)
386 CALL para_env%bcast(qtb_therm%step)
388 ALLOCATE (qtb_therm%r(nf, p, ndim))
389 ALLOCATE (qtb_therm%cpt(p))
390 ALLOCATE (qtb_therm%rf(p, ndim))
393 CALL pint_qtb_restart(pint_env, qtb_therm)
396 DO i = 1, qtb_therm%nf
397 CALL qtb_therm%gaussian_rng_stream%dump(qtb_therm%rng_status(i))
404 qtb_therm%r(i, ibead, idim) = qtb_therm%gaussian_rng_stream%next()
413 qtb_therm%rf(ibead, idim) = 0.0_dp
415 qtb_therm%rf(ibead, idim) = qtb_therm%rf(ibead, idim) + &
416 qtb_therm%h(i, ibead)*qtb_therm%r(i, ibead, idim)
421 CALL timestop(handle)
422 END SUBROUTINE pint_qtb_forces_init
431 SUBROUTINE pint_qtb_restart(pint_env, qtb_therm)
435 INTEGER :: begin, i, ibead, idim, istep
437 begin = pint_env%first_step - mod(pint_env%first_step, qtb_therm%step(1)) - &
438 (qtb_therm%nf - 1)*qtb_therm%step(1)
443 DO i = 1, qtb_therm%nf
444 CALL qtb_therm%gaussian_rng_stream%dump(qtb_therm%rng_status(i))
447 DO idim = 1, pint_env%ndim
448 DO ibead = 1, pint_env%p
449 DO i = 1, qtb_therm%nf
450 qtb_therm%r(i, ibead, idim) = qtb_therm%gaussian_rng_stream%next()
456 qtb_therm%cpt(1) = 2*(qtb_therm%step(1) - 1)
457 DO ibead = 2, pint_env%p
458 qtb_therm%cpt(ibead) = 2*mod(begin - 1, qtb_therm%step(ibead))
465 DO istep = 1, 2*(pint_env%first_step - begin + 1)
466 DO ibead = 1, pint_env%p
467 qtb_therm%cpt(ibead) = qtb_therm%cpt(ibead) + 1
469 IF (qtb_therm%cpt(ibead) == 2*qtb_therm%step(ibead))
THEN
472 DO i = 1, qtb_therm%nf - 1
473 qtb_therm%rng_status(i) = qtb_therm%rng_status(i + 1)
475 CALL qtb_therm%gaussian_rng_stream%dump(qtb_therm%rng_status(qtb_therm%nf))
477 DO idim = 1, pint_env%ndim
479 DO i = 1, qtb_therm%nf - 1
480 qtb_therm%r(i, ibead, idim) = qtb_therm%r(i + 1, ibead, idim)
482 qtb_therm%r(qtb_therm%nf, ibead, idim) = qtb_therm%gaussian_rng_stream%next()
484 qtb_therm%cpt(ibead) = 0
489 END SUBROUTINE pint_qtb_restart
505 SUBROUTINE pint_qtb_computefp0(pint_env, fp, fp1, dw, aa, bb, log_unit, ibead, print_level)
507 REAL(kind=
dp),
DIMENSION(:),
INTENT(INOUT) :: fp
508 REAL(kind=
dp),
DIMENSION(:),
POINTER :: fp1
509 REAL(kind=
dp),
INTENT(IN) :: dw, aa, bb
510 INTEGER,
INTENT(IN) :: log_unit, ibead, print_level
512 CHARACTER(len=200) :: line
513 INTEGER :: i, j, k, n, niter, nx, p
514 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: kk
515 REAL(kind=
dp) :: dx, dx1, err, fprev, hbokt, malpha, op, &
516 r2, tmp, w, x1, xmax, xmin, xx
517 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: h, x, x2
518 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: fpxk, xk, xk2
524 hbokt = 1.0_dp/(pint_env%kT*pint_env%propagator%temp_sim2phys)
532 fp(j) = tmp*(0.5_dp + 1.0_dp/(exp(tmp) - 1.0_dp))
536 WRITE (log_unit,
'(A)')
' # ------------------------------------------------'
537 WRITE (log_unit,
'(A)')
' # computed fp^(0) function'
538 WRITE (log_unit,
'(A)')
' # i, w(a.u.), fp'
540 WRITE (log_unit, *) j, j*dw, j*0.5_dp*hbokt*dw, fp(j)
546 dx1 = 0.5_dp*hbokt*dw
550 nx = int((xmax - xmin)/dx) + 1
559 WRITE (log_unit,
'(A)')
' # ------------------------------------------------'
560 WRITE (log_unit,
'(A)')
' # computing fp^(0) function'
561 WRITE (log_unit,
'(A)')
' # parameters used:'
562 WRITE (log_unit,
'(A,ES13.3)')
' # dx = ', dx
563 WRITE (log_unit,
'(A,ES13.3)')
' # xmin = ', xmin
564 WRITE (log_unit,
'(A,ES13.3)')
' # xmax = ', xmax
565 WRITE (log_unit,
'(A,I8,I8)')
' # nx, n = ', nx, n
572 ALLOCATE (xk(p - 1, nx))
573 ALLOCATE (xk2(p - 1, nx))
574 ALLOCATE (kk(p - 1, nx))
575 ALLOCATE (fpxk(p - 1, nx))
581 x(j) = xmin + (j - 1)*dx
583 h(j) = x(j)/tanh(x(j))
584 IF (x(j) <= 1.0e-10_dp) h(j) = 1.0_dp
585 fp1(j) = op*x(j)/tanh(x(j)*op)
586 IF (x(j)*op <= 1.0e-10_dp) fp1(j) = 1.0_dp
588 xk2(k, j) = x2(j) + (p*sin(k*
pi*op))**2
589 xk(k, j) = sqrt(xk2(k, j))
590 kk(k, j) = nint((xk(k, j) - xmin)/dx) + 1
591 fpxk(k, j) = xk(k, j)*op/tanh(xk(k, j)*op)
592 IF (xk(k, j)*op <= 1.0e-10_dp) fpxk(k, j) = 1.0_dp
603 tmp = tmp + fpxk(k, j)*x2(j)/xk2(k, j)
606 fp1(j) = malpha*(h(j) - tmp) + (1.0_dp - malpha)*fp1(j)
607 IF (j <= n) err = err + abs(1.0_dp - fp1(j)/fprev)
612 CALL pint_qtb_linreg(fp1(8*nx/10:nx), x(8*nx/10:nx), aa, bb, r2, log_unit, print_level)
619 IF (kk(k, j) < nx)
THEN
620 fpxk(k, j) = fp1(kk(k, j)) + (fp1(kk(k, j) + 1) - fp1(kk(k, j)))/dx* &
621 (xk(k, j) - x(kk(k, j)))
623 fpxk(k, j) = aa*xk(k, j) + bb
631 WRITE (log_unit,
'(A,ES9.3)')
' # average error during computation: ', err
632 WRITE (log_unit,
'(A,ES9.3)')
' # slope of F_P at high freq. - theoretical: ', op
633 WRITE (log_unit,
'(A,ES9.3)')
' # slope of F_P at high freq. - calculated: ', aa
634 WRITE (log_unit,
'(A,F6.3)')
' # F_P at zero freq. - theoretical: ', 1.0_dp
635 WRITE (log_unit,
'(A,F6.3)')
' # F_P at zero freq. - calculated: ', fp1(1)
637 CALL pint_write_line(
"QTB| Initialization of random forces using fP0 function")
639 WRITE (line,
'(A,ES9.3)')
'QTB| average error ', err
641 WRITE (line,
'(A,ES9.3)')
'QTB| slope at high frequency - theoretical: ', op
643 WRITE (line,
'(A,ES9.3)')
'QTB| slope at high frequency - calculated: ', aa
645 WRITE (line,
'(A,F6.3)')
'QTB| value at zero frequency - theoretical: ', 1.0_dp
647 WRITE (line,
'(A,F6.3)')
'QTB| value at zero frequency - calculated: ', fp1(1)
653 WRITE (log_unit,
'(A)')
' # ------------------------------------------------'
654 WRITE (log_unit,
'(A)')
' # computed fp function'
655 WRITE (log_unit,
'(A)')
' # i, w(a.u.), x, fp'
657 WRITE (log_unit, *) j, j*dw, xmin + (j - 1)*dx, fp1(j)
674 k = nint((x1 - xmin)/dx) + 1
677 ELSE IF (k <= 0)
THEN
679 cpabort(
"Error in fp computation (x < xmin) in initialization of QTB random forces")
681 xx = xmin + (k - 1)*dx
683 fp(j) = fp1(k) + (fp1(k + 1) - fp1(k))/dx*(x1 - xx)
685 fp(j) = fp1(k) + (fp1(k) - fp1(k - 1))/dx*(x1 - xx)
692 END SUBROUTINE pint_qtb_computefp0
708 SUBROUTINE pint_qtb_computefp1(pint_env, fp, fp1, dw, aa, bb, log_unit, ibead, print_level)
710 REAL(kind=
dp),
DIMENSION(:),
INTENT(INOUT) :: fp
711 REAL(kind=
dp),
DIMENSION(:),
POINTER :: fp1
712 REAL(kind=
dp) :: dw, aa, bb
713 INTEGER,
INTENT(IN) :: log_unit, ibead, print_level
715 CHARACTER(len=200) :: line
716 INTEGER :: i, j, k, n, niter, nx, p
717 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: kk
718 REAL(kind=
dp) :: dx, dx1, err, fprev, hbokt, malpha, op, &
719 op1, r2, tmp, tmp1, xmax, xmin, xx
720 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: h, x, x2
721 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: fpxk, xk, xk2
727 hbokt = 1.0_dp/(pint_env%kT*pint_env%propagator%temp_sim2phys)
737 dx1 = 0.5_dp*hbokt*dw
741 nx = int((xmax - xmin)/dx) + 1
752 WRITE (log_unit,
'(A)')
' # ------------------------------------------------'
753 WRITE (log_unit,
'(A)')
' # computing fp^(1) function'
754 WRITE (log_unit,
'(A)')
' # parameters used:'
755 WRITE (log_unit,
'(A,ES13.3)')
' # dx = ', dx
756 WRITE (log_unit,
'(A,ES13.3)')
' # xmin = ', xmin
757 WRITE (log_unit,
'(A,ES13.3)')
' # xmax = ', xmax
758 WRITE (log_unit,
'(A,I8,I8)')
' # nx, n = ', nx, n
765 ALLOCATE (xk(p - 1, nx))
766 ALLOCATE (xk2(p - 1, nx))
767 ALLOCATE (kk(p - 1, nx))
768 ALLOCATE (fpxk(p - 1, nx))
774 x(j) = xmin + (j - 1)*dx
776 h(j) = x(j)/tanh(x(j))
777 IF (x(j) <= 1.0e-10_dp) h(j) = 1.0_dp
778 fp1(j) = op1*x(j)/tanh(x(j)*op1)
779 IF (x(j)*op1 <= 1.0e-10_dp) fp1(j) = 1.0_dp
781 xk2(k, j) = x2(j) + (p*sin(k*
pi*op))**2
782 xk(k, j) = sqrt(xk2(k, j) - (p*sin(
pi*op))**2)
783 kk(k, j) = nint((xk(k, j) - xmin)/dx) + 1
784 fpxk(k, j) = xk(k, j)*op1/tanh(xk(k, j)*op1)
785 IF (xk(k, j)*op1 <= 1.0e-10_dp) fpxk(k, j) = 1.0_dp
796 tmp = tmp + fpxk(k, j)*x2(j)/xk2(k, j)
799 tmp1 = 1.0_dp + (p*sin(
pi*op)/x(j))**2
800 fp1(j) = malpha*tmp1*(h(j) - 1.0_dp - tmp) + (1.0_dp - malpha)*fp1(j)
801 IF (j <= n) err = err + abs(1.0_dp - fp1(j)/fprev)
806 CALL pint_qtb_linreg(fp1(8*nx/10:nx), x(8*nx/10:nx), aa, bb, r2, log_unit, print_level)
813 IF (kk(k, j) < nx)
THEN
814 fpxk(k, j) = fp1(kk(k, j)) + (fp1(kk(k, j) + 1) - fp1(kk(k, j)))/dx* &
815 (xk(k, j) - x(kk(k, j)))
817 fpxk(k, j) = aa*xk(k, j) + bb
825 WRITE (log_unit,
'(A,ES9.3)')
' # average error during computation: ', err
826 WRITE (log_unit,
'(A,ES9.3)')
' # slope of F_P at high freq. - theoretical: ', op1
827 WRITE (log_unit,
'(A,ES9.3)')
' # slope of F_P at high freq. - calculated: ', aa
829 CALL pint_write_line(
"QTB| Initialization of random forces using fP1 function")
831 WRITE (line,
'(A,ES9.3)')
'QTB| average error ', err
833 WRITE (line,
'(A,ES9.3)')
'QTB| slope at high frequency - theoretical: ', op1
835 WRITE (line,
'(A,ES9.3)')
'QTB| slope at high frequency - calculated: ', aa
841 WRITE (log_unit,
'(A)')
' # ------------------------------------------------'
842 WRITE (log_unit,
'(A)')
' # computed fp function'
843 WRITE (log_unit,
'(A)')
' # i, w(a.u.), x, fp'
845 WRITE (log_unit, *) j, j*dw, xmin + (j - 1)*dx, fp1(j)
860 tmp = (j*dx1)**2 - (p*sin(
pi*op))**2
865 k = nint((tmp - xmin)/dx) + 1
868 ELSE IF (k <= 0)
THEN
871 xx = xmin + (k - 1)*dx
873 fp(j) = fp1(k) + (fp1(k + 1) - fp1(k))/dx*(tmp - xx)
875 fp(j) = fp1(k) + (fp1(k) - fp1(k - 1))/dx*(tmp - xx)
883 END SUBROUTINE pint_qtb_computefp1
896 SUBROUTINE pint_qtb_linreg(y, x, a, b, r2, log_unit, print_level)
897 REAL(kind=
dp),
DIMENSION(:) :: y, x
898 REAL(kind=
dp) :: a, b, r2
899 INTEGER :: log_unit, print_level
901 CHARACTER(len=200) :: line
903 REAL(kind=
dp) :: xav, xvar, xycov, yav, yvar
916 xycov = xycov + x(i)*y(i)
917 xvar = xvar + x(i)**2
918 yvar = yvar + y(i)**2
924 xycov = xycov - xav*yav
933 r2 = xycov/sqrt(xvar*yvar)
935 IF (r2 < 0.9_dp)
THEN
937 WRITE (log_unit,
'(A, E10.3)')
'# possible error during linear regression: r^2 = ', r2
939 WRITE (line,
'(A,E10.3)')
'QTB| possible error during linear regression: r^2 = ', r2
944 END SUBROUTINE pint_qtb_linreg
952 SUBROUTINE pint_qtb_fft(z_in, z_out, n)
955 COMPLEX(KIND=dp),
DIMENSION(n) :: z_out, z_in
959 CALL fft_1d_many(
fwfft, n, 1, .false., .false., n, n, z_in, z_out, 1.0_dp, stat)
960 END SUBROUTINE pint_qtb_fft
Utility routines to open and close files. Tracking of preconnections.
subroutine, public open_file(file_name, file_status, file_form, file_action, file_position, file_pad, unit_number, debug, skip_get_unit_number, file_access)
Opens the requested file using a free unit number.
various routines to log and control the output. The idea is that decisions about where to log should ...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public debug_print_level
integer, parameter, public silent_print_level
Defines the basic variable types.
integer, parameter, public dp
Definition of mathematical constants and functions.
real(kind=dp), parameter, public pi
real(kind=dp), parameter, public twopi
Interface to the message passing library MPI.
Parallel (pseudo)random number generator (RNG) for multiple streams and substreams of random numbers.
type(rng_stream_type) function, public rng_stream_type_from_record(rng_record)
Create a RNG stream from a record given as an internal file (string).
integer, parameter, public rng_record_length
integer, parameter, public gaussian
I/O subroutines for pint_env.
subroutine, public pint_write_line(line)
Writes out a line of text to the default output unit.
Methods to apply the QTB thermostat to PI runs. Based on the PILE implementation from Felix Uhl (pint...
subroutine, public pint_qtb_step(vold, vnew, p, ndim, masses, qtb_therm)
...
subroutine, public pint_calc_qtb_energy(pint_env)
returns the qtb kinetic energy contribution
subroutine, public pint_qtb_release(qtb_therm)
releases the qtb environment
subroutine, public pint_qtb_init(qtb_therm, pint_env, normalmode_env, section)
initializes the data for a QTB run
type of a logger, at the moment it contains just a print level starting at which level it should be l...
stores all the informations relevant to an mpi environment
data to perform the normalmode transformation
environment for a path integral run
data to use the qtb thermostat