A molecular model should travel with its workflow

A molecular project is often more than a structure. It may depend on analysis scripts, input files, notes, and the steps that produced a result. When those pieces are scattered across folders or computers, sharing the model can leave a colleague with an important question: What do I need to open this, and how do I run the same workflow?

SAMSON documents can help keep those project materials together. Alongside molecular models, a document can embed Python scripts and other files or folders. The result is a self-contained document that can be transferred and shared, giving collaborators a clear place to find the workflow materials associated with the model.

Put the workflow beside the model

Instead of sending a structure in one message, a script in another, and data through a separate shared folder, consider collecting the relevant materials into the SAMSON document. This is useful for research handoffs, teaching exercises, and projects where someone else may need to inspect or repeat an analysis.

To add materials, drag files or folders into SAMSON and respond to the prompt about embedding them. You can also use Home > Embed files or Home > Embed folders.

Dialog for embedding files in a SAMSON document

Embedding keeps those files within the document rather than relying on the recipient to locate the same folder structure on another computer. It does not, by itself, guarantee that every external software dependency is installed, so make a note of any packages your script requires.

Make the script easy to find and run

An embedded Python script can be opened in the Code Editor by double-clicking it. The editor supports Python files and includes syntax highlighting and auto-completion. To execute a script, use Run in the editor or its Run menu. For a short command or quick test, use the integrated Python Console instead.

SAMSON Code Editor interface

Both routes provide access to the SAMSON Python API. That means scripts can automate SAMSON workflows, and the console is handy for trying an idea before saving it as part of a project. If you need an additional Python package, open Edit > Manage packages… in the Python Console. The package manager uses pip and can install packages by name or from a local package path.

A small handoff checklist

  • Keep related materials together: embed the scripts, data files, and folders that a collaborator needs to understand the workflow.
  • Make the starting point obvious: use a clearly named script and, where useful, add notes explaining what it does and which files it uses.
  • Check package needs: identify any packages that must be installed separately; do not assume that embedding a script also installs its dependencies.
  • Test the handoff: reopen the document, locate the embedded script, and run it in SAMSON before sharing.
  • Share the document: SAMSON documents can be shared by email, GitHub, or SAMSON Connect Documents.

For recurring actions, you can also obtain Python code for some SAMSON commands, color palettes, and visual presets. For example, searching for a command in Find everything can reveal a copyable Python version when one is available. This can help turn a manually performed step into a scriptable part of a workflow.

The practical benefit is not just fewer separate attachments. Keeping the model and its supporting materials together makes it easier for another person to see what belongs to the project, inspect the code, and continue from the same starting point. For details on the console, package manager, editor, and embedding options, learn more in the SAMSON scripting documentation.

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

Comments are closed.