rwexler / gcmc

7 stars 1 forks source link

Detailed Balance in the Current Code Implementation #6

Open hsulab opened 3 years ago

hsulab commented 3 years ago

Dear Developers,

I appreciate you upload the GCMC implementation for metal surface oxidation. This really helps me in my own project. However, I have few questions after reading the source code.

Does the probabilities of adding Ag and O affect the final equilibrated structure if they are not 50/50? Or it only influences the sampling efficiency? I also noticed the comment in the last line of mc.py. Will the adjustment of action probability by accept probability violate the detailed balance because the probabilities of the insertion and the deletion doesn't equal anymore?

Looking forward to replies.

All the best, Jiayan

rwexler commented 3 years ago

Dear Jiayan,

Thanks for your email and we're glad to hear that our code has been helpful for your research!

In principal, the global composition-equilibrated structure shouldn't depend on the addition probabilities. It will, however, affect the efficiency with which you reach that solution. In the case of ab initio GCMC, where we used DFT, one might not be able to afford the number of calculations required to equilibrate the structure using an inefficient set of addition probabilities. Therefore, your best bet is to do some tests to determine, for example, the conditions that lead to reasonable acceptance ratios.

Regarding action probability adjustments, this shouldn't affect the detailed balance as long as the actions are reversible. Because we do local DFT relaxations after each step, our implementation does not explicitly obey detailed balance – though we did check the effect of a relaxation volume correction in the acceptance conditions and it seems to minimally affect probabilities. The key to detailed balance is that the reverse path is as equally "accessible" as the forward path. If you relax after each step, then reversibility is an issue. For that reason, our initial code is more of a GCMC-inspired safari through phase space but we hope to improve this in the future.

Hope this was helpful!

Sincerely, Rob

--

Robert B. Wexler

Postdoctoral Research Associate

Department of Mechanical and Aerospace Engineering

School of Engineering and Applied Science

Princeton University


From: Jiayan Xu @.> Sent: Sunday, April 18, 2021 10:23 AM To: rwexler/gcmc @.> Cc: Subscribed @.***> Subject: [rwexler/gcmc] Detailed Balance in the Current Code Implementation (#6)

Dear Developers,

I appreciate you upload the GCMC implementation for metal surface oxidation. This really helps me in my own project. However, I have few questions after reading the source code.

Does the probabilities of adding Ag and O affect the final equilibrated structure if they are not 50/50? Or it only influences the sampling efficiency? I also noticed the comment in the last line of mc.py. Will the adjustment of action probability by accept probability violate the detailed balance because the probabilities of the insertion and the deletion doesn't equal anymore?

Looking forward to replies.

All the best, Jiayan

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/rwexler/gcmc/issues/6, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABL73NTSWLWF3GH3FSJOW23TJLTORANCNFSM43EIUOQA.

hsulab commented 3 years ago

Dear Jiayan, Thanks for your email and we're glad to hear that our code has been helpful for your research! In principal, the global composition-equilibrated structure shouldn't depend on the addition probabilities. It will, however, affect the efficiency with which you reach that solution. In the case of ab initio GCMC, where we used DFT, one might not be able to afford the number of calculations required to equilibrate the structure using an inefficient set of addition probabilities. Therefore, your best bet is to do some tests to determine, for example, the conditions that lead to reasonable acceptance ratios. Regarding action probability adjustments, this shouldn't affect the detailed balance as long as the actions are reversible. Because we do local DFT relaxations after each step, our implementation does not explicitly obey detailed balance – though we did check the effect of a relaxation volume correction in the acceptance conditions and it seems to minimally affect probabilities. The key to detailed balance is that the reverse path is as equally "accessible" as the forward path. If you relax after each step, then reversibility is an issue. For that reason, our initial code is more of a GCMC-inspired safari through phase space but we hope to improve this in the future. Hope this was helpful! Sincerely, Rob -- Robert B. Wexler Postdoctoral Research Associate Department of Mechanical and Aerospace Engineering School of Engineering and Applied Science Princeton University ____ From: Jiayan Xu @.> Sent: Sunday, April 18, 2021 10:23 AM To: rwexler/gcmc @.> Cc: Subscribed @.***> Subject: [rwexler/gcmc] Detailed Balance in the Current Code Implementation (#6) Dear Developers, I appreciate you upload the GCMC implementation for metal surface oxidation. This really helps me in my own project. However, I have few questions after reading the source code. Does the probabilities of adding Ag and O affect the final equilibrated structure if they are not 50/50? Or it only influences the sampling efficiency? I also noticed the comment in the last line of mc.py. Will the adjustment of action probability by accept probability violate the detailed balance because the probabilities of the insertion and the deletion doesn't equal anymore? Looking forward to replies. All the best, Jiayan — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub<#6>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABL73NTSWLWF3GH3FSJOW23TJLTORANCNFSM43EIUOQA.

Dear Rob,

Thanks for your reply! Now I understand that the code here works more as a global optimisation method which utilises the framework of GCMC. Also, I wonder if it will be more appropriate that multi-species have separate exchange actions because the number of particles in the acceptance probability formula is only about the exchanged particle (Ag or O) instead of the summation (Ag+O).

Many thanks, Jiayan