Skip to content

Commit

Permalink
Print orbital densities also when using damp dynamics. (#17)
Browse files Browse the repository at this point in the history
* print orbital density when using damp dynamic

* print orbital density also if using damp dynamics.
Both occ and empty

* Remove name and dates
  • Loading branch information
nscolonna authored Jul 21, 2023
1 parent d909b4e commit 2a3de3f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CPV/cpr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ SUBROUTINE cprmain(tau_out, fion_out, etot_out)
USE small_box, ONLY: ainvb
USE descriptors, ONLY: descla_siz_
USE twin_types
USE input_parameters, ONLY: fixed_state, fixed_band
USE input_parameters, ONLY: fixed_state, fixed_band, print_real_space_density
use print_real_space_orbital_density, only: print_orbr
!
IMPLICIT NONE
!
Expand Down Expand Up @@ -676,6 +677,12 @@ SUBROUTINE cprmain(tau_out, fion_out, etot_out)
END IF
!
IF (MOD(nfi, iprint) == 0 .OR. tlast) THEN
!
! if tcg the orbitals are printed inside gc_sub.f90
! we avoid printing these twice.
if (print_real_space_density .AND. .NOT. tcg) then
call print_orbr(bec, nbsp, ispin, lgam, .False., c0)
end if
!
! In order to calculate the eigenvalues for CG case
!
Expand Down Expand Up @@ -1020,6 +1027,7 @@ SUBROUTINE cprmain(tau_out, fion_out, etot_out)
!
END DO main_loop
!
!
!===================== end of main loop of molecular dynamics ===============
!
! ... Here copy relevant physical quantities into the output arrays/variables
Expand Down
8 changes: 7 additions & 1 deletion CPV/emptystates.f90
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ SUBROUTINE empty_cp_twin_x(nfi, c0, v, tcg)
restart_from_wannier_cp, wannier_empty_only, &
fixed_band, print_wfc_anion, wo_odd_in_empty_run, &
odd_nkscalfact, index_empty_to_save, write_hr, &
impose_bloch_symm
impose_bloch_symm, print_real_space_density
USE wavefunctions_module, ONLY: c0fixed_emp
USE print_real_space_orbital_density, only: print_orbr
!
IMPLICIT NONE
!
Expand Down Expand Up @@ -666,6 +667,10 @@ SUBROUTINE empty_cp_twin_x(nfi, c0, v, tcg)
!
END DO ITERATIONS
!
if (print_real_space_density) then
call print_orbr(bec, nbsp_emp, ispin_emp, lgam, .True., c0_emp)
end if
!
END IF !if clause to choose between cg and damped dynamics
!
IF (ionode) WRITE (stdout, "()")
Expand Down Expand Up @@ -803,6 +808,7 @@ SUBROUTINE empty_cp_twin_x(nfi, c0, v, tcg)
!
END IF
!
!
DEALLOCATE (ispin_emp)
DEALLOCATE (f_emp)
DEALLOCATE (f_aux)
Expand Down

0 comments on commit 2a3de3f

Please sign in to comment.