When building or analyzing molecular structures, modelers often need to focus on specific regions of molecules—like backbones with a certain number of atoms, or those containing specific elements. If you’ve ever found yourself manually clicking through complex molecular assemblies to select just the right backbone group, you’re not alone.
The good news is: if you use SAMSON, you can do this much faster with NSL (Node Specification Language). NSL lets you write compact expressions to filter and select nodes, including backbone structures, based on detailed attributes like atomic count or elemental composition.
Why filtering backbone groups matters
In integrative modeling, we often need to:
- Identify structural domains with a high or low atomic count
- Select only coarse-grained backbones for analysis or export
- Focus on charged backbones (e.g. formal or partial charge)
- Analyze regions enriched in specific atoms (like nitrogen or sulfur)
Without filtering, these tasks can be tedious, error-prone, and slow. But NSL makes them quick and repeatable—which is especially useful for workflows and scripts.
Meet the attributes of backbone groups
In SAMSON’s NSL, you can refer to backbone groups using the bb selector. Here are some especially useful attributes inherited from the structuralGroup attribute space:
bb.nat– Total number of atomsbb.ncga– Number of coarse-grained atomsbb.nC,bb.nH,bb.nO,bb.nN,bb.nS– Number of carbon, hydrogen, oxygen, nitrogen, and sulfur atomsbb.fc– Formal chargebb.pc– Partial charge (real number)
With this, you can construct queries like:
|
1 2 3 4 |
bb.nat < 100 // backbone groups with fewer than 100 atoms bb.fc > 1 // backbone groups with formal charge above 1 bb.ncga 50:100 // groups with 50-100 coarse-grained atoms bb.nO > 5 // groups containing more than 5 oxygen atoms |
Example: Selecting backbones rich in nitrogen
Imagine you’re interested in backbones that are rich in nitrogen (e.g., potential binding domains or functional groups). You can filter them using:
|
1 |
bb.nN > 10 |
This selects all backbone groups with more than 10 nitrogen atoms. You can now isolate them for further analysis, visualization, or even export.
Simplify repetitive selections
You can combine NSL queries with selection flags too. For instance:
|
1 |
bb.selected and bb.nC 10:20 |
This will match already-selected backbones that contain between 10 and 20 carbon atoms.
Conclusion
Filtering backbone groups by composition or charge using NSL can significantly speed up your workflow. Whether you’re building a new model, analyzing specific regions, or preparing datasets for simulations, NSL gives you a powerful and flexible way to select exactly what you need.
To learn more about available attributes and usage examples, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
