mirror of https://gitlab.com/QEF/q-e.git
- fixed a problem with the charge written in restart dir, since
vofrho overwrites rhor, what was written in the restart was the potential and not the charge density. - clean-up in input_parameters and INPUT_CP doc git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2248 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
235d96d71e
commit
df5e388d3c
|
@ -32,7 +32,6 @@
|
|||
! end of module-scope declarations
|
||||
! ----------------------------------------------
|
||||
|
||||
PUBLIC :: printrho, printrho_info
|
||||
PUBLIC :: checkrho, rhoofr, gradrho
|
||||
|
||||
!=----------------------------------------------------------------------=!
|
||||
|
@ -45,193 +44,6 @@
|
|||
RETURN
|
||||
END SUBROUTINE charge_density_closeup
|
||||
!
|
||||
|
||||
!----------------------------------------------------------------------
|
||||
SUBROUTINE printrho(nfi, rho, desc, atoms, ht)
|
||||
!----------------------------------------------------------------------
|
||||
|
||||
! This subroutine print out the charge density to file CHARGE_DENSITY
|
||||
|
||||
USE cell_module, ONLY: boxdimensions, s_to_r
|
||||
USE mp_global, ONLY: mpime, root, group, nproc
|
||||
USE io_global, ONLY: ionode, ionode_id, stdout
|
||||
USE mp, ONLY: mp_gather, mp_sum
|
||||
USE atoms_type_module, ONLY: atoms_type
|
||||
USE charge_types, ONLY: charge_descriptor
|
||||
USE io_files, ONLY: scradir
|
||||
|
||||
|
||||
IMPLICIT NONE
|
||||
|
||||
TYPE (atoms_type), INTENT(IN) :: atoms
|
||||
REAL(DP), INTENT(IN) :: rho(:,:,:,:)
|
||||
TYPE (charge_descriptor), INTENT(IN) :: desc
|
||||
TYPE (boxdimensions), INTENT(IN) :: ht
|
||||
INTEGER, INTENT(IN) :: nfi
|
||||
|
||||
REAL(DP), ALLOCATABLE :: comp(:), send(:)
|
||||
REAL(DP) :: rpos(3), charge, omega, fact
|
||||
CHARACTER(LEN=256) filename
|
||||
INTEGER :: i, j, k, ispin, nspin, nxl, nyl, nzl, nx, ny, nz, nl
|
||||
INTEGER, ALLOCATABLE :: nzl_proc( : )
|
||||
INTEGER :: izl
|
||||
LOGICAL :: top
|
||||
|
||||
omega = ht%deth
|
||||
|
||||
charge = zero
|
||||
|
||||
nx = desc%nx
|
||||
ny = desc%ny
|
||||
nz = desc%nz
|
||||
nxl = desc%nxl
|
||||
nyl = desc%nyl
|
||||
nzl = desc%nzl
|
||||
nspin = desc%nspin
|
||||
|
||||
IF( nxl /= nx .OR. nyl /= ny ) THEN
|
||||
CALL errore(' printrho ',' local nxl or nyl not supported ', 1)
|
||||
END IF
|
||||
|
||||
! make processors aware of the nzl of all other processors
|
||||
!
|
||||
ALLOCATE( nzl_proc( nproc ) )
|
||||
nzl_proc = 0
|
||||
nzl_proc( mpime + 1 ) = nzl
|
||||
CALL mp_sum( nzl_proc )
|
||||
|
||||
! find the global index of the first local cell in the z direction
|
||||
!
|
||||
izl = 1
|
||||
DO k = 1, mpime
|
||||
izl = izl + nzl_proc( k )
|
||||
END DO
|
||||
|
||||
|
||||
ALLOCATE( comp( nz ) )
|
||||
|
||||
fact = omega / DBLE( nx * ny * nz )
|
||||
|
||||
|
||||
DO ispin = 1, nspin
|
||||
|
||||
! ... CHARGE_DENSITY file layout
|
||||
! rho( 1, 1, 1)
|
||||
! rho( 1, 1, 2)
|
||||
! ..
|
||||
! rho( 1, 1,nz)
|
||||
! rho( 1, 2, 1)
|
||||
! rho( 1, 2, 2)
|
||||
! ..
|
||||
! rho( 1, 2,nz)
|
||||
! ..
|
||||
! rho( 1,ny,nz)
|
||||
! rho( 2, 1, 1)
|
||||
! ..
|
||||
! rho( 2,ny,nz)
|
||||
! ..
|
||||
! rho(nx,ny,nz)
|
||||
|
||||
INQUIRE( UNIT=rhounit, OPENED=top )
|
||||
IF( top ) THEN
|
||||
WRITE( stdout,fmt="('** WARNING: printrho, rhounit already OPENED')")
|
||||
END IF
|
||||
|
||||
IF ( ionode ) THEN
|
||||
|
||||
IF( ispin == 1 .AND. nspin > 1) THEN
|
||||
filename = rho_name_up
|
||||
ELSE IF( ispin == 2 .AND. nspin > 1) THEN
|
||||
filename = rho_name_down
|
||||
ELSE
|
||||
filename = rho_name
|
||||
END IF
|
||||
|
||||
IF( scradir(1:1) /= ' ' ) THEN
|
||||
nl = index(scradir,' ')
|
||||
filename = scradir(1:nl-1) // '/' // filename
|
||||
END IF
|
||||
|
||||
OPEN(rhounit, FILE=filename, STATUS='UNKNOWN')
|
||||
|
||||
END IF
|
||||
|
||||
DO i = 1, nxl
|
||||
DO j = 1, nyl
|
||||
comp = 0.0d0
|
||||
comp( izl : ( izl + nzl - 1) ) = rho( i, j, 1:nzl, ispin ) * fact
|
||||
CALL mp_sum( comp, group )
|
||||
IF( ionode ) THEN
|
||||
WRITE(rhounit,'(D13.5)') ( comp(k), k = 1, nz )
|
||||
charge = charge + SUM( comp )
|
||||
END IF
|
||||
END DO
|
||||
END DO
|
||||
|
||||
IF ( ionode ) THEN
|
||||
CALL printrho_info(rhounit, nfi, ht, atoms, nx, ny, nz)
|
||||
CLOSE( rhounit )
|
||||
END IF
|
||||
|
||||
|
||||
END DO
|
||||
|
||||
DEALLOCATE( comp, nzl_proc )
|
||||
|
||||
IF ( ionode ) THEN
|
||||
WRITE( stdout,*)
|
||||
WRITE( stdout,'( " Print Rho")')
|
||||
WRITE( stdout,'( " ---------")')
|
||||
WRITE( stdout,'( " to file ",A20)') rho_name
|
||||
WRITE( stdout,'( " integrated charge : ",F14.5)') charge
|
||||
END IF
|
||||
|
||||
90 FORMAT(" * From printrho")
|
||||
100 FORMAT(" Total charge : ",F10.5)
|
||||
|
||||
RETURN
|
||||
!----------------------------------------------------------------------
|
||||
END SUBROUTINE printrho
|
||||
!----------------------------------------------------------------------
|
||||
|
||||
|
||||
!----------------------------------------------------------------------
|
||||
SUBROUTINE printrho_info(rhounit, nfi, ht, atoms, nx, ny, nz)
|
||||
!----------------------------------------------------------------------
|
||||
|
||||
! This Subroutine writes atomic positions and cell parameters
|
||||
! at the end of the charge density file
|
||||
|
||||
USE cell_module, ONLY: boxdimensions, s_to_r
|
||||
USE atoms_type_module, ONLY: atoms_type
|
||||
|
||||
IMPLICIT NONE
|
||||
|
||||
INTEGER, INTENT(IN) :: rhounit, nfi, nx, ny, nz
|
||||
TYPE (atoms_type), INTENT(IN) :: atoms
|
||||
TYPE (boxdimensions), INTENT(IN) :: ht
|
||||
INTEGER :: i, j, k
|
||||
REAL(DP) :: rpos(3)
|
||||
|
||||
WRITE(rhounit,30) nfi
|
||||
DO i = 1, 3
|
||||
WRITE(rhounit,254) ( ht%a(I,J), J = 1, 3 )
|
||||
END DO
|
||||
WRITE(rhounit,30) nfi
|
||||
DO i = 1, atoms%nat
|
||||
CALL s_to_r( atoms%taus(:,i), rpos, ht )
|
||||
WRITE(rhounit,253) ( rpos(k), k = 1, 3 )
|
||||
END DO
|
||||
WRITE(rhounit,40) nx, ny, nz
|
||||
40 FORMAT('Charge density Mesh : ',3I5)
|
||||
30 FORMAT(2X,'STEP:',I6)
|
||||
253 FORMAT(3F14.5,3(2X,D12.4))
|
||||
254 FORMAT(3F14.8)
|
||||
RETURN
|
||||
!----------------------------------------------------------------------
|
||||
END SUBROUTINE printrho_info
|
||||
!----------------------------------------------------------------------
|
||||
|
||||
!=----------------------------------------------------------------------=!
|
||||
SUBROUTINE checkrho(rhoe, desc, rsum, omega)
|
||||
!=----------------------------------------------------------------------=!
|
||||
|
|
16
CPV/cpr.f90
16
CPV/cpr.f90
|
@ -114,7 +114,7 @@ SUBROUTINE cprmain( tau, fion_out, etot_out )
|
|||
acc, bec, lambda, lambdam, lambdap, &
|
||||
ema0bg, sfac, eigr, ei1, ei2, ei3, &
|
||||
irb, becdr, taub, eigrb, rhog, rhos, &
|
||||
rhor, bephi, becp, nfi
|
||||
rhor, rhopr, bephi, becp, nfi
|
||||
USE autopilot, ONLY : event_step, event_index, &
|
||||
max_event_step, restart_p
|
||||
USE coarsegrained_vars, ONLY : dfe_acc
|
||||
|
@ -493,7 +493,7 @@ SUBROUTINE cprmain( tau, fion_out, etot_out )
|
|||
!
|
||||
END IF
|
||||
!
|
||||
IF( ( MOD(nfi,iprint) == 0 ) .OR. ( nfi == nomore ) ) THEN
|
||||
IF( ( MOD( nfi, iprint ) == 0 ) .OR. ( nfi == nomore ) ) THEN
|
||||
!
|
||||
CALL cp_eigs( nfi, bec, c0, irb, eigrb, rhor, &
|
||||
rhog, rhos, lambdap, lambda, tau0, h )
|
||||
|
@ -627,7 +627,7 @@ SUBROUTINE cprmain( tau, fion_out, etot_out )
|
|||
vels, velsm, acc, lambda, lambdam, xnhe0, xnhem, &
|
||||
vnhe, xnhp0, xnhpm, vnhp, nhpcl, ekincm, xnhh0, &
|
||||
xnhhm, vnhh, velh, ecutp, ecutw, delt, pmass, ibrav,&
|
||||
celldm, fion, tps, z0, f, rhor )
|
||||
celldm, fion, tps, z0, f, rhopr )
|
||||
!
|
||||
ELSE
|
||||
!
|
||||
|
@ -635,7 +635,7 @@ SUBROUTINE cprmain( tau, fion_out, etot_out )
|
|||
tausm, vels, velsm, acc, lambda, lambdam, xnhe0, &
|
||||
xnhem, vnhe, xnhp0, xnhpm, vnhp, nhpcl, ekincm, &
|
||||
xnhh0, xnhhm, vnhh, velh, ecutp, ecutw, delt, pmass,&
|
||||
ibrav, celldm, fion, tps, z0, f, rhor )
|
||||
ibrav, celldm, fion, tps, z0, f, rhopr )
|
||||
!
|
||||
END IF
|
||||
!
|
||||
|
@ -705,7 +705,7 @@ SUBROUTINE cprmain( tau, fion_out, etot_out )
|
|||
velsm, acc, lambda, lambdam, xnhe0, xnhem, &
|
||||
vnhe, xnhp0, xnhpm, vnhp, nhpcl, ekincm, &
|
||||
xnhh0, xnhhm, vnhh, velh, ecutp, ecutw, &
|
||||
delt, celldm, fion, tps, z0, f, rhor )
|
||||
delt, celldm, fion, tps, z0, f, rhopr )
|
||||
!
|
||||
IF ( ( nfi >= nomore ) .OR. tstop ) EXIT main_loop
|
||||
!
|
||||
|
@ -749,7 +749,7 @@ SUBROUTINE terminate_run()
|
|||
!
|
||||
USE kinds, ONLY : DP
|
||||
USE io_global, ONLY : stdout, ionode
|
||||
USE cp_main_variables, ONLY : acc, nfi, lambda, lambdam, rhor
|
||||
USE cp_main_variables, ONLY : acc, nfi, lambda, lambdam, rhopr
|
||||
USE cpr_subroutines, ONLY : print_lambda
|
||||
USE cg_module, ONLY : tcg, c0old
|
||||
USE wavefunctions_module, ONLY : c0, cm
|
||||
|
@ -821,7 +821,7 @@ SUBROUTINE terminate_run()
|
|||
velsm, acc, lambda, lambdam, xnhe0, xnhem, vnhe, xnhp0, &
|
||||
xnhpm, vnhp, nhpcl, ekincm, xnhh0, xnhhm, vnhh, velh, &
|
||||
ecutp, ecutw, delt, pmass, ibrav, celldm, fion, tps, &
|
||||
z0, f, rhor )
|
||||
z0, f, rhopr )
|
||||
!
|
||||
ELSE
|
||||
!
|
||||
|
@ -829,7 +829,7 @@ SUBROUTINE terminate_run()
|
|||
vels, velsm, acc, lambda, lambdam, xnhe0, xnhem, vnhe, &
|
||||
xnhp0, xnhpm, vnhp, nhpcl, ekincm, xnhh0, xnhhm, vnhh, &
|
||||
velh, ecutp, ecutw, delt, pmass, ibrav, celldm, fion, tps,&
|
||||
z0, f, rhor )
|
||||
z0, f, rhopr )
|
||||
!
|
||||
END IF
|
||||
!
|
||||
|
|
|
@ -815,18 +815,3 @@ END SUBROUTINE write_pdb
|
|||
|
||||
|
||||
|
||||
subroutine errore( a, b, ierr )
|
||||
!
|
||||
! A substitution for subroutine Errore, used only by fpmdpp
|
||||
!
|
||||
implicit none
|
||||
character(len=*) :: a, b
|
||||
integer :: ierr
|
||||
!
|
||||
WRITE( *, * ) 'FATAL ERROR'
|
||||
WRITE( *, * ) 'SUB:', a
|
||||
WRITE( *, * ) 'MSG:', b
|
||||
WRITE( *, * ) 'COD:', ierr
|
||||
stop
|
||||
return
|
||||
end subroutine
|
||||
|
|
|
@ -65,15 +65,8 @@ MODULE input
|
|||
!
|
||||
lmetadyn = ( TRIM( calculation ) == 'metadyn' )
|
||||
!
|
||||
IF ( lsmd .AND. ( program_name == 'FPMD' ) ) &
|
||||
CALL errore( 'read_input_file ', &
|
||||
'string dynamics not implemented in FPMD', 1 )
|
||||
!
|
||||
lwf = ( TRIM( calculation ) == 'cp-wf' )
|
||||
!
|
||||
IF ( lwf .AND. ( program_name == 'FPMD' ) ) &
|
||||
CALL errore( 'read_input_file ', 'cp-wf not implemented in FPMD', 1 )
|
||||
!
|
||||
! ... Set job title and print it on standard output
|
||||
!
|
||||
title_ = title
|
||||
|
@ -194,7 +187,6 @@ MODULE input
|
|||
trane_ => trane, &
|
||||
newnfi_ => newnfi, &
|
||||
tnewnfi_ => tnewnfi, &
|
||||
rhoout_ => rhoout, &
|
||||
tdipole_ => tdipole, &
|
||||
nomore_ => nomore, &
|
||||
memchk_ => memchk, &
|
||||
|
@ -274,7 +266,7 @@ MODULE input
|
|||
tapos, tavel, ecutwfc, emass, emass_cutoff, taspc, trd_ht, ibrav, &
|
||||
ortho_eps, ortho_max, ntyp, tolp, tchi2_inp, calculation, disk_io, dt, &
|
||||
tcg, ndr, ndw, iprint, isave, tstress, k_points, tprnfor, verbosity, &
|
||||
tprnrho, tdipole_card, toptical_card, tnewnfi_card, newnfi_card, &
|
||||
tdipole_card, toptical_card, tnewnfi_card, newnfi_card, &
|
||||
ampre, nstep, restart_mode, ion_positions, startingwfc, printwfc, &
|
||||
orthogonalization, electron_velocities, nat, if_pos, phase_space
|
||||
!
|
||||
|
@ -318,9 +310,6 @@ MODULE input
|
|||
timing_ = .FALSE.
|
||||
! The code write to files fort.8 fort.41 fort.42 fort.43
|
||||
! a detailed report of subroutines timing
|
||||
rhoout_ = .FALSE.
|
||||
! save charge density to file CHARGEDENSITY if nspin = 1, and
|
||||
! CHARGEDENSITY.UP CHARGEDENSITY.DOWN if nspin = 2
|
||||
memchk_ = .FALSE.
|
||||
! The code performs a memory check, write on standard
|
||||
! output the allocated memory at each step.
|
||||
|
@ -347,7 +336,6 @@ MODULE input
|
|||
!
|
||||
iprsta_ = 2
|
||||
timing_ = .TRUE.
|
||||
rhoout_ = .TRUE.
|
||||
tprnsfac_ = .TRUE.
|
||||
!
|
||||
CASE( 'high' )
|
||||
|
@ -355,7 +343,6 @@ MODULE input
|
|||
iprsta_ = 3
|
||||
memchk_ = .TRUE.
|
||||
timing_ = .TRUE.
|
||||
rhoout_ = .TRUE.
|
||||
tprnsfac_ = .TRUE.
|
||||
!
|
||||
CASE DEFAULT
|
||||
|
@ -365,10 +352,6 @@ MODULE input
|
|||
!
|
||||
END SELECT
|
||||
!
|
||||
! ... If explicitly requested force the charge density to be printed
|
||||
!
|
||||
IF ( tprnrho ) rhoout_ = .TRUE.
|
||||
!
|
||||
tdipole_ = tdipole_card
|
||||
toptical_ = toptical_card
|
||||
newnfi_ = newnfi_card
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
tfor, thdyn, tzeroe, tsde, tsdp, tsdc, taurdr, ndr, &
|
||||
ndw, tortho, timing, memchk, iprsta, &
|
||||
tconjgrad, tprnsfac, toptical, tcarpar, &
|
||||
rhoout, tdipole, t_diis, t_diis_simple, t_diis_rot, &
|
||||
tdipole, t_diis, t_diis_simple, t_diis_rot, &
|
||||
tnosee, tnosep, force_pairing, tconvthrs, convergence_criteria, tionstep, nstepe, &
|
||||
tsteepdesc, ekin_conv_thr, ekin_maxiter, ionic_conjugate_gradient, &
|
||||
tconjgrad_ion, conv_elec, lneb, tnoseh, tuspp, etot_conv_thr
|
||||
|
@ -109,7 +109,7 @@
|
|||
USE fft, ONLY : fft_closeup
|
||||
USE electrons_module, ONLY: ei, nspin, n_emp
|
||||
USE diis, ONLY: allocate_diis
|
||||
USE charge_density, ONLY: rhoofr, printrho
|
||||
USE charge_density, ONLY: rhoofr
|
||||
USE fft_base, ONLY: dfftp, dffts
|
||||
USE check_stop, ONLY: check_stop_now
|
||||
USE nl, ONLY: nlrh_m
|
||||
|
@ -739,7 +739,7 @@
|
|||
|
||||
! ... report statistics
|
||||
|
||||
CALL printacc(nfi, rhoe, desc, rhoout, atomsm, htm, nstep_this_run, acc, acc_this_run)
|
||||
CALL printacc(nfi, rhoe, desc, atomsm, htm, nstep_this_run, acc, acc_this_run)
|
||||
CALL mp_report_buffers()
|
||||
CALL mp_report()
|
||||
|
||||
|
|
|
@ -86,9 +86,12 @@ MODULE cp_main_variables
|
|||
! rhog = charge density in g space
|
||||
! rhor = charge density in r space (dense grid)
|
||||
! rhos = charge density in r space (smooth grid)
|
||||
! rhopr since rhor is overwritten in vofrho,
|
||||
! this array is used to save rhor for restart file
|
||||
!
|
||||
COMPLEX(DP), ALLOCATABLE :: rhog(:,:)
|
||||
REAL(DP), ALLOCATABLE :: rhor(:,:), rhos(:,:)
|
||||
REAL(DP), ALLOCATABLE :: rhopr(:,:)
|
||||
!
|
||||
TYPE (wave_descriptor) :: wfill, wempt ! wave function descriptor
|
||||
! for filled and empty states
|
||||
|
@ -160,6 +163,7 @@ MODULE cp_main_variables
|
|||
!
|
||||
IF( program_name == 'CP90' ) THEN
|
||||
!
|
||||
ALLOCATE( rhopr( nnr, nspin ) )
|
||||
ALLOCATE( rhor( nnr, nspin ) )
|
||||
ALLOCATE( rhos( nnrsx, nspin ) )
|
||||
ALLOCATE( rhog( ng, nspin ) )
|
||||
|
@ -221,6 +225,7 @@ MODULE cp_main_variables
|
|||
IF( ALLOCATED( sfac ) ) DEALLOCATE( sfac )
|
||||
IF( ALLOCATED( eigrb ) ) DEALLOCATE( eigrb )
|
||||
IF( ALLOCATED( irb ) ) DEALLOCATE( irb )
|
||||
IF( ALLOCATED( rhopr ) ) DEALLOCATE( rhopr )
|
||||
IF( ALLOCATED( rhor ) ) DEALLOCATE( rhor )
|
||||
IF( ALLOCATED( rhos ) ) DEALLOCATE( rhos )
|
||||
IF( ALLOCATED( rhog ) ) DEALLOCATE( rhog )
|
||||
|
|
|
@ -18,8 +18,8 @@ SUBROUTINE move_electrons( nfi, tfirst, tlast, b1, b2, b3, fion, &
|
|||
USE parameters, ONLY : natx
|
||||
USE control_flags, ONLY : lwf, trhow, tfor, tprnfor, thdyn
|
||||
USE cg_module, ONLY : tcg
|
||||
USE cp_main_variables, ONLY : eigr, bec, irb, eigrb, rhog, rhos, rhor, &
|
||||
ei1, ei2, ei3, sfac, ema0bg, becdr, &
|
||||
USE cp_main_variables, ONLY : eigr, bec, irb, eigrb, rhog, rhos, rhor, &
|
||||
rhopr, ei1, ei2, ei3, sfac, ema0bg, becdr, &
|
||||
taub, lambda, lambdam, lambdap
|
||||
USE wavefunctions_module, ONLY : c0, cm, phi => cp
|
||||
USE ensemble_dft, ONLY : tens, z0, c0diag, becdiag, bec0, v0s, &
|
||||
|
@ -91,12 +91,7 @@ SUBROUTINE move_electrons( nfi, tfirst, tlast, b1, b2, b3, fion, &
|
|||
!
|
||||
END IF
|
||||
!
|
||||
#if defined (__PARA)
|
||||
IF ( trhow .AND. tlast ) CALL write_rho( 47, nspin, rhor )
|
||||
#else
|
||||
IF ( trhow .AND. tlast ) &
|
||||
WRITE(47) ( ( rhor(i,is), i = 1, nnrx ), is = 1, nspin )
|
||||
#endif
|
||||
IF ( tfirst .OR. tlast ) rhopr = rhor
|
||||
!
|
||||
! ... put core charge (if present) in rhoc(r)
|
||||
!
|
||||
|
|
|
@ -791,9 +791,8 @@
|
|||
!=----------------------------------------------------------------------------=!
|
||||
|
||||
|
||||
SUBROUTINE printacc( nfi, rhoe, desc, rhoout, atoms, ht, nstep_run, avgs, avgs_run )
|
||||
SUBROUTINE printacc( nfi, rhoe, desc, atoms, ht, nstep_run, avgs, avgs_run )
|
||||
|
||||
USE charge_density, ONLY: printrho
|
||||
USE cell_module, ONLY: boxdimensions
|
||||
USE atoms_type_module, ONLY: atoms_type
|
||||
USE charge_types, ONLY: charge_descriptor
|
||||
|
@ -801,7 +800,6 @@
|
|||
IMPLICIT NONE
|
||||
|
||||
INTEGER, INTENT(IN) :: nfi, nstep_run
|
||||
LOGICAL, INTENT(IN) :: rhoout
|
||||
REAL(DP), intent(in) :: rhoe(:,:,:,:)
|
||||
TYPE (charge_descriptor), intent(in) :: desc
|
||||
REAL (DP) :: avgs(:), avgs_run(:)
|
||||
|
@ -812,10 +810,6 @@
|
|||
RETURN
|
||||
END IF
|
||||
|
||||
IF( rhoout ) THEN
|
||||
CALL printrho(nfi, rhoe, desc, atoms, ht)
|
||||
END IF
|
||||
|
||||
avgs = avgs / DBLE( nfi )
|
||||
avgs_run = avgs_run / DBLE( nstep_run )
|
||||
|
||||
|
|
26
Doc/INPUT_CP
26
Doc/INPUT_CP
|
@ -69,7 +69,7 @@ NAMELIST &CONTROL
|
|||
calculation CHARACTER ( default = 'cp' )
|
||||
a string describing the task to be performed:
|
||||
'cp', 'scf', 'nscf', 'relax', 'vc-relax', 'vc-cp', 'neb',
|
||||
'smd', 'cp-wf'
|
||||
'smd', 'cp-wf', 'fpmd'
|
||||
where :
|
||||
cp = Car-Parrinello MD (includes cases 'scf' and 'relax')
|
||||
scf = electron minimization
|
||||
|
@ -82,6 +82,9 @@ calculation CHARACTER ( default = 'cp' )
|
|||
neb = Nudged Elastc Band method
|
||||
smd = String Method Dynamics
|
||||
cp-wf = Car-Parrinello MD with Wannier functions
|
||||
fpmd = CP works in FPMD compatibility mode, with all FPMD
|
||||
features not yet ported in CP, but works only for
|
||||
norm-conserving pseudopotentials
|
||||
|
||||
title CHARACTER ( default = 'MD Simulation' )
|
||||
reprinted on output.
|
||||
|
@ -1975,12 +1978,6 @@ FORMER FPMD INPUT
|
|||
CHARACTER(LEN=256) :: tscradir_inp = ''
|
||||
|
||||
|
||||
RHOOUT
|
||||
|
||||
|
||||
LOGICAL :: tprnrho = .FALSE.
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Description of the allowed input CARDS for FPMD code
|
||||
|
@ -2477,18 +2474,3 @@ CONSTRAINTS
|
|||
Note: the first empty state has index "1" !
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
RHOOUT
|
||||
|
||||
Enable the printing of the real space charge density
|
||||
to file CHARGE_DENSITY
|
||||
|
||||
Syntax:
|
||||
|
||||
RHOOUT
|
||||
|
||||
Where:
|
||||
|
||||
no parameters
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
|
|
@ -45,7 +45,7 @@ MODULE control_flags
|
|||
PUBLIC :: tbeg, nomore, nbeg, isave, iprint, tv0rd, nv0rd, tzeroc, tzerop, &
|
||||
newnfi, tnewnfi, tfor, tpre, tzeroe, tsde, tsdp, tsdc, taurdr, &
|
||||
ndr, ndw, tortho, ortho_eps, ortho_max, tstress, tprnfor, &
|
||||
timing, memchk, tconjgrad, tprnsfac, toptical, tcarpar, rhoout, &
|
||||
timing, memchk, tconjgrad, tprnsfac, toptical, tcarpar, &
|
||||
trane, ampre, tranp, amprp, tdipole, t_diis, t_diis_simple, &
|
||||
t_diis_rot, tnosee, tnosep, tnoseh, tcp, tcap, tdamp, tdampions, &
|
||||
tconvthrs, tolp, convergence_criteria, tionstep, nstepe, &
|
||||
|
@ -91,7 +91,6 @@ MODULE control_flags
|
|||
LOGICAL :: tprnsfac = .FALSE. ! print out structure factor
|
||||
LOGICAL :: toptical = .FALSE. ! print out optical properties
|
||||
LOGICAL :: tcarpar = .FALSE. ! tcarpar is set TRUE for a "pure" Car Parrinello simulation
|
||||
LOGICAL :: rhoout = .FALSE. ! print out charge densities
|
||||
LOGICAL :: tdamp = .FALSE. ! Use damped dinamics for electrons
|
||||
LOGICAL :: tdampions = .FALSE. ! Use damped dinamics for electrons
|
||||
LOGICAL :: tatomicwfc = .FALSE. ! Use atomic wavefunctions as starting guess for ch. density
|
||||
|
|
|
@ -1481,13 +1481,6 @@ MODULE input_parameters
|
|||
!
|
||||
LOGICAL :: tchi2_inp = .FALSE.
|
||||
|
||||
!
|
||||
! RHOOUT
|
||||
!
|
||||
|
||||
LOGICAL :: tprnrho = .FALSE.
|
||||
|
||||
|
||||
!
|
||||
! CLIMBING_IMAGES
|
||||
!
|
||||
|
|
|
@ -235,12 +235,6 @@ MODULE read_cards_module
|
|||
IF ( ( prog == 'PW' .OR. prog == 'CP' ) .AND. ionode ) &
|
||||
WRITE( stdout,'(A)') 'Warning: card '//trim(input_line)//' ignored'
|
||||
!
|
||||
ELSE IF ( TRIM(card) == 'RHOOUT' ) THEN
|
||||
!
|
||||
CALL card_rhoout( input_line )
|
||||
IF ( ( prog == 'PW' .OR. prog == 'CP' ) .AND. ionode ) &
|
||||
WRITE( stdout,'(A)') 'Warning: card '//trim(input_line)//' ignored'
|
||||
!
|
||||
ELSE IF ( TRIM(card) == 'CLIMBING_IMAGES' ) THEN
|
||||
!
|
||||
CALL card_climbing_images( input_line )
|
||||
|
@ -1790,46 +1784,6 @@ MODULE read_cards_module
|
|||
! BEGIN manual
|
||||
!----------------------------------------------------------------------
|
||||
!
|
||||
! RHOOUT
|
||||
!
|
||||
! Enable the printing of the real space charge density
|
||||
! to file CHARGE_DENSITY
|
||||
!
|
||||
! Syntax:
|
||||
!
|
||||
! RHOOUT
|
||||
!
|
||||
! Where:
|
||||
!
|
||||
! no parameters
|
||||
!
|
||||
!----------------------------------------------------------------------
|
||||
! END manual
|
||||
!------------------------------------------------------------------------
|
||||
!
|
||||
SUBROUTINE card_rhoout( input_line )
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
CHARACTER(LEN=256) :: input_line
|
||||
LOGICAL, SAVE :: tread = .FALSE.
|
||||
!
|
||||
!
|
||||
IF ( tread ) THEN
|
||||
CALL errore( ' card_rhoout ', ' two occurrence ', 2 )
|
||||
END IF
|
||||
!
|
||||
tprnrho = .TRUE.
|
||||
tread = .TRUE.
|
||||
!
|
||||
RETURN
|
||||
!
|
||||
END SUBROUTINE
|
||||
!
|
||||
!------------------------------------------------------------------------
|
||||
! BEGIN manual
|
||||
!----------------------------------------------------------------------
|
||||
!
|
||||
! CLIMBING_IMAGES
|
||||
!
|
||||
! Needed to explicitly specify which images have to climb
|
||||
|
|
|
@ -1543,8 +1543,8 @@ MODULE read_namelists_module
|
|||
CASE ('scf')
|
||||
IF( prog == 'CP' ) THEN
|
||||
electron_dynamics = 'damp'
|
||||
ion_dynamics = 'none'
|
||||
cell_dynamics = 'none'
|
||||
ion_dynamics = 'none'
|
||||
cell_dynamics = 'none'
|
||||
END IF
|
||||
CASE ('nscf')
|
||||
IF( prog == 'CP' ) &
|
||||
|
@ -1574,30 +1574,30 @@ MODULE read_namelists_module
|
|||
CASE ('relax')
|
||||
IF( prog == 'CP' ) THEN
|
||||
electron_dynamics = 'damp'
|
||||
ion_dynamics = 'damp'
|
||||
ion_dynamics = 'damp'
|
||||
ELSE IF( prog == 'PW' ) THEN
|
||||
ion_dynamics = 'bfgs'
|
||||
END IF
|
||||
CASE ( 'md', 'cp' )
|
||||
IF( prog == 'CP' ) THEN
|
||||
electron_dynamics = 'verlet'
|
||||
ion_dynamics = 'verlet'
|
||||
ion_dynamics = 'verlet'
|
||||
ELSE IF( prog == 'PW' ) THEN
|
||||
ion_dynamics = 'verlet'
|
||||
END IF
|
||||
CASE ('vc-relax')
|
||||
IF( prog == 'CP' ) THEN
|
||||
electron_dynamics = 'damp'
|
||||
ion_dynamics = 'damp'
|
||||
cell_dynamics = 'damp-pr'
|
||||
ion_dynamics = 'damp'
|
||||
cell_dynamics = 'damp-pr'
|
||||
ELSE IF( prog == 'PW' ) THEN
|
||||
ion_dynamics = 'damp'
|
||||
END IF
|
||||
CASE ( 'vc-md', 'vc-cp' )
|
||||
IF( prog == 'CP' ) THEN
|
||||
electron_dynamics = 'verlet'
|
||||
ion_dynamics = 'verlet'
|
||||
cell_dynamics = 'pr'
|
||||
ion_dynamics = 'verlet'
|
||||
cell_dynamics = 'pr'
|
||||
ELSE IF( prog == 'PW' ) THEN
|
||||
ion_dynamics = 'beeman'
|
||||
END IF
|
||||
|
@ -1626,6 +1626,10 @@ MODULE read_namelists_module
|
|||
!
|
||||
! Compatibility with old FPMD
|
||||
!
|
||||
IF ( prog == 'PW' ) &
|
||||
CALL errore( sub_name, ' calculation ' // &
|
||||
& TRIM( calculation ) // ' not implemented ', 1 )
|
||||
!
|
||||
electron_dynamics = 'sd'
|
||||
ion_dynamics = 'none'
|
||||
cell_dynamics = 'none'
|
||||
|
|
Loading…
Reference in New Issue