For molecular modelers, efficiently selecting and filtering specific parts of a molecular structure is an integral part of their work. This process often becomes tedious and time-consuming, particularly when dealing with large and complex systems. The Node Specification Language (NSL) in SAMSON provides a powerful and versatile way to simplify these tasks, enabling quick selections and filters based on user-defined criteria.
In this blog post, we will explore how to leverage NSL as a quick and effective tool for search-driven selections and interactive filtering in SAMSON, with a focus on practical first steps and examples.
What is NSL?
NSL is a language integrated into SAMSON that allows users to select and filter nodes (e.g., atoms, residues, etc.) or broader structures like ligands and receptors based on specific properties or patterns. It can be accessed through the Find command or the filter box in the Document View.
Quick Steps to Start Using NSL
If you’ve never worked with NSL before, here’s how to get started effectively. By the end of this, you’ll know where to use NSL and how to craft your first practical expressions.
Where Can You Use NSL?
- Select > Find: Use this for advanced search-driven selections. For detailed usage, refer to the section on the Find command in the documentation.
- Document View filter box: NSL expressions can be entered here to filter nodes interactively.
First Expressions to Try
Here are some sample expressions to try out in SAMSON:
node.type residue— Selects all residue nodes.C or H— Matches carbon or hydrogen atoms."CA" within 5A of S— Matches nodes named “CA” within 5 angstroms of sulfur atoms.node.category ligand, receptor— Finds ligands and receptors.
These initial expressions will help you build confidence in crafting more complex NSL queries.
Why Use NSL?
The simplicity and flexibility of NSL mean you can create both straightforward and highly intricate queries. For example:
- Find all non-alanine residues:
node.type residue and not residue.type ALA. - Filter structures by proximity:
"CA" within 5A of Smatches “CA” nodes near sulfur atoms.
Moreover, NSL comes with context-sensitive completion in the Find command. For instance, typing "ALA (with quotes and no closing quote) and pressing Tab displays auto-completion suggestions, such as:
"ALA 22 Backbone""ALA 22 Side chain""ALA 22"
Accelerate Your Workflow
Using NSL in SAMSON can significantly reduce the effort needed to manage complex molecular models, making it an indispensable tool for molecular modelers working with hierarchical molecular datasets. Getting started is easy, and with practice, you’ll be able to construct intricate queries effortlessly.
Interested in digging deeper? You can find comprehensive examples and in-depth explanations on NSL in the full documentation at NSL Documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON from here.
