Molecular modeling often involves managing large datasets with complex structural hierarchies. If you’re working in SAMSON and using folders to organize molecules, residues, or atoms, you may have run into the challenge of locating specific entities based on detailed characteristics like the number of atoms, hydrogens, or chains. Filtering them manually is time-consuming and error-prone.
This is where the Node Specification Language (NSL) comes in handy. SAMSON’s NSL allows you to search for folders based on very precise, chemically relevant criteria.
Use case: Selecting folders with specific numbers of atoms
You’re analyzing a protein structure loaded as a folder node and you want to isolate only those models with atoms in a certain range. Instead of browsing through each folder and counting atoms manually, you can use:
|
1 |
f.nat 100:200 |
This matches all folders with atom counts between 100 and 200.
If you’re looking for only the smallest structural models, try:
|
1 |
f.nat < 50 |
This filters in folders that contain fewer than 50 atoms.
Tip: The f prefix comes from the attribute space for folders. You can also use the longer form folder.nat if you prefer more explicit expressions.
Combining filters adds precision
Let’s say you want to select folders containing small molecules (less than 150 atoms) that also have a neutral formal charge. Combine both filters like this:
|
1 |
f.nat < 150 and f.fc 0 |
You can also apply filtering to specific atoms. For example, if the number of hydrogen atoms is relevant to your analysis:
|
1 |
f.nH 10:30 |
This expression selects folders that have between 10 and 30 hydrogen atoms.
Other useful attributes
f.nC– Number of carbon atomsf.nN– Number of nitrogen atomsf.nO– Number of oxygen atomsf.nc– Number of chainsf.nm– Number of moleculesf.nsm– Number of structural modelsf.pc– Total partial charge
These can be combined to form powerful hierarchic queries for advanced molecular selection in SAMSON.
Why this matters
If you’re building custom analyses, preparing datasets, or need reproducibility in filtering, mastering these attributes saves time and increases accuracy. Especially for structural biologists or medicinal chemists handling large molecular assemblies, this kind of search automation streamlines workflows significantly.
Learn more in the official NSL Folder documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON from samson-connect.net.
