When working with large biomolecular systems such as proteins, nucleic acids, or molecular assemblies, finding and selecting specific chains based on their properties can be time-consuming. If you’re a molecular modeler who has ever needed to isolate chains with more than 100 residues, or filter out chains based on their atomic composition, you’re not alone.
Fortunately, SAMSON’s Node Specification Language (NSL) offers a powerful way to query and select chains based on detailed structural and display attributes. This blog post explores how to simplify chain selection using chain attributes in the NSL.
Why Chain Attributes Matter
A molecular model might contain dozens or even hundreds of chains. Manually identifying those chains with a specific number of residues, atoms, or material visibility status can waste time and introduce errors. NSL allows you to write concise queries like c.nr > 100 to instantly highlight chains with more than 100 residues.
NSL Chain Attribute Syntax
To filter chains, use the short alias c for the chain attribute space, followed by dot notation and attribute names. For instance:
c.id 1– selects chains with chain ID equal to 1c.nat < 1000– selects chains with fewer than 1000 atomsnot c.hidden– selects chains that are not hidden
This selective filtering works on both structural properties and user-controlled display settings. You can focus your modeling tasks only on chains that matter, reducing visual clutter and improving workflow efficiency.
Useful Structural Filters
Below are some practical chain attributes inherited from various attribute spaces that can speed up your modeling:
- Number of residues:
c.nr > 130 - Number of segments:
c.ns 1:3 - Number of atoms:
c.nat 100:200 - Element-specific counts:
c.nC < 10,c.nH 10:20
Want chains with a specific partial charge? Try c.pc > 1.5. You can even match combinations like:
c.nr > 100 and not c.hidden
Display and Selection Flags
Chain attributes also let you filter based on visualization and selection status:
c.v– visible chainsnot c.sf– chains with selection flag turned offc.om– chains that own materials
This is particularly handy when preparing figures, exporting selections, or managing large scenes composed of multiple entities.
Combining Filters
The real strength appears when you combine multiple filters. Here’s an example that selects visible, material-owning chains with more than 50 atoms:
c.v and c.om and c.nat > 50
With just a few characters, you’re in control of your molecular scene.
Conclusion
If you’re often zooming and panning around large systems trying to identify the “right chains”, chain attributes in NSL can save you hours. They offer a programmatic yet intuitive way to focus, analyze, and manipulate complex molecular models.
To explore the full list of attributes and examples, visit the official documentation page: https://documentation.samson-connect.net/users/latest/nsl/chain/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
