Atomic energies

188 views
Skip to first unread message

Jakob Brauer

unread,
Sep 10, 2024, 4:37:51 AM9/10/24
to cp2k
Dear all,

I want to run an AIMD simulation and have the forces of the atoms and the atomic energies printed at each MD step. To do that I am using the input section:
&FORCE_EVAL
...
&PROPERTIES
        &ATOMIC
        ENERGY TRUE
        &END ATOMIC
&END PROPERTIES
...
&END FORCE_EVAL

The AIMD runs smoothly without the properties block I showed above. When I add this properties block, the calculation fails after the first SCF is coverged and the atomic forces are printed with "CPASSERT failed". The last thing that is printed after the atomic forces is:
Potential energy (Atomic):                                   -797.3284106239240
 Potential energy (Total) :                                   -868.7310139775017
 Difference               :                                     71.4026033535777

 *******************************************************************************
 *   ___                                                                       *
 *  /   \                                                                      *
 * [ABORT]                                                                     *
 *  \___/                             CPASSERT failed                          *
 *    |                                                                        *
 *  O/|                                                                        *
 * /| |                                                                        *
 * / \                                                 force_env_methods.F:430 *
 *******************************************************************************


 ===== Routine Calling Stack =====

            2 qs_mol_dyn_low
            1 CP2K

I have attached my input, the xyzfile and the logfile. The problem seems to be version independent, since I have tested it with version 2023.1, 2023.2 and 2024.1.

Any help would be greatly appreciated!
Best wishes and kind regards
Jakob

LTA_AIMD_TEST_clean.log
LTA_AIMD_TEST_clean.inp
LTA_TIGHTOPT-fullopt-TZVP-high-prcs_last_config.xyz

Jürg Hutter

unread,
Sep 10, 2024, 5:38:56 AM9/10/24
to cp...@googlegroups.com
Hi

atomic energies are not implemented with all features available. If at the end
of the calculation the sum of atomic energies is not equal to the calculated
total energy, CP2K will stop with the error message you see.
In your case, the nonlocal vdW functional is the problem. Atomic energies for
these types of functionals are not available.

regards
JH

________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Jakob Brauer <jakob.br...@gmail.com>
Sent: Tuesday, September 10, 2024 10:32 AM
To: cp2k
Subject: [CP2K:20679] Atomic energies
--
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<mailto:cp2k+uns...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/e6cebe98-dd42-49ec-b2c5-bc8874114d4fn%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/e6cebe98-dd42-49ec-b2c5-bc8874114d4fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Jakob Brauer

unread,
Sep 10, 2024, 8:34:33 AM9/10/24
to cp2k
Dear Mr. Hütter,

Thanks a lot for the quick reply. I now understand the error.

Following your advice I switched from the rev-vdW-DF2 functional to PBE-D3. Again I end up with the same error and a difference of around 70 Hartree between the sum of atomic energies and the total energy. Removing the D3 correction does not affect the outcome (see attached inputs and log files) in both cases the difference stays the same. I suspected that the periodicity might be an issue, so I tried the input (with the piosson wavelet solver) on a molecule in the gasphase but the issue remains, the sum of atomic energies is less (well, a smaller negative number) than the total energy.

Is there documentation for which kind of methods this is available?

Kind regards and best wishes
JaBr
LTA_AIMD_TEST_PBE-noD3.log
LTA_AIMD_TEST_PBE-D3.inp
LTA_AIMD_TEST_PBE-noD3.inp
LTA_AIMD_TEST_PBE-D3.log

Jürg Hutter

unread,
Sep 10, 2024, 9:00:56 AM9/10/24
to cp...@googlegroups.com
Hi

I can run your input (slightly adapted, but essentially the same) without problems.

Potential energy (Atomic): -867.8891545970548
Potential energy (Total) : -867.8891476822960
Difference : 0.0000069147588

This is the current TRUNK version (similar to 2024.3) with the Gnu compiler.

If you want to make a quick check, use a smaller system with the same options and run
it with your current version and with a precompiled new version. (https://github.com/cp2k/cp2k/releases/tag/v2024.2)

regards
JH

________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Jakob Brauer <jakob.br...@gmail.com>
Sent: Tuesday, September 10, 2024 2:34 PM
To: cp2k
Subject: Re: [CP2K:20683] Atomic energies
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/e77334da-5f9a-4823-bf8a-14a7b0b31022n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/e77334da-5f9a-4823-bf8a-14a7b0b31022n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Jakob Brauer

unread,
Sep 11, 2024, 3:57:15 AM9/11/24
to cp2k
Dear Mr. Hütter,

thanks for your support, with the PBE-D3 functional the CP2K version indeed was the issue.
With the 2024.1 version the input runs without problem.

Kind regards
Jakob
Reply all
Reply to author
Forward
0 new messages