Effortless Structural Group Filtering with Attribute Based Queries

Molecular modeling often involves managing complex datasets with numerous molecular structures. A common challenge is efficiently filtering and identifying structural groups based on specific criteria. SAMSON’s Node Specification Language (NSL) offers a solution to streamline this process using attributes defined in the structuralGroup attribute space. This blog post will guide you on leveraging these attributes to solve filtering challenges effortlessly.

How does it work?

The structuralGroup attribute space (short name: sg) in SAMSON’s Node Specification Language allows you to target specific structural groups for filtering or analysis. Attributes can include atom counts, formal charges, visibility status, and more. This focused query language ensures you can precisely specify what you are looking for, avoiding unnecessary data processing.

Inherited Attributes for General Filtering

Structural groups inherit several attributes from the more general node attribute space, such as:

  • hasMaterial (sg.hm): Matches structural groups with or without material (values: true or false).
  • hidden (sg.h): Matches hidden or visible groups (true or false).
  • selected (sg.selected): Matches whether a group is selected (true or false).

These attributes act as a first level of filtering, quickly identifying groups with specific global properties.

Structural Group Specific Attributes

The power of the structuralGroup attribute space is amplified by specific attributes tailored to structural data. For example:

  • formalCharge (sg.fc): Matches groups with a specific formal charge. Example: sg.fc 6:8 matches charges between 6 and 8.
  • numberOfAtoms (sg.nat): Filters groups by atom counts. Example: sg.nat > 100 matches groups with more than 100 atoms.
  • numberOfCarbons, numberOfHydrogens, etc.: Specific element counts (e.g., sg.nC < 10 filters fewer than 10 Carbon atoms).
  • partialCharge (sg.pc): Filters based on partial charges using real-valued numbers. Example: sg.pc 1.5:2.0.

These attributes help you focus on structural groups with particular features of chemical or structural interest. The syntax is simple yet powerful, enabling complex queries effortlessly.

Getting More Out of Filtering with Examples

Here are practical examples of how these attributes can solve real-world problems:

  • Identify charged groups: Use sg.fc > 0 to locate groups with positive formal charges.
  • Sort by size: Filter groups with fewer than 200 atoms by typing sg.nat < 200.
  • Focus on visibility: Select visible groups using sg.visible.

This targeted approach helps molecular modelers save time while ensuring results align with their experimental needs.

Conclusion

SAMSON’s structuralGroup attribute space empowers users with precise and intuitive filtering mechanisms. Whether you’re analyzing atom counts or grouping structural charges, the attribute-based querying system ensures efficiency and specificity in molecular design. For full details and examples, consult the official documentation.

SAMSON and all SAMSON Extensions are free for non-commercial use. Explore and download SAMSON at SAMSON Connect.

Comments are closed.