Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation of Finite size effects #2000

Open
zenandrea opened this issue Oct 14, 2019 · 8 comments
Open

Evaluation of Finite size effects #2000

zenandrea opened this issue Oct 14, 2019 · 8 comments

Comments

@zenandrea
Copy link
Contributor

zenandrea commented Oct 14, 2019

I would like to evaluate finite size effects.

Concerning the correction to the potential, I can use MPC.
If I set in input
<pairpot name="ElecElec" type="coulomb" source="e" target="e" /> <pairpot type="MPC" name="MPC" source="e" target="e" ecut="30.0" physical="no"/>
then the local energy is calculated using the Ewald ElecElec interaction.
The correction is given my MPC-ElecElec.
I can use the tool qmca to have the value and associated error of MPC and ElecElec, separately, but not of the difference (which would have a much smaller error, because of the correlation between the MPC and ElecElec fluctuations).
So, if I want to compute the MPC-ElecElec error I should write a script to do that.
Am I correct? Or is there some way to tell qmca or some other script to do that?

Concerning the kinetic correction:
As far as I understood, I cannot get the kinetic correction or the structure factor from the SoA version, because it not yet implemented. Thus, I should instead use the AoS version (which could have a bug in version v.3.8.0, issue #1995).
Which version of qmcpack is safe for those quantities (v.3.7.0 AoS)?

@zenandrea
Copy link
Contributor Author

I forgot to mention:
the manual reports about a tool qmcfinitesize
which I cannot find.
Does the tool (still/yet) exist?

@prckent
Copy link
Contributor

prckent commented Oct 16, 2019

I think that @jtkrogel has the best perspective of the situation but he is out for a few days. When he is back and has time we should discuss the situation here. Clearly MPC need to work since it is a standard (default?) observable for solid state calculations. I see two issues (1) How are the results output and analysed conveniently, including with error cancelation as mentioned above? Some tweaks to qmca could handle this. (2) What is the status of MPC in the main develop branch, what is tested etc.? This is important given the upcoming transition to a single code path.

@jtkrogel
Copy link
Contributor

Currently qmca gives a corrected energy if both MPC and the Chiesa et al S(k) corrections are available. I can put in a quick update to print a corrected energy in the presence of MPC alone.

I was actually unaware of (or had forgotton) the Chiesa S(k) breakage in SoA. It is clearly not implemented however. This is important enough to add it to the list for the SoA transition, though I don't know who would do the implementation. I will add it to the list in #861 and discussion can follow here or there. I expect v3.7.0 AoS should be OK; @ye-luo should comment here otherwise.

The qmcfinitesize tool was developed by @rcclay with some additions made by @Paul-St-Young. It implements the potential part of the 2016 Holzmann finite size corrections based on S(k). The tool has never been released, but I think it would be very useful to have available for current use and later expansion to include the kinetic part (see also #1007). Perhaps @rcclay can elaborate further about current status and future plans.

@jtkrogel
Copy link
Contributor

@zenandrea see #2026 for the qmca update.

@rcclay
Copy link
Contributor

rcclay commented Oct 21, 2019

@jtkrogel I think @Paul-St-Young is the current expert on the status of this tool.

@zenandrea
Copy link
Contributor Author

@jtkrogel many thanks.
The tool qmca -q ec *scalar.dat works well if the sampling is done using ewald and mpc is set to be non-physical.
However, the result is wrong if mpc is set to physical and ElecElec is calculated but set to non-physical.

A possible fix to that is to change the line 1851 of qmca into
v = data.Kinetic + data.IonIon + data.LocalECP + data.NonLocalECP + data.MPC
and similarly, change line 1847 into
v = data.Kinetic + data.IonIon + data.LocalECP + data.NonLocalECP + data.MPC + data.KEcorr
in this way, CorrectedEnergy will be correct in both the cases mentioned above.
(However, there could be problems if the hamiltonian has different components)

Maybe the most general solution would be to allow qmca to evaluate an expression given as input,
say qmca -q 'e-ee+mpc'

@jtkrogel
Copy link
Contributor

@zenandrea I think I have a fix that will capture all the situations you describe. Please try out the updated code in #2042 and let me know if it works.

Expression evaluation is an intriguing idea. Since this breaks the mold a bit, I will let this wait until after adequate test code has been made for qmca (tests should all be present by end Nov).

@zenandrea
Copy link
Contributor Author

@jtkrogel Awesome, it works in my systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants