Making Sense of Molecular Models: How to Filter Backbones by Atom Counts in SAMSON

When working on complex molecular systems, clarity and focus are essential. One challenge molecular modelers often face is the ability to isolate specific structural elements—like protein backbones—based on detailed chemical composition. For example, what if you only want to work with backbones containing a certain number of atoms or a specific range of nitrogen atoms?

In SAMSON, the Node Specification Language (NSL) offers a powerful way to filter and manipulate molecular data. This post looks at how you can use NSL to select backbones based on atomic counts using attributes like numberOfAtoms, numberOfNitrogens, numberOfCarbons, and more.

Filtering Backbones using Atom Count Attributes

The backbone attribute space (short name: bb) allows you to write compact expressions to filter nodes—specifically backbone nodes. Let’s walk through some practical filtering tasks you might encounter.

1. Select backbones containing fewer than 1000 atoms

Imagine you want to simplify your visualization by focusing only on smaller backbones. Use:

2. Select backbones with a nitrogen atom count between 10 and 20

For nitrogen-rich models, or because you are studying amino acid sequences, you might need this filter:

3. Highlight highly charged backbones

Use the formalCharge attribute to find such structures:

4. Focus on carbon-rich fragments

If you’re analyzing hydrophobic regions or carbon skeletons, try:

5. Track partial charges

To identify fragments with a specific partial charge distribution, use:

Use Cases and Efficiency

These filters are not just for visuals—they directly impact modeling performance. For example, if you are building simulations or preparing systems for docking studies, identifying small backbones or eliminating unnecessary fragments helps reduce compute time and focus the analysis on relevant data.

Additionally, using attribute-based filters allows for batch operations. Say you want to hide all models with fewer than 100 atoms:

Apply this selection and mark them as hidden with scripting or GUI toggles.

Summary Table

Attribute Short Name Example Filter
formalCharge fc bb.fc > 1
numberOfAtoms nat bb.nat < 1000
numberOfCarbons nC bb.nC 10:20
numberOfHydrogens nH bb.nH < 10
numberOfNitrogens nN bb.nN > 5
numberOfOxygens nO bb.nO < 8
numberOfSulfurs nS bb.nS 1:5
numberOfCoarseGrainedAtoms ncga bb.ncga 100:200
partialCharge pc bb.pc > 1.5

Try It Yourself

The next time you’re loading a complex biomolecular structure in SAMSON, try applying one or more of these filters in the frontend search bar or as part of your scripting workflow. Fine-tuning your view in this way not only helps with analysis, but also makes presentations and screenshots clearer and more focused.

For more filtering parameters and real-world examples, visit the full documentation page: https://documentation.samson-connect.net/users/latest/nsl/backbone/

SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at https://www.samson-connect.net.

Comments are closed.