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

Ewald energies and energy differences from EwaldTerm do not match EwaldSummation for charged cells #155

Open
lbluque opened this issue Feb 22, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@lbluque
Copy link
Collaborator

lbluque commented Feb 22, 2022

Expected Behavior

The portions of the Ewald energy (total, real, reciprocal, and point) should match when computed using the "expanded" matrices created with the EwaldTerm or directly with an EwaldSummation for an ordered structure.

For the case of charged cells all should match except the charged cell correction since the "expanded" Ewald structure has the charge of the disordered structure and not the particular ordered structure.

Current Behavior

The computed Ewald interaction for charged cells using the "expanded" ewald matrices created by the EwaldTerm, do not match the corresponding Ewald energies computed directly for a structure using pymatgen.EwaldSummation when the structure is charged.

The real and reciprocal energies do not match, and as a result the total energy (even excluding the charged cell correction) does not match. The point energies do match.

In MC we should decide if it is necessary to add charge corrections when going off charge, because that is currently not being considered.

Everything works well for charge neutral structures.

Possible Solution

  1. Need to find out what is changing the values! Currently I do not know what is causing this.
  2. Need to decide if and how to add the charged cell correction in MC sampling.

Steps to Reproduce

For the real space energy for example:

  1. Create a disordered structure and an ordered structure with the same supercell.
  2. Obtain ewald energy directly from EwaldSummation(ordered structure).real_space_energy
  3. Obtain ewald energy by using EwaldTerm(use_term='real').value_from_occupancy(occu for ordered structure, disordered structure)
@lbluque lbluque added the bug Something isn't working label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants