BradyAJohnston / MolecularNodes

Toolbox for molecular animations in Blender, powered by Geometry Nodes.
https://bradyajohnston.github.io/MolecularNodes/
GNU General Public License v3.0
918 stars 86 forks source link

Add an option to delete hydrogen from the Styles #559

Open julioarvellos opened 4 months ago

julioarvellos commented 4 months ago

Hello! I want to suggest a simple feature that allows us to hide/ignore hydrogen atoms in some representations (styles) instead of removing them when importing. Basically the idea is to add a switch node inside the node groups so we can decide if we want the hydrogens to be shown.

This is also helpful if you need to show the hydrogens in different parts of the molecule/protein with different representations.

An example of implementation: sphere_style

Spheres node group with the checkbox + other nodes that can have this feature delete-hydrogen

BradyAJohnston commented 4 months ago

I would agree it is a fairly common thing to select for when visualising, but I am unsure about including this in the interface on the node groups. We could maybe include in one of the panels, but it doesn't quite fit in any of them.

julioarvellos commented 4 months ago

Hmm maybe an alternative would be a node group that comes native with the structure like the Set Color and Style? The node group could be ignored if the "Remove Hydrogen" checkbox is active when importing new structures.

Screenshot_1

Screenshot_2

BradyAJohnston commented 3 months ago

I've revisited this and I think having the 'hydrogens' as a toggle for the styles where it is relevant (sphere, ball & stick, surface) is probably a good idea and I'll add it in the upcoming version. Having a node which drops hydrogens is probably a bit overkill when we already have selections etc