SAMSON Elements

SAMSON Elements are modules for SAMSON, developed thanks to the SAMSON SDK, and distributed on SAMSON Connect. SAMSON Elements are what makes SAMSON useful: without any SAMSON Element, SAMSON cannot even create an atom, open a file, etc.

SAMSON Elements expose their functionality to SAMSON and other SAMSON Elements through a powerful introspection mechanism. This introspection mechanism makes it possible to save and load data graph objects without knowing their type, to reuse exposed functionality without having access to the source files or header files of the exposed SAMSON Element, to perform scripting, to pipeline tasks, etc.

The Element Generator can be used to generate a new SAMSON Element in a few clicks and help kickstart development.

# Element classes

A SAMSON Element contains one or more classes that provide functionality. Although any class may be exposed in a SAMSON Element, some classes, derived from classes provided in the SAMSON SDK, play a specific role in SAMSON.

## Apps

Apps are tools that may provide any type of functionality. An app may be e.g. a connector to an external executable or web service, may wrap previously developed code to integrate its functionality with SAMSON and other SAMSON Elements, or provide entirely new functionality based on the SAMSON Application Programming Interface. When SAMSON loads an app during startup, it includes it in the App menu and the App toolbar.

## Editors

Editors are classes that receive user interaction events (e.g. mouse and keyboard events) from SAMSON, which may be used to provide potentially complex editing functionality. For example, an editor may be a nanotube generator that lets users create a new nanotube model in a few clicks, a tool for deforming molecular structures while preserving local rigidity, a rectangle selection tool, a tool to apply a rigid-body transform to a model, etc. At startup, SAMSON positions editors in the Edit menu and the Editors toolbar.

One and only one editor is active at any time.

## Importers

Importers are classes dedicated to parsing files. Precisely, they implement an importFromFile function that may be called by s or other SAMSON Elements to parse files and, potentially, add nodes to SAMSON's data graph. An importer may be a PDB parser, an electron density parser, etc. Whenever a new importer is loaded at startup, SAMSON adds it to the list of available importers. Importers are used in particular when opening a new file from the File menu.

## Exporters

Exporters are classes dedicated to exporting content from the data graph to files. Precisely, they implement an exportToFile function that may be called by SAMSON or other SAMSON Elements to export to files. An exporter may be a PDB exporter, an XYZ exporter, etc. Whenever a new exporter is loaded at startup, SAMSON adds it to the list of available exporters, used in particular when exporting to a file from the File menu.

## Interaction models

Interaction models are one of the five categories of models in SAMSON (with structural models, dynamical models, visual models and property models). They are responsible for computing energies and forces and are used in SAMSON to perform various modeling and simulation tasks. They may rely on SAMSON's signals and slots mechanism to perform incremental calculations used in adaptive simulations. An interaction model may be e.g. a spring model, an elastic network model, an extended Hückel model, etc. When a new interaction model is loaded at startup, SAMSON stores it in a list of available interaction models, which may be used by SAMSON (e.g. when the user applies a new model to some data graph nodes), or other SAMSON Elements.

## Visual models

Visual models are one of the five categories of models in SAMSON (with structural models, dynamical models, interaction models and property models). Their sole purpose is to provide some visual representations in the SAMSON viewport. A visual model may be e.g. a secondary structure representation applicable to protein models, an electron density isosurface, a volume rendering of an electrostatics field, etc. When a new visual model is loaded at startup, SAMSON stores it in a list of available visual models, which may be used by SAMSON (e.g. when the user applies a new model to some data graph nodes), or other SAMSON Elements.

# Element categories

At the moment, a SAMSON Element may belong to one or more of the following categories:

• Assembly
• Biology
• Chemistry
• Developer
• Education
• Electronics
• General
• Materials
• Medicine
• Metrology
• Modeling
• Optics
• Particles
• Photonics
• Physics
• Simulation
• Toxicology
• Visualization

Note that, even though a SAMSON Element may contain several classes, all classes belonging to the same SAMSON Element have the same categories.

Categories are useful to arrange SAMSON Elements in the SAMSON user interface, as well as organize them on SAMSON Connect. Note that this categorization might evolve in the future.