AW: [CP2K:16062] Question about the classical BMHFTD potential

126 views
Skip to first unread message

Krack Matthias (PSI)

unread,
Oct 18, 2021, 7:28:18 AM10/18/21
to cp...@googlegroups.com

Dear Abdullah

 

Thanks for reporting that issue. Though the input keyword ORDER is defined in the input section &BMHFTD, it is not used in the code. Only the pair potential parameters A, B, C, D, BD, and RMIN, RMAX, and RCUT are considered. It does not matter what you specify for ORDER in your input, the 6th and 8th order dispersion terms are always added using the damping parameter BD.

I will remove the unused input keyword ORDER from the &BMHFT section in the CP2K trunk version.

 

HTH

 

Matthias

__________________________________________
Paul Scherrer Institut
Dr. Matthias Krack
OHSA/D07
Forschungsstrasse 111
5232 Villigen PSI
Schweiz

Von: cp...@googlegroups.com <cp...@googlegroups.com> Im Auftrag von abdullahb...@gmail.com
Gesendet: Montag, 18. Oktober 2021 09:37
An: cp2k <cp...@googlegroups.com>
Betreff: [CP2K:16062] Question about the classical BMHFT potential

 

Dear CP2K users,

 

For the classical BMHFT potential, the C_6 (C parameter) and C_8 (D parameter) terms are multiplied by the Tang-Toennies damping functions, i.e. f_6 and f_8 (J. Phys. Chem. B, Vol. 112, No. 4, 2008). 

 

For this, an "ORDER" term (in CP2K) of 6 is needed for f_6 and 8 is needed for f_8. However, for defining this potential between two atoms, only a single "ORDER" term can be defined, for example, like this:

&BMHFTD

        atoms Cl Cl

        A 100.00000

        B 2.89128

        C 4.88053

        D 45.84421

        BD 3.21254

        RCUT 10.0

        ORDER 6

 &END BMHFTD

 

I am curious to know whether it is possible to set an ORDER for 6 for the f_6 term, which is then multiplied by the C_6 term; and an order of 8 for the f_8 term, which is then multiplied by the C_8 term. I tried the below input file format, but it does not work as CP2K (ver 5.1) stops reading the file and gives an error cause of the missing D parameter in the first part:

 

&BMHFTD

        atoms Cl Cl

        A 100.00000

        B 2.89128

        C 4.88053

        BD 3.21254

        RCUT 10.0

        ORDER 6

&END BMHFTD

&BMHFTD

        atoms Cl Cl

        D 45.84421

        BD 3.21254

        RCUT 10.0

        ORDER 8

&END BMHFTD

 

Error:

 *******************************************************************************

 *   ___                                                                       *

 *  /   \                                                                      *

 * [ABORT]                                                                     *

 *  \___/    Value requested, but no value set getting value from keyword D of *

 *    |                               section BMHFTD                           *

 *  O/|                                                                        *

 * /| |                                                                        *

 * / \                                        input/input_section_types.F:1303 *

 *******************************************************************************

 

Any suggestions would be greatly appreciated.

 

Thank you.

 

Best Regards,

Abdullah Bin Faheem

 

 

 

 

 

 

 

 

--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/08f80f7a-2d3d-4e61-8fa1-d648826224d2n%40googlegroups.com.

abdullahb...@gmail.com

unread,
Oct 18, 2021, 8:04:33 AM10/18/21
to cp2k
Dear Dr.  Krack,

Thank you for elaborating. Quick question, can the BD parameter be defined separately for the f_6 and f_8 terms then? 
I ask since I've found that in previous literature (as mentioned in my previous post and in https://doi.org/10.1016/j.molliq.2021.117470), they use different values for BD in f_6 and f_8. Or such an implementation not currently supported in cp2k?

Thank you.
Abdullah

Krack Matthias (PSI)

unread,
Oct 18, 2021, 8:13:15 AM10/18/21
to cp2k

Dear Abdullah

 

Correct, different BD values, i.e. b(ij) parameters, are not supported currently.

 

Best

 

Matthias

 

abdullahb...@gmail.com

unread,
Oct 18, 2021, 8:14:44 AM10/18/21
to cp2k
Thank you for time. 

Regards,
Abdullah

Krack Matthias (PSI)

unread,
Oct 18, 2021, 8:43:25 AM10/18/21
to cp...@googlegroups.com

It should not be too difficult to add such flexibility.

 

Matthias

 

abdullahb...@gmail.com

unread,
Oct 18, 2021, 8:53:03 AM10/18/21
to cp2k
If that is the case, perhaps the source code can be modified to accept two integers that are multiplied separately. However, I am unfamiliar with the code structure of cp2k and I am not certain which files I might need to modify. Is there perhaps some txt i could follow that lists more details of the fortran files in the /src folder?

Regards,
Abdullah

Krack Matthias (PSI)

unread,
Oct 18, 2021, 8:58:14 AM10/18/21
to cp...@googlegroups.com

Maybe, there is no need for a code change. Did you try the following as input:

&BMHFTD

ATOMS Cl Cl

A 100.00000

B 2.89128

C 4.88053

D 0.0

BD 3.21254

RCUT 10.0

&END BMHFTD

&BMHFTD

ATOMS Cl Cl

A 0.0

B 1.0 # does not matter

C 0.0

D 45.84421

BD #any other BD value

RCUT 10.0

&END BMHFTD

 

 

abdullahb...@gmail.com

