[CP2K-user] How to mix DFTB and normal XC calculation?
linfeng gan
ganli... at gmail.com
Thu May 9 11:00:44 UTC 2019
Hi Vladimir,
Thanks for your advices.
I had done some tests as you suggested. First, I run all the following
tests only on run type ENERGY.
Second, I noted there two ways to run embedded calculations, DFET and DMFET
which local in CP2K_INPUT / FORCE_EVAL / EMBED. So, I tried the DFET and
DMFET embedded respective, but unfortunately, I failed them both.
In the DFET method, I was using,
FORCE_EVA section 1
!******************************************************************************
&FORCE_EVAL
METHOD EMBED
!******************************************************************************
!FORCE_EVA section 4 Total system
!******************************************************************************
&OPT_EMBED
REG_LAMBDA 0.00001
N_ITER 3
DENS_CONV_INT 0.5
DENS_CONV_MAX 0.025
OPTIMIZER QUASI_NEWTON
GRID_OPT .FALSE.
&END OPT_EMBED
And in the DMFET method, I was using
!******************************************************************************
!FORCE_EVA section 1
!******************************************************************************
&FORCE_EVAL
METHOD EMBED
!Select DFET or DMFET. Default value: DFET
&EMBED DMFET
NGROUPS 1
!******************************************************************************
!FORCE_EVA section 4 Total system
!******************************************************************************
Both of the DFET and DMFET embedded runs, I got the same error massages in
the output files.
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1
:
system msg for write_line failure : Bad file descriptor
in the DFET runs, I got following error massages,
-------- Optimize embedding potential info at step = 1 ------------
Functional value = -4.7317737943
Trust radius = 0.5000000000
---------------------------------------------------
Convergence check :
Maximum density difference = 1.0000000021
Convergence limit for max. density diff. = 0.0250000000
Convergence in max. density diff. = NO
Integrated density difference = NaN
Conv. limit for integrated density diff. = 0.5000000000
Convergence in integrated density diff. = NO
Integrated squared density difference = NaN
Maximum density change in:
subsystem 1, spin 1: 0.0000000000
subsystem 2, spin 1:********************
*******************************************************************************
* ___
*
* / \
*
* [ABORT]
*
* \___/ The pointer gto_basis_set is not associated
*
* |
*
* O/|
*
* /| |
*
* / \ aobasis/basis_set_types.F:791
*
*******************************************************************************
and in the DMFET runs, I got following error massage in the
h2o_h2_dftb_mp2_DMFET-r-1.out
-------- Optimize embedding potential info at step = 50 ------------
Functional value = NaN
Real energy change = NaN
Step size = 0.5000000000
Trust radius = 0.5000000000
---------------------------------------------------
Convergence check :
Maximum density difference = ********************
Convergence limit for max. density diff. = 0.0100000000
Convergence in max. density diff. = NO
Integrated density difference = NaN
Conv. limit for integrated density diff. = 0.1000000000
Convergence in integrated density diff. = NO
Integrated squared density difference = NaN
Maximum density change in:
subsystem 1, spin 1: 0.0000000000
subsystem 2, spin 1: 0.0000000000
*******************************************************************************
* ___
*
* / \
*
* [ABORT]
*
* \___/ Embedding potential optimization not converged.
*
* |
*
* O/|
*
* /| |
*
* / \ force_env_methods.F:1483
*
*******************************************************************************
Do I miss something in the input files? Do you have any suggests?
Thanks again,
Linfeng
在 2019年5月8日星期三 UTC+8下午4:25:25,Vladimir Rybkin写道:
>
> Dear user,
>
> a few points to mention:
>
> 1) this kind of embedding does not have a gradient, i.e. energy_force will
> not generate meaningful results, even if runs through. It's only for
> energies.
>
> 2) OPT_EMBED section in the 3rd FORCE_EVAL is not optional and must not be
> commented out
>
> 3) DFTB has not been tested, but must be straightforward to implement.
> Maybe it already works out of the box: should be tested bearing points 1)
> and 2) in mind.
>
> 4) I will try it out one of these days.
>
> Yours,
>
> Vladimir
>
> пятница, 3 мая 2019 г., 14:11:51 UTC+2 пользователь ga... at gmail.com
> написал:
>>
>>
>>
>> Hi everyone in cp2k community,
>>
>> I am very curious about if CP2K can EMBED or MIXED DFTB and normal XC
>> calculation together. I noticed in the CP2K tests there was an example
>> (regtest-embed/H2O_H2_pbe_mp2.inp) which EMBED pbe and mp2 sections
>> together. So, I am set up a DFTB-MP2 embed calculation just like the
>> example before. Unfortunately, I failed and got following message,
>>
>> >>>>>
>>
>> application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
>>
>> [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1
>>
>> :
>>
>> system msg for write_line failure : Bad file descriptor
>>
>> <<<<
>>
>> what can I do next? I post my input file in the end. Any advice would be
>> greatly appreciated!
>>
>>
>>
>> Best regards
>>
>> LinFeng
>>
>>
>>
>>
>>
>> &GLOBAL
>>
>>
>> PROJECT h2o_h2_dftb
>>
>> PRINT_LEVEL HIGH
>>
>> RUN_TYPE ENERGY_FORCE
>>
>> &END GLOBAL
>>
>>
>>
>> &MULTIPLE_FORCE_EVALS
>>
>> FORCE_EVAL_ORDER 2 3 4 5
>>
>> MULTIPLE_SUBSYS T
>>
>>
>>
>> &END MULTIPLE_FORCE_EVALS
>>
>>
>>
>> &FORCE_EVAL
>>
>> METHOD EMBED
>>
>> &EMBED
>>
>> NGROUPS 1
>>
>> &MAPPING
>>
>> &FORCE_EVAL_EMBED
>>
>> &FRAGMENT 1
>>
>> 1 3
>>
>> &END
>>
>> &FRAGMENT 2
>>
>> 4 5
>>
>> &END
>>
>> &FRAGMENT 3
>>
>> 1 5
>>
>> &END
>>
>> &END
>>
>> &FORCE_EVAL 1
>>
>> &FRAGMENT 1
>>
>> 1 3
>>
>> MAP 1
>>
>> &END
>>
>> &END
>>
>> &FORCE_EVAL 2
>>
>> &FRAGMENT 1
>>
>> 1 2
>>
>> MAP 2
>>
>> &END
>>
>> &END
>>
>> &FORCE_EVAL 3
>>
>> &FRAGMENT 1
>>
>> 1 5
>>
>> MAP 3
>>
>> &END
>>
>> &END
>>
>> &FORCE_EVAL 4
>>
>> &FRAGMENT 1
>>
>> 1 2
>>
>> MAP 2
>>
>> &END
>>
>> &END
>>
>> &END
>>
>> &END EMBED
>>
>> &SUBSYS
>>
>> &CELL
>>
>> ABC [angstrom] 5.000 5.000 5.000
>>
>> &END CELL
>>
>> &KIND H
>>
>> BASIS_SET cc-TZ
>>
>> BASIS_SET RI_AUX RI_TZ
>>
>> POTENTIAL GTH-HF-q1
>>
>> &END KIND
>>
>> &KIND O
>>
>> BASIS_SET cc-TZ
>>
>> BASIS_SET RI_AUX RI_TZ
>>
>> POTENTIAL GTH-HF-q6
>>
>> &END KIND
>>
>>
>>
>> &COORD
>>
>> O 1.75 1.5 0.0
>>
>> H 1.0 1.0 0.0
>>
>> H 2.5 1.0 0.0
>>
>> H 1.75 2.75 0.0
>>
>> H 1.75 3.50 0.0
>>
>> &END
>>
>> &END SUBSYS
>>
>> &END FORCE_EVAL
>>
>>
>>
>>
>> !******************************************************************************
>>
>> !FORCE_EVA section 1 Subsys 1
>>
>>
>> !******************************************************************************
>>
>> &FORCE_EVAL
>>
>>
>>
>>
>>
>> METHOD Quickstep
>>
>>
>>
>> &SUBSYS
>>
>> &CELL
>>
>> ABC [angstrom] 5.000 5.000 5.000
>>
>> &END CELL
>>
>> &COORD
>>
>> O 1.75 1.5 0.0
>>
>> H 1.0 1.0 0.0
>>
>> H 2.5 1.0 0.0
>>
>> &END COORD
>>
>> &KIND H
>>
>> BASIS_SET cc-TZ
>>
>> BASIS_SET RI_AUX RI_TZ
>>
>> POTENTIAL GTH-HF-q1
>>
>> &END KIND
>>
>> &KIND O
>>
>> BASIS_SET cc-TZ
>>
>> BASIS_SET RI_AUX RI_TZ
>>
>> POTENTIAL GTH-HF-q6
>>
>> &END KIND
>>
>> &END SUBSYS
>>
>>
>>
>>
>>
>> &DFT
>>
>>
>>
>> &QS
>>
>>
>>
>> METHOD DFTB
>>
>>
>>
>> &DFTB
>>
>> SELF_CONSISTENT TRUE
>>
>> DO_EWALD TRUE
>>
>> DISPERSION TRUE
>>
>> DIAGONAL_DFTB3 TRUE
>>
>> HB_SR_GAMMA TRUE
>>
>>
>>
>> &PARAMETER
>>
>> PARAM_FILE_PATH DFTB/3ob-3-1
>>
>> PARAM_FILE_NAME 3ob-3-1.parameter
>>
>>
>>
>> DISPERSION_TYPE D3
>>
>> DISPERSION_RADIUS 15.
>>
>> COORDINATION_CUTOFF 1.e-4
>>
>> D3_SCALING 1.0 1.0 1.5
>>
>> DISPERSION_PARAMETER_FILE dftd3.dat
>>
>> &END PARAMETER
>>
>>
>>
>>
>>
>> &END DFTB
>>
>>
>>
>>
>>
>> &END QS
>>
>>
>>
>>
>>
>> &POISSON
>>
>> &EWALD
>>
>> EWALD_TYPE SPME
>>
>> GMAX 25
>>
>> &END EWALD
>>
>> POISSON_SOLVER ANALYTIC
>>
>> PERIODIC NONE
>>
>> &END POISSON
>>
>>
>>
>>
>>
>> &SCF
>>
>> MAX_SCF 100 !Maximum number of SCF iteration
>>
>>
>>
>> &OT
>>
>> PRECONDITIONER FULL_SINGLE_INVERSE
>>
>>
>>
>> MINIMIZER DIIS
>>
>>
>>
>> &END OT
>>
>>
>>
>> &END SCF
>>
>>
>>
>> &END DFT
>>
>>
>>
>>
>>
>> STRESS_TENSOR ANALYTICAL
>>
>>
>>
>> &END FORCE_EVAL
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> !******************************************************************************
>>
>> !FORCE_EVA section 2 Subsys 2
>>
>>
>> !******************************************************************************
>>
>> &FORCE_EVAL
>>
>>
>>
>> METHOD Quickstep
>>
>>
>>
>> &SUBSYS
>>
>>
>>
>> &CELL
>>
>> ABC [angstrom] 5.000 5.000 5.000
>>
>> &END CELL
>>
>> &KIND H
>>
>> BASIS_SET cc-TZ
>>
>> BASIS_SET RI_AUX RI_TZ
>>
>> POTENTIAL GTH-HF-q1
>>
>> &END KIND
>>
>> &KIND O
>>
>> BASIS_SET cc-TZ
>>
>> BASIS_SET RI_AUX RI_TZ
>>
>> POTENTIAL GTH-HF-q6
>>
>> &END KIND
>>
>> &COORD
>>
>> H 1.75 2.75 0.0
>>
>> H 1.75 3.50 0.0
>>
>> &END COORD
>>
>>
>>
>> &END SUBSYS
>>
>>
>>
>>
>>
>> &DFT
>>
>>
>>
>> &QS
>>
>>
>>
>> CLUSTER_EMBED_SUBSYS .TRUE.
>>
>>
>>
>> METHOD DFTB
>>
>>
>>
>> &DFTB
>>
>> SELF_CONSISTENT TRUE
>>
>> DO_EWALD TRUE
>>
>> DISPERSION TRUE
>>
>> DIAGONAL_DFTB3 TRUE
>>
>> HB_SR_GAMMA TRUE
>>
>>
>>
>> !the default parameter files localed in data/DFTB/
>>
>> &PARAMETER
>>
>> PARAM_FILE_PATH DFTB/3ob-3-1
>>
>> PARAM_FILE_NAME 3ob-3-1.parameter
>>
>>
>>
>> DISPERSION_TYPE D3
>>
>> DISPERSION_RADIUS 15.
>>
>> COORDINATION_CUTOFF 1.e-4
>>
>> D3_SCALING 1.0 1.0 1.5
>>
>> DISPERSION_PARAMETER_FILE dftd3.dat
>>
>> &END PARAMETER
>>
>>
>>
>>
>>
>> &END DFTB
>>
>>
>>
>>
>>
>> &END QS
>>
>>
>>
>> &POISSON
>>
>> &EWALD
>>
>> EWALD_TYPE SPME
>>
>> GMAX 25
>>
>> &END EWALD
>>
>> POISSON_SOLVER ANALYTIC
>>
>> PERIODIC NONE
>>
>> &END POISSON
>>
>>
>>
>>
>>
>> &SCF
>>
>> SCF_GUESS ATOMIC !initial guess for the wavefunction.
>>
>> MAX_SCF 100 !Maximum number of SCF iteration
>>
>>
>>
>> &OT
>>
>> PRECONDITIONER FULL_SINGLE_INVERSE
>>
>> MINIMIZER DIIS
>>
>> &END OT
>>
>>
>>
>> &END SCF
>>
>>
>>
>> &END DFT
>>
>>
>>
>> STRESS_TENSOR ANALYTICAL
>>
>>
>>
>>
>>
>> &END FORCE_EVAL
>>
>>
>>
>>
>>
>>
>>
>>
>> !******************************************************************************
>>
>> !FORCE_EVA section 3 Total system
>>
>>
>> !******************************************************************************
>>
>> &FORCE_EVAL
>>
>>
>>
>>
>>
>> METHOD Quickstep
>>
>>
>>
>> &SUBSYS
>>
>>
>>
>> &CELL
>>
>> ABC [angstrom] 5.000 5.000 5.000
>>
>> &END CELL
>>
>>
>>
>> &COORD
>>
>> O 1.75 1.5 0.0
>>
>> H 1.0 1.0 0.0
>>
>> H 2.5 1.0 0.0
>>
>> H 1.75 2.75 0.0
>>
>> H 1.75 3.50 0.0
>>
>> &END COORD
>>
>>
>>
>> &KIND H
>>
>> BASIS_SET cc-TZ
>>
>> BASIS_SET RI_AUX RI_TZ
>>
>> POTENTIAL GTH-HF-q1
>>
>> &END KIND
>>
>> &KIND O
>>
>> BASIS_SET cc-TZ
>>
>> BASIS_SET RI_AUX RI_TZ
>>
>> POTENTIAL GTH-HF-q6
>>
>> &END KIND
>>
>> &END SUBSYS
>>
>>
>>
>> &DFT
>>
>>
>>
>>
>>
>> &QS
>>
>> REF_EMBED_SUBSYS .TRUE.
>>
>>
>>
>> !&OPT_EMBED
>>
>> ! REG_LAMBDA 0.00001
>>
>> ! N_ITER 3
>>
>> ! DENS_CONV_INT 0.5
>>
>> ! DENS_CONV_MAX 0.025
>>
>> ! OPTIMIZER QUASI_NEWTON
>>
>> ! GRID_OPT .FALSE.
>>
>> !&END OPT_EMBED
>>
>> &OPT_DMFET
>>
>> &END
>>
>>
>>
>> EPS_DEFAULT 1.0E-10 !Default value: 1.00000000E-010
>>
>>
>>
>> METHOD DFTB
>>
>>
>>
>> &DFTB
>>
>> SELF_CONSISTENT TRUE
>>
>> DO_EWALD TRUE
>>
>> DISPERSION TRUE
>>
>> DIAGONAL_DFTB3 TRUE
>>
>> HB_SR_GAMMA TRUE
>>
>>
>>
>> !the default parameter files localed in data/DFTB/
>>
>> &PARAMETER
>>
>> PARAM_FILE_PATH DFTB/3ob-3-1
>>
>> PARAM_FILE_NAME 3ob-3-1.parameter
>>
>>
>>
>> DISPERSION_TYPE D3
>>
>> DISPERSION_RADIUS 15.
>>
>> COORDINATION_CUTOFF 1.e-4
>>
>> D3_SCALING 1.0 1.0 1.5
>>
>> DISPERSION_PARAMETER_FILE dftd3.dat
>>
>> &END PARAMETER
>>
>>
>>
>>
>>
>> &END DFTB
>>
>>
>>
>>
>>
>> &END QS
>>
>>
>>
>> &POISSON
>>
>> &EWALD
>>
>> EWALD_TYPE SPME
>>
>> GMAX 25
>>
>> &END EWALD
>>
>> POISSON_SOLVER ANALYTIC
>>
>> PERIODIC NONE
>>
>> &END POISSON
>>
>>
>>
>>
>>
>> &SCF
>>
>> SCF_GUESS ATOMIC !initial guess for the wavefunction.
>>
>> MAX_SCF 100 !Maximum number of SCF iteration
>>
>>
>>
>> &OT
>>
>> PRECONDITIONER FULL_SINGLE_INVERSE
>>
>> MINIMIZER DIIS
>>
>> &END OT
>>
>>
>>
>>
>>
>> &END SCF
>>
>>
>>
>> &END DFT
>>
>>
>>
>>
>>
>> STRESS_TENSOR ANALYTICAL
>>
>>
>>
>>
>>
>> &END FORCE_EVAL
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> !******************************************************************************
>>
>> !FORCE_EVA section 4 Higher level calculation on subsys 2
>>
>>
>> !******************************************************************************
>>
>>
>>
>> &FORCE_EVAL
>>
>> METHOD Quickstep
>>
>> &DFT
>>
>> BASIS_SET_FILE_NAME BASIS_RI_cc-TZ
>>
>> POTENTIAL_FILE_NAME HF_POTENTIALS
>>
>> &MGRID
>>
>> CUTOFF 100
>>
>> REL_CUTOFF 20
>>
>> &END MGRID
>>
>> &POISSON
>>
>> &END POISSON
>>
>> &QS
>>
>> HIGH_LEVEL_EMBED_SUBSYS
>>
>> METHOD GPW
>>
>> EPS_DEFAULT 1.0E-15
>>
>> EPS_PGF_ORB 1.0E-30
>>
>> &END QS
>>
>>
>>
>> &SCF
>>
>> SCF_GUESS ATOMIC !initial guess for the wavefunction.
>>
>> MAX_SCF 100 !Maximum number of SCF iteration
>>
>>
>>
>> &OT
>>
>> PRECONDITIONER FULL_SINGLE_INVERSE
>>
>> MINIMIZER DIIS
>>
>> &END OT
>>
>>
>>
>> &END SCF
>>
>>
>>
>> &XC
>>
>> &XC_FUNCTIONAL PBE
>>
>> &END XC_FUNCTIONAL
>>
>>
>>
>> &END XC
>>
>> &END DFT
>>
>> &SUBSYS
>>
>> &CELL
>>
>> ABC [angstrom] 5.000 5.000 5.000
>>
>> &END CELL
>>
>> &KIND H
>>
>> BASIS_SET cc-TZ
>>
>> BASIS_SET RI_AUX RI_TZ
>>
>> POTENTIAL GTH-HF-q1
>>
>> &END KIND
>>
>> &KIND O
>>
>> BASIS_SET cc-TZ
>>
>> BASIS_SET RI_AUX RI_TZ
>>
>> POTENTIAL GTH-HF-q6
>>
>> &END KIND
>>
>> &COORD
>>
>> H 1.75 2.75 0.0
>>
>> H 1.75 3.50 0.0
>>
>> &END
>>
>> &END SUBSYS
>>
>> &END FORCE_EVAL
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20190509/ea586452/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dftb_mp2_DFET.inp
Type: chemical/x-gamess-input
Size: 10492 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20190509/ea586452/attachment.inp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dftb_mp2_DFET.out
Type: application/octet-stream
Size: 12299 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20190509/ea586452/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dftb_mp2_DMFET.inp
Type: chemical/x-gamess-input
Size: 10557 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20190509/ea586452/attachment-0001.inp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dftb_mp2_DMFET.out
Type: application/octet-stream
Size: 12300 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20190509/ea586452/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h2o_h2_dftb_mp2_DFET-r-1.out
Type: application/octet-stream
Size: 120264 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20190509/ea586452/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h2o_h2_dftb_mp2_DMFET-r-1.out
Type: application/octet-stream
Size: 730946 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20190509/ea586452/attachment-0003.obj>
More information about the CP2K-user
mailing list