Keeping track of workflows in molecular modeling can be difficult, especially when switching between tools, colleagues, or machines. Have you ever had to send a list of packages to install, external scripts and readme files in an attempt to make a project reproducible? It’s easy to lose track of updates, versions, or even break workflows altogether.
SAMSON provides a way to simplify that—and reduce potential errors—by embedding Python scripts and apps directly inside its Documents. That means one file can contain your molecular structures, presentation images, research notes, Python code, and more.
Why embed scripts?
Embedded scripts provide a simple solution to an enduring problem in computational workflows: reproducibility. By storing your Python analysis or simulation code inside a single SAMSON Document (.samx), everything stays portable and version-consistent, whether you’re sharing with colleagues or saving your own work for a later project.
You can embed full folders too, which allows you to bring in complete local Python packages, project data, or executable apps (like machine learning protocols). SAMSON Documents operate as self-contained environments, so you don’t have to worry about missing files when you move the document between machines—or even between collaborators.
How it works
Embedding is easy. You can simply drag and drop files or folders into your SAMSON workspace and choose to embed them when prompted:

You can also use the interface: Home > Embed files or Home > Embed folders. The embedded files then become part of the SAMSON Document. Double-clicking on an embedded script opens it directly in the integrated Code Editor, where you can view, modify, and execute it.
Typical use cases
- Researchers can attach analysis scripts to a structure they submit for publication. Colleagues and reviewers can run the original processing pipeline instantly.
- Educators can prepare self-contained teaching modules with interactive molecular exercises in Python.
- Teams can build and share complete molecular modeling pipelines—complete with scripts, presets, and datasets—in a single document file.
- Machine learning developers working on molecular data can bundle not just scripts, but full pipelines and training data.
Open and reproducible science
This approach supports reproducibility in scientific modeling by tightly coupling molecular data and analysis workflows. When a colleague opens your document, they get exactly what you do—the same structure, same embedded Python script, same execution environment—streamlining collaboration and reducing the overhead of setup.
To open and run an embedded script, your colleague just has to double-click it. It opens in the SAMSON Code Editor, where it can be executed, edited, or extended further with the SAMSON Python API. You can distribute SAMSON Documents via email, GitHub, or the cloud-based SAMSON Connect – Documents platform.
To learn more about embedding Python scripts and apps, visit the SAMSON documentation on Scripting.
SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON at https://www.samson-connect.net.
