materialsvirtuallab / pymatgen-analysis-diffusion

This add-on to pymatgen provides tools for analyzing diffusion in materials.
https://guide.materialsvirtuallab.org/pymatgen-diffusion/
BSD 3-Clause "New" or "Revised" License
98 stars 56 forks source link

The calculation results of different systems are different, with a difference of several orders of magnitude #415

Open Esseco opened 1 month ago

Esseco commented 1 month ago

Hello, may I ask a question? I used CHGNet to run a 150ps MD on a certain crystal material, and the generated MD.traj file was converted into a CIF file using the ASE library. Then, I analyzed and calculated the MSD using pymatgen.diffusion.analyzer. I found that the results calculated by my personal laptop's Windows, macOS, and Supercomputing Linux systems are all different, with a difference of several orders of magnitude. The version used is chgnet=0.4.0 ase==3.23.0,pymatgen==2024.10.3,pymatgen analysis dispersion==2024.7.15,numpy=1.26.4. English is not my native language; please excuse typing errors.

shyuep commented 1 month ago

It depends on what kind of system you are studying and the actual diffusivity. If the diffusivity is low, a 150ps run is not going to result in converged results. Without more details, we can't reallyhelp.

Esseco commented 1 month ago

hello, We are calculating a super diffusion system (sodium electric layered oxide), and the MSD of this system does not converge. My question is to generate a CIF file using the same md.traj trajectory file, then analyze it using pymatgen.diffusion.analyzer, analyze it using different systems (Windows and Linux), and plot it. The results obtained vary greatly. How can this problem be solved. The code is as follows:

diff_analyzer1 = DiffusionAnalyzer.from_structures( structures, specie="Na", temperature=1000.0,
time_step=2, step_skip=100, smoothed=False, initial_structure=structures[0] ) print(diff_analyzer1.diffusivity) # in cm^2/s print(diff_analyzer1.conductivity) # in mS / cm

1

2