Molecular modelers often need to query specific parts of molecular structures in their systems to analyze, modify, or visualize their models effectively. This is where SAMSON’s Node Specification Language (NSL) becomes immensely valuable—handling queries efficiently helps save time and reduces repetitive tasks during molecular modeling workflows. In this blog post, we will explore chain attributes in the NSL and how mastering them can make your modeling more efficient and precise.
What are Chain Attributes in NSL?
Chain attributes refer to specific properties of chains in molecular systems and are part of the chain attribute space (short name: c) in SAMSON’s NSL. Using these attributes, you can match chain nodes and query or manipulate their molecular properties effectively.
Chains contain a wealth of structural information like the number of atoms, residues, or even specific counts of elements like carbon or hydrogen. Understanding what these attributes mean and how to use them can significantly optimize your workflow.
Key Inherited Chain Attributes
Many attributes of chains are inherited from larger organizational spaces such as node or structuralGroup. For instance:
- numberOfAtoms (
nat): Defines the number of atoms in a chain. For example, you can check chains with fewer than 1000 atoms usingc.nat < 1000. - name (
n): Matches chains by name. For example,c.n "A"retrieves a chain named “A”. - numberOfCarbons (
nC): Allows filtering chains by the number of carbon atoms, e.g.,c.nC 10:20finds chains with 10 to 20 carbons.
These attributes act like molecular filters, allowing you to tighten your focus on specific parts of your model.
Specific to Chains
The chain attribute space also includes properties exclusive to chains:
- chainID (
id): Matches chains by their unique ID. For example,c.id 2:4,6matches IDs 2, 3, 4, and 6. - numberOfResidues (
nr): Refers to the number of residues in a chain. For instance,c.nr 100:130focuses on chains with 100 to 130 residues. - numberOfSegments (
ns): Defines the number of segments in a chain, e.g.,c.ns < 3finds chains with fewer than three segments.
Practical Scenarios
Here’s how using chain attributes can help you in your everyday modeling tasks:
- Isolating Large Molecules: Use
c.nat > 1000to identify extremely large molecules for detailed structural analysis. - Counting Elements: Curious about hydrogen content? Try
c.nH 10:20to focus on chains with a specific number of hydrogens. - Specific Regions: Query chains with a specific ID using
c.idto zoom into a specific region of interest.
Learning Resources
Learning to harness the power of chain attributes can save hours of manual work and enable advanced molecular workflows. To explore all the inherited and specific attributes for chains in NSL, visit the SAMSON NSL documentation on Chain Attributes.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
