Keep the Model, Data, and Analysis Together

A molecular model can be easy to understand on your computer and surprisingly hard to hand off. The structure may be in one folder, the analysis script in another, and the notes explaining how to run it somewhere else. When a colleague opens only the model, they may not have the materials needed to repeat your workflow.

SAMSON documents offer a practical way to keep related files together: you can embed Python scripts, folders, and other files in the document. That makes the document a useful handoff package for a modeling project—not just a place to store the molecular structure.

Build a document that explains how to use itself

Start with the SAMSON document containing your molecular model. Gather the files someone would need to understand or continue the work: for example, analysis scripts, input data, images, research papers, or project notes. You can embed individual files or entire folders by dragging and dropping them into SAMSON and choosing to embed them when prompted. Alternatively, use Home > Embed files or Home > Embed folders.

Dialog for embedding a file in a SAMSON document

Because the files and folders are stored within the document, the document can be transferred to another computer or shared with a colleague. This helps prevent a common handoff problem: sending the model but forgetting the script, data, or context that made the result understandable.

Make the analysis easy to find and run

If you include a Python script, a recipient can open the embedded script in SAMSON’s Code Editor by double-clicking it. The editor can open and modify text files, including Python scripts, and run Python files. For a quick test or a short command, the integrated Python Console is another option. It provides access to SAMSON functionality through Python.

SAMSON Code Editor interface

A useful project handoff can include a short note alongside the script describing its purpose, the expected inputs, and what the recipient should inspect after running it. These are practical additions you can make to your project; they are not generated automatically by embedding files. Clear names and a simple folder structure also make a document easier to navigate.

Use the document for collaboration and teaching

This approach can support different kinds of molecular work. A research team might share a model with its analysis script and supporting data. An educator might distribute a document containing lecture material and an interactive Python exercise. A colleague can open the document, locate the embedded script, and run it in SAMSON rather than searching through separate attachments.

SAMSON also lets you copy Python code corresponding to some commands, color palettes, and visual presets. For example, code for a supported command can be copied from the message in the Find everything box and then used in the Code Editor or Python Console. This can help turn a manual step into a scriptable one, or give you a starting point when documenting a workflow.

Embedding project files keeps them together, but it does not by itself guarantee that every workflow will run identically on every computer. If a script depends on Python packages or particular inputs, make those dependencies and assumptions clear. SAMSON’s Python Package Manager can install packages, but recipients may still need to ensure that the required packages are available in their environment.

The key idea is simple: share the model together with the files that explain and support the work. For details on Python scripting, package management, the Code Editor, and embedding files, see the SAMSON Scripting documentation.

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

Comments are closed.