When working with large molecular structures, isolating specific parts of interest—such as side chains with certain atomic properties—can save significant time. This is especially true if you’re preparing simulations, analyzing interactions, or cleaning up your models.
In SAMSON, the Node Specification Language (NSL) offers a powerful way to filter molecular components. In this short guide, we explore how you can use NSL to select, filter, and manipulate side chains based on their attributes.
Why focus on side chains?
Side chains in biomolecules determine much of their chemical reactivity and interactions. Whether you’re tuning a protein’s surface for docking studies or highlighting charged regions for electrostatics, having fine control over side chains helps.
Introducing NSL and the sideChain attribute space
In NSL, the attribute space for side chains is called sideChain (with a short name: sc). This lets you write succinct queries like sc.n "LYS" to retrieve lysine side chains. Here’s how you can use it effectively.
Examples of useful filters
The NSL makes it easy to compose attribute-based queries. Below are some practical use cases for side chain selection:
- Select visible side chains:
sc.v— Only returns side chains marked visible. - Exclude hidden components:
not sc.h - Select side chains with more than 10 carbon atoms:
sc.nC > 10 - Focus on charged residues:
sc.fc > 0— Positive formal charge - Filter by name patterns:
sc.n "L*"— Captures all side chains whose names start with ‘L’
Combining filters
You can logically combine multiple conditions to refine your selections:
sc.v and sc.nC > 5 and sc.fc < 0 — Visible side chains with more than 5 carbon atoms and a negative formal charge.
Visual feedback and context
Because NSL filters instantly highlight matching components in the viewport, you get immediate visual feedback on your selection criteria. This is helpful not only for model editing but also for ensuring that analysis steps (e.g., charge distribution, hydrophobic mapping) target the correct regions.
Attribute summary
Some of the most relevant attributes inherited from node and structuralGroup spaces include:
sc.h– hiddensc.v– visiblesc.n– namesc.fc– formal chargesc.nC,sc.nH– number of carbons or hydrogenssc.pc– partial chargesc.nat– total number of atoms
Getting comfortable with NSL
If you’re unfamiliar with the Node Specification Language, it might seem abstract at first. But after trying a few filters, it becomes second nature. Filter a couple of side chains, check the results, and adjust the syntax as needed. This saves time over using purely GUI-based methods for selection.
For a full reference and additional examples, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
