When analyzing complex molecular structures, it’s often necessary to selectively work with specific parts of a system — for example, focusing on protein chains with a certain number of residues or minimizing visual clutter by displaying only visible chains. This type of targeted manipulation can save significant time and prevent errors during model setup or visualization.
In SAMSON, the Node Specification Language (NSL) provides a clear and powerful way to query and manipulate parts of molecular models. For users working with structures that contain multiple chains — common in protein complexes or large biomolecular assemblies — being able to filter chains based on particular attributes can make a big difference.
What is a chain in SAMSON?
In SAMSON’s data model, a chain node represents a sequence of connected residues within a biomolecule, such as those found in proteins or nucleic acids. When you’re exploring large structures with many chains, understanding and filtering based on chain attributes becomes essential.
Types of Chain Attributes
Chain attributes in NSL are accessible through the chain attribute space (short name: c). There are three classes of chain attributes:
- Inherited from
node - Inherited from
structuralGroup - Specific to
chainnodes
Examples of Useful Chain Filters
Let’s say you’re screening chains in a PDB model and want those with a high residue count, or you’re scripting selections for visualization or analysis. Here are some practical NSL expressions:
c.nr > 130– matches chains with more than 130 residuesc.nsg 10:13– matches chains with between 10 and 13 structural groupsnot c.v– selects chains that are not currently visiblec.name "A"orc.n "L*"– selects chains with specific names using string matching
Advanced tip: You can combine these filters using logical operators to narrow down even further. For example:
|
1 |
c.nr > 100 and c.v |
This matches chains with more than 100 residues and currently visible.
What Attributes Can You Use?
Chain nodes come with numerous attributes. Here are a few that are frequently useful:
c.id— chain ID (integer)c.nr— number of residuesc.ns— number of segmentsc.selected— selection status (true/false)c.h— visibility status (hidden or not)c.pc— partial charge (float)
Why This Matters
Molecular modelers frequently face the problem of visual or computational overload — too many atoms, chains, or structural entities to easily work with. NSL lets you narrow down those structures by attributes that matter for your workflow. Whether you’re running simulations, analyzing structure quality, or preparing figures, being able to selectively work with specific chains with concise NSL expressions is an efficient solution that significantly reduces manual effort.
To learn more about working with chain attributes in NSL, including all attribute options and full usage examples, visit the official SAMSON documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
