-
Notifications
You must be signed in to change notification settings - Fork 1
Hack in bonded interactions #236
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
base: main
Are you sure you want to change the base?
Conversation
Ensure bond exclusions are only enforced if bonds are not None.
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.
Thanks! This looks like it should work. I would try to also implement the logic about the neighbor list exclusions, but it should do what Tyla wants for the time being.
src/relentless/simulate/hoomd.py
Outdated
self._assert_dimension_safe(sim, snap) | ||
|
||
# create the potentials, defer attaching until later | ||
neighbor_list = hoomd.md.nlist.Tree(buffer=sim.potentials.pair.neighbor_buffer) |
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.
One thing we do still want to do is make sure we can specify the neighbor list exclusions, and then only do the exclusions in the thermo if they are active. I think we talked about adding that as an argument / property of the PairPotentialTabulator
, like the neighbor_buffer
, and then we would set it here by setting the exclusions
option.
src/relentless/simulate/hoomd.py
Outdated
) | ||
.toNeighborList() | ||
) | ||
if snap.bonds is not None: |
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.
Here you would add a check if bonds are in the exclusion list as well. Probably you need to have that forwarded to this action though, since we would normally grab it from the sim
.
… feature/bonds
src/relentless/simulate/hoomd.py
Outdated
@@ -64,6 +64,8 @@ def _call_v3(self, sim): | |||
# parse masses by type | |||
snap = sim["engine"]["_hoomd"].state.get_snapshot() | |||
sim.masses = self._get_masses_from_snapshot(sim, snap) | |||
sim[self]["_bonds"] = self._get_bonds_from_snapshot(sim, snap) | |||
sim[self]["_angles"] = self._get_angles_from_snapshot(sim, snap) | |||
self._assert_dimension_safe(sim, snap) | |||
# create the potentials, defer attaching until later | |||
neighbor_list = hoomd.md.nlist.Tree(buffer=sim.potentials.pair.neighbor_buffer) |
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.
add in exclusions=('bond', 'angle')
No description provided.