When exploring complex molecular systems in 3D using SAMSON, users often define multiple camera views: top-down, specific atom neighborhood, or tailored renderings for publication figures. As these views accumulate in a project, a common challenge arises: how to quickly find and re-use specific cameras?
Whether you’re organizing your snapshots for a paper or returning to a project after a few months, locating the exact camera among dozens can waste valuable time. Fortunately, SAMSON provides a clean solution with its Node Specification Language (NSL), allowing you to search using camera attributes.
Using Camera Attributes to Your Advantage
In NSL, camera nodes belong to the camera attribute space, short-named ca. You can filter cameras by their name, their selection status, or a selection flag. Here’s how each works and how they can relieve some of your everyday modeling headaches:
1. The name Attribute (Short name: n)
If you’ve named your views intuitively (e.g., “LigandView”, “DockingSite1”, etc.), you can retrieve them instantly using a simple filter. You just need to type:
|
1 |
ca.n "LigandView" |
You can also use wildcards to match patterns. For example:
|
1 |
ca.n "Dock*" |
This will match all cameras named something like “Dock1”, “Docking view”, etc.
2. The selected Attribute
Need to filter for cameras currently selected in your document? Use:
|
1 |
ca.selected |
To show only unselected cameras:
|
1 |
not ca.selected |
This is handy when combined with manual or scripted selection workflows.
3. The selectionFlag Attribute (Short name: sf)
The selectionFlag attribute is useful when you tag cameras indirectly, particularly in scripts or longer modeling workflows. For example:
|
1 |
ca.sf true |
will show only cameras that have been flagged, even if they’re not currently selected.
Tips for a Smooth Workflow
- Give meaningful names to each camera you create. Use namespaces or short prefixes (e.g., “dock.”, “site.”, etc.) to easily group them.
- Use the
selectionFlagin scripts to batch-mark important views during automation. - Combine filters for more refined queries, like:
1ca.selected and ca.n "Lig*"
Why This Matters
Working with dozens of molecular snapshots? Want to standardize figure views or jump between ligand-bound states in seconds? Understanding how to filter and retrieve cameras systematically is a minor habit that can dramatically streamline your modeling process. Instead of scrolling past camera #47 to find “LigandTop”, build a habit of filtering instantly.
To dig deeper into these attributes and how they integrate into the broader NSL system, you can explore the official documentation here: https://documentation.samson-connect.net/users/latest/nsl/camera/.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
