Commit 7b4856a1 authored by ccavazzoni's avatar ccavazzoni

- QMMM ( lammps+qe ), Adding EC coupling



git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/[email protected] c92efa57-630b-4861-b058-cf58834340f0
parent df794545
......@@ -35,6 +35,9 @@ SUBROUTINE run_pwscf ( exit_status )
USE check_stop, ONLY : check_stop_init, check_stop_now
USE mp_images, ONLY : intra_image_comm
USE extrapolation, ONLY : update_file, update_pot
USE scf, ONLY : rho
USE lsda_mod, ONLY : nspin
USE fft_base, ONLY : dfftp
USE qmmm, ONLY : qmmm_initialization, qmmm_shutdown, &
qmmm_update_positions, qmmm_update_forces
!
......@@ -131,7 +134,7 @@ SUBROUTINE run_pwscf ( exit_status )
!
! ... send out forces to MM code in QM/MM run
!
CALL qmmm_update_forces(force)
CALL qmmm_update_forces( force, rho%of_r, nspin, dfftp)
!
IF ( lmd .OR. lbfgs ) THEN
!
......
......@@ -12,6 +12,7 @@ SUBROUTINE setlocal
!
! This routine computes the local potential in real space vltot(ir)
!
USE io_global, ONLY : stdout
USE kinds, ONLY : DP
USE constants, ONLY : eps8
USE ions_base, ONLY : zv, ntyp => nsp
......@@ -28,7 +29,7 @@ SUBROUTINE setlocal
USE mp, ONLY : mp_sum
USE martyna_tuckerman, ONLY : wg_corr_loc, do_comp_mt
USE esm, ONLY : esm_local, esm_bc, do_comp_esm
USE qmmm, ONLY : qmmm_add_mm_field
USE qmmm, ONLY : qmmm_add_esf
!
IMPLICIT NONE
COMPLEX(DP), ALLOCATABLE :: aux (:), v_corr(:)
......@@ -86,7 +87,7 @@ SUBROUTINE setlocal
! ... Add the electrostatic field generated by MM atoms
! in a QM/MM calculation to the local potential
!
CALL qmmm_add_mm_field()
CALL qmmm_add_esf(vltot,dfftp)
!
! ... Save vltot for possible modifications in plugins
!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment