When working with large biomolecular systems—protein complexes, nucleic acid assemblies, or supramolecular structures—molecular modelers often need to focus on specific subsets of the system. For example, isolating segments with particular properties like a number of residues, specific atomic compositions, or charge states. Doing this manually can be both time-consuming and error-prone.
This is where the Node Specification Language (NSL) of SAMSON becomes extremely useful. In this post, we take a look at the segment attribute space—a practical toolset for precisely and efficiently querying molecular segments based on their properties.
What is a Segment in NSL?
In the SAMSON environment, a segment refers to a coarse-level grouping of atoms such as a chain in a polymer or group of residues in a protein. Using NSL, each segment can be queried through the segment attribute space, shortened as s.
Example Use Cases for Segment Filtering
Let’s explore some scenarios you might encounter when modeling complex systems, and how segment attributes help:
- Identifying large segments: If you’re only interested in macromolecular segments with more than 130 residues, you can use:
s.nr > 130 - Working with molecular fragments: Need to find all segments with between 10 and 20 carbon atoms?
s.nC 10:20 - Charge-based selection: To isolate positively charged segments, you might write:
s.fc > 0 - Low-hydrogen segments: For identifying coarse-grained areas or non-standard modeling regions with very few hydrogens:
s.nH < 5
Combining Filters
You can combine multiple attributes to build detailed queries. For example, to find segments with more than 100 atoms, a formal charge greater than 1, and visibility enabled:
|
1 |
s.nat > 100 and s.fc > 1 and s.v |
This flexibility allows powerful selection workflows, making your modeling far more efficient.
Inherited Attributes Worth Knowing
Segment nodes also inherit attributes from node and structural group attribute spaces. This makes many additional properties searchable. For example:
s.nO– number of oxygen atomss.vf– visibility flags.om– whether the node owns its own materials.pc– partial charge (float values supported)
Simplifying Common Modeling Tasks
Some molecular editing or visualization tasks depend on knowing which segments are currently selected, visible, or hidden. With segment-level attribute queries, this becomes straightforward. For example, toggle to only show visible segments:
|
1 |
s.v |
Or filter out all currently hidden segments:
|
1 |
not s.h |
You’re not limited to visual filters—selections powered by these queries can feed directly into modeling operations, such as refinement, export, or mutation workflows.
Where to Go Next
Segment attributes offer a powerful way to streamline molecular modeling in SAMSON. By learning a few attribute codes, you can drastically reduce the time spent selecting and isolating regions of interest in complex systems.
To learn more, visit the official documentation page for segment attributes.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
