What are Node Types in SAMSON, and Why Should You Care?

When it comes to molecular modeling in SAMSON, one of the most important yet often underappreciated concepts is Node Types. Understanding node types can clear up a lot of confusion and give you much more control over your models and simulations.

If you’ve ever asked yourself questions like:

  • “Why can’t I apply this editor to my molecule?”
  • “Where did that object go in the Document?”
  • “How do I select only atoms or bonds efficiently?”

… then learning how node types work in SAMSON is well worth your time.

What is a Node in SAMSON?

Everything you see and interact with in SAMSON—atoms, molecules, shapes, simulations, annotations—is a node. These nodes can be connected hierarchically, much like folders and files. But to do anything useful with nodes, you need to understand what type of node you’re dealing with.

Why Node Types Matter

Each type of node in SAMSON has specific properties, behaviors, and compatible operations. For example:

  • An Atom node stores different data than a Bond node.
  • A Molecule node may contain children nodes such as atoms and bonds.
  • An Editor may only apply to specific node types.

Without knowing the type of a node, you’ll be taking shots in the dark when manipulating your model.

Examples of Common Node Types

Here are just a few useful node types and what they represent:

  • Atom: A single atom with various data such as element, coordinates, charge, etc.
  • Bond: Connects two atoms and can specify bond order.
  • MolecularModel: A container for structures—can include molecules or crystal structures.
  • VisualModel: Responsible for how things look. These nodes define visual representations like Van der Waals, Stick, Ribbon models, and more.
  • SimulationModel: Used for setting up and running dynamics simulations.
  • Label: Text annotations in the model.

Once you’re familiar with these, navigating the Node Specification Language (NSL) becomes much easier. For example, selecting all atoms is as easy as using: type=Atom.

Combining Node Types with Editors and Apps

Many SAMSON Extensions are designed to work with specific node types. For example, a geometry editor might only accept nodes of type Atom or MolecularModel. If the selection doesn’t match, the extension may not activate or behave as expected.

By knowing which node types are compatible with which tools, your workflow becomes smoother and more focused. It also prevents the frustrating trial-and-error process of activating tools and wondering why nothing is happening.

How to See Node Types

In SAMSON, the Document View panel shows all the nodes in a hierarchical tree structure. By expanding objects in this tree, you can inspect the parent or child nodes and recognize what types they are.

You can also use the Find feature with NSL to search for nodes based on their type. This is especially useful in large and complex documents.

In Summary

Node Types are at the heart of working effectively in SAMSON. They define what something is, what it can contain, and what you can do with it. While they might not be the flashiest feature, getting comfortable with them will save you time and make your molecular modeling much more powerful.

To explore the full reference of Node Types in SAMSON, you can consult the original documentation page: https://documentation.samson-connect.net/users/latest/node-types/

To navigate all available references, see the documentation overview at SAMSON Documentation – References.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.

Comments are closed.