unread,
Oct 18, 2021, 9:12:36 AM10/18/21
to cp2k
Yes i tried it out for a system consisting of molten KCl. Where I used different BD values for K-Cl and K-K. However, such an implementation leads to an error (even though a single BD term does not):

"Potential energy is an abnormal value (NaN/Inf)".

 I believe it is due to the fact that the second part overwrites the first part, as mentioned in the output file here (i have attached both the input and output files):
 
SPLINE_INFO| Done
     TESTING KK with CLCL
     TESTING KK with CLK
     TESTING KK with CLK
     TESTING KK with KK
     FOUND K K
     TESTING KK with KK

 *** WARNING in force_fields_all.F:3011 :: Multiple NONBONDED declaration: ***
 *** K and K OVERWRITING!                                                  ***

     FOUND K K
     TESTING KCL with CLCL
     TESTING KCL with CLK
     FOUND K CL
     TESTING KCL with CLK

 *** WARNING in force_fields_all.F:3011 :: Multiple NONBONDED declaration: ***
 *** K and CL OVERWRITING!                                                 ***

     FOUND K CL
     TESTING KCL with KK
     TESTING KCL with KK
     TESTING CLCL with CLCL
     FOUND CL CL
     TESTING CLCL with CLK
     TESTING CLCL with CLK
     TESTING CLCL with KK
     TESTING CLCL with KK

Regards,
Abdullah
kcl.xyz
kcl_cmd.out
kcl_cmd.inp

Krack Matthias (PSI)

unread,
Oct 18, 2021, 9:28:33 AM10/18/21
to cp...@googlegroups.com

Well, that are only warnings. The crash after a couple of MD steps could also have a different reason. Did you try one &BMHFTD section for a kind pair and compared it with a spilt &BMHFTD section using the same BD values just to be sure that the section “split” is causing the crash?

 

M.

 

abdullahb...@gmail.com

unread,
Oct 18, 2021, 9:54:07 AM10/18/21
to cp2k
Yes the following input, where I use a split BMHFTD gives the same error:
 
&NONBONDED
      &BMHFTD
        atoms Cl Cl
        A 100.00000
        B 2.89128
        C 4.88053
        D 45.84421
        BD 3.21254
        RCUT 10.0
      &END BMHFTD
      &BMHFTD
        atoms Cl K
        A 57.70000
        B 2.92907
        C 1.10101
        D 0.0
        BD 2.83459
        RCUT 10.0
      &END BMHFTD
  &BMHFTD
        atoms Cl K
        A 0.0
        B 1.0
        C 0.0
        D 1.67438
        BD 2.83459
        RCUT 10.0
      &END BMHFTD
      &BMHFTD
        atoms K K
        A 54.50000
        B 2.94797
        C 0.55731
        D 0.0
        BD 2.83459
        RCUT 10.0
      &END BMHFTD
  &BMHFTD
        atoms K K
        A 0.0
        B 1.0
        C 0.0
        D 0.55034
        BD 2.83459
        RCUT 10.0
      &END BMHFTD
    &END NONBONDED


In comparison, the input below, where I did not use a split BMHTD does not give this error, and the MD proceeds normally:

    &NONBONDED
      &BMHFTD
        atoms Cl Cl
        A 100.00000
        B 2.89128
        C 4.88053
        D 45.84421
        BD 3.21254
        RCUT 10.0
      &END BMHFTD
      &BMHFTD
        atoms Cl K
        A 57.70000
        B 2.92907
        C 1.10101
        D 1.67438
        BD 2.83459
        RCUT 10.0
      &END BMHFTD
      &BMHFTD
        atoms K K
        A 54.50000
        B 2.94797
        C 0.55731
        D 0.55034
        BD 2.83459
        RCUT 10.0
      &END BMHFTD
    &END NONBONDED



Krack Matthias (PSI)

unread,
Oct 18, 2021, 11:43:24 AM10/18/21
to cp...@googlegroups.com

You are right, Abdullah, the resulting splined pair potentials are different. The additive behavior does not work with the same pair potential section and the same atomic kind pair twice.

I have just committed a fix which will allow for different BD values in the BMHFTD section. The pull request is currently running. You can find the fixed code already here in my fork on github.

 

HTH

 

Matthias

 

abdullahb...@gmail.com

unread,
Oct 18, 2021, 11:56:49 AM10/18/21
to cp2k
Thank you very much for your support.

Just to clarify,  defining the BD terms like this:

BD = 1.5 2 

means that the f_6 uses the 1.5 value and f_7 uses the 2 value right?

Best regards,
Abdullah


abdullahb...@gmail.com

unread,
Oct 18, 2021, 11:59:46 AM10/18/21
to cp2k
sorry i mean:
means that the f_6 uses the 1.5 value and f_8 uses the 2 value right?

Krack Matthias (PSI)

unread,
Oct 18, 2021, 12:01:04 PM10/18/21
to cp...@googlegroups.com

BD 1.5   # will use 1.5 for f6 and f8

BD 1.5 2 # will use 1.5 for f6 and 2.0 for f8

There is no f7 term.

 

Matthias

 

Krack Matthias (PSI)

unread,
Oct 18, 2021, 12:01:59 PM10/18/21
to cp...@googlegroups.com

abdullahb...@gmail.com

unread,
Oct 18, 2021, 12:03:02 PM10/18/21
to cp2k
Yes, "f7" was a typo from my end. 

Thank you for your help

Abdullah

Reply all
Reply to author
Forward
0 new messages