Skip to content

Bug (typo) in Ewald kspace error implementation? #215

@flobuch

Description

@flobuch

I think there is a typo in tuning.ewald.EwaldErrorBounds.err_kspace that leads to the square root of the prefactor being taken instead of it being divided by two:

Is self.prefac**0.5 meant to read self.prefac*0.5?

If not, I don't see how the implementation could match the formula in the docs and the literature.
From a dimensions perspective alone, I also don't think this can be correct, because as implemented EwaldErrorBounds.err_kspace would return a quantity with dimension charge / length**2, whereas EwaldErrorBounds.err_rspace returns charge**2 / length**2 (the proper dimension for a force).

I am aware of #196 and #198 , which were also about a mistake in the Ewald kspace error estimate, but a different one as far as I can tell. That one concerned the exponential, not the prefactor.

Please let me know if I'm missing something here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions