Quickly Filter Molecular Backbones by Visibility, Name, and More in SAMSON

When modeling complex molecular systems, isolating specific components—like molecular backbones based on their attributes—can save a considerable amount of time and help reduce visual clutter. If you’ve ever asked yourself, “How do I hide all backbones that are not selected?” or “How can I filter backbone nodes based on name or atom count?”, you’re not alone.

In SAMSON, the Node Specification Language (NSL) offers a structured yet flexible way to query different elements of your molecular document. One particularly useful NSL scope is the backbone attribute space, which allows you to filter and manipulate backbone-specific nodes quickly.

Understanding the backbone Attribute Space

Backbone attributes in NSL are accessed via the short prefix bb and let you filter based on visual, structural, and chemical properties. Here are some use cases that can help molecular modelers navigate and control complex structures more effectively.

🎯 Targeting Backbones by Name

You can filter backbones by their name using the n short tag. For instance:

This filters backbones named exactly “A”. If you’re looking for multiple similar names, wildcards are supported:

This selects all backbones with names starting with “L”—useful when working with specific residues or labeled domains.

👁️ Managing Visibility

If you’d like to hide all backbones that have their visibility flag set to false, you can use:

Conversely, to isolate visible backbones, use:

The related visibilityFlag (vf) lets you query whether a backbone node has manually set its visibility:

This is helpful to distinguish between visibility due to inheritance and direct manipulation.

🔍 Filtering by Selection

The attribute selected allows you to filter for currently selected backbone nodes:

If you’re preparing to export or focus on specific parts of the structure, this is especially handy.

⚡ Combining Attributes for Deeper Filtering

One of the strengths of NSL in SAMSON is combining multiple attributes. Say you want all visible backbones with more than 10 carbon atoms and names starting with “A”. You could write:

Such queries streamline model exploration and editing, especially when dealing with macromolecular assemblies.

Advanced Counts: Atoms, Hydrogens, Carbons, and More

The backbone attribute space allows granular breakdowns of structural group properties:

  • bb.nat – number of atoms in the backbone
  • bb.nC – number of carbon atoms
  • bb.nH, bb.nN, bb.nO, bb.nS – hydrogen, nitrogen, oxygen, and sulfur counts

For instance:

Filters backbones with 10 to 20 carbon atoms. The same structure applies to other atom types, empowering targeted analysis or visualization strategies (e.g., locating carbon-rich or sulfur-deficient regions).

Summary

The backbone attribute space in SAMSON’s NSL provides a powerful filter mechanism to handle molecular complexity with precision. Whether you’re aiming to adjust visibility, isolate selections, or find patterns (like particular names or atomic compositions), these attributes translate into real time saved—and more focused modeling sessions.

To learn more, visit the official SAMSON documentation page on backbone attributes.

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

Comments are closed.