Does the result of thermodynamic integration using VCAIMAGES include the energy difference of the ideal gas?

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
Yicheng
Newbie
Newbie
Posts: 14
Joined: Tue Nov 19, 2019 9:45 am

Does the result of thermodynamic integration using VCAIMAGES include the energy difference of the ideal gas?

#1 Post by Yicheng » Wed Oct 09, 2024 12:12 pm

Dear VASP developers,

I plan to investigate the free energy difference between two aqueous systems containing NaCl and KCl (i.e., NaCl+63H2O and KCl+63H2O) through thermodynamic integration, using the VCAIMAGES tag to gradually transition Na(+) into K(+) by employing two different POTCAR files. Under the same VCAIMAGES value, the masses of Na and K in the two POTCAR files are set to be the same; as the VCAIMAGES value changes from 1.0 to 0.0, the mass gradually transitions from the atom mass of Na to that of K.

By performing thermodynamic integration on the derived potential energy differences, I obtain a free energy difference value. However, I am uncertain whether this value includes the ideal gas energy difference between these two systems. In other words, if I wish to calculate the free energy difference between the NaCl+63H2O and KCl+63H2O systems, should the energy difference between the ideal gas corresponding to these two systems (which is equal to the free energy difference between gaseous Na and K in these two systems) be added to the thermodynamic integration result?

I hope my question is clearly stated, and I greatly appreciate your time and patience.
Sincerely,
Yicheng


fabien_tran1
Global Moderator
Global Moderator
Posts: 418
Joined: Mon Sep 13, 2021 11:02 am

Re: Does the result of thermodynamic integration using VCAIMAGES include the energy difference of the ideal gas?

#2 Post by fabien_tran1 » Wed Oct 09, 2024 1:15 pm

Hi,

I have just discussed with a colleague who is more expert than me on this topic. Here are two important points:

-You are setting the masses of the atoms equal, which results in the same ideal gas free energy for both NaCl and KCl. Therefore, when the difference between NaCl and KCl is computed this term will factor out and won't affect the free energy difference.

-Does it really make sense to think about ideal gases here? There are cases where you express the free energy of a system relative to the ideal gas. But in this case you wants to express the free energy difference with respect to each other. And not to some third artificial system.


Yicheng
Newbie
Newbie
Posts: 14
Joined: Tue Nov 19, 2019 9:45 am

Re: Does the result of thermodynamic integration using VCAIMAGES include the energy difference of the ideal gas?

#3 Post by Yicheng » Wed Oct 09, 2024 1:43 pm

Dear Dr. Tran,
Thank you for your attention and effort regarding my question.

Indeed, there is another method to calculate the free energy difference between the NaCl+63H2O and KCl+63H2O systems using the ideal gas reference. In this method, we need to calculate the free energy of each system, which is equal to the sum of the free energy of the corresponding ideal gas system (denoted as F(IG)) and the free energy difference between the “realistic” system and the ideal gas reference (denoted as ΔF). It is this method that causes my confusion regarding the alchemical change using VCAIMAGES. I am uncertain whether the thermodynamic integration result using VCAIMAGES is equal to:
(1) ΔF(KCl+63H2O) - ΔF(NaCl+63H2O)
(2) ΔF(KCl+63H2O) - ΔF(NaCl+63H2O) + F(IG, KCl+63H2O) - F(IG, NaCl+63H2O)
Could you please clarify this question again?

Additionally, I would like to clarify that the set masses of Na and K change with the VCAIMAGES values, e.g., 22.990 when VCAIMAGES=1.0, 31.044 when VCAIMAGES=0.5, and 39.098 when VCAIMAGES=0.0.

Thank you for your time and I am looking forward to your reply.
Sincerely,
Yicheng

fabien_tran1 wrote: Wed Oct 09, 2024 1:15 pm

Hi,

I have just discussed with a colleague who is more expert than me on this topic. Here are two important points:

-You are setting the masses of the atoms equal, which results in the same ideal gas free energy for both NaCl and KCl. Therefore, when the difference between NaCl and KCl is computed this term will factor out and won't affect the free energy difference.

-Does it really make sense to think about ideal gases here? There are cases where you express the free energy of a system relative to the ideal gas. But in this case you wants to express the free energy difference with respect to each other. And not to some third artificial system.


fabien_tran1
Global Moderator
Global Moderator
Posts: 418
Joined: Mon Sep 13, 2021 11:02 am

Re: Does the result of thermodynamic integration using VCAIMAGES include the energy difference of the ideal gas?

#4 Post by fabien_tran1 » Wed Oct 09, 2024 2:40 pm

With the method that you are using you do not get a relative energy to the ideal gas. If you want to know if the method you are using and the ideal gas reference give the same results you have to try what is explained at Thermodynamic integration with harmonic reference and SCALEE. Actually, using the harmonic solid instead of the ideal gas is in principle easier.

For more information about thermodynamic integration and perturbation theory you should read these papers:
https://journals.aps.org/prl/abstract/1 ... 121.195701
https://journals.aps.org/prb/abstract/1 ... .99.184103

On the page SCALEE you can also find an equation how to compute the free energy of the ideal gas. You can obtain the de Broglie wavelength from the canonical momentum computed from the partition function of the ideal gas and the de Broglie relation.

But if these two methods will give the same result I doubt. Nevertheless they should be very close to each other.


Yicheng
Newbie
Newbie
Posts: 14
Joined: Tue Nov 19, 2019 9:45 am

Re: Does the result of thermodynamic integration using VCAIMAGES include the energy difference of the ideal gas?

#5 Post by Yicheng » Wed Oct 09, 2024 2:57 pm

