virial from Cp2K

511 views
Skip to first unread message

rafal gorniak

unread,
Jan 14, 2022, 9:06:42 AM1/14/22
to cp2k
Dear All,

I'm trying to calculate virial for some crystal structure using cp2k. In cp2k I can calculate stress tensor is that feature is exactly virial or contain kinetic energy part (de facto it's a pressure)?

I know from cp2k I can have a forces and atom positions thus I also should be able to calculate virial. am I right? 

With kind regards
Rafal

hut...@chem.uzh.ch

unread,
Jan 17, 2022, 10:22:22 AM1/17/22
to cp...@googlegroups.com
Hi

CP2K stress tensor calculations return the derivative of the
total energy wrt the cell parameters.
For NPT simulations the kinetic energy part is added to account
for finite temperature effects.

The virial can only be calculated from the nuclear gradients
under certain conditions, e.g. pair atomic forces (so not in DFT)
and minimum image conditions.

regards

Juerg Hutter
--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie E-mail: hut...@chem.uzh.ch
Universität Zürich
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: "cp2k" <cp...@googlegroups.com>
From: "rafal gorniak"
Sent by: cp...@googlegroups.com
Date: 01/14/2022 03:06PM
Subject: [CP2K:16461] virial from Cp2K
--
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/c025f562-4ddb-4992-a273-43caa023384an%40googlegroups.com.

rafal gorniak

unread,
Jan 20, 2022, 6:05:54 AM1/20/22
to cp2k

Thank you  Juerg for your answer.

 I’m a beginner at cp2k calculations however if you take closer my input file (inp.input) where the forces are calculated I’m using a pbc convention. I thought with the total forces Fk on particle k treated as the sum of all the forces from the other particles j in the system I will be able to calculate virial because the virial is defined as <w>=sumk(Frk)=sumksumj>k(Fkj·rkj).
My project is generally bias simulations, where external forces will be calculated from a different program and those forces must be added (modified) to the forces from cp2k. But the whole simulation must be applied at Npt ensemble. 

Best regards,

Rafal 

inp
Reply all
Reply to author
Forward
0 new messages