Exploring Structural Group Attributes in SAMSON’s NSL

Molecular modeling can be a complex task, especially when managing the attributes of various structural groups in a molecular design platform. For those working with SAMSON, understanding how to specify and query structural group attributes using the Node Specification Language (NSL) is essential. Let’s dive into some valuable insights about these attributes that can make your workflow more efficient and precise.

What Are Structural Group Attributes?

Structural group attributes belong to the structuralGroup attribute space (short name: sg), which only applies to structural group nodes. These attributes allow you to query or filter molecular structures based on their properties, from visibility to the number of specific atoms in a group. This can save you significant time and effort when dealing with complex models.

Inherited Attributes

Certain attributes for structural groups are inherited from the general node attribute space. For example, the hasMaterial attribute (sg.hm) specifies if a structural group contains material, whereas the hidden attribute (sg.h) determines whether the structural group is hidden. These logical attributes accept boolean values (true or false) and can be used in expression queries like:

  • sg.hm: Finds structural groups with materials.
  • not sg.h: Finds structural groups that are not hidden.

Customizable Structural Group-Specific Attributes

Moving beyond inherited attributes, SAMSON also offers attributes that are specifically tailored to structural groups. These include:

1. Working with Atom Counts

The numberOfAtoms attribute (sg.nat) makes it easy to filter structural groups based on the total number of atoms they contain. For example:

  • sg.nat > 100: Matches structural groups with more than 100 atoms.
  • sg.nat 50:150: Matches structural groups with atom counts between 50 and 150.

You can take a more granular approach by targeting specific atom types:

  • numberOfCarbons (sg.nC): Matches groups with a defined number of carbon atoms.
  • numberOfHydrogens (sg.nH): For Hydrogen atoms.
  • numberOfNitrogens (sg.nN): For Nitrogen atoms.
  • numberOfOxygens (sg.nO): For Oxygen atoms.

2. Charge Attributes

If your modeling requires dealing with molecular charges, the following are particularly useful:

  • formalCharge (sg.fc): Filter based on formal charge of a group, e.g., sg.fc 1 or sg.fc 2:4.
  • partialCharge (sg.pc): Works similarly, but for partial charges. Example: sg.pc >= 1.5.

3. Structure Identification

For organizing models, the structureID attribute (sg.id) lets you target specific groups by their ID. For instance:

  • sg.id 10: Matches structural groups with ID 10.
  • sg.id 5:15, 25:35: Matches multiple ranges of IDs.

Practical Applications

These attributes can be combined into logical expressions to finely query or control structural groups. For example, you can simultaneously filter structural groups that are visible, have over 200 atoms, and a formal charge range of 3-5 with this query:

sg.v and sg.nat > 200 and sg.fc 3:5

Such powerful filtering capabilities help molecular modelers streamline simulations, refine data, and design complex systems with greater precision.

For a complete list of attributes, syntax, and examples, visit the SAMSON Structural Group Attributes Documentation.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Download them at SAMSON-Connect.

Comments are closed.