Dear Dr. Tran,

Thank you for your reply. I understanding that the thermodynamic integration using the VCAIMAGES tag can only obtain the free energy difference between two systems, but cannot determine the free energy of a single system. On the other hand, thermodynamic integration using the ideal gas reference (i.e., the SCALEE tag) can provide the free energy of a single system, and therefore, it also can be used to calculate the free energy difference between two systems.

There should be a corresponding relation (this is what I want to know) between the free energy difference (between two systems) calculated from these two methods. This is why I am wondering whether the thermodynamic integration result using VCAIMAGES is equal to:
(1) ΔF(KCl+63H2O) - ΔF(NaCl+63H2O)
(2) ΔF(KCl+63H2O) - ΔF(NaCl+63H2O) + F(IG, KCl+63H2O) - F(IG, NaCl+63H2O)
where the ΔF values are the results calculated with the SCALEE tag. The thermodynamic integration result using the VCAIMAGES tag, and equations (1) and (2) calculated with the SCALEE tag, all represent the free energy difference between two systems (with or without the contribution of the ideal gas free energy).

Sincerely,
Yicheng

fabien_tran1 wrote: Wed Oct 09, 2024 2:40 pm

With the method that you are using you do not get a relative energy to the ideal gas. If you want to know if the method you are using and the ideal gas reference give the same results you have to try what is explained at Thermodynamic integration with harmonic reference and SCALEE. Actually, using the harmonic solid instead of the ideal gas is in principle easier.

For more information about thermodynamic integration and perturbation theory you should read these papers:
https://journals.aps.org/prl/abstract/1 ... 121.195701
https://journals.aps.org/prb/abstract/1 ... .99.184103

On the page SCALEE you can also find an equation how to compute the free energy of the ideal gas. You can obtain the de Broglie wavelength from the canonical momentum computed from the partition function of the ideal gas and the de Broglie relation.

But if these two methods will give the same result I doubt. Nevertheless they should be very close to each other.

Last edited by Yicheng on Wed Oct 09, 2024 3:00 pm, edited 1 time in total.

jonathan_lahnsteiner2
Global Moderator
Global Moderator
Posts: 215
Joined: Fri Jul 01, 2022 2:17 pm

Re: Does the result of thermodynamic integration using VCAIMAGES include the energy difference of the ideal gas?

#6 Post by jonathan_lahnsteiner2 » Thu Oct 10, 2024 6:49 pm

Dear Yicheng,

Regarding your initial question

However, I am uncertain whether this value includes the ideal gas energy difference between these two systems. In other words, if I wish to calculate the free energy difference between the NaCl+63H2O and KCl+63H2O systems, should the energy difference between the ideal gas corresponding to these two systems (which is equal to the free energy difference between gaseous Na and K in these two systems) be added to the thermodynamic integration result?

The method of thermodynamic integration with VCAIMAGES will give you the free energy difference between your two states aqueous NaCl and KCl. There is no need to add the free energy difference between the ideal gas states of NaCl and KCl. For your purpose the VCAIMAGES method in VASP is the appropriate method because it directly determines the free energy difference for your states of interest.

Another possibility would be to first determine the free energy for the aqueous NaCl system with respect to some reference system as the ideal gas or the Einstein crystal (harmonic solid). Both are valid reference systems. But in principle you could also use any other reference potential for which you can write down the free energy analytically. Next you would have to obtain the free energy for your aqueous KCl system with respect to the same reference potential and determine its free energy as well. Like this you would have obtained the free energies of NaCl and of KCl with respect to some artificial reference potential. The next step is now to compute the free energy difference between NaCl and KCl.

So to summarize, in the first method you directly obtain the free energy difference between your states. And in the second case you obtain the free energy difference by doing a detour by first computing the free energies of NaCl and KCl wrt to an artificial reference system and then compute the free energy difference. In theory these methods give the same answer because thermodynamic free energy differences only depend on the initial and the final state. They are independent of the path which was taken two reach from the initial to the final state. For more information I would recommend to take a look in the book Thermodynamics and an introduction to thermostatistics by Herbert Callen.

Because both methods are only exact in the adiabatic limit, you would have to make infinitely many images with the VCAIMAGES method. And you would have to varySCALEE for the reference system method infinitely slow. In practice this is not possible and therefore I would suspect the methods to give slightly different answers. But qualitatively the two approaches will yield the same result.

There is also a nice chapter in Daan Frenkels book Understanding Molecular Simulation about thermodynamic integration which I highly recommend. Also the references my colleague sent are very helpful. In your case, especially the second paper will be interesting.

If you are interested in how strong the two approaches deviate you are very welcome to try. It is definitely interesting to look into this. But there is no simple relation between the two methods because in principle they should give the same results.

I hope this is of help, all the best

Jonathan


Yicheng
Newbie
Newbie
Posts: 14
Joined: Tue Nov 19, 2019 9:45 am

Re: Does the result of thermodynamic integration using VCAIMAGES include the energy difference of the ideal gas?

#7 Post by Yicheng » Fri Oct 11, 2024 12:52 pm

Dear Dr. Lahnsteiner,

Thank you very much for your detailed response! I have greatly benefited from both your and Dr. Tran’s guidance, not only on my initial question but also on the thermodynamic integration method. Regarding the discrepancy between the free energy differences calculated from these two method, I have to say that, at least for my systems, as you mentioned, the free energy calculated from thermodynamic integration using the ideal gas reference has poor convergence with a large error. Perhaps this method is more suitable for systems with repetitive units. I will continue to explore this issue.
Thank you again for your guidance and time regarding my question.

Sincerely,
Yicheng


Post Reply