Make molecular workflows easier to share—and easier to rerun

A molecular project is rarely just a model. It may also depend on analysis scripts, input files, notes, and small utilities that explain how the work was done. When those pieces live in separate folders, sharing the model can leave a colleague with the structure but not the workflow.

SAMSON documents can hold more than molecular models: they can embed files and folders, including Python scripts and app files. That gives you a practical way to keep project materials together and share them as a single document.

Build a document around the work, not just the structure

Before sharing a project, gather the files someone would need to understand or continue it. Depending on your workflow, that might include the molecular model, scripts, data files, images, and research notes. You can add files by dragging and dropping them into SAMSON and choosing to embed them, or by using Home > Embed files or Home > Embed folders.

Dialog for embedding files in a SAMSON document

Embedding stores those files within the document, making it self-contained for transfer and sharing. A useful habit is to give files descriptive names and keep related materials in clearly named folders before embedding them. That way, a collaborator can more quickly distinguish the analysis script from its input data or supporting notes.

Keep the script close to the model

Once a Python script is embedded, you can open it in SAMSON’s Code Editor by double-clicking it. The editor can modify text files, provides Python script templates, and can run Python files. For a quick test or a short command, the integrated Python Console is another option.

SAMSON Code Editor interface

This arrangement makes the connection between a model and its workflow easier to inspect: the document carries the project materials, while the script can show the steps you automated. SAMSON’s Python Scripting Extension exposes the SAMSON Python API, which can be used to automate workflows and build custom pipelines. If you need help drafting code, SAMSON AI’s /script command can generate a Python script based on a request; review and test generated code before relying on it.

Check package requirements before sharing

A script may use Python packages beyond the built-in SAMSON API. SAMSON’s Python Package Manager lets you view installed packages and their versions, and install or uninstall packages. Open it from the Python Console using Edit > Manage packages…. Packages are managed with pip; for example, you can specify a version such as foo==1.2.0.

Embedding a script and its project files does not, by itself, mean that every Python package the script uses is embedded too. Before sharing, note any package requirements in the project materials and check that the intended user can install them in their SAMSON environment. This simple check can prevent the confusing situation where a project opens but a script cannot run because a dependency is missing.

A practical sharing checklist

  • Include the model and the files the workflow reads or produces.
  • Embed scripts and supporting folders in the SAMSON document.
  • Open the embedded script in the Code Editor and check that it is the intended version.
  • Record external Python package requirements and any relevant instructions in the document.
  • Share the document through email, GitHub, or SAMSON Connect Documents, and tell recipients where to find the script.

This approach is useful for collaborative projects, teaching materials, and research workflows where you want analysis code and context to travel alongside a molecular model. It also makes a project easier to revisit later: the supporting files are in one place rather than scattered across old downloads and working directories.

For instructions on the Python Console, package management, the Code Editor, and embedding scripts and apps, see the SAMSON scripting documentation.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.