How to Quickly Find Molecular Paths by Number of Atoms in SAMSON

When modeling complex molecular systems, it’s common to end up with a large number of paths representing different conformations. Some might be dozens of atoms long, while others can go into the hundreds. If you’re working with polymers, DNA segments, or large molecular machines, chances are you’re interested in analyzing specific subsets of these paths. But scrolling through potentially hundreds of nodes by hand can be tedious and error-prone.

This is where the numberOfAtoms attribute in SAMSON’s Node Specification Language (NSL) becomes useful. It lets you instantly filter paths based on how many atoms they contain — a small trick, but one that can save a lot of time. Here’s how it works.

What is the path.numberOfAtoms attribute?

The path.numberOfAtoms attribute (short name: p.nat) is specific to the path attribute space in SAMSON. It allows you to target conformational paths based on atom count. You can filter for paths with more than, less than, or within a range of atom numbers.

Examples:

  • p.nat > 100: Matches all paths with more than 100 atoms
  • p.nat 100:200: Matches paths that have between 100 and 200 atoms (inclusive)

This is particularly helpful when you’re only interested in analyzing larger or smaller molecular chains within a larger dataset. For example, if you’ve run a simulation that generates a large number of candidate structures, you can use this filter to investigate only those above a certain complexity threshold.

Why should you use this?

If you’re comparing conformations, studying folding behavior, or selecting segments for further analysis, managing structural complexity is essential. The p.nat filter adds a level of control and precision that wouldn’t be practical manually.

Pairing with other filters

The power of this grows when combined with other NSL attributes. For instance:

  • p.nat > 100 and p.n "A*": Get all paths with more than 100 atoms whose names start with “A”
  • p.nat 50:150 and not p.selected: Filter for mid-size paths that are not currently selected

Using these expressions, you can construct highly specific queries to help you manage and understand your molecular models. You’re not restricted to naming conventions or visual inspection anymore.

A note on usage

The numberOfAtoms attribute applies only to conformation nodes within the SAMSON environment. If you’re not seeing results, double-check that you’re working with path nodes.

The short name nat makes expressions quick to type and easy to read, especially when combining multiple criteria. And since NSL expressions are reusable, you can save them and apply them across different projects.

To learn more about the path attribute space in NSL and other helpful attributes like name, selected, and selectionFlag, check out the full documentation here: https://documentation.samson-connect.net/users/latest/nsl/path/

SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON from https://www.samson-connect.net.

Comments are closed.