For molecular modelers, quickly isolating specific atoms from a complex structure can be an everyday yet time-consuming challenge. Whether you’re pinpointing elements, identifying charged atoms, or working out chain IDs, the good news is that SAMSON’s Node Specification Language (NSL) offers a powerful solution. Let’s dive into atom attributes, a feature that simplifies these tasks.
What Are Atom Attributes?
Atom attributes in NSL help define and filter nodes based on specific atomic properties. These attributes come with a short name to improve usability. For instance, the element attribute allows you to query atoms by their name (e.g., Carbon or Oxygen), while charge attributes like formalCharge and partialCharge let you filter based on charges. Such attributes save significant time when working with large molecular datasets.
Practical Examples for Busy Modelers
Here are some concrete use cases:
- Find atoms of a specific element:
Useatom.element Oxygen(short version:a.e Oxygen) to select oxygen atoms in a structure. - Locate charged atoms:
Filter atoms usingformalChargeorpartialCharge. For example,a.fc > 1matches atoms with a formal charge greater than 1. - Query alternate locations:
Useatom.altLocation B, C(short version:a.alt B, C) to select atoms present in alternate positions B or C. - Identify hydrogens in hydrogen bonds:
ThehydrogenBondAcceptorattribute (a.hba) andhydrogenBondDonorattribute (a.hbd) allow you to efficiently identify hydrogen-bond acceptors and donors.
Enhancing Searches with Numeric Ranges and Comparators
Attributes in SAMSON allow fine-grained control over queries with support for ranges, greater-than, and less-than operators. This is particularly useful for numeric properties:
- Query atoms by specific mass:
a.cgm 14Da:19Damatches atoms with a coarse-grained mass between 14 and 19 Da. - Find atoms with a defined oxidation state:
a.os >= 2matches atoms with an oxidation state greater than or equal to 2. - Filter based on van der Waals radius:
a.vdwr > 2Amatches any atom with a radius greater than 2 Å.
Streamlined Syntax for Quick Workflow
The short names for these attributes are designed to save time. Once familiar with a.x, a.y, and a.z, you can pinpoint atoms based on spatial coordinates. For example:
a.x >= 1.0A: Select atoms with an x-coordinate of at least 1.0 Å.a.x 1nm:10nm and a.y > 0.5nm: Combines conditions to locate atoms in a specific spatial region.
Conclusion
With just a few well-crafted queries, SAMSON’s NSL allows you to easily tackle tasks that can otherwise take hours of manual filtering on molecular structures. To explore all atom attributes and see additional examples, visit the official documentation page.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.
