Last commit reverted, check added: PAW + force theorem was crashing.

Now an error messga is issued
This commit is contained in:
Paolo Giannozzi 2023-11-21 12:15:12 +01:00
parent a79fcade47
commit 6179e03984
1 changed files with 15 additions and 9 deletions

View File

@ -88,15 +88,22 @@ SUBROUTINE potinit()
! ... Cases a) and b): the charge density is read from file ! ... Cases a) and b): the charge density is read from file
! ... this also reads rho%ns if DFT+U, rho%bec if PAW, rho%kin if metaGGA ! ... this also reads rho%ns if DFT+U, rho%bec if PAW, rho%kin if metaGGA
! !
CALL read_scf ( rho, nspin, gamma_only ) IF ( .NOT.lforcet ) THEN
! CALL read_scf ( rho, nspin, gamma_only )
! ... 'force theorem' calculation of MAE: rho is read from previous ELSE
! ... lsda calculation, noncolinear magnetization is set from angles IF ( okpaw ) CALL errore( 'potinit', &
! ... (not if restarting from interrupted run: the charge density 'force theorem with PAW not implemented', 1 )
! ... read from file already has the required magnetization direction) !
! ! ... 'force theorem' calculation of MAE: read rho only from previous
IF ( lforcet .AND. .NOT. restart ) & ! ... lsda calculation, set noncolinear magnetization from angles
! ... (not if restarting! the charge density saved to file in that
! ... case has already the required magnetization direction)
!
CALL read_rhog ( filename, root_bgrp, intra_bgrp_comm, &
ig_l2g, nspin, rho%of_g, gamma_only )
IF ( .NOT. restart ) &
CALL nc_magnetization_from_lsda ( dfftp%ngm, nspin, rho%of_g ) CALL nc_magnetization_from_lsda ( dfftp%ngm, nspin, rho%of_g )
END IF
! !
IF ( lscf ) THEN IF ( lscf ) THEN
! !
@ -336,4 +343,3 @@ SUBROUTINE nc_magnetization_from_lsda ( ngm, nspin, rho )
RETURN RETURN
! !
END SUBROUTINE nc_magnetization_from_lsda END SUBROUTINE nc_magnetization_from_lsda