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

Fresnel wrapper class to quickly and easily view GSD files in Notebooks #54

Merged
merged 17 commits into from
Sep 18, 2023

Conversation

chrisjonesBSU
Copy link
Member

This works as is right now, but is still a WIP, and open to feedback!

This is really just a wrapper for Fresnel that is designed around loading a GSD file, and visualizing different frames. All of the fresnel objects are automatically set up, and there are setters for just about all of the parameters for these objects making it easy to change something and view it.

@codecov
Copy link

codecov bot commented Sep 18, 2023

Codecov Report

Merging #54 (749ca98) into master (fed4476) will increase coverage by 0.49%.
Report is 2 commits behind head on master.
The diff coverage is 97.46%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #54      +/-   ##
==========================================
+ Coverage   95.54%   96.03%   +0.49%     
==========================================
  Files           7        8       +1     
  Lines         449      606     +157     
==========================================
+ Hits          429      582     +153     
- Misses         20       24       +4     
Files Changed Coverage Δ
cmeutils/visualize.py 97.45% <97.45%> (ø)
cmeutils/__init__.py 100.00% <100.00%> (ø)

@chrisjonesBSU chrisjonesBSU added the WIP Work in progress label Sep 18, 2023
@chrisjonesBSU chrisjonesBSU removed the WIP Work in progress label Sep 18, 2023
return self.snapshot.configuration.box[:3] * -self.view_axis

@property
def positions(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like some lines in this method are untested.

Copy link
Member Author

@chrisjonesBSU chrisjonesBSU Sep 18, 2023

Choose a reason for hiding this comment

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

Yeah, I need to get a test gsd that has multiple frames, and values set for snapshot.particles.image

@marjanalbooyeh
Copy link
Contributor

@chrisjonesBSU We can also visualize the simulation box by adding this line:

L = pps.snapshot.configuration.box[0]
box = fresnel.geometry.Box(pps.scene, [L, L, L, 0, 0, 0], box_radius=.02)

I found it in render method of Hoomd tutorial notebooks.

@chrisjonesBSU
Copy link
Member Author

@chrisjonesBSU We can also visualize the simulation box by adding this line:

L = pps.snapshot.configuration.box[0]
box = fresnel.geometry.Box(pps.scene, [L, L, L, 0, 0, 0], box_radius=.02)

I found it in render method of Hoomd tutorial notebooks.

Ok, cool! I can add a setter that is on/off (True/False) to visualize the box

@erjank erjank merged commit 543a2c6 into cmelab:master Sep 18, 2023
3 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.

3 participants