Whether you’re analyzing protein structure-function relationships or preparing systems for simulations, selecting the right residues matters. Charged, polar, nonpolar, and terminal residues all contribute differently to binding, dynamics, or interactions with solvents. But filtering residues manually? Not efficient.
If you’re using SAMSON for molecular modeling, there’s a faster path using the Node Specification Language (NSL). In this post, we’ll explore how to filter charged and polar residues (and more) using NSL’s residue attributes, so molecule selection becomes accurate, consistent, and fast 🚀.
Residue Filters Solving Real Problems
Imagine you want to:
- Select negatively charged amino acids to explore salt bridge formation.
- Highlight polar residues lining a binding pocket.
- Exclude unstructured loop regions from certain analyses.
Instead of manual inspection or scripting, NSL lets you express these criteria with readable expressions like:
1 2 3 4 |
r.c neg // negatively charged residues r.p polar // polar residues r.ss h // residues in alpha helices |
Understanding Charge and Polarity in NSL
NSL lets you use short and long names to query residue properties:
Charge: residue.charge
or r.c
negative
(orneg
)neutral
(orneu
)positive
(orpos
)undefined
(orun
)
Examples:
1 2 3 |
r.c neg // matches acidic residues r.c neu, pos // neutral or basic residues |
Polarity: residue.polarity
or r.p
acidicPolar
(oracidic
)basicPolar
(orbasic
)polar
nonpolar
undefined
(orun
)
Examples:
1 2 3 |
r.p polar // simple polar side chains r.p acidic, basic // charged polar residues |
Combine Filters for More Control
You can easily combine criteria. For instance, to get all visible, positively charged polar residues in helices:
1 |
r.v and r.c pos and r.p polar and r.ss h |
Want to exclude terminal residues?
1 |
r.p polar and not r.ter |
Quick Use Cases
- Select nonpolar residues inside a membrane region:
r.p nonpolar and r.z -10:10
(assuming z-axis orientation) - Check if a surface patch contains basic residues:
r.p basic and r.v
- Isolate acidic residues in loops:
r.c neg and r.ss u
Accelerate Your Modeling Workflow
Using these intuitive queries helps reduce errors and saves you time during system setup or inspection steps. The filters are readable, repeatable, and easy to share across users or projects. Plus, they integrate directly into SAMSON’s powerful selection tools.
To explore all other residue-based attributes and discover what else you can filter by (like residue type, backbone completeness, or number of atoms), see the full documentation here: SAMSON: Residue NSL Attributes.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.