When exploring large biomolecular systems, many modelers face the challenge of selecting specific chains based on meaningful structural or visual criteria. Whether you’re visually analyzing complexes, preparing simulations, or preparing chain-specific outputs, being able to rapidly query and select protein chains can save you a great deal of time.
In SAMSON, the Node Specification Language (NSL) offers powerful query options to make this process easier and more flexible. In this post, we look into practical uses of the chain attribute space – especially how to fluently work with attributes like chainID, numberOfResidues, and visibility to streamline analysis workflows.
What are chain attributes?
Chain attributes in NSL are used to target entire chains in a model, allowing you to filter and select chains by ID, composition, visibility, and many other properties. These attributes are accessed using a short prefix: c. For example, c.id matches a chain’s ID, while c.nr matches its number of residues.
Examples of useful chain queries
c.id 1— Selects the chain with ID 1 only.c.id 2:4, 6— Selects chains with IDs 2, 3, 4, and 6.c.nr > 100— Selects chains with more than 100 residues.c.h— Matches chains that are hidden.not c.visible— Matches chains that are not currently visible.
This approach provides much more control than GUI-based clicking or manual selection—especially useful when exploring large assemblies or protein complexes with dozens of chains.
Combining multiple attributes
One of the most powerful features of NSL is the ability to combine multiple attributes using logical operators like and and not. For example:
c.nr > 150 and not c.h— Finds chains with more than 150 residues that are not hidden.c.n "A"— Matches chains named exactly “A”.c.selected— Matches currently selected chains; helps to refine or extend selection sets.
These kinds of selections can be especially helpful when preparing chains for export, applying materials, isolating for animation, or preparing subsets for simulation.
A use case: Selecting visible chains with over 100 residues
Let’s say you need to apply coloring only to visible chains that have a significant number of residues. The NSL expression would be:
|
1 |
c.v and c.nr > 100 |
This selects all visible chains that have more than 100 residues—great for quickly spotlighting major chains in a complex structure.
Why this matters
For workflows with large macromolecular assemblies, the ability to specify selection criteria programmatically means less time spent navigating menus and more time focused on analysis or design. You can easily build selections that would otherwise require precise clicking or scripting – without the overhead.
To see the full list of supported chain attributes and how to use them, visit the official documentation page:
Chain Attributes in SAMSON
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
