[CP2K-user] How to mix DFTB and normal XC calculation?
Vladimir Rybkin
rybk... at gmail.com
Thu May 16 09:14:05 UTC 2019
Dear Lifeng,
the code is experimental so it may happen. Could you please attach your
full input?
Yours,
Vladimir
четверг, 16 мая 2019 г., 8:51:39 UTC+2 пользователь linfeng gan написал:
>
> Dear Vladimir,
>
> It worked after I set GRID_OPT to be TRUE.! Thank your Vladimir.
>
>
>
> I still need some your help since I has not much experiences in the EMBED
> calculations. I found that the embedding DFTB and PDB calculations were
> very hard to converged even after 100 optimize steps for H2O-H2 system. For
> example, after 50 iterations, I got following error massage,
>
> -------- 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.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: 0.0000000000
>
>
>
>
> *******************************************************************************
>
> * ___
> *
>
> * / \
> *
>
> * [ABORT]
> *
>
> * \___/ Embedding potential optimization not converged.
> *
>
> * |
> *
>
> * O/|
> *
>
> * /| |
> *
>
> * / \ force_env_methods.F:1483
> *
>
>
> *******************************************************************************
>
>
>
> As you can see, the “Integrated density difference” value was NaN and the
> embedding potential optimization was not converged. And I found that the
> embedding potential was also NaN too which wrote in the
> h2o_h2_dftb_pbe_DFET-embed_pot_*.cube files. Is these normal output for the
> embed calculation? Or how can I fix this?
>
>
>
>
>
>
>
> Quickstep-
>
> EMBEDDING POTENTIAL at optimization step 1
>
> 5 0.000000 0.000000 0.000000
>
> 75 0.125982 0.000000 0.000000
>
> 75 0.000000 0.125982 0.000000
>
> 75 0.000000 0.000000 0.125982
>
> 8 0.000000 3.307021 2.834589 0.000000
>
> 1 0.000000 1.889726 1.889726 0.000000
>
> 1 0.000000 4.724315 1.889726 0.000000
>
> 1 0.000000 3.307021 5.196747 0.000000
>
> 1 0.000000 3.307021 6.614041 0.000000
>
> NaN NaN 0.00000E+00 NaN NaN
> NaN
>
> 0.00000E+00 NaN 0.00000E+00 0.00000E+00 0.00000E+00
> 0.00000E+00
>
> NaN 0.00000E+00 0.00000E+00 NaN 0.00000E+00
> NaN
>
> 0.00000E+00 NaN NaN NaN NaN
> 0.00000E+00
>
> NaN 0.00000E+00 0.00000E+00 0.00000E+00 NaN
> NaN
>
> 0.00000E+00 0.00000E+00 NaN NaN NaN
> 0.00000E+00
>
> 0.00000E+00 NaN NaN 0.00000E+00 NaN
> 0.00000E+00
>
> 0.00000E+00 0.00000E+00 NaN NaN 0.00000E+00
> 0.00000E+00
>
> NaN 0.00000E+00 0.00000E+00 NaN NaN
> 0.00000E+00
>
> NaN NaN NaN 0.00000E+00 NaN
> 0.00000E+00
>
> NaN 0.00000E+00 0.00000E+00 NaN NaN
> 0.00000E+00
>
> NaN NaN NaN NaN 0.00000E+00
> 0.00000E+00
>
> 0.00000E+00 NaN NaN
>
> NaN 0.00000E+00 0.00000E+00 NaN 0.00000E+00
> NaN
>
>
>
>
>
> Yours,
>
> Linfeng
>
>
> 在 2019年5月15日星期三 UTC+8下午7:51:27,Vladimir Rybkin写道:
>>
>> Dear Linfeng
>>
>> 1) the first force_eval is the &EMBED one, the others are actual
>> subsystems.
>>
>> 2) >> The first FORCE_EVA section should be descripting how the other 4
>> FORCE_EVAL embed and how to mapping the fragments. The Am I correct?
>> Yes
>>
>> 3) to 6) Yes
>>
>> The error is as follows: for DFTB there is no basis set. However, in
>> OPT_EMBED you ask for GRID_OPT .FALSE. This is not obvious but: the
>> embedding potential optimization is requested in the finite RI basis of the
>> total system. This basis, however, is not specified in DFTB. So, to make a
>> long story short, set GRID_OPT .TRUE. This is general, safe and fast (and
>> the default).
>>
>> Yours,
>>
>> Vladimir
>>
>> среда, 15 мая 2019 г., 12:18:52 UTC+2 пользователь linfeng gan написал:
>>>
>>>
>>>
>>> Hi Vladimir,
>>>
>>> Thanks for your feedback. But there are still something confusing me.
>>> The input which I used was simply modified form
>>> “tests/QS/regtest-embed/H2O_H2_pbe_mp2.inp” in the CP2K test dir. Correct
>>> me if I understand the input keyword wrong.
>>>
>>>
>>>
>>> In the input system, there are a water molecular and a hydrogen
>>> molecular.
>>>
>>>
>>>
>>> (1) Question one
>>>
>>> The MULTIPLE_FORCE_EVALS section, I set
>>>
>>> FORCE_EVAL_ORDER 2 3 4 5
>>>
>>> So, there should be 5 FORCE_EVAL sections in my input file. Am I correct?
>>>
>>>
>>>
>>> (2) Question two
>>>
>>> !*******************************
>>>
>>> !FORCE_EVA section 1
>>>
>>> !
>>>
>>> !mapping the fragments
>>>
>>> !*******************************
>>>
>>>
>>>
>>> The first FORCE_EVA section should be descripting how the other 4
>>> FORCE_EVAL embed and how to mapping the fragments. The Am I correct?
>>>
>>>
>>>
>>> (3) Question three
>>>
>>> !*******************************
>>>
>>> !FORCE_EVA section 2
>>>
>>> !
>>>
>>> !Subsys 1 the H2O molecular
>>>
>>> !*******************************
>>>
>>>
>>>
>>> The second FORCE_EVA section should be descripting how to calculate the
>>> H2O molecular energy with DFTB.
>>>
>>>
>>>
>>> (4) Question 4
>>>
>>> !*******************************
>>>
>>> !FORCE_EVA section 3
>>>
>>> !
>>>
>>> !Subsys 2 the H2 molecular
>>>
>>> !*******************************
>>>
>>>
>>>
>>> &DFT
>>>
>>> &QS
>>>
>>> CLUSTER_EMBED_SUBSYS .TRUE.
>>>
>>> &END QS
>>>
>>> &END DFT
>>>
>>>
>>>
>>>
>>>
>>> The third FORCE_EVA section should be descripting how to calculate the
>>> H2 molecular energy with DFTB. This is the embedded cluster and the CLUSTER_EMBED_SUBSYS
>>> .TRUE. is set.
>>>
>>>
>>>
>>> (5) Question five
>>>
>>> !*******************************
>>>
>>> !FORCE_EVA section 4
>>>
>>> !
>>>
>>> !Total system including H2O and H2
>>>
>>> !*******************************
>>>
>>> &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
>>>
>>> &END QS
>>>
>>> &END DFT
>>>
>>>
>>>
>>> The fourth FORCE_EVA section descripting how to calculate the total
>>> system, including H2O and H2 molecular, energy with DFTB. Because this is
>>> the total system, the REF_EMBED_SUBSYS .TRUE. is set.
>>>
>>>
>>>
>>> (6) Question six
>>>
>>> !*******************************
>>>
>>> !FORCE_EVA section 5
>>>
>>> !
>>>
>>> !Higher level calculation on subsys 2, the H2O
>>>
>>> !*******************************
>>>
>>> &DFT
>>>
>>> &QS
>>>
>>> HIGH_LEVEL_EMBED_SUBSYS .TRUE.
>>>
>>> &END QS
>>>
>>> &END DFT
>>>
>>>
>>>
>>> The fifth FORCE_EVA section descripting how to calculate the higher
>>> level system, in this case H2, energy with PBE. The HIGH_LEVEL_EMBED_SUBSYS
>>> .TRUE. should be set in this section.
>>>
>>>
>>>
>>>
>>>
>>> To avoid the grid influence I set the same grids for all the subsystem
>>> as follow,
>>>
>>> &MGRID
>>>
>>> NGRIDS 5
>>>
>>> CUTOFF 600
>>>
>>> REL_CUTOFF 60
>>>
>>> &END MGRID
>>>
>>>
>>>
>>>
>>>
>>> But I still got the same error,
>>>
>>>
>>> *******************************************************************************
>>>
>>> * ___
>>> *
>>>
>>> * / \
>>> *
>>>
>>> * [ABORT]
>>> *
>>>
>>> * \___/ The pointer gto_basis_set is not associated
>>> *
>>>
>>> * |
>>> *
>>>
>>> * O/|
>>> *
>>>
>>> * /| |
>>> *
>>>
>>> * / \ aobasis/basis_set_types.F:791
>>> *
>>>
>>>
>>> *******************************************************************************
>>>
>>>
>>>
>>>
>>>
>>> What should I do next? I post my input file in the end of this,
>>>
>>>
>>>
>>> Regards,
>>>
>>> Linfeng
>>>
>>>
>>> &GLOBAL
>>>
>>> PROJECT h2o_h2_dftb_pbe_DFET
>>> PRINT_LEVEL HIGH
>>> RUN_TYPE ENERGY
>>> &END GLOBAL
>>>
>>> &MULTIPLE_FORCE_EVALS
>>> FORCE_EVAL_ORDER 2 3 4 5
>>> MULTIPLE_SUBSYS T
>>> &END MULTIPLE_FORCE_EVALS
>>>
>>>
>>> !*******************************
>>> !FORCE_EVA section 1
>>> !
>>> !mapping the fragments
>>> !*******************************
>>> &FORCE_EVAL
>>>
>>> METHOD EMBED
>>>
>>> !Select DFET or DMFET. Default value: DFET
>>> &EMBED DFET
>>> 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
>>>
>>> &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 2
>>> !
>>> !Subsys 1 the H2O molecular
>>> !*******************************
>>> &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
>>>
>>> &END SUBSYS
>>>
>>> &DFT
>>> &QS
>>>
>>> METHOD DFTB
>>> &DFTB
>>> SELF_CONSISTENT T
>>> &PARAMETER
>>> PARAM_FILE_PATH DFTB/scc
>>> PARAM_FILE_NAME scc_parameter
>>> UFF_FORCE_FIELD ../uff_table
>>> &END PARAMETER
>>> &END DFTB
>>>
>>> &END QS
>>>
>>> &POISSON
>>> &EWALD
>>> EWALD_TYPE SPME
>>> GMAX 25
>>> &END EWALD
>>> POISSON_SOLVER ANALYTIC
>>> &END POISSON
>>>
>>> &MGRID
>>> NGRIDS 5
>>> CUTOFF 600
>>> REL_CUTOFF 60
>>> &END MGRID
>>>
>>>
>>> &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 3
>>> !
>>> !Subsys 2 the H2 molecular
>>> !*******************************
>>> &FORCE_EVAL
>>>
>>> METHOD Quickstep
>>>
>>> &SUBSYS
>>>
>>> &CELL
>>> ABC [angstrom] 5.000 5.000 5.000
>>> &END CELL
>>>
>>>
>>> &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 T
>>> &PARAMETER
>>> PARAM_FILE_PATH DFTB/scc
>>> PARAM_FILE_NAME scc_parameter
>>> UFF_FORCE_FIELD ../uff_table
>>> &END PARAMETER
>>> &END DFTB
>>>
>>> &END QS
>>>
>>> &POISSON
>>> &EWALD
>>> EWALD_TYPE SPME
>>> GMAX 25
>>> &END EWALD
>>> POISSON_SOLVER ANALYTIC
>>> &END POISSON
>>>
>>> &MGRID
>>> NGRIDS 5
>>> CUTOFF 600
>>> REL_CUTOFF 60
>>> &END MGRID
>>>
>>> &SCF
>>> MAX_SCF 100
>>>
>>> &OT
>>> PRECONDITIONER FULL_SINGLE_INVERSE
>>> MINIMIZER DIIS
>>> &END OT
>>>
>>> &END SCF
>>>
>>> &END DFT
>>>
>>> STRESS_TENSOR ANALYTICAL
>>>
>>>
>>> &END FORCE_EVAL
>>>
>>>
>>>
>>> !*******************************
>>> !FORCE_EVA section 4
>>> !
>>> !Total system including H2O and H2
>>> !*******************************
>>> &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
>>>
>>> &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 T
>>> &PARAMETER
>>> PARAM_FILE_PATH DFTB/scc
>>> PARAM_FILE_NAME scc_parameter
>>> UFF_FORCE_FIELD ../uff_table
>>> &END PARAMETER
>>> &END DFTB
>>>
>>> &END QS
>>>
>>> &POISSON
>>> &EWALD
>>> EWALD_TYPE SPME
>>> GMAX 25
>>> &END EWALD
>>> POISSON_SOLVER ANALYTIC
>>> &END POISSON
>>>
>>> &MGRID
>>> NGRIDS 5
>>> CUTOFF 600
>>> REL_CUTOFF 60
>>> &END MGRID
>>>
>>> &SCF
>>> MAX_SCF 100
>>>
>>> &OT
>>> PRECONDITIONER FULL_SINGLE_INVERSE
>>> MINIMIZER DIIS
>>> &END OT
>>>
>>> &END SCF
>>>
>>> &END DFT
>>>
>>> STRESS_TENSOR ANALYTICAL
>>>
>>> &END FORCE_EVAL
>>>
>>>
>>>
>>>
>>> !*******************************
>>> !FORCE_EVA section 5
>>> !
>>> !Higher level calculation on subsys 2, the H2O
>>> !*******************************
>>>
>>> &FORCE_EVAL
>>> METHOD Quickstep
>>>
>>> &DFT
>>> BASIS_SET_FILE_NAME BASIS_RI_cc-TZ
>>> POTENTIAL_FILE_NAME HF_POTENTIALS
>>>
>>>
>>> &QS
>>> HIGH_LEVEL_EMBED_SUBSYS .TRUE.
>>>
>>> METHOD GPW
>>> EPS_DEFAULT 1.0E-15
>>> EPS_PGF_ORB 1.0E-30
>>> &END QS
>>>
>>> &SCF
>>> MAX_SCF 100
>>>
>>> &OT
>>> PRECONDITIONER FULL_SINGLE_INVERSE
>>> MINIMIZER DIIS
>>> &END OT
>>>
>>> &END SCF
>>>
>>> &XC
>>> &XC_FUNCTIONAL PBE
>>> &END XC_FUNCTIONAL
>>> &END XC
>>>
>>> &POISSON
>>> &EWALD
>>> EWALD_TYPE SPME
>>> GMAX 25
>>> &END EWALD
>>> POISSON_SOLVER ANALYTIC
>>> &END POISSON
>>>
>>> &MGRID
>>> NGRIDS 5
>>> CUTOFF 600
>>> REL_CUTOFF 60
>>> &END MGRID
>>>
>>> &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/20190516/8974abeb/attachment.htm>
More information about the CP2K-user
mailing list