Quickly Find Molecules with the Right Structural Properties Using NSL

When working with large molecular systems, it’s common to end up with hundreds—or even thousands—of molecules in one document. Finding the exact molecule you’re interested in can feel like looking for a needle in a haystack.

If you’re using SAMSON, the NSL (Node Specification Language) lets you filter and search for molecules based on a variety of structural properties in just a few keystrokes. Whether you’re looking for molecules with a specific number of atoms, residues, chains, or even partial charges, NSL provides a concise way to query your molecular data.

Filtering by Number of Atoms, Chains, Residues, and More

In NSL, all molecule-specific attributes are accessed using the mol prefix. For example, mol.nat refers to the number of atoms in a molecule. You can use numerical filters such as >, <, or range expressions like 100:200 to define your search.

  • mol.nat < 1000: molecules with fewer than 1000 atoms
  • mol.nr 100:130: molecules with 100 to 130 residues
  • mol.nc < 3: molecules with fewer than three chains
  • mol.nC 10:20: molecules with 10 to 20 carbon atoms

This can be incredibly useful in common scenarios:

  • You want to isolate large proteins from small ligands in a multi-component system.
  • You’re interested in visualizing or exporting only coarse-grained representations.
  • You’re focusing only on molecules with specific charge characteristics.

Combining Filters for More Power

You can also combine multiple filters to narrow down your selection even further. For example:

This selects all molecules with more than 500 atoms, fewer than 20 carbon atoms, and a partial charge greater than 1.5.

Readable Yet Precise

The intuitive naming, along with short aliases (like nat for number of atoms or pc for partial charge), keeps your queries readable. Here’s a quick reference for some commonly used molecule attributes:

Attribute Alias Description
mol.fc fc Formal charge
mol.nat nat Number of atoms
mol.nc nc Number of chains
mol.nr nr Number of residues
mol.pc pc Partial charge

You’ll find that mastering a few of these expressions can save significant time, especially when preparing datasets, visualizing specific targets, or automating selections for simulations or analysis.

To learn more about molecule attributes and NSL, visit the official SAMSON documentation.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON here.

Comments are closed.