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

MDA_ESP does not work without ELECTROSTATICS #2248

Closed
fweik opened this issue Sep 10, 2018 · 2 comments
Closed

MDA_ESP does not work without ELECTROSTATICS #2248

fweik opened this issue Sep 10, 2018 · 2 comments

Comments

@fweik
Copy link
Contributor

fweik commented Sep 10, 2018

Also I think there is no test.

@pdebuyl
Copy link
Contributor

pdebuyl commented Sep 12, 2018

The line https://github.com/espressomd/espresso/blob/python/src/python/espressomd/MDA_ESP/__init__.py#L161

charges.append(p.q)

requires the q particle property to be defined.

Solutions:

  1. Always define q, even without ELECTROSTATICS
  2. Protect the access to q in MDA_ESP by a conditional

@fweik
Copy link
Contributor Author

fweik commented Sep 12, 2018

Yes, q should just be static constexpr and zero if !ELECTROSTATICS.

@pdebuyl pdebuyl mentioned this issue Sep 14, 2018
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants