-
Notifications
You must be signed in to change notification settings - Fork 9
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
Populate snapshot.bonds.types
and snapshot.bonds.typeid
#46
Conversation
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## main #46 +/- ##
==========================================
+ Coverage 96.50% 96.62% +0.11%
==========================================
Files 4 4
Lines 372 385 +13
==========================================
+ Hits 359 372 +13
Misses 13 13
|
Now that I'm thinking about this some more, if the bonds aren't changing throughout the trajectory (which is probably safe to assume), we only have to create the It seems pretty fast now, so I'm not sure if it's better to be safe (don't assume bonds and particles are constant) rather than try to improve performance. |
Actually, I don't think GRiTS would really work as is if the bonds and particle types were changing. These attributes are set based on the first frame only and used over again when coarse-graining the trajectory. |
This PR ensures that both
snapshot.bonds.types
andsnapshot.bonds.typeid
are populated. All of the work to identify bonds is pretty much done, this just iterates through the existing information to populate these fields of the snapshot.So far it seems to work on a simple system (PEKK) where there are 2 kinds of beads. I sitll need to add unit tests and try it out a system that has some kind of branching (p3ht)