Dynamical matrices decimal point digits

Hi,

I am interested in doing some lattice dynamics calculations that require high precisions.

When I looked at the dynamical matrix outputs from GULP, it seems to print out 6 decimal point digits.

Does this mean internal calculations (not printing) also consider up to 6 decimal point digits? I am guessing not since some numbers print out as -0.000000 which means it knows that it’s negative.

Is there a way to print out more decimal points for the dynamical matrices?

Thanks,

Jack

Hi Jack
GULP computes everything to double precision. You can increase this to quad precision by changing the definitions in the module that defines the precision variables, though you really shouldn’t need to do this. If you want to get more than 6 d.p. in the output then you’ll need to just go edit the source code where the quantity is output & recompile to write more decimal places. Of course, remember that the accuracy is nothing like 6 d.p. and anything less than 0.025 eV is often in the thermal noise.
Regards,
Julian

Hi Julian,

Thanks for the information. I have looked through some source files but I am not sure which files to look at and where to make a change.

Would you mind letting me know where I can make such changes such that gulp output file has a larger number of decimal point digits?

Thanks,

Jack

Hi Jack,
It depends exactly what you want to print out. If it’s the dynamical matrix as part of debugging information then the routine is phonon.F90 for serial runs (around line 1740). All of this comes with the caveat that anything beyond the 2nd decimal place in energy (when expressed in eV) is in the thermal noise and well beyond the accuracy of pretty much every theoretical method, so going beyond the 6 decimal place has no meaning in terms of the real world & so is only relevant to the theory of computing operations.
Regards,
Julian

Screenshot_1
Screenshot_2
Hello, Julian! I’ve also encountered a problem—I’m not getting the correct accuracy for the potential parameters when outputting GULP (I’m not sure how much error is introduced by rounding). Could you please tell me how I can increase the number of decimal places (or change the output from exponential to numeric) without editing the internal files? I’m using GULP version 4.0.1.

Hi Stalminer. The important point here is that there is no rounding error or loss of accuracy because the output of parameters is rounded in the output file. Everything has the same precision as your input file (within the limits of double precision). If you want to see more numbers in your output then the solution is simple - just upgrade your old copy of GULP to any version from 5.1 onwards (current latest is 6.3) and the format of the output for potentials was changed to allow more digits to be shown. Regards, Julian

1 Like