cmelab / cmeutils

Useful functions by and for the CME lab
GNU General Public License v3.0
3 stars 11 forks source link

FresnelGSD viewer default colors #60

Open CalCraven opened 1 year ago

CalCraven commented 1 year ago

Would be nice to have colors for the Fresnel GSD viewer. I put together a little video renderer pulled from code used in the HOOMD docs with another student in our lab (Kieran Nehils-Puleo), and think it would be useful to include default colors for particles if you knew their elements from something like a gmso topology. Here's a link to the dict in the file that sets those colors (and radii) https://github.com/mosdef-hub/CECAM-MoSDeF-Workshop/blob/73e87b53b6d01ae7784f8b18c396739e65776d8f/solvated_surface_workflow/hoomd_runners.py#L147C1-L147C1.

There's also a messy version of the render video code at the end of that file. Might be a nice feature to have.

chrisjonesBSU commented 1 year ago

I think that would be a great idea @CalCraven. In one of our other packages we used for coarse-graining we have utils file we use to map atom types in a force field to the element here. Right now, we only have one for amber/gaff, but we can make one for oplsa too. Since hoomd snapshots don't store information about elements, I think this would be the easiest route to get element information; then we can have another dictionary that sets default colors per element.