[CP2K-user] [CP2K:19777] Printing stress tensor from an existing trajectory

Léon Luntadila Lufungula Leon.luntadilalufungula at uantwerpen.be
Thu Jan 18 13:30:01 UTC 2024


Dear Matthias,

Thanks for the confirmation! 

Kind regards,
Léon

On Thursday 18 January 2024 at 14:14:57 UTC+1 Krack Matthias wrote:

> Dear Léon
>
>  
>
> That’s correct, the values in the .stress file have already been divided 
> by the cell volume and thus the total pressure in bar can be calculated as 
> (p(xx) + p(yy) + p(zz))/3.
>
>  
>
> Best
>
>  
>
> Matthias
>
>  
>
> *From: *cp... at googlegroups.com <cp... at googlegroups.com> on behalf of Léon 
> Luntadila Lufungula <Leon.luntad... at uantwerpen.be>
> *Date: *Thursday, 18 January 2024 at 11:41
> *To: *cp2k <cp... at googlegroups.com>
> *Subject: *Re: [CP2K:19774] Printing stress tensor from an existing 
> trajectory
>
> Dear Matthias,
>
>  
>
> I've done some checking myself, by comparing my calculated value with that 
> reported in the MD section of the output and the reported value in the 
> output does seem to coincide with just the average of the diagonal elements 
> of the stress tensor as outputted by MOTION/PRINT/STRESS, without dividing 
> by the cell volume... The elements of the stress tensor are already given 
> in bar so dividing by the cell volume would give units of bar/Å^3 and not 
> bar. So is it correct that the pressure is just equal to the average of the 
> diagonal elements or does one need to take into account the cell volume as 
> you suggested?
>
>  
>
> Kind regards,
>
> Léon
>
>  
>
> P.S. Thanks to all of you from CP2K (Matthias, Jürg, Matt, ...) for being 
> so responsive this last week, it has really helped me in getting my 
> calculations and analysis of the results up and running in a short time!
>
> On Thursday 18 January 2024 at 09:59:27 UTC+1 Krack Matthias wrote:
>
> Dear Léon
>
>  
>
> yes, the pressure is calculated from the average of the three diagonal 
> elements divided by the cell volume.
>
>  
>
> Best
>
>  
>
> Matthias
>
>  
>
> *From: *cp... at googlegroups.com <cp... at googlegroups.com> on behalf of Léon 
> Luntadila Lufungula <Leon.luntad... at uantwerpen.be>
> *Date: *Wednesday, 17 January 2024 at 13:47
> *To: *cp2k <cp... at googlegroups.com>
> *Subject: *Re: [CP2K:19768] Printing stress tensor from an existing 
> trajectory
>
> Dear Matthias,
>
>  
>
> Perhaps this is a stupid question, but I want to calculate the pressure 
> from the stress tensor to see if my NPT trajectory is keeping the pressure 
> constant along its trajectory and I'm a bit unsure about how to do this. Is 
> this just taking the average of the diagonal elements of the stress tensor 
> or is it more complex than this?
>
>  
>
> Kind regards,
>
> Léon
>
> On Friday 12 January 2024 at 12:25:29 UTC+1 Léon Luntadila Lufungula wrote:
>
> Dear Matthias,
>
>  
>
> Thanks for the quick reply, it wasn't a very expensive calculation so it 
> doesn't matter if I'll have to re-do it. I'll keep this in mind for the 
> future so that I don't forget this again.
>
>  
>
> Kind regards,
>
> Léon
>
> On Friday 12 January 2024 at 11:22:39 UTC+1 Krack Matthias wrote:
>
> Dear Léon
>
>  
>
> I am afraid, it is not possible to recover the stresses a posteriori from 
> a NpT run. The stresses obtained with REFTRAJ would miss the kinetic energy 
> contribution to the total stress tensor.
>
>  
>
> HTH
>
>  
>
> Matthias
>
>  
>
> *From: *cp... at googlegroups.com <cp... at googlegroups.com> on behalf of Léon 
> Luntadila Lufungula <Leon.luntad... at uantwerpen.be>
> *Date: *Friday, 12 January 2024 at 10:16
> *To: *cp2k <cp... at googlegroups.com>
> *Subject: *[CP2K:19730] Printing stress tensor from an existing trajectory
>
> Dear all,
>
>  
>
> I calculated an NPT trajectory and wanted to see how the pressure 
> fluctuated during the MD run, however, I forgot to add 
> the MOTION/PRINT/STRESS keyword so I don't have my stresses. Is there a way 
> to create the file with the stresses after the fact without re-doing the 
> whole trajectory? Perhaps with the REFTRAJ keyword? I don't have any 
> experience with it, but I think it might pose a solution if I read the 
> documentation...
>
>  
>
> Kind regards,
>
> Léon
>
> -- 
> 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... at googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/cp2k/fa512d0f-ede4-4ed7-ad14-92b512851a8fn%40googlegroups.com 
> <https://groups.google.com/d/msgid/cp2k/fa512d0f-ede4-4ed7-ad14-92b512851a8fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> -- 
> 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... at googlegroups.com
>
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/cp2k/8f700419-9d4d-48da-a051-f46ea0ecc86cn%40googlegroups.com 
> <https://groups.google.com/d/msgid/cp2k/8f700419-9d4d-48da-a051-f46ea0ecc86cn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> -- 
> 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... at googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/cp2k/41909f1d-e212-482e-a407-5fdb8536d824n%40googlegroups.com 
> <https://groups.google.com/d/msgid/cp2k/41909f1d-e212-482e-a407-5fdb8536d824n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/ef623622-6ba7-4bed-8f31-ec6ee3c703d8n%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20240118/c737eb1c/attachment.htm>


More information about the CP2K-user mailing list