For molecular modelers juggling different tools, scripts, and data files, maintaining consistency, reproducibility, and portability across projects often becomes a challenge. Whether you’re working on protein-ligand docking, simulating reaction mechanisms, or analyzing trajectories, your work usually relies on custom scripts, supporting datasets, and manually repeated processes. But what if your entire computational workflow—from raw data to publication-quality results—could live inside a single, shareable file?
Enter Embedded Python scripting in SAMSON. This feature offers a flexible way to package your molecular models, Python scripts, visual settings, and even full Python-based apps inside one SAMSON Document. This approach can save you time, improve collaboration, and boost reproducibility.
Why embed scripts in SAMSON documents?
Traditionally, setting up a molecular modeling workflow could involve multiple steps, scattered across environments:
- A separate Python script directory
- External data folders
- Manual setup every time work continues on a new computer or is shared with colleagues
With SAMSON’s Universal File Embedding, you can:
- Attach Python scripts directly within SAMSON documents
- Include datasets, images, and publication drafts
- Package complete Python apps (e.g., analysis tools, machine learning models)
- Ensure your workflow runs consistently, wherever the file goes
How it works
To embed a script or folder:
- Drag and drop the file or folder directly into SAMSON, and choose to embed it
- Or use Home > Embed files or Embed folders from the toolbar

Once embedded, your scripts open with a simple double-click inside the Code Editor, which supports real-time script editing through the Monaco Editor (from Visual Studio Code). Combined with the integrated Python console, this creates a Python-friendly environment fully intertwined within SAMSON’s molecular modeling core.
Typical use cases
- Collaborating with colleagues: Share SAMSON documents that include analysis scripts, setup instructions, and raw molecular data. Your peers can run everything without external dependencies or additional setup.
- For educators: Combine lecture notes and interactive coding exercises within a single file ready to distribute to students.
- Research reproducibility: Attach scripts that perform data analysis to your SAMSON models to preserve the full scientific context of your project.
Distributing embedded documents
Documents with embedded scripts can be shared via email, GitHub, cloud storage, or directly on SAMSON Connect – Documents. Once received, users can open the file in SAMSON and access the entire simulation environment and tools as originally configured.
Instead of providing a zip archive containing fragmented pieces of your project, your full computational environment becomes a self-contained document.
Learn more and see step-by-step instructions in the SAMSON scripting documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at https://www.samson-connect.net.
