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

Add total energy module #31

Closed
RandomDefaultUser opened this issue Mar 31, 2021 · 9 comments
Closed

Add total energy module #31

RandomDefaultUser opened this issue Mar 31, 2021 · 9 comments
Assignees
Labels
enhancement New feature or request important

Comments

@RandomDefaultUser
Copy link
Member

In GitLab by @RandomDefaultUser on Jan 18, 2021, 10:00

Now that we have examples from Sandia, we need to add this asap.

@RandomDefaultUser RandomDefaultUser added enhancement New feature or request important labels Mar 31, 2021
@RandomDefaultUser RandomDefaultUser self-assigned this Mar 31, 2021
@RandomDefaultUser
Copy link
Member Author

In GitLab by @RandomDefaultUser on Jan 19, 2021, 21:40

Total energy works (as tested on QE DOS and densities). The only thing missing is a test using the LDOS, for which I am currently lacking either a small example to be run locally or the installation of the updated total_energy module on hemera.

By Fiedler, Lenz (FWU) - 146409 on 2021-01-19T21:40:44 (imported from GitLab)

@RandomDefaultUser
Copy link
Member Author

In GitLab by @RandomDefaultUser on Jan 21, 2021, 13:20

@schmer52: The error of 0.2 Ry above is the total error, meaning that this results in a deviation of about 10 meV/atom in the 256 Al cell.

By Cangi, Dr. Attila (FWU) - 139621 on 2021-01-21T13:20:54 (imported from GitLab)

@RandomDefaultUser
Copy link
Member Author

In GitLab by @RandomDefaultUser on Jan 21, 2021, 13:21

But I agree, our numbers look good.

By Cangi, Dr. Attila (FWU) - 139621 on 2021-01-21T13:21:27 (imported from GitLab)

@RandomDefaultUser
Copy link
Member Author

In GitLab by @RandomDefaultUser on Jan 20, 2021, 13:45

Update: Using the LDOS (which seems to be better than the DOS for this example, I don't understand why) I get -180.61445255890345 Ry, which is even better.

By Fiedler, Lenz (FWU) - 146409 on 2021-01-20T13:45:39 (imported from GitLab)

@RandomDefaultUser
Copy link
Member Author

In GitLab by @RandomDefaultUser on Jan 20, 2021, 12:57

The total energy module works and Mani is installing it on hemera.
I tested the module using the 36 Atom Al supercell also mentioned in #28 . The QE calculation of this supercell gives

     estimated scf accuracy    <          1.7E-09 Ry
     smearing contrib. (-TS)   =      -0.00243886 Ry
     internal energy E=F+TS    =    -179.00615680 Ry

     The total energy is F=E-TS. E is the sum of the following terms:
     one-electron contribution =      83.67164706 Ry
     hartree contribution      =      10.80127314 Ry
     xc contribution           =     -95.48558928 Ry
     ewald contribution        =    -177.99348773 Ry

Using QE, I extracted the density and DOS from this calculation (I skipped the LDOS for this test, to avoid any potential errors.)
Drawing on the DOS I get

    smearing contribution (FESL) = -0.002340884052959653
    band energy (FESL) = 22.582953317130595

and drawing on the density I get

    Rho* V_hxc (FESL) = 59.95625424
    hartree contribution (FESL) = 10.8012743
    xc contribution (FESL) = -95.72383858
    ewald contribution (FESL) = -179.35386304

This yields a total energy of -181.7395606503153 Ry compared to QE -179.00615680 Ry. Given the limited scope of the calculation I feel this is a reasonably
good agreement. Do you agree @cangi21 @schmer52 or should I investigate this matter further? I will definitely verify the results once I can use the module in hemera.
The restriction to 36 is mainly because my local machine cannot handle 256 atoms.
In any case I will merge the branch for now.

By Fiedler, Lenz (FWU) - 146409 on 2021-01-20T12:57:58 (imported from GitLab)

@RandomDefaultUser
Copy link
Member Author

In GitLab by @RandomDefaultUser on Jan 20, 2021, 16:10

Great progress! The deviation between the QE total energy and the LDOS total energy looks right.
I looked at the numbers of the comparison between these two energies with the Sandia code. There the deviation was about 0.2 Ry. That example was a supercell with 256 atoms and a cartesian mesh with 8 million points. Quantities that have an influence on the accuracy are the DFT parameters (k points) but also the cartesian mesh plays a significant role.
Overall, I would say everything looks good here.
Once everything is set up on hemera, we can assess the Sandia results.

By Cangi, Dr. Attila (FWU) - 139621 on 2021-01-20T16:10:20 (imported from GitLab)

@RandomDefaultUser
Copy link
Member Author

In GitLab by @RandomDefaultUser on Jan 20, 2021, 22:49

Sorry for being late on this one.

The numbers look good! @cangi21 was that 0.2 Ry or Ry/atom? I can only think in meV/atom :) The numbers above would result in a difference of 1033 meV/atom, which is not huge but still sizable. I have not yet an intuition for the errors that one would expect.

Regarding the tested system: When calculating with the same cutoff, k-grid spacing (in 1/Ang) and same FESL SNAP grid spacing (or well grid density...), then the difference measured in energy/atom must be independent of the system size, so you could do local tests with primitive cells, if I'm not mistaken.

By Schmerler, Dr. Steve (FWCC) - 131252 on 2021-01-20T22:49:07 (imported from GitLab)

@RandomDefaultUser
Copy link
Member Author

In GitLab by @RandomDefaultUser on Jan 21, 2021, 09:47

@cangi21 : Not only is the mesh different, the k-grid is also only 6x6x6 in this example compared to the 8x8x8 in the paper. We'll see how it performs with the Sandia data but I am optimistic as well.

@schmer52 : That makes sense, I could rerun the QE calculations with a bigger k-grid, but considering that Mani said he would have the new module up on hemera tomorrow I think I will wait for that and then just test on the LDOS data there.

By Fiedler, Lenz (FWU) - 146409 on 2021-01-21T09:47:24 (imported from GitLab)

@RandomDefaultUser
Copy link
Member Author

In GitLab by @DanielKotik on Mar 23, 2021, 18:00

mentioned in commit 66f9eb8

harisankar95 pushed a commit to somas193/mala that referenced this issue Jan 4, 2022
Runner ci-amd-rocm (mala-project#31) fails for test-workflow. Runner 
gitlab-runner-manager.hemera works. The latter runner is choosen wirth 
tag performance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request important
Projects
None yet
Development

No branches or pull requests

1 participant