When designing, analyzing, or editing macromolecular systems in SAMSON, researchers often need to isolate specific backbone groups based on their chemical or visual characteristics. Whether it’s identifying hidden segments of a protein, locating backbones with extremely high partial charges, or simply filtering by visibility, this process can become tedious when dealing with large models.
Fortunately, the Node Specification Language (NSL) in SAMSON simplifies this task thanks to its system of attributes that can be used for querying molecular backbones directly. This blog post focuses on how to use those backbone attributes in a productive and efficient way.
Why filter backbones in the first place?
Using attribute-based filters can help you:
- Identify backbones with an unusual number of atoms or charges
- Expose hidden structures during visualization sessions
- Exclude coarse-grained components in high-resolution studies
- Create expressive selections for simulations, rendering, or further manipulation
Common Filters You Can Use
Below are some useful attributes for filtering backbone (bb) elements.
Visibility and Rendering
bb.v: Filters visible backbones. Addnotto find hidden ones:not bb.vbb.h: Alternative to determine if a backbone is hidden. (true/false)
Material Assignment
bb.hm: Use to locate backbones that have a material assigned.bb.om: Filters for backbones that actually own the material.
Selection Operations
bb.selected: Highlights selected backbones. Useful for programmatic validation of manual selections.bb.sf: Queries the selection flag.
Atomic Composition
bb.nC > 10: Finds backbones with more than 10 carbon atoms.bb.nH 5:15: Selects backbones containing between 5 and 15 hydrogen atoms.bb.fc: Filter by formal charge, e.g.,bb.fc > 1. Great when looking for highly charged molecular fragments.bb.pc: Partial charge filters, useful for fine electrostatic analysis. Example:bb.pc > 1.5
Custom Naming Filters
bb.n "L*": Selects backbones with names starting with ‘L’. Useful in organized systems where labels follow a scheme.
Best Practices
Combine filters using logical combinators to refine results. For example:
|
1 |
(bb.v and bb.nC > 10) or bb.pc > 2.0 |
This would select backbones that are either visible with more than 10 carbons, or that have a partial charge greater than 2.0.
Wrap-up
Filtering backbones with NSL saves time, improves reproducibility, and simplifies navigation in large models. Whether you’re streamlining your workflow or preparing for publication-quality renders, mastering attributes like bb.v, bb.n, or bb.nC gives you more control over your project data.
Learn more in the full documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON here.
