Conversation
Ensure bond exclusions are only enforced if bonds are not None.
mphoward
left a comment
There was a problem hiding this comment.
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.
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.
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.
src/relentless/simulate/hoomd.py
Outdated
| 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.
add in exclusions=('bond', 'angle')
No description provided.