Reproducibility is an ongoing challenge in molecular modeling. Whether you’re a researcher distributing a protocol, an educator preparing a hands-on course, or an AI enthusiast developing predictive models, ensuring that others can run your code exactly as you intended often requires careful file management, environment configuration, and documentation. This is where SAMSON’s Universal File Embedding capability can simplify your life.
Instead of juggling external folders, code snippets, and archived datasets, SAMSON lets you embed Python scripts—and even entire Python apps—directly into molecular documents. This means a single file can carry everything needed to run your project, making your work self-contained, portable, and easier to share.
Embedded Python Apps: What and Why?
SAMSON’s document format allows you to embed:
- Python scripts and apps
- Machine learning models
- Data files (e.g., CSV, Numpy arrays)
- Supporting code, images, and even publications
This makes your SAMSON document a complete, portable capsule of a project, useful for ensuring reproducibility and collaboration.
How to Embed Python Scripts and Files
To include scripts and files inside a SAMSON Document, simply drag and drop them into the SAMSON workspace. SAMSON will ask if you want to embed them. Alternatively, you can go to:
- Home > Embed files or
- Home > Embed folders

Once embedded, the files are stored INSIDE the document. That means:
- No broken paths.
- No missing dependencies.
- No need to ask, “Which version of the Python script were you using again?”
Running Embedded Scripts
You can open these embedded Python scripts simply by double-clicking them inside the document. They will immediately open in SAMSON’s Code Editor, where you can inspect or run the code.
This allows collaborators—or even future-you—to execute the exact same script in the exact same environment used originally.
Use Cases for Shared SAMSON Documents
- Researchers can attach data analysis or simulation protocols to a molecular model and share it via email or GitHub.
- Educators can bundle lecture notes with interactive exercises that students can run without setup.
- Teams can collaborate using single documents that act as centralized project bundles.
For advanced users, you can integrate external Python libraries using SAMSON’s Python Package Manager, and even develop interactive apps using PyQt embedded in the document.
Distribution Made Easy
Once you’ve prepared your self-contained SAMSON Document:
- Send it via email
- Publish it on GitHub
- Upload it to the SAMSON Connect – Documents platform
Recipients don’t need to configure anything. They open the SAMSON Document and are ready to view models, run your scripts, or interact with GUI apps inside SAMSON.
To learn more, visit the SAMSON scripting documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON from https://www.samson-connect.net.
