mushroomfire / mdapy

A simple and fast python library to handle the data generated from molecular dynamics simulations
https://mdapy.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
53 stars 5 forks source link

How to change cutoff and displacement when using NEP potential to calculate phonon dispersion? #4

Open BianTieyuan opened 1 month ago

BianTieyuan commented 1 month ago

Hi,

I noticed that in GPUMD tutorial. The cutoff and displacement can be changed in compute_phonon keyword of run.in. However I did not see how to change this in mdapy phonon calculation tutorial (https://mdapy.readthedocs.io/en/latest/gettingstarted/calculate_phonon.html)? Is there any method to revise the paramters in phonon calculations?

Tieyuan

mushroomfire commented 1 month ago

Hi @BianTieyuan

The cutoff distance in mdapy refers to the intrinsic distance in the NEP potential, as defined by the user, which is utilized to calculate the force constants. I believe there is no need for modification here. In terms of displacements, the current implementation employs the default value suggested by Phonopy, which is 0.01 angstroms, to generate displaced structures. It would be straightforward to enhance the interface to allow users to modify this value. I plan to implement this feature in the next version.

Yongchao

BianTieyuan commented 1 month ago

Thanks for your reply @mushroomfire! I'm looking forward for your implement. It seems that cutoff setting in NEP phonon calculation still have some misunderstanding between several developers.

mushroomfire commented 3 weeks ago

Hi @BianTieyuan , I have implemented the displacement and cutoff_radius parameter in Phonon class. Try the newest version of mdapy. Note that the mdapy calculates the force constant using the whole supercell, the cutoff_radius will set the force constant outer than it to zero. Hence if you want to test the effects of the cutoff distance, you can first use a big supercell, and then modify the cutoff_radius to check the effects.