When working with complex molecular systems in SAMSON, it’s common to switch between various visual representations—ball-and-stick, ribbons, surfaces, and more. Each of these visual styles helps highlight different structural or functional details, but selecting or filtering specific visual models across large data sets can quickly become a burden.
This is where the Node Specification Language (NSL) really shines. NSL enables users to define rich queries to select nodes, not only by type or name, but also by their visual model category. That means you can filter only what you want to see—without manually clicking through tree structures.
What are visual model categories?
Visual model categories in SAMSON allow you to group and select representations by style. These include commonly used modes such as:
ballAndStick(bas)licorice(lic)vanDerWaals(vdw)cartoon(car)ribbon(rib)tube(tub)gaussianSurface(gau)solventAccessibleSurface(sas)solventExcludedSurface(ses)surface(sur)
Why use NSL for visual models?
Imagine you’ve loaded a large biomolecular complex. You want to quickly toggle, hide, or analyze certain representations—for example, turning off all van der Waals models to declutter the view and focus on ribbons. With NSL, this is straightforward:
|
1 |
n.c vdw |
This simple command selects all nodes that are in the van der Waals visual model category.
Combining multiple categories
Need to affect several categories at once? You can combine them using commas:
|
1 |
n.c lic, rib |
This selects both licorice and ribbon style elements.
Practical scenarios
Case 1: Hiding all cartoon models
You can select all cartoon secondary structure representations using:
|
1 |
n.c car |
Then, simply use the hide command in combination with your query in the SAMSON interface.
Case 2: Isolate all surface-related models
This is particularly useful when inspecting molecular interfaces. You can use:
|
1 |
n.c gau, sas, ses, sur |
Which selects Gaussian, solvent-accessible, solvent-excluded, and generic surface models in one go.
When does this help?
Many users spend time trying to find and alternate between visual styles manually. For large systems, this is inefficient and error-prone. Using NSL expressions streamlines your workflow and removes ambiguity. It’s also easy to script or repeat across different projects, helping maintain consistency.
Learn more commands
If you’re ready to dive deeper into filtering and selecting nodes with NSL, the documentation offers a wide set of expressions to combine node type, name, visibility, and ownership attributes beyond just visual categories.
You can find more information about node queries and attributes in the full documentation here: https://documentation.samson-connect.net/users/latest/nsl/node/.
SAMSON and all SAMSON Extensions are free for non-commercial use. To get started, download SAMSON at https://www.samson-connect.net.
