[CPMD-list] VDW / kpoints

Axel Kohlmeyer akohlmey at cmm.chem.upenn.edu
Tue Jan 8 18:11:41 CET 2008


On Mon, 7 Jan 2008, Belabbas Imad wrote:


dear imad,

thanks for the detailed report and your help to track down this issue.
this is very commendable. CPMD needs people like you. ;-)

[...]

BI> Here are the results of the tests I have performed on the 
BI> Acetonitrile (C2H3N) molecule and crystal. During these tests I have 
BI> checked if the subroutines vdwin.F (reading VDW inputs) and vdw.F 
BI> (evaluating VDW energy, forces, stress) were both called when the 
BI> VDW correction is applied.

[...]

BI> I went trough the code, and I have found that during a wavefunction 
BI> or a geometry optimization the subroutine that takes care of 
BI> evaluating the total energy, ionic forces is:
BI> 
BI> updrho.f (without k-points sampling)
BI> 
BI> k_forces.f (kpoints sampling)
BI> 
BI> However, at the opposite of updrho.f , k_forces.f do not contain any 
BI> call to vdw.f !!. So, I think adding a call to vdw.f in k_forces may 
BI> fix the problem, I am trying that !!

that seems reasonable and i would suggest the following 
change (also attached as gzipped file, so that it will
not be modified by mailers and mailing list processors).

Index: k_forces.F
===================================================================
RCS file: /users/cvsroot/cpmd/CPMD/k_forces.F,v
retrieving revision 1.17
diff -u -u -r1.17 k_forces.F
--- k_forces.F	17 Jun 2006 12:07:36 -0000	1.17
+++ k_forces.F	8 Jan 2008 16:55:21 -0000
@@ -33,6 +33,7 @@
       include 'time.inc'
       include 'envj.inc'
       include 'rswf.inc'
+      include 'vdwc.inc'
 C     Arguments
       INTEGER    NSTATE,NKPOINT,LSCR,ISTEP
       COMPLEX*16 C0(NGWK,NSTATE,NKPOINT),C2(NGWK,NSTATE),
@@ -380,12 +381,20 @@
       IF(TFOR .AND. CALCRHO) THEN
         CALL RNLFOR(FION,F,WK,NSTATE,NKPOINT)
       ENDIF
+
+C     ==--------------------------------------------------------------==
+C     == Energy and force on the ions from van der Waals interaction  ==
+C     ==--------------------------------------------------------------==
+      EVDW=0.D0
+      IF(VDWC) CALL VDW(TAU0,NVDW,IDVDW,IVDW,JVDW,VDWST,VDWRM,VDWBE,
+     &                  VDWEPS,NXVDW,NYVDW,NZVDW,EVDW,FION,DEVDW)
+
 C     ==--------------------------------------------------------------==
 C     == TOTAL ENERGY                                                 ==
 C     ==--------------------------------------------------------------==
       IF(CALCRHO) THEN
         EEIG = 0.D0
-        ETOT = EKIN + EHT + EPSEU + ENL + EXC 
+        ETOT = EKIN + EHT + EPSEU + ENL + EXC + EVDW
 
 #ifdef PARALLEL
 C     Sum ETOT,EKIN,EPSEU,ENL,EHT,EHEP,EHEE,EHII,EXC,VXC,EGC

BI> Can someone comment on that ???

please try this and let us know if it works for youy so it 
can be included in the next release.

cheers,
   axel.

BI> 
BI> Cheers,
BI> Imad
BI> 

-- 
=======================================================================
Axel Kohlmeyer   akohlmey at cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpmd-kpoint-vdw.diff.gz
Type: application/x-gzip
Size: 623 bytes
Desc: 
Url : http://cpmd.org/pipermail/cpmd-list/attachments/20080108/3fe60e1c/attachment.gz 


More information about the CPMD-list mailing list