shankar1729 / jdftx

JDFTx: software for joint density functional theory
http://jdftx.org
81 stars 54 forks source link

Some problems about free energy #49

Closed chen314156 closed 5 years ago

chen314156 commented 5 years ago

Hi Shankar Sorry to bother you again. This may be a stupid problem, but it really bothers me. When I dealed with the calculated energies listed in the bottom of output files (something concerned in the free energy tutorial), like ZPE, the vibrational energy {including Evib, TSvib and Avib}, it was difficult for me to distinguish the meaning of these energies between JDFTx and VASP. In VASP, Gibbs free energy △G =Etot+ZPE-TS, while in JDFTx, I don't know how to calculate it, △G =Etot+ZPE-TSvib? However, the fianl result is far from the ideal result when I use this equation. And I don't know the meaning of 'the vibrational free energy' and ' vibrational energy'. Looking forward for your reply. Thank you. Regards, Chen

shankar1729 commented 5 years ago

Hi Chen,

You should use Avib in general for the total vibrational correction. ZPE - TS is an approximation that will be close when the vibrational frequencies >> T, but in general the Evib contribution also matters when you have soft vibrational frequencies.

What do you mean the numbers are far from ideal? What are you comparing against? For what system? Have you checked that the vibrational frequencies agree with the reference? If not, first figure out if everything is properly converged.

Best, Shankar

DaisyWang20 commented 5 years ago

Hi shankar, It may be a stupid question but I really don't know the meaning of Etot,TS ,F in jdftx ,is it electroic energy? So if I want to calculate Gibbs free energy , I should calculate the frequency of this structure ?

shankar1729 commented 5 years ago

Yes, energy calculated by DFT codes are always electronic only. You need to calculate vibrations (or phonons for periodic systems) to get vibrational contributions.

DaisyWang20 commented 5 years ago

Hi shankar, my view : when calculating the free energy in vacuum and solvent, Etot+Avib=G ; (you mentioned if smearing is used ,we should use F,which means F+Avib=G )Is it right?

What about G got from "target mu"? Do I also need to calculate the vibration ?(Then G+Avib=G_free energy)

By the way ,where can I get total magnetic moment from OUTPUT?from "magneticMoment: [ Abs: 1.09368 Tot: -0.00000 ]"? what's the meaning of Abs and Tot?

Thanks !!!

shankar1729 commented 5 years ago

Yes, if you want vibrational free energy, you need to compute vibrations. Difference between F and G are electronic entropy and chemical potential contributions only.

Tot is integral(M) and abs is integral (|M|), where M is magnetization density at each point in unit cell. You are probably looking for tot.

shankar1729 commented 1 year ago

Hi Ricco,

I don't know what VASP does, but in JDFTx, after calculating list of vibrational frequencies / phonon frequencies omega_i:

ZPE: zero-point energy = sum_i 0.5 omega_i, energy assuming Bose occupations of all vibrational modes are zero (corresponds to 0K).

Evib: energy expectation value, which also accounts for Bose occupations at the specified temperature (eg. 300K)

Avib = Evib - TSvib, includes the vibrational entropy, and is the appropriate (Helmholtz) free energy at fixed T.

Essentially, Avib is the correct quantity at finite T, and as T -> 0, Avib -> ZPE. If all your vibrational frequencies have hbar omega >> kT, then all the Bose occupations will be close to zero anyway and Avib will be approximately the same as ZPE.

In JDFTx, you can use the vibrations module for molecules and the phonon code for periodic systems, as shown in two separate tutorials. Each of these report ZPE, Evib and Avib in the same way.

Best, Shankar

On Wed, Oct 11, 2023 at 1:51 AM Rriccooo @.***> wrote:

Hi Shankar

I am also confused by this problem.

When I dealed with the calculated energies listed in the bottom of output files (something concerned in the free energy tutorial), like ZPE, the vibrational energy {including Evib, TSvib and Avib}, it was difficult for me to distinguish the meaning of these energies between JDFTx and VASP.

In VASP, Gibbs free energy △G =Etot+ZPE-TS, while in JDFTx, I don't know how to calculate it, △G =Etot+ZPE-TSvib or △G =Etot+Avib, or △G =Etot+Avib +Evib -TSvib, and why? I also feel confused by the meaning of 'the vibrational free energy' and ' vibrational energy'.

And you have mentioned energy calculated by DFT codes are always electronic only, we need to calculate vibrations (or phonons for periodic systems) to get vibrational contributions. But how to compute this part?

Looking forward for your reply. Thanks a lot!

Best Regards, Ricco

— Reply to this email directly, view it on GitHub https://github.com/shankar1729/jdftx/issues/49#issuecomment-1756850313, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHASIIYGNYZ2KS3MFGIM7RLX6YXV5AVCNFSM4GLRUDDKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZVGY4DKMBTGEZQ . You are receiving this because you modified the open/close state.Message ID: @.***>