Mastering Bond Specification with Custom Attributes in SAMSON

Molecular modeling can often feel like solving a vast and complex jigsaw puzzle. One common challenge modelers face is specifying and filtering chemical bonds with high precision: whether for analysis, simulations, or creating tailored molecular systems. This task becomes significantly easier with the help of SAMSON’s Node Specification Language (NSL) and its bond attributes. In this post, we’ll dive into how you can use bond attributes in SAMSON to efficiently specify bonds based on their type, length, order, and more, saving you time and ensuring accuracy.

What are Bond Attributes?

In SAMSON’s NSL, bond attributes live within the bond space (short name: b). These attributes allow users to perform targeted operations by matching nodes classified specifically as bonds. Each attribute focuses on certain characteristics of the bonds, such as length, type, order, and even custom-defined categories. Let’s explore some of the most useful bond attributes.

Customizing with customType

The bond.customType attribute (short name: b.ct) is a powerful way of matching bonds with specific custom types. This is particularly handy if you’re working with a system that includes user-defined bond categories.

Supported values: Integers.
Examples:

  • b.ct 0: Matches bonds with custom type 0.
  • b.ct >= 0: Matches bonds with custom types greater than or equal to 0.
  • b.ct 0:2: Matches bonds with custom types between 0 and 2.

Specifying Precise Bond Lengths

Have you ever needed to isolate bonds of a particular length for an analysis? The bond.length attribute (short name: b.len) is your go-to tool. This attribute lets you find bonds with exact or range-specific lengths. It’s especially useful when working with nanostructures or molecular frameworks where bond dimensions are critical.

Supported values: Floating-point values, which can include units such as angstroms (A) or nanometers (nm).
Examples:

  • b.len >= 1.5A: Matches bonds longer than 1.5 angstroms.
  • b.len 1.2A:1.4A: Matches bonds within the range 1.2 to 1.4 angstroms.
  • b.len 0.15nm:2.1nm: Matches bonds between 0.15 and 2.1 nanometers in length.

Fine-tuning with order

The bond.order attribute (short name: b.o) allows you to specify and filter bonds based on their order, which is crucial in distinguishing bond strength and character, such as single, double, or aromatic bonds.

Supported values: Floating-point values.
Examples:

  • b.o >= 2: Matches bonds with an order greater than or equal to 2.
  • b.o 1.5:3: Matches bonds with an order between 1.5 and 3.

Classifying Bond Types

The bond.type attribute (short name: b.t) is highly useful for isolating bonds based on their chemical type, whether single, double, triple, or specialized bonds like amides and aromatics.

The supported bond types include:

  • single (s, 1): Single bonds.
  • double (d, 2): Double bonds.
  • triple (t, 3): Triple bonds.
  • amide (am): Amide bonds.
  • aromatic (ar): Aromatic bonds.
  • dummy (du): Dummy bonds.
  • undefined (un): Undefined bonds.

Examples:

  • b.t s: Matches single bonds.
  • b.t s,d: Matches single and double bonds.
  • b.t du,un: Matches dummy and undefined bonds.

Why Use These Bond Attributes?

Being able to specify bonds with such granularity in SAMSON simplifies many workflows, whether you need to run analyses, filter out specific structures, or model highly customized systems. For example, when optimizing a molecular design for a specific function, isolating particular bond types or lengths can be essential to your success.

To learn more about these bond attributes and how to use them, visit the official documentation page here: https://documentation.samson-connect.net/users/latest/nsl/bond/

SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON today at https://www.samson-connect.net.

Comments are closed.