Skip to content

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

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

Hack in bonded interactions #236

wants to merge 14 commits into from

Conversation

clpetix
Copy link
Contributor

@clpetix clpetix commented Feb 12, 2024

No description provided.

Ensure bond exclusions are only enforced if bonds are not None.
Copy link
Collaborator

@mphoward mphoward left a 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.

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)
Copy link
Collaborator

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.

)
.toNeighborList()
)
if snap.bonds is not None:
Copy link
Collaborator

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.

@@ -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)
Copy link
Contributor Author

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')

@clpetix clpetix changed the title Add bonded interactions Hack in bonded interactions Nov 6, 2024
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

Successfully merging this pull request may close these issues.

2 participants