Skip to content

Commit

Permalink
Bug fix for parallel runs (#1700)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrack committed Oct 28, 2021
1 parent 592eca0 commit 72bf2a5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/ex_property_calculation.F
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ MODULE ex_property_calculation

PRIVATE

! *** Global parameters ***
! Global parameters

CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'ex_property_calculation'

Expand Down Expand Up @@ -126,7 +126,7 @@ SUBROUTINE ex_properties(qs_env, matrix_pe, p_env)
iounit = cp_logger_get_default_unit_nr(logger, local=.TRUE.)
ELSE
iounit = -1
ENDIF
END IF

print_key => section_vals_get_subs_vals(section_vals=qs_env%input, &
subsection_name="DFT%PRINT%MOMENTS")
Expand Down Expand Up @@ -243,17 +243,18 @@ SUBROUTINE ex_properties(qs_env, matrix_pe, p_env)
END DO
CALL dbcsr_deallocate_matrix_set(moments)
END IF
!

tdip = -(rdip + pedip + pdip + cdip)

IF (unit_nr > 0) THEN
tdip = -(rdip + pedip + pdip + cdip)
WRITE (unit_nr, "(T3,A)") "Dipoles are based on the traditional operator."
dd = SQRT(SUM(tdip(1:3)**2))*debye
WRITE (unit_nr, "(T3,A)") "Dipole moment [Debye]"
WRITE (unit_nr, "(T5,3(A,A,F14.8,1X),T60,A,T67,F14.8)") &
(TRIM(rlab(i)), "=", tdip(i)*debye, i=1, 3), "Total=", dd
WRITE (unit_nr, FMT="(T2,A,T61,E20.12)") ' DIPOLE : CheckSum =', SUM(ABS(tdip))
END IF
ENDIF
END IF
END IF

CALL get_qs_env(qs_env=qs_env, results=results)
Expand All @@ -269,6 +270,4 @@ SUBROUTINE ex_properties(qs_env, matrix_pe, p_env)

END SUBROUTINE ex_properties

! **************************************************************************************************

END MODULE ex_property_calculation

0 comments on commit 72bf2a5

Please sign in to comment.