phonopy / phono3py

A simulation package of phonon-phonon interaction related properties
http://phonopy.github.io/phono3py/
BSD 3-Clause "New" or "Revised" License
126 stars 55 forks source link

obtaining forces and energies from FORCES_FC3 / fc2.hdf5 / fc3.hdf5 #5

Closed glensk closed 4 years ago

glensk commented 6 years ago

Dear Togo,

having obtained the dynamical matrix in harmonic approximation it is possible to obtain forces and the total energy for any (arbitrary) configuration. Having obtained the FORCES_FC3 / fc2.hdf5 / fc3.hdf5 files (did it for fcc Aluminium), would it be possible to calculate forces and/or the total energy (the vibrational contribution) for randomly displaced atoms? Thank you very much,

Albert Glensk

atztogo commented 6 years ago

I think it is straightforward, but so I don't see what you mean in your question.

glensk commented 6 years ago

Dear Togo,

what I meant was the following: Lets assume I have a particular atomic configuration taken from a molecular dynamics at a relatively low temperature (say 300K, for the particular snapshot all atoms are still close to their equilibrium positions at T=0K). In Harmonic approximation I can calculate the forces and energies when I have the force constant matrix screenshot 2018-01-02 23 33 06. Here, i and j are the indices for the atoms and \alpha and \beta are for the cartesian components x, y and z. The energy U in harmonic approximation can be calculated by U = screenshot 2018-01-02 23 40 11 while the forces can be calculated by screenshot 2018-01-02 23 30 30. What I would like to do is to calculate the energy and/or the forces however not in harmonic approximation but rather from perturbation theory. Do you see a way to do this using phono3py once the second (fc2.hdf5) and third (rd3.hdf5) order force constants are evaluated? Thanks and Best,

Albert

atztogo commented 6 years ago

If we believe the potential energy is expanded into the Taylor series (e.g., see eq.(1) at http://www.sciencedirect.com/science/article/pii/S1359646215003127?via%3Dihub), then it may be true approximately. However I don't know how many orders we will need to be accurate, i.e., I'm not sure if it is OK up to third order or not for the accuracy you need.

glensk commented 6 years ago

Dear Togo, it will be approximate but very accurate at low temperatures. For me the question is to what temperature it is OK. But as mentioned, at low temperatures this will be the best possible choice. Would you know how this can be done using the fc2.hdf5 and fc3.hdf5 files? Thank you very much, Albert

atztogo commented 6 years ago

fc2.hdf5 and fc3.hdf5 contain arrays with (N, N, 3, 3) and (N, N, N, 3, 3, 3), respectively. N and 3 are the indices of atoms in supercell and (x,y,z). For example, the array data of fc3 is obtained like this:

In [1]: import h5py
In [2]: f = h5py.File("fc3.hdf5")
In [3]: list(f)
Out[3]: ['fc3']
In [4]: f['fc3'].shape
Out[4]: (64, 64, 64, 3, 3, 3)
In [5]: fc3 = f['fc3'][:]

I assume your MD supercell and phono3py supercell sizes are the same. Then for easy handling, your MD supercell would be good if the atomic sites and indices are the same as those of the supercell created by phono3py. Otherwise, you need to map the atomic indices between them by yourself.

atztogo commented 6 years ago

Can I close this issue?

glensk commented 6 years ago

Hallo! I will try to get back to this within the next 2 weeks ...

On 21 March 2018 at 11:08, Atsushi Togo notifications@github.com wrote:

Can I close this issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/atztogo/phono3py/issues/5#issuecomment-374887210, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwsmCbhparWUdBYxh8BIA9kgiveVeVMks5tgiaRgaJpZM4RPbhW .

atztogo commented 6 years ago

Then, you don't need to hurry!

atztogo commented 4 years ago

I will close this issue because long time no update.