How to Quickly Filter Backbone Groups in SAMSON Using NSL

When working with complex molecular systems, identifying and manipulating specific backbone groups can quickly become overwhelming—especially in large biomolecular assemblies. If you’ve ever found yourself scrolling endlessly or zooming in and out to locate backbone components with a certain charge, visibility status, or number of atoms, this post is for you đź’ˇ.

The Node Specification Language (NSL) in SAMSON offers a powerful syntax to filter, select, and manipulate parts of a molecular system based on defined attributes. In this post, we’ll explore a subset of NSL attributes specific to backbone nodes—particularly those inherited from the structuralGroup space. Understanding these can save you hours in analysis and visualization workflows.

Why focus on structuralGroup attributes?

Backbone elements in molecular models often correspond to essential structural motifs—repetitive units shared across biomolecular chains. Understanding their properties, such as formal charge, number of atoms, or elemental composition (like carbon or hydrogen count), helps in tasks like binding pocket analysis, structural comparison, or dynamics interpretation.

Attributes like numberOfAtoms or numberOfCarbons are inherited from the structuralGroup space, meaning you can apply the same selection logic to your backbones using concise NSL expressions. Let’s look at some practical examples.

Key Attributes and Use Cases

1. Filter backbone groups by charge:
Use bb.fc (formalCharge) to locate charged backbones quickly. For example:

This returns all backbone groups with a formal charge greater than 1.

2. Find large structural groups:
Use bb.nat to identify structures with many atoms. If you’re only interested in backbone groups between 100 and 200 atoms:

3. Locate hydrocarbon backbones:
Find backbones with high carbon and hydrogen counts:

This narrows your view to rich hydrocarbon motifs.

4. Detect functionality via heteroatoms:
Use nO or nN to locate oxygen- or nitrogen-rich backbones:

This is particularly useful to identify functionally active regions in biopolymers or ligands.

Useful Tips

  • You can combine multiple attributes using logical operators to refine your queries further.
  • Partial charge selection is also supported with bb.pc, which allows filtering by electrostatic properties.
  • Use wildcards with bb.n (name) to quickly isolate backbone groups by naming patterns.

Putting It All Together

You might want to select backbone groups with more than 10 carbon atoms, a formal charge less than 2, and visible in the viewport:

This expression immediately isolates the backbone groups you want, no manual inspection required.

Once you’re familiar with the attribute names and their meanings, exploring and visualizing complex models becomes significantly faster and more intuitive. All of these options are documented under the backbone attributes section of the NSL documentation.

To learn more, visit the full documentation page here: https://documentation.samson-connect.net/users/latest/nsl/backbone/

SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON here.

Comments are closed.