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

Effective potential at each charge site #51

Open
peterbygrave opened this issue Sep 11, 2020 · 2 comments
Open

Effective potential at each charge site #51

peterbygrave opened this issue Sep 11, 2020 · 2 comments

Comments

@peterbygrave
Copy link

Does this library provide the periodic effective potential matrix (i.e. the 1/r_{ij} matrix for molecular system) at each atomic/charge site in the system?

In other libraries e.g. OpenMM, sampling the potential (i.e. get q_j/r_{ij} at site i) at a charge site just returns infinity and it would be awesome to have this feature.

Many thanks!

@andysim
Copy link
Owner

andysim commented Sep 12, 2020

Hi @peterbygrave. That would be very easy to add in a janky way for sure; all of the components needed are there. The potential has three components: direct, reciprocal and self terms. The reciprocal and self terms are already implemented (the self term corrects for the fact that we can't simply exclude the "probe" atom from the potential the way we can in the pairwise loops for direct space terms).

The formula for the direct term is very simple, but implementing it properly is a little trickier. The problem is figuring out all the pairs in a smart way. The proper solution is to use some kind of a non bonded list generator to keep everything O(N) in code, and apply the minimum image convention to correctly wrap around periodic boundaries. I didn't add any code like this to avoid scope creep; from there it's a slippery slope to becoming OpenMM itself! Hacking in an O(N^2) solution that doesn't use a list generator should be relatively easy for me to do and, depending on your target application, it might be sufficient. Adding some simple list generating code wouldn't be too difficult on top of that, but I would rather try without it first, to avoid coding up unnecessary features.

What kind of system size are you talking about, and is this something that you would want to evaluate just a handful of times, or many?

@peterbygrave
Copy link
Author

peterbygrave commented Sep 12, 2020 via email

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