[CP2K:2929] DFT-D

Jörg Saßmannshausen j.sassma... at ucl.ac.uk
Mon Dec 13 22:54:19 UTC 2010


Dear Juerg,

ok, I am now playing around with the DFT-D in cp2k.
I am currently trying to ascertain how much memory we would require for the 
work we are planning to do and for the new cluster. Hence, these are test 
runs of the right size of molecule but not with a really good optimised 
structure (i.e. not optimised with DFT-D). 

I have tried both the DFT-D2 and DFT-D3 option and I got 2 problems:
a) the test molecule needs about > 48 GB of RAM, which is significant. Is 
there any way to get that into a more handable size? I have tried the 
SAVE_MEM in GLOBAL but that did not really had any effect it seems. Following 
Matthias' suggestion some time ago, I am using a cutoff of 660, which was 
working well for different molecules in the past.

b) I get the following error for the DFT-D2 frequency calculation:

[ ... ]
 REPLICA| layout of the replica grid, number of groups                         
2
 REPLICA| layout of the replica grid, size of each group                       
1
 REPLICA| MPI process to grid (group,rank) correspondence:
  (   0 :    0,   0)  (   1 :    1,   0)

 VIB| Vibrational Analysis Info

  Pair potential vdW calculation
  Dispersion potential type: DFTD2
  Scaling parameter (s6)   1.00000000000000000
  Exponential prefactor     20.000000000000000
  Total vdW energy [au]     : -6.37708902660472643E-002
  Total vdW energy [kcal]   :  -40.016837470249470

  Dispersion Forces
  Atom   Kind                            Forces
[ ... ]
 |G| =   5.08859983571732719E-002

 Stress Tensor (dispersion)
 -0.911187517690E-03 -0.491992126627E-02  0.140501262854E-01
 -0.491992126627E-02  0.134365275526E-01  0.179254944339E-02
  0.140501262854E-01  0.179254944339E-02 -0.155716224075E-01
   Tr(P)/3 :   -1.01542745750825042E-003

 CP2K| condition FAILED at line 253
 CP2K| Abnormal program termination, stopped by process number 1
 CP2K| condition FAILED at line 253
 CP2K| Abnormal program termination, stopped by process number 0

For the DFT-D3 calculation I get this error:
[ ... ]
|G| =   1.19763995420629592E-002

 Stress Tensor (dispersion)
 -0.525748742588E-02 -0.260638877285E-02  0.799232865409E-02
 -0.260638877285E-02 -0.433023621108E-03  0.181088946886E-02
  0.799232865409E-02  0.181088946886E-02 -0.929520614835E-02
   Tr(P)/3 :   -4.99523906511300034E-003

 CP2K| condition FAILED at line 236
 CP2K| Abnormal program termination, stopped by process number 0

It appears to me I am doing something wrong. I basically have copied and 
pasted your section into the force_eval.inc file. 
Can you or somebody be so kind and point me in the right direction? It is 
possible to do the frequency calculation with DFT-D or am I wrong here?

I have attached the input files dft-d-D2.inp, force_eval-D2.inc and 
subsys.inc. 

All the best from London

Jörg


On Montag 22 November 2010 hut... at pci.uzh.ch wrote:
> Hi
>
> here is an example for the Grimme D2 method
>       &vdW_POTENTIAL
>          DISPERSION_FUNCTIONAL PAIR_POTENTIAL
>          &PAIR_POTENTIAL
>             TYPE DFTD2
>             R_CUTOFF 15.0
>             SCALING 1.0
>          &END PAIR_POTENTIAL
>       &END vdW_POTENTIAL
>
> The SCALING parameter refers to the s6 term in this method.
> Default values for some functionals are available in the
> code through
>              REFERENCE_FUNCTIONAL BLYP
>
> This is an example for the new D3 method
>          DISPERSION_FUNCTIONAL PAIR_POTENTIAL
>          &PAIR_POTENTIAL
>             TYPE DFTD3
>             REFERENCE_FUNCTIONAL BLYP
>             CALCULATE_C9_TERM .TRUE.
>             PARAMETER_FILE_NAME dftd3.dat
>             R_CUTOFF 15.0
>          &END PAIR_POTENTIAL
>       &END vdW_POTENTIAL
>
> With VERBOSE_OUTPUT TRUE you can get all kinds of detailed
> energy contributions.
>
> regards
>
> Juerg Hutter
>
> --------------------------------------------------------------
> Juerg Hutter                       Phone : ++41 44 635 4491
> Physical Chemistry Institute   FAX   : ++41 44 635 6838
> University of Zurich               E-mail:  hut... at pci.uzh.ch
> Winterthurerstrasse 190
> CH-8057 Zurich, Switzerland
> ---------------------------------------------------------------
>
> -----cp... at googlegroups.com wrote: -----
>
> To: cp2k <cp... at googlegroups.com>
> From: Jörg Saßmannshausen <j.sassma... at ucl.ac.uk>
> Sent by: cp... at googlegroups.com
> Date: 11/21/2010 11:23AM
> Subject: [CP2K:2928] DFT-D
>
> Dear all
>
> admittingly, my skills in cp2k are a bit rusty.
> I wanted to look into the DFT-D option of cp2k, specially how the second
> derivatives calculation are performing on rather large molecules.
>
> >From the manual I takt it one can do DFT-D calculations so I thought I am
>
> using the water example and play around with that. I decided, mainly for
> speed reasons, to go with the BP functional and compare that MD run with
> one where DFT-D is switched on, i.e. BP-D.
> However, I am not sure whether I done the setup correctly, so I thought I
> might as well print out whether or not dispension is actually switch on.
> Playing around with various option in
> __ROOT__%FORCE_EVAL%DFT%PRINT%DFT_CONTROL_PARAMETERS
> where somehow unsuccesful in this respect. Would somebody just briefly
> comment on whether my input file (attached below) is correct and how to
> print out the DFT parameters?
> I have omitted the coordination section to save some space.
>
> All the best from London!
>
> Jörg
>
> Input file:
> &FORCE_EVAL
>   METHOD QS
>   &DFT
>     BASIS_SET_FILE_NAME ../BASIS_SET
>     POTENTIAL_FILE_NAME ../POTENTIAL
>     &MGRID
>       CUTOFF 280
>     &END MGRID
>     &QS
>       EPS_DEFAULT 1.0E-12
>       WF_INTERPOLATION PS
>       EXTRAPOLATION_ORDER 3
>     &END QS
>     &SCF
>       SCF_GUESS ATOMIC
>       &OT ON
>         MINIMIZER DIIS
>       &END OT
>     # SCF_GUESS        RESTART
>     # EPS_SCF      1.0E-7
>       &PRINT
>         &RESTART OFF
>         &END
>       &END
>     &END SCF
>     &XC
>       &XC_FUNCTIONAL BP
>       &END XC_FUNCTIONAL
>       &VDW_POTENTIAL
>        &PAIR_POTENTIAL
>         Type Grimme
>        &end PAIR_POTENTIAL
> #      POTENTIAL_TYPE DISPERSION_FUNCTIONAL
>       &END VDW_POTENTIAL
>     &END XC
>    &print
>     &DFT_CONTROL_PARAMETERS high
>     &end DFT_CONTROL_PARAMETERS
>    &end print
>   &END DFT
>   &SUBSYS
>     &CELL
>       ABC 9.8528 9.8528 9.8528
>     &END CELL
>     # 32 H2O (TIP5P,1bar,300K) a = 9.8528
>     &COORD
> [ ... ]
>     &END COORD
>     &KIND H
>       BASIS_SET TZV2P-GTH
>       POTENTIAL GTH-PADE-q1
>     &END KIND
>     &KIND O
>       BASIS_SET TZV2P-GTH
>       POTENTIAL GTH-PADE-q6
>     &END KIND
>   &END SUBSYS
> &END FORCE_EVAL
> &GLOBAL
>   PROJECT H2O-32-vdw
>   RUN_TYPE MD
>   PRINT_LEVEL low
>   &TIMINGS
>      THRESHOLD 0.000001
>   &END
> &END GLOBAL
> &MOTION
>   &MD
>     ENSEMBLE NVE
>     STEPS 300
>     TIMESTEP 0.5
>     TEMPERATURE 300.0
>   &END MD
> &END MOTION
>
>
> --
> *************************************************************
> Jörg Saßmannshausen
> University College London
> Department of Chemistry
> Gordon Street
> London
> WC1H 0AJ
>
> email: j.sassma... at ucl.ac.uk
> web: http://sassy.formativ.net
>
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html
>
> --
> You received this message because you are subscribed to the Google Groups
> "cp2k" group. To post to this group, send email to cp... at googlegroups.com.
> To unsubscribe from this group, send email to
> cp2k+uns... at googlegroups.com. For more options, visit this group at
> http://groups.google.com/group/cp2k?hl=en.



-- 
*************************************************************
Jörg Saßmannshausen
University College London
Department of Chemistry
Gordon Street
London
WC1H 0AJ 

email: j.sassma... at ucl.ac.uk
web: http://sassy.formativ.net

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
-------------- next part --------------
! -*- cp2k -*-

! Possibly restart (if explicitly requested)
@IF 0
&EXT_RESTART ON
  RESTART_DEFAULT F
  RESTART_FILE_NAME dft-d-freq.restart
  RESTART_POS T
  RESTART_COUNTERS T
&END EXT_RESTART
@ENDIF

&GLOBAL
  PROJECT  dft-d2-freq
  RUN_TYPE NORMAL_MODES
  PRINT_LEVEL LOW
&END GLOBAL

&VIBRATIONAL_ANALYSIS
   NPROC_REP 1 
   DX 0.001
   &PRINT
     &PROGRAM_RUN_INFO ON
     &END
     &MOLDEN_VIB
!      FILENAME=
     &END
   &END

&END

@INCLUDE 'force_eval-D2.inc'
-------------- next part --------------
  &SUBSYS
    &CELL
      ABC [angstrom] 23.0 25.0 34.0
      PERIODIC NONE
    &END CELL
    &TOPOLOGY
      CONNECTIVITY OFF
      COORDINATE   XYZ
      COORD_FILE_NAME Aa132.xyz
    &END TOPOLOGY
    &KIND C
      POTENTIAL GTH
      &POTENTIAL
        # C GTH-PBE-q4
    2    2
     0.33847124    2    -8.80367398     1.33921085
    2
     0.30257575    1     9.62248665
     0.29150694    0
      &END POTENTIAL
      &BASIS
        # C DZVP-MOLOPT-GTH
 1
 2 0 2 7 2 2 1
      6.132624767898 -0.105576563700  0.024850587600  0.035098108400 -0.056712999000  0.037469425800
      2.625196064782 -0.174866621100  0.147440856000  0.114197930900 -0.076743951500  0.071047574800
      1.045456957247  0.064464981400 -0.421418379200  0.215908137300 -0.528056757000  0.619330561200
      0.478316330874  0.830447035300  0.823051336800  0.355929151000  0.394594045700  0.710730857000
      0.178617414302  0.371911373800  0.184880712100  0.271541842000  0.721247475800  0.389148235000
      0.075144725465  0.006174464000 -0.742086051600  0.056256557700  0.733902531700  0.346374124100
      0.030286753006  0.008966477300  0.083382192000  0.004998059700  0.248172175500 -0.005142430900
      &END BASIS
    &END KIND
    &KIND H
      POTENTIAL GTH
      &POTENTIAL
        # H GTH-PBE-q1
    1
     0.20000000    2    -4.17890044     0.72446331
    0
      &END POTENTIAL
      &BASIS
        # H DZVP-MOLOPT-GTH
 1
 2 0 1 7 2 1
     11.478000339908  0.024916243200 -0.012512421400  0.024510918200
      3.700758562763  0.079825490000 -0.056449071100  0.058140794100
      1.446884268432  0.128862675300  0.011242684700  0.444709498500
      0.716814589696  0.379448894600 -0.418587548300  0.646207973100
      0.247918564176  0.324552432600  0.590363216700  0.803385018200
      0.066918004004  0.037148121400  0.438703133000  0.892971208700
      0.021708243634 -0.001125195500 -0.059693171300  0.120101316500
      &END BASIS
    &END KIND
    &KIND N
      POTENTIAL GTH
      &POTENTIAL
        # N GTH-PBE-q5
    2    3
     0.28379051    2   -12.41522559     1.86809592
    2
     0.25540500    1    13.63026257
     0.24549453    0
      &END POTENTIAL
      &BASIS
        # N DZVP-MOLOPT-GTH
 1
 2 0 2 7 2 2 1
      9.042730397298 -0.057711157700  0.055618665600  0.031469526900 -0.012643172000  0.017852718900
      3.882224940673 -0.121876730300  0.101741751800  0.109126355100 -0.031177059000  0.037932409700
      1.512880320070  0.094844857800 -0.036013432800  0.238123330300 -0.094228032000  0.324051472500
      0.586630738140  0.558583487700 -0.547764884700  0.376105481500 -0.192405367500  0.888374055100
      0.222851091943  0.346456981000  0.606791574500  0.249727365300  0.701455729100  0.188935754200
      0.084582888713  0.031196738600  0.493556790200  0.054673928900  0.593951368600 -0.049452863800
      0.039193834928  0.010393976200  0.053452379800 -0.000181794900  0.039720774300 -0.019150455700
      &END BASIS
    &END KIND
    &KIND O
      POTENTIAL GTH
      &POTENTIAL
        # O GTH-PBE-q6
    2    4
     0.24455430    2   -16.66721480     2.48731132
    2
     0.22095592    1    18.33745811
     0.21133247    0
      &END POTENTIAL
      &BASIS
        # O DZVP-MOLOPT-GTH
 1
 2 0 2 7 2 2 1
     12.015954705512 -0.060190841200  0.065738617900  0.036543638800 -0.034210557400  0.014807054400
      5.108150287385 -0.129597923300  0.110885902200  0.120927648700 -0.120619770900  0.068186159300
      2.048398039874  0.118175889400 -0.053732406400  0.251093670300 -0.213719464600  0.290576499200
      0.832381575582  0.462964485000 -0.572670666200  0.352639910300 -0.473674858400  1.063344189500
      0.352316246455  0.450353782600  0.186760006700  0.294708645200  0.484848376400  0.307656114200
      0.142977330880  0.092715833600  0.387201458600  0.173039869300  0.717465919700  0.318346834400
      0.046760918300 -0.000255945800  0.003825849600  0.009726110600  0.032498979400 -0.005771736600
      &END BASIS
    &END KIND
    &KIND S
      POTENTIAL GTH
      &POTENTIAL
        # S GTH-PBE-q6
    2    4
     0.42000000    1    -5.98626038
    2
     0.36482035    2    13.14354448    -4.24183045
                                        5.47617957
     0.40948048    1     3.70089057
      &END POTENTIAL
      &BASIS
        # S DZVP-MOLOPT-GTH
 1
 2 0 2 6 2 2 1
      3.817590656735  0.075558928000 -0.045713227100 -0.019219238100  0.001714015800  0.007498037400
      2.362751931093 -0.351216488200  0.179094296600 -0.035664835200  0.064608303200  0.104757185100
      0.861004180298 -0.099160602500  0.206133423700  0.160834397000 -0.170453754100  0.344818199900
      0.417524512433  0.862753116400 -0.737640763800  0.507608206800 -0.536548069500  0.472319101700
      0.181513540673  0.307053614900  0.419230078700  0.249563613200  0.786543640200  0.204745694800
      0.070570776865  0.001592872500  0.359607313200  0.025974500500  0.740434318200 -0.019952573900
      &END BASIS
    &END KIND
  &END SUBSYS
