Mastering Molecular Selections with SAMSON’s Node Specification Language (NSL).

For molecular modelers, efficiently selecting specific molecular structures or nodes in a project is a recurring challenge. Whether you’re distinguishing ligands from receptors or identifying specific residues based on complex queries, manual selection can be time-consuming and error-prone. Fortunately, SAMSON’s Node Specification Language (NSL) provides a powerful, flexible solution to streamline such selections.

This blog post introduces you to the essentials of NSL, demonstrating how it can be used to enhance your workflows with targeted selections. By the end, you’ll feel confident navigating its syntax and using it effectively in SAMSON’s interface.

Why Use the Node Specification Language (NSL)?

NSL enables you to select nodes (e.g., atoms, residues) based on their properties using simple, logical expressions. For example, you can:

  • Filter residues by ID ranges or specific types.
  • Select atoms within a specific distance of a ligand.
  • Query structures based on topology or proximity rules.

This eliminates repetitive clicks and provides precise results, particularly for large or complex molecular systems.

How to Write NSL Expressions

NSL is designed to be intuitive, with a mixture of full and short syntax options. Below are some examples:

  • node.type residue: Selects all residue nodes.
  • C or H: Selects all carbon or hydrogen atoms.
  • "CA" within 5A of S: Selects all nodes named “CA” within 5 angstrom of sulfur atoms.
  • node.category ligand, receptor: Selects nodes categorized as ligands or receptors.

The beauty of NSL is its flexibility—you can mix logical operators (and, or, not) with proximity queries (within, out of, beyond).

Getting Started with NSL in SAMSON

NSL can be used in two key areas:

  • Select > Find: Use this command to search for nodes matching specific expressions, such as searching for all hydrogens in a ligand.
  • Document view: Filter nodes interactively in your molecular document by typing the desired expression in the filtering box.

For example, to select residues with IDs between 20 and 40, you can type:

Proximity Selections with NSL

NSL allows for advanced proximity-based selections. Want to find all carbon atoms near a sulfur atom? Try:

Similarly, to select atoms that do not belong to residues while staying within a certain range:

With such proximity operators, you can effortlessly handle spatial queries on a molecular level.

Tips for Efficient Selection

Tip

Ask AI You can use SAMSON’s AI Assistant to generate NSL expressions. Simply click the Ask AI button in the selection string field or the filter node box. The Assistant understands your molecular document and provides tailored suggestions!

Learn by Doing

Interactive tutorials within SAMSON, such as “Selecting using the Node Specification Language”, are a great resource for hands-on practice. Accessible under Help > Tutorials, they guide users through real-world selection scenarios step by step.

Conclusion

With the versatility of NSL, selecting and filtering molecular nodes becomes much simpler and more intuitive. For more complex examples and detailed syntax explanations, visit the full NSL documentation page by following this link.

SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at SAMSON Connect.

Comments are closed.