Speed Up Molecular Modeling with Attribute-Based Backbone Filters

When building or analyzing complex molecular systems, molecular modelers often face a recurring challenge: identifying specific fragments such as backbones with particular properties—like charge, composition, visibility, and more—across vast datasets or large molecular assemblies. Manually browsing through molecular groups wastes time and makes mistakes more likely.

The Node Specification Language (NSL) in SAMSON helps solve this. More specifically, the backbone attribute space within NSL lets you select and filter backbone nodes using precise and readable commands. This is especially useful when scripting complex filters or preparing data for simulations, visualizations, or downstream modeling.

Why Focus on Backbones?

Backbones are essential components in biomolecules like proteins and nucleic acids. Being able to filter these based on structural or chemical properties like the number of atoms, formal charge, or visibility flags can dramatically speed up workflows in structural biology, coarse-graining, and materials science.

Efficient Filtering with NSL Syntax

The backbone attribute space uses the short name s and supports a wide array of inherited attributes from both node and structuralGroup attribute spaces.

Examples of Use

  • Select visible backbones only:
    bb.v
  • Exclude hidden backbones:
    not bb.h
  • Find backbones with a formal charge greater than 1:
    bb.fc > 1
  • Select backbones with names starting with “L”:
    bb.n "L*"
  • Target backbones with between 100 and 200 atoms:
    bb.nat 100:200

Rather than scanning through molecular parts manually, these expressions let you pinpoint structural features programmatically—or even visually if you integrate them into selectors inside SAMSON.

What Can You Filter?

Here’s a snapshot of some attributes available specifically for backbones:

  • Visibility & Selection: bb.visible, bb.selected, bb.h, bb.selectionFlag (sf)
  • Structural Composition: bb.nat (number of atoms), bb.nC (number of carbons), bb.nH, bb.nO, bb.nN, bb.nS
  • Electronic Properties: bb.formalCharge (fc), bb.partialCharge (pc)

You can combine any of these in a single line to create complex filters, making your operations faster and more reproducible. For example, to find visible backbones with more than 10 oxygen atoms and a positive formal charge, you can write:

bb.v and bb.nO > 10 and bb.fc > 0

Bonus: Use Short Names for Speed

Each attribute also has an optional shorthand. For instance, visible becomes v, numberOfCarbons becomes nC, and so on. This small syntax trick can speed up working in scripts or the NSL console.

Want to dig deeper or explore all available attributes? 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 from https://www.samson-connect.net.

Comments are closed.