When working with large molecular systems — think thousands of atoms, many chains, or dense biomolecular assemblies — navigating, selecting, and editing specific parts of a scene can be time-consuming. If you’ve ever spent minutes clicking through structures to find a hidden or selected molecule, you’re not alone.
This is where the Node Specification Language (NSL) in SAMSON can help streamline your workflow. In particular, the NSL lets you define and filter molecules based on their visibility or selection states using very simple queries.
How can this help you?
Let’s say your scene has more than 50 molecular models and only a few are visible. Rather than scanning the Document View to figure out which ones are currently displayed or hidden, you can retrieve them instantly using the following:
|
1 2 |
mol.v // selects all visible molecules not mol.v // selects all hidden molecules |
Want to work only with molecules you’ve selected manually? Use:
|
1 |
mol.selected |
Want to continue working only with unselected ones?
|
1 |
not mol.selected |
You can even filter with finer control using additional flags:
mol.vf(visibility flag)mol.sf(selection flag)
These attributes reveal user-set visibility or selection states — for example, when visibility is set manually rather than inherited from other structural elements.
Use cases
- Cleanup: Hide all selected molecules to de-clutter your workspace:
mol.selectedfollowed by a hide operation. - Validation: After an operation, confirm which molecules are visible with
mol.v. - Scripting: Integrate NSL filters into selection pipelines in complex models.
With systems becoming increasingly complex in molecular modeling, small productivity wins like this can save substantial time and allow you to focus more on the science and less on the clicking.
To learn more about selecting molecules based on attributes like visibility, selection, or other properties such as name or material status, check the full documentation on molecule attributes in NSL:
https://documentation.samson-connect.net/users/latest/nsl/molecule/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
