[Pw_forum] Separation of energy terms in pw output

Pietro Bonfa' pietro.bonfa at fis.unipr.it
Fri Aug 1 16:39:18 CEST 2014


Dear Chris Heard,

I faced the same problem some time ago. I copy pasted a few routines
from the various codes of the QE package and put together a sort of
postprocessing tool.

I uploaded it for your reference here: https://gitorious.org/qe-stuff/enx/

It was somehow working for QE 5.0, but consider that it is the first
piece of code that I ever wrote in Fortran. This means that the "AS IS"
terms apply.

I slightly changed a couple of things to make it compile with QE 5.1.
I also changed

CALL davcio (evc, nwordwfc, iunwfc, ik, - 1)

to

CALL davcio (evc, 2*nwordwfc, iunwfc, ik, - 1)

as it should be in QE 5.1 (as far as I know).

The routine that calculates kinetic energy (and is fairly readable) is
at line 235 of kinetic.f90.

I haven't tested it, if you do please let me know!

Best regards,
Pietro




On 08/01/2014 02:14 PM, Christopher Heard wrote:
> Dear all,
> 
> I am looking into the various contributions to the total energy of a system after scf convergence, and the output gives the Hartree, Ewald, xc, smearing and "one-electron" contributions.
> 
> I hope to separate it further, so I can isolate the kinetic energy, for example, and it seems that in the code there is such a separation before grouping terms together in the output, judging by the total energy subroutine:
> 
> 
> ===============================================
> SUBROUTINE total_energy( edft )
> 
>           TYPE (dft_energy_type) :: edft
> 
>           eself = edft%eself
>           epseu = edft%epseu
>           ent = edft%ent
>           enl = edft%enl
>           evdw = edft%evdw
>           esr = edft%esr
>           ekin = edft%ekin
>           vxc = edft%vxc
>           ehti = edft%ehti
>           ehte = edft%ehte
>           self_ehte = edft%self_ehte
>           self_exc = edft%self_exc
>           self_vxc = edft%self_vxc
>           exc = edft%exc
>           eht = edft%eht
> 
>           etot = ekin + eht + epseu + enl + exc + evdw - ent
>           !
>           edft%etot = etot
> 
>           RETURN
> END SUBROUTINE total_energy
> ==============================================
> 
> 
> Is there a way which avoids having the output energies grouped together in the way they are by default?
> 
> 
> Many thanks,
> 
> 
> Chris Heard
> Chemical Physics,
> Chalmers University of Technology,
> Göteborg, Sweden
> 
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://pwscf.org/mailman/listinfo/pw_forum
> 


-- 
Pietro Bonfa' - PhD student
Dipartimento di Fisica e Scienze della Terra "Macedonio Melloni"
Viale delle Scienze 7A
43124 Parma - Italy



More information about the users mailing list