When working with large molecular systems, biological macromolecules, or custom-designed coarse-grained models, quickly identifying specific structural components based on their chemical and structural properties can be a challenge. Whether you’re preparing simulations, visualizing data, or extracting substructures, manually selecting regions in a complex molecular scene is not only time-consuming — it’s error-prone too.
If you use SAMSON, the integrative molecular design platform, there’s some good news: the Node Specification Language (NSL) allows you to select and filter backbone structures according to various attributes in a fast, intuitive way. In this guide, we’ll walk through how to use backbone-specific filtering to select subsets of your molecular systems — all without clicking atoms manually one by one.
Why focus on backbone attributes?
Backbone structures in SAMSON refer to coarse-grained representations of molecular systems. For example, they may represent alpha-carbon chains in proteins or backbone atoms in nucleic acids. NSL gives special attention to filtering backbone nodes based on structural and derived chemical properties.
Typical use cases for backbone filtering include:
- Isolating parts of a structure with high or low partial charge
- Finding regions with a specific number of atoms or atom types
- Filtering out invisible or hidden backbone nodes before rendering
- Searching for structures that carry a particular formal charge
Understanding and using these filters not only improves control and efficiency but also produces cleaner and more reproducible visualizations and analysis pipelines.
Examples of useful backbone filters
Let’s say you want to find backbones with more than 10 carbon atoms. You can use:
1 |
bb.nC > 10 |
Looking for backbones that are invisible in the current view? Try:
1 |
not bb.v |
Need to select backbones with a partial charge between 1.5 and 2.0?
1 |
bb.pc 1.5:2.0 |
To identify backbones with between 100 and 200 atoms:
1 |
bb.nat 100:200 |
Want to include only those owning material settings for rendering?
1 |
bb.om |
Complete set of backbone attributes
NSL offers a rich set of attributes to describe and filter backbones, inherited from broader node and structural group categories:
- Node attributes:
hm
(hasMaterial),h
(hidden),n
(name),om
(ownsMaterial),selected
,sf
(selectionFlag),vf
(visibilityFlag),v
(visible) - Structural group attributes:
fc
(formalCharge),nat
(numberOfAtoms),nC
,nH
,nN
,nO
,nS
,ncga
(numberOfCoarseGrainedAtoms), andpc
(partialCharge)
Each attribute supports logical filtering using equality, ranges (a:b
), and logical negation. This makes it easy to build powerful filters, for example:
1 |
bb.n "L*" and bb.v and bb.nO > 5 |
This finds all visible backbones whose names start with “L” and have more than 5 oxygen atoms.
Towards cleaner, scalable workflows
Filters like these are especially useful in automated scripts, educational demos, or simply for keeping a tidy visualization setup. Instead of remembering which parts of your complex structure to hide, select, or color, you can define rule-based selections that are repeatable and precise.
This way, you can focus more on understanding your system, instead of managing it manually.
To see the full reference of backbone attributes and their filter syntax, visit the official NSL backbone documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. To get started or update your platform, visit samson-connect.net.