# SAMSON

SAMSON (Software for Adaptive Modeling and Simulation Of Nanosystems) is a computer software platform for molecular design being developed by OneAngstrom and previously by the NANO-D group at the French Institute for Research in Computer Science and Automation (INRIA).
SAMSON has a modular architecture that makes it suitable for different domains of nanoscience, including material science, life science, and drug design.

## SAMSON Elements

SAMSON Elements are modules for SAMSON, developed with the SAMSON software development kit (SDK). SAMSON Elements help users perform tasks in SAMSON, including building new models, performing calculations, running interactive or offline simulations, and visualizing and interpreting results.
SAMSON Elements may contain different class types, including for example:
* Apps – generic classes with a graphical user interface that extend the functions of SAMSON
* Editors – classes that receive user interaction events to provide editing functions (e.g., model generation, structure deformation, etc.)
* Models – classes that describe properties of nanosystems (see below)
* Parsers – classes that may parse files to add content to SAMSON's data graph (see below)
SAMSON Elements expose their functions to SAMSON and other Elements through an introspection mechanism, and may thus be integrated and pipelined.

## Modeling and simulation

SAMSON represents nanosystems using five categories of models:
* Structural models – describe geometry and topology
* Visual models – provide graphical representations
* Dynamical models – describe dynamical degrees of freedom
* Interaction models – describe energies and forces
* Property models – describe traits that do not enter in the first four model categories
Simulators (potentially interactive ones) are used to build physically-based models, and predict properties.

## Data graph

All models and simulators are integrated into a hierarchical, layered structure that form the SAMSON data graph. SAMSON Elements interact with each other and with the data graph to perform modeling and simulation tasks. A signals and slots mechanism makes it possible for data graph nodes to send events when they are updated, which makes it possible to develop e.g., adaptive simulation algorithms.

## Node specification language

SAMSON has a node specification language (NSL) that users may employ to select data graph nodes based on their properties. Example NSL expressions include:
* Hydrogen – select all hydrogens (short version: H)
* atom.chainID > 2 – select all atoms with a chain ID strictly larger than 2 (short version: a.ci > 2)
* Carbon in node.selected – select all carbons in the current selection (short version: C in n.s)
* bond.order > 1.5 – select all bonds with order strictly larger than 1.5 (short version: b.o > 1.5)
* node.type backbone – select all backbone nodes (short version: n.t bb)
* O in node.type sidechain – select all oxygens in sidechain nodes (short version: O in n.t sc)
* "CA" within 5A of S – select all nodes named CA that are within 5 angstrom of any sulfur atom (short version: "CA" w 5A of S)
* node.type residue beyond 5A of node.selected – select all residue nodes beyond 5 angstrom of the current selection (short version: n.t r b 5A of n.s)
* residue.secondaryStructure helix – select residue nodes in alpha helices (short version: r.ss h)
* node.type sidechain having S – select sidechain nodes that have at least one sulfur atom (short version: n.t sc h S)
* H linking O – select all hydrogens bonded to oxygen atoms (short version: H l O)
* C or H – select atoms that are carbons or hydrogens

## Features

SAMSON is developed in C++ and implements many features to ease developing SAMSON Elements, including:
* Managed memory
* Signals and slots
* Serialization
* Multilevel undo-redo
* Introspection
* Referencing
* Unit system
* Functors and predicate logic
* SAMSON Element source code generators

## SAMSON Connect

SAMSON, SAMSON Elements and the SAMSON Software Development Kit are distributed via the SAMSON Connect website. The site acts as a repository for the SAMSON Elements being uploaded by developers, and users of SAMSON choose and add Elements from SAMSON Connect.