printing STRESS_TENSOR

138 views
Skip to first unread message

oandr...@gmail.com

unread,
Jul 20, 2022, 4:51:56 PM7/20/22
to cp2k
Dear CP2K group, 

I have been trying to get the stress tensor in cp2k 9.1 , I am using 

   &PRINT

      &STRESS_TENSOR

         ADD_LAST SYMBOLIC

         FILENAME tensor

      &END STRESS_TENSOR

   &END PRINT


within FORCE_EVAL, yet, I dont get an independent  file for the  LAST STEP, but I do get one file (stress_tensor) per step during the geo_opt. 

if i include 

    &EACH

            GEO_OPT 0

         &END EACH


if i dont get the LAST STEP, 


I was wondering if you have some suggestions to obtain a single file, with the last last stress tensor,


thank you , 


Andres Ortega-Guerrero



Anna Hehn

unread,
Jul 21, 2022, 3:43:27 AM7/21/22
to cp...@googlegroups.com
Dear Andres,

I am not sure about all the different options and combinations, but if choosing RUN_TYPE CELL_OPT with TYPE DIRECT_CELL_OPT in the CELL_OPT section and adding to your print statement the keyword COMMON_ITERATION_LEVELS XXX with XXX being the number of maximum iterations chosen for CELL_OPT, CP2K prints all stress tensors for each step in one file for me, named as chosen with the keyword FILENAME "tensor". Was this what you were searching for? 

Best regards,

Anna

--
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/e3cfc64d-51d0-42fc-952a-a879f6f50f0an%40googlegroups.com.

oandr...@gmail.com

unread,
Jul 21, 2022, 4:12:45 AM7/21/22
to cp2k
Dear Anna, 

Thank you for your email, 

What I am looking for is to obtain a single stress_tensor file containing the stress_tensor of the last step. 
Similar to what is used for MO_CUBES within DFT/PRINT, you can obtain the cubes files of interest from the last step, using ADD_LAST. 
However, when I try this for STRESS_TENSOR it doesn't seem to work. 


best 

Andres

Anna Hehn

unread,
Jul 21, 2022, 5:05:55 AM7/21/22
to cp...@googlegroups.com
Hi Andres,

maybe you can try to add in the PRINT section in section MOTION  a subsection for STRESS and THEN for &EACH CELL_OPT -1  ?
&MOTION
  &PRINT
  &STRESS
    &EACH 
     CELL_OPT -1
   &END EACH
 &END STRESS
 &END PRINT
&END MOTION

But I am not sure - let me please know if it helps. 

Best regards,

Anna


oandr...@gmail.com

unread,
Jul 25, 2022, 10:29:53 AM7/25/22
to cp2k
Hello Anna, 

I need to print the stress_tensor, that is not in MOTION but instead is in FORCE EVAL PRINT (https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/PRINT/STRESS_TENSOR.html)
I tried the ADD_LAST for the forces, and they seem to work  but the one in STRESS_TENSOR doesn't, 
I just wanted one file instead of all, but I will work my way around it since it doesn't seem to work the ADD_LAST functionality

best, 

Andres 
Reply all
Reply to author
Forward
0 new messages