Accessing the data graph in Python

To efficiently manipulate nodes (atoms, bonds, side chains, molecules, etc.), use node indexers returned by the SAMSON.getNodes function applied to a Node Specification Language (NSL) expression.

For example, SAMSON.getNodes(‘node.type atom’) returns an indexer containing all atoms in the active document.

Internally, a node indexer is a vector combined with a hashmap, which makes it easy to associate indices to subsets of nodes, for example to manage arrays of data associated to nodes.


Comments are closed.