Collaborating on molecular modeling projects often requires sharing not just the structural data but also the scripts and applications that process, visualize, or simulate them. However, researchers and educators frequently struggle with keeping everything organized and reproducible across different environments. Files get lost. Dependencies break. Recreating workflows becomes a tedious, error-prone process.
That’s where SAMSON’s embedded scripting capability can be a game changer.
Why embed scripts?
Documents in SAMSON are not just static representations of molecular structures. They function as containers thanks to a concept called Universal File Embedding. This allows users to embed Python scripts, entire folders, and even Python apps directly within a document.
Here’s why this matters:
- Portability: Your entire analysis—data, code, tools—travels with the document. No broken paths. No missing scripts.
- Reproducibility: Anyone opening the document sees and runs the exact same script as you, using the same version and dependencies.
- Simplicity: Send a single self-contained file that needs no extra step to get the scripts running.
How does it work?
To embed files or folders, simply drag-and-drop them into your SAMSON window. You can also use the menu: Home > Embed files or Home > Embed folders.

The document becomes a sort of bundled workspace. Later on, these scripts can be opened from within the document through double-clicks—which launch them in SAMSON’s built-in Code Editor—and executed using the Run button or the Python Console inside SAMSON.
Who benefits from this?
This embedding feature is particularly helpful for:
- Research scientists: Attach analysis scripts to shared molecular models when submitting a paper or collaborating with a colleague.
- Educators: Package interactive learning modules with step-by-step scripts for students.
- Students: Submit assignments or projects with executable examples directly included, avoiding software mismatches.
- R&D teams: Share reproducible protocols across different groups or departments, bundled into a single document.
Examples of use
- Launching a simulation pipeline script directly from a shared document—without needing to set up the environment twice.
- Creating molecular visualization presets and linking them with Python button scripts embedded in the same document.
- Developing and sharing Python-based GUIs made with PyQt, where everything (interface, logic, scripts) travels inside one SAMSON file.
To learn more about how to embed Python scripts and folders in SAMSON documents, visit the official scripting documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON and get started at https://www.samson-connect.net.