-------------- next part --------------
! -*- cp2k -*-
@SET SCF_CONV   1.0E-8
@SET CUTOFF        660
@SET FUNCTIONAL   PBE
@SET DECOUPLING     MT
@SET CHARGE          0

&FORCE_EVAL
  STRESS_TENSOR ANALYTICAL
  &PRINT
    &FORCES OFF
    &END
  &END

  METHOD QS

  &DFT
    CHARGE ${CHARGE}
    &MGRID
      CUTOFF ${CUTOFF}
      NGRIDS 5
    &END MGRID
    &QS
      EPS_DEFAULT 1.0E-16
    &END QS
    &SCF
      SCF_GUESS random
      EPS_SCF       ${SCF_CONV}
      MAX_SCF      30
      &PRINT
        &RESTART 
          LOG_PRINT_KEY T
          FILENAME =./WFN_restart-mem.wfn
          &EACH 
            QS_SCF  0
          &END EACH
          ADD_LAST NUMERIC
          COMMON_ITERATION_LEVELS 1
        &END RESTART
      &END PRINT
      &OT ON
        MINIMIZER DIIS
           ! MINIMIZER CG
           ! PRECONDITIONER FULL_ALL
           ! PRECONDITIONER FULL_KINETIC
        PRECONDITIONER FULL_SINGLE_INVERSE
           !ENERGY_GAP  0.001
      &END OT
      &OUTER_SCF
        EPS_SCF ${SCF_CONV}
        MAX_SCF 5
      &END OUTER_SCF
    &END SCF
    &XC
      &XC_FUNCTIONAL ${FUNCTIONAL}
      &END XC_FUNCTIONAL

      &VDW_POTENTIAL
         DISPERSION_FUNCTIONAL PAIR_POTENTIAL
         &PAIR_POTENTIAL
            TYPE DFTD2
            REFERENCE_FUNCTIONAL PBE 
            R_CUTOFF 15.0
            SCALING 1.0
            VERBOSE_OUTPUT TRUE
         &END PAIR_POTENTIAL
      &END vdW_POTENTIAL

    &END XC
@IF ( ${DECOUPLING} == NONE )
    &POISSON
    &END
@ENDIF
@IF ( ${DECOUPLING} == MT )
    &POISSON
       POISSON_SOLVER MT
       PERIODIC NONE
       &MT
       &END
    &END
@ENDIF
@IF ( ${DECOUPLING} == WAVELET )
    &POISSON
       POISSON_SOLVER WAVELET
       PERIODIC NONE
       &WAVELET
         SCF_TYPE 60
       &END
    &END
@ENDIF
  &END DFT
  
  ! Include subsys
@INCLUDE 'subsys.inc'
&END FORCE_EVAL


More information about the CP2K-user mailing list