Molecular modelers often face the challenge of efficiently defining and filtering complex path properties in their molecular systems. The Node Specification Language (NSL) in SAMSON offers an elegant solution, enabling precise queries through a well-structured system of attributes. This blog post shines a spotlight on the indispensable path attributes, helping you leverage SAMSON’s capabilities in a smarter way.
What Are Path Attributes?
Path attributes belong to the path attribute space (short name: p) and apply exclusively to conformation nodes. These attributes include both general properties inherited from the node attribute space and specific ones dedicated to the path context. From filtering paths by the number of atoms to querying based on selection properties, path attributes streamline and sharpen your molecular analysis.
Inherited Attributes
Some key attributes in the path space are inherited from the node space:
- name (
n): Allows you to filter paths based on string matches. For example: p.n "A": Matches paths with the name “A”.p.n "L*": Matches paths whose names start with “L”.- selected: Filters paths based on whether they are selected. Examples:
p.selected: Matches selected paths.not p.selected: Excludes selected paths.- selectionFlag (
sf): Functions similarly toselected, allowing checks for flagged selections. Examples: p.sf false: Matches paths without a selection flag.p.sf: Matches paths with a selection flag.
Specific Path Attribute: numberOfAtoms
In addition to the inherited attributes, the path space brings a unique attribute to the table:
- numberOfAtoms (
nat): Lets you query paths based on the number of atoms they contain. Some practical examples include: p.nat > 100: Matches paths with more than 100 atoms.p.nat 100:200: Matches paths with the number of atoms between 100 and 200 (inclusive).
This attribute is particularly useful for analyzing or isolating paths with specific molecular sizes or structural features.
Practical Applications
The path attribute space is immensely useful for molecular modelers working with complex systems. For instance, suppose you’re interested in identifying paths with a specific naming convention or those containing over 200 atoms. Using NSL, you can craft precise queries such as:
- For paths starting with the name “L” and containing more than 200 atoms:
p.n "L*" and p.nat > 200 - For unselected paths between 50 and 150 atoms:
not p.selected and p.nat 50:150
Such queries dramatically simplify the modeling workflow, allowing you to focus on the paths that matter most to your research.
Learn More
Understanding path attributes unlocks the full potential of SAMSON for molecular modeling. By mastering these expressions, you can work more efficiently and confidently with your molecular systems. To dive deeper, visit the original documentation: Path Attributes.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON here.
