Skip to content
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

Add function to identify connections in a snapshot #76

Merged
merged 6 commits into from
Jan 22, 2024

Conversation

marjanalbooyeh
Copy link
Contributor

@marjanalbooyeh marjanalbooyeh commented Jan 18, 2024

This PR adds a new function to cmeutils to identify angles and dihedrals from a snapshot's bond data.

The code mainly searches through the graph of bonds to find subgraphs that matches the angle and dihedrals sequence. The new hidden functions are almost copied from gmso's identify_connections with minor modifications.

ToDo:

  • Add tests
  • Move new hidden methods to a separate utils file (Do we need a utils directory for keeping the hidden methods in cmeutils? )

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (6fa75c4) 96.01% compared to head (1b83345) 96.29%.
Report is 4 commits behind head on master.

❗ Current head 1b83345 differs from pull request most recent head 1929fd5. Consider uploading reports for the commit 1929fd5 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   96.01%   96.29%   +0.28%     
==========================================
  Files           8        8              
  Lines         677      783     +106     
==========================================
+ Hits          650      754     +104     
- Misses         27       29       +2     
Files Coverage Δ
cmeutils/gsd_utils.py 91.66% <98.11%> (+5.09%) ⬆️

Copy link
Member

@chrisjonesBSU chrisjonesBSU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I tested it out with some PPS gsd files and it seems to work. I added a gsd file for PEKK and a unit test that checks for angles and dihedrals.

@marjanalbooyeh marjanalbooyeh merged commit 3953734 into cmelab:master Jan 22, 2024
2 checks passed
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