-
Notifications
You must be signed in to change notification settings - Fork 47
fix oom bug; #6
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
fix oom bug; #6
Conversation
…ld parameters in potential_fn
feat(classical): create harmonic bond & angle generators
…holes into if pol:; api.py:396: remove U_ind from params, access it directly from pme_force
KuangYu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change the default setting of ethresh for both admp dispersion and electrostatics? Also, it may be good to start thinking about jit and vmap all the classical potentials (maybe do it in the next pr).
dmff/api.py
Outdated
| self._jaxPotential = None | ||
| self.types = [] | ||
| self.ethresh = 1.0e-5 | ||
| self.ethresh = 1e-5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change it to 5e-4, keep consistent with electrostatic PME
dmff/api.py
Outdated
| # self._input_params = defaultDict(list) | ||
| self._jaxPotential = None | ||
| self.types = [] | ||
| self.ethresh = 1.0e-5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to 5e-4
|
|
||
| def generate_get_energy(self): | ||
| def get_energy(positions, box, pairs, k, theta0): | ||
| p1 = positions[self.p1idx] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a remind that there are distribute_xx functions in admp.pairwise module (maybe it is not the most appropriate place to put these functions ...), which were designed to do such parameter expansions. These functions are jitted and vmapped, and my tests show that they can be noticeably faster. It's okay for now, but in the next stage we may want to think about jit and vmap all classical potentials.
fix OOM bug;
api.py:302: add default polarity;
api.py:420: move pol&tholes into if pol:;
api.py:396: remove U_ind from params, access it directly from pme_force