If you’ve ever tried to analyze or filter protein structures based on the chemistry of their side chains, you know how tedious and manual this task can get.
Let’s say you want to isolate side chains with exactly two nitrogen atoms and a net positive charge. Or quickly find all visible side chains with more than 20 atoms. Doing this visually, or looping through scripting APIs, takes time.
The Node Specification Language (NSL) in SAMSON allows you to perform complex queries across molecular models—including very efficient filtering of side chains—using readable, structured expressions.
What is a Side Chain in NSL?
In NSL, side chains belong to a specific attribute space called sideChain, abbreviated as sc. This space includes both inherited attributes from general node and structural group properties, and lets you filter side chains based on visibility, charge, atom counts, and more.
Common Use Cases for Side Chain Filtering
- Find highly charged side chains:
Use partial charge queries likesc.pc > 1.5or formal charges withsc.fc > 2to locate reactive groups. - Identify unusually large or small residues:
Usesc.natto filter by number of atoms. For example,sc.nat < 10isolates minimal side chains. - Inspect visibility of side chains:
Combinesc.hiddenorsc.vto find side chains currently displayed or hidden in the viewport. - Find specific atom composition patterns:
Count carbons, hydrogens, nitrogens, oxygens, or sulfurs with attributes likesc.nC,sc.nN, etc.
Examples
Here are a few direct examples of NSL expressions for typical use cases:
sc.pc 1.0:2.0— Side chains with partial charge between 1.0 and 2.0.sc.nH 10:20— Side chains with 10 to 20 hydrogen atoms.sc.v— Side chains that are currently visible in the workspace.not sc.selected— Side chains that are not currently selected.
Why Use NSL Instead of Manual Inspection?
The strength of NSL is its expressiveness and speed. Instead of looping over potential attributes in a script or manually inspecting structures, you can write a single line that instantly filters your entire system. This becomes especially useful for large biomolecular assemblies where side chain diversity is high and atom counts vast.
Ultimately, it reduces friction from the analysis process and frees you to focus on interpretation, design, and discovery.
To learn more and see the full list of available attributes and examples, visit the official documentation page for Side Chain Attributes in NSL.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON here.
