Molecular modelers often face challenges when working with large sets of molecules. Filtering or identifying specific molecules based on properties can become tedious without the right tools. Thankfully, SAMSON’s Node Specification Language (NSL) provides a practical solution for tackling this pain point, especially through the molecule attribute space. This blog post explores how you can use molecule attributes in SAMSON to streamline your molecular modeling tasks.
What are Molecule Attributes?
Molecule attributes in SAMSON describe characteristics of molecule nodes, including inherited attributes from the node and structuralGroup attribute spaces, as well as attributes specific to molecules. These attributes allow you to filter and manipulate molecules based on their properties efficiently.
Why Use Molecule Attributes?
If you’ve ever needed to locate molecules based on their specific number of chains, residues, or atoms, molecule attributes can save you hours of effort. Instead of manually analyzing datasets, you can use short, simple expressions to pinpoint molecules with exact features.
For instance, if you want to select molecules with fewer than 3 chains, you can use:
molecule.numberOfChains < 3(short version:mol.nc < 3)
Inherited and Specific Attributes
Attributes can be categorized into three main groups:
- Inherited from node: e.g.,
visible(mol.v) determines whether a molecule is visible, andname(mol.n) allows string-based filtering by molecule names. - Inherited from structuralGroup: e.g.,
numberOfAtoms(mol.nat) helps identify molecules based on the count of their atoms. - Specific to
molecule: e.g.,numberOfChains(mol.nc) andnumberOfResidues(mol.nr) give precise control over molecule properties.
Examples for Applying Molecule Attributes
To better understand the practical applications, here are a few examples:
mol.nr > 130: Matches molecules with a number of residues greater than 130.mol.nC 10:20: Matches molecules with a number of carbon atoms between 10 and 20.not mol.h: Finds molecules that are not hidden.mol.pc > 1.5: Selects molecules with specific partial charges higher than 1.5.
How This Improves Your Workflow
By defining molecule attributes and using their short names, you can optimize modeling workflows in SAMSON. Whether you are preparing for simulations, analyzing structures, or constructing molecular libraries, these attributes make filtering and targeting molecules straightforward and time-efficient.
Explore Further
The detailed documentation offers additional examples and explanations of molecule attributes and their uses. Visit the full molecule attribute documentation to discover more.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.
