How to compute and output the dipole of the whole system during AIMD simulations?

321 views
Skip to first unread message

liu dongfei

unread,
Sep 27, 2023, 9:29:41 AM9/27/23
to cp2k
Recently, I have been trying to find commands in the reference manual and cp2k group for calculating dipole of the simulation system.
I find one previous related message posted two years ago.
In that post, Mr. Chen mentioned three commands for calculating dipole in cp2k reference manual. They are as follows:
  1. Total dipole: https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/LOCALIZE/PRINT/TOTAL_DIPOLE.html
  2. Molecular dipole: https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/LOCALIZE/PRINT/MOLECULAR_DIPOLES.html
  3. moments: https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/PRINT/MOMENTS.html
Mr. Chen said there exist differences between the results of Total dipole and Molecular dipole. And the way of calculating Molecular dipole is also unknown. 

Mr. Chen's questions are also something that I want to know very much. Looking forward to any guidance and help! 

Regards,
Dongfei

Matt Watkins

unread,
Oct 4, 2023, 1:47:36 AM10/4/23
to cp2k
The moments keyword gives the dipole moment of the whole system (which you seem to ask for). If your system if periodic you need to allow for that with the periodic keyword - dipole moments in a periodic system are only defined up to a point - consider drawing a box with two charges in it then shifting the box boundaries. There are many papers on this in the literature.

The localise keyword converts the density into a Wannier representation centred on atoms from the original distributed density. These wannier centres can then be used to recalculate the dipole of the whole system or by grouping the wannier centres that correspond to molecules (as defined in a similar way to a forcefield calculation) molecular dipoles can be calculated. See PL Silvestrelli, M Parrinello - Physical Review Letters, 1999 - APS for instance.

Matt

Alexandre Pinto

unread,
Nov 15, 2023, 1:55:54 PM11/15/23
to cp2k
Dear Matt,

Do you know if the moments keyword gives the dipole moment of the whole system within the QM/MM implementation, or just the QM layer?

Best regards,
Alexandre 

Matt Watkins

unread,
Nov 16, 2023, 4:16:59 AM11/16/23
to cp2k
I am not 100% sure. Relevant seems to be:

https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/QMMM/PRINT/DIPOLE.html

"Controls the printing of the DIPOLE in a QM/MM calculations. It requires that the DIPOLE calculations is requested both for the QS and for the MM part."

but do sanity check your results / consider periodic boundary conditions etc.
Matt

Alexandre Pinto

unread,
Nov 16, 2023, 7:56:18 AM11/16/23
to cp2k
I failed to see that manual section, thank you so much!

Best regards,
Alexandre

Guozhen Zhang

unread,
Jul 3, 2025, 3:44:20 AMJul 3
to cp2k
Hi Dongfei,

     Glad to see your posted question just spoke out what I am wondering. I would like to collect dipole moments of a periodic system consisting of molecular packing along the AIMD trajectory to compute the dielectric constant using the formula suggested in this webpage. https://docs.mdanalysis.org/2.8.0/documentation_pages/analysis/dielectric.html

      Have you figured out the way of obtaining the dipole moment eventually?

      Looking forward to any advice and help! 

      Thanks.

       Best
       GZ

Reply all
Reply to author
Forward
0 new messages