For molecular modelers, adjusting atomic properties and exploring customized configurations is often a time-consuming challenge. What if you could streamline these tasks with a simple scripting tool designed for precision and flexibility? Meet the Simple Script Extension in SAMSON, a tool that brings mathematical expressions and logical scripting to the molecular modeling table. It’s your gateway to deeply customizable atomic-level modifications within SAMSON’s integrative molecular design environment.
What is the Simple Script Extension?
The Simple Script Extension allows researchers to manipulate atomic properties in molecular structures. These manipulations are carried out through straightforward scripts that utilize mathematical and logical expressions. With this tool, you can adjust properties such as atom positions, visibility flags, partial charges, chain IDs, and more—giving you unprecedented control over your molecular models.
Why Does it Matter for Molecular Modelers?
Molecular modelers often face inefficiencies when it comes to applying detailed modifications across complex structures. Tasks such as adjusting coordinates for select atoms, highlighting specific elements, or crafting geometrically intricate shapes (like bat motifs or nano-patterns) can become tedious. The Simple Script Extension solves this pain point by enabling users to define these tasks with concise, powerful scripting.
Getting Started with Variables and Attributes
The tool uses predefined variables specific to atoms, allowing users to quickly script alterations. For instance:
a.x,a.y, anda.z: Control atom positions.a.element: Target specific elements (e.g.,'Carbon').a.visibilityFlag: Toggle the visibility of atoms.
Changes are applied through an intuitive syntax. For example:
|
1 |
a.z := sin(a.x * π / 12); |
This line sets the z-coordinate for atoms as a sinusoidal function of their x-coordinate, which is useful for creating patterns like sinusoidal graphene sheets.
Example: Creating Nano-Batarangs
If you’re intrigued by modeling complex shapes, the Simple Script Extension can even transform graphene sheets into nano-batarangs! Using mathematical operators, you define an area within the graphene plane that matches the outline of your desired motif. Below is a glimpse of how this scripting magic works:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
var x := a.x / 2; var y := a.y / 2; var iambatman := false; if ((abs(x) > 3 && y >= 0) || (abs(x) > 4 && y < 0)) { if ((x/7)^2 + (y/3)^2 < 1) iambatman := true; } if (iambatman) { n.sf := 1; a.vf := 1; } else { n.sf := 0; a.vf := 0; } |
You can see an example of a nano-batarang crafted with this script below:

This isn’t just a novelty—defining intricate motifs at the atomic level can serve advanced research purposes, such as designing materials with specific features or testing the boundaries of molecular modeling.
Exploring More with Predefined Functions
In addition to variables, the extension supports a wide range of operators, functions, and structures. From basic math operators (+, -, *, /) to advanced control structures like loops and switch-case statements, the possibilities are vast. For example, you can:
- Rotate all atoms by a specific angle using trigonometric functions such as
cosandsin. - Highlight specific residues using
a.residueSequenceNumber. - Filter and visually isolate subsets of atoms based on their spatial coordinates.
Want to Learn More?
The Simple Script Extension is more than just a tool—it’s a doorway to advanced molecular design. Whether you’re crafting nano-tiles, sinusoidal patterns, or complex geometric figures, the extension’s flexibility can empower your work.
Dive deeper into how to use the Simple Script Extension and access additional examples and inspirations by visiting the original documentation page at this link.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get started with molecular modeling today by downloading SAMSON at SAMSON-Connect.net.
