When you’re working with complex molecular systems, identifying the right segment to analyze or visualize in your workspace can be a challenge. The sheer number of atoms, residues, and structural groups in large biochemical systems can be overwhelming.
This is where the Node Specification Language (NSL) in SAMSON can help. NSL gives molecular modelers powerful filtering tools to pinpoint segments based on attributes such as number of residues, atoms, or partial charge. This blog post will introduce you to a very practical subset of these tools: segment-level attributes for filtering.
Understanding the Segment Attribute Space
Segment nodes represent contiguous sections of molecules—like protein domains or DNA strands. Attributes specific to segments help you filter them logically.
In NSL, you use s as a prefix to access the segment attribute space. For example:
s.nrrefers to the number of residuess.natis number of atomss.pcis partial charge
Here’s how this helps: Imagine you’re exploring a simulation of a protein-ligand system and you only want to work with segments with more than 100 residues. Rather than browsing manually, just type:
|
1 |
s.nr > 100 |
This instantly filters your view to focus only on those segments.
Filter by Structural Composition
Let’s say you’re interested in locating segments rich in carbon atoms or exploring charge distribution across a system. These segment-level attributes come in handy:
- Number of atoms –
s.nat < 1000filters out extremely large segments. - Number of carbons –
s.nC 10:20gives segments with a moderate carbon count. - Partial charges –
s.pc > 1.5helps detect charged regions.
You can even combine filters to get more precise. For example:
|
1 |
s.nr > 100 and s.pc > 1.5 |
This targets only sizeable, charged segments—useful for electrostatic studies.
Are They Visible or Not?
In a crowded visual environment, hiding or isolating parts of your model is essential. Segment attributes also include visibility states:
s.v truematches visible segmentsnot s.selectedfilters out selected items
You can even check if a segment has a material or stylistic definition:
|
1 |
s.hm |
This returns all segments that have a material applied.
Segment Filtering Makes Workflows More Efficient
Rather than spending time zooming and clicking, using segment attributes with NSL helps molecular modelers:
- Quickly find regions of interest
- Isolate specific biochemical features
- Preprocess only meaningful segments for further simulation or visualization
For molecular systems with thousands of components, these filters aren’t just convenient—they’re necessary for maintaining efficiency and accuracy.
You can explore the complete list of segment attributes in the official documentation page.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at https://www.samson-connect.net.
