For molecular modelers working with backbone structures, precise identification and classification of nodes are essential. The backbone attribute space in SAMSON’s Node Specification Language (NSL) offers tools to streamline these workflows. In this blog post, we’ll dive into some of the most useful backbone attributes and how they can simplify your molecular modeling tasks.
Why Backbone Attributes Matter
Modeling backbones involves manipulating their properties, visibility, and relationships with other molecular structures. The backbone attribute space (short name: s) empowers molecular modelers to query and refine backbones efficiently by providing predefined attribute names, short names, and logical expressions.
Key Attributes and How to Use Them
Here are some of the most frequently used attributes from the backbone attribute space:
hasMaterial (hm)
This indicates whether a backbone node possesses material properties. It accepts true or false as values. For instance:
|
1 |
bb.hm</code> (checks if the backbone node has material properties) |
|
1 |
not bb.hm</code> (checks if the backbone node doesn’t have material properties) |
name (n)
If you’re searching for specific backbone nodes by name, this attribute is invaluable. The name attribute allows string values. Examples include:
|
1 |
bb.n "A"</code> (looks for a backbone with the name “A”) |
|
1 |
bb.n "L*"</code> (finds backbones starting with “L”) |
numberOfAtoms (nat)
For analyzing the size of your backbones, you can use this attribute to query the number of atoms. As an example:
|
1 |
bb.nat < 1000</code> (finds backbones with fewer than 1000 atoms) |
|
1 |
bb.nat 100:200</code> (finds backbones with 100 to 200 atoms) |
visibilityFlag (vf) and selected
These attributes help refine the visibility and selection of backbones in your system. For example:
|
1 |
bb.vf</code> (checks if the backbone is flagged as visible) |
|
1 |
not bb.selected</code> (checks if the backbone is not selected) |
Using Expressions to Combine Attributes
The real power of these attributes comes when you combine them in logical expressions. For instance:
|
1 |
bb.hm and bb.vf</code> (finds backbones that both have material properties and are marked as visible) |
|
1 |
not bb.h and bb.n "C*"</code> (finds non-hidden backbones whose name starts with “C”) |
These expressions allow you to perform precise queries and modifications, saving time during complex modeling tasks.
Where to Learn More
This was just a quick overview of what the backbone attribute space offers. To dive deeper into all attributes and examples, visit the original documentation page at https://documentation.samson-connect.net/users/latest/nsl/backbone/. You’ll find extensive details and pre-built examples to further enhance your modeling efficiency.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
