HOOMD-Blue handling Virtual sites for TIP4P water xml#956
HOOMD-Blue handling Virtual sites for TIP4P water xml#956CalCraven wants to merge 9 commits intomosdef-hub:mainfrom
Conversation
3cb83e7 to
10f728d
Compare
for more information, see https://pre-commit.ci
…r some of the inputs in test files, fix bug in xyz reader
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #956 +/- ##
==========================================
- Coverage 93.96% 93.54% -0.43%
==========================================
Files 67 67
Lines 7693 7883 +190
==========================================
+ Hits 7229 7374 +145
- Misses 464 509 +45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| yield site | ||
|
|
||
| def iter_sites(self, key, value): | ||
| """Iterate through this topology's sites and virtual_sites based on certain attribute and their values. |
There was a problem hiding this comment.
Is this doc string mixed up with the one in iter_sites_and_virtual_sites?
| ) | ||
| # attach potential to VirtualSitType | ||
| virtualsite_group.append(virtual_type.etree(params_units_def)) | ||
| # potential_group.append(virtual_type.virtual_potential.etree(potential_params_units_def)) |
There was a problem hiding this comment.
Can these commented lines be removed?
| xyz = u.unyt_array( | ||
| [site.position.to_value(base_units["length"]) for site in top.sites] | ||
| ) | ||
| if shift_coords: |
There was a problem hiding this comment.
Why are we removing the coordiante shift? Is this being handled somewhere else? shift_coords is still a parameter in to_gsd_snapshot and to_hoomd_snapshot
|
Thanks or re-working this to support virtual sites. I'll test it out some this week, but it looks pretty close to complete from what I can tell. |
| return potential | ||
|
|
||
|
|
||
| def _organize_generate_topology_molecule_info(top): |
There was a problem hiding this comment.
I was just thinking thismight be better suited as a method in Topology as there might be use cases other than writing rigid bodies in HOOMD.
There was a problem hiding this comment.
Or, if we don't want to add it as a class method for Topology (to reduce clutter) maybe this should live in a utils module instead.
PR Summary: This PR should enable passing of various TIP-4P, and other forcefield models, enabling efficient handling of both virtual sites and rigid bodies.
PR Checklist