# SAMSON Python Scripting Guide --- > Python scripting documentation for SAMSON, including guides, examples, and Python API reference generated from the compiled pybind11 bindings. --- This file is generated from resolved Sphinx doctrees after autodoc has imported the compiled Python bindings and inserted API docstrings. --- # Python bindings for SAMSON API Source: https://documentation.samson-connect.net/scripting/latest/index.html Markdown: https://documentation.samson-connect.net/scripting/latest/index.md The **Python Scripting extension** in SAMSON provides **Python bindings for SAMSON API** and an **integrated Python console**. It provides you with an access to most of the [SAMSON SDK](https://documentation.samson-connect.net/developers/11.0.0/index.html#) allowing you to access most of SAMSON’s functionality through Python scripting. Python bindings for the SAMSON API are done in the same structure as the [SAMSON SDK](https://documentation.samson-connect.net/developers/11.0.0/index.html#): classes have the same short names as in the SDK and functions are exposed with the same names and parameters except for some getter/setter functions that are exposed as class properties where possible. This makes it possible to easily trasnfer your code between Python and C++ with minor modifications. This documentation has links to the [SAMSON Developer Guide](https://documentation.samson-connect.net/developers/11.0.0/index.html#) which you can check out for comparison and some additional information. The Python console in SAMSON comes with an integrated [Jupyter Qt Console](https://github.com/jupyter/qtconsole). !!! note This version of Python bindings is for [SAMSON SDK](https://documentation.samson-connect.net/developers/11.0.0/index.html#) 2026 R1. Python bindings are done thanks to [pybind11](https://github.com/pybind/pybind11/) ([pybind11 license](https://github.com/pybind/pybind11/blob/master/LICENSE)). ### Guide The following guides demonstrate the usage of Python bindings for SAMSON API. - [Getting started](https://documentation.samson-connect.net/scripting/latest/docs/GettingStarted.md) - [Importing samson module](https://documentation.samson-connect.net/scripting/latest/docs/GettingStarted.md#importing-samson-module) - [Getting help](https://documentation.samson-connect.net/scripting/latest/docs/GettingStarted.md#getting-help) - [Saving history](https://documentation.samson-connect.net/scripting/latest/docs/GettingStarted.md#saving-history) - [Running scripts](https://documentation.samson-connect.net/scripting/latest/docs/GettingStarted.md#running-scripts) - [Installing Python packages](https://documentation.samson-connect.net/scripting/latest/docs/GettingStarted.md#installing-python-packages) - [Running actions](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md) - [Running actions by name](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md#running-actions-by-name) - [Selecting nodes using runCommand and NSL](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md#selecting-nodes-using-runcommand-and-nsl) - [Running actions by UUID](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md#running-actions-by-uuid) - [Developing scripts](https://documentation.samson-connect.net/scripting/latest/docs/DevelopingScripts.md) - [Using SAMSON AI](https://documentation.samson-connect.net/scripting/latest/docs/DevelopingScripts.md#using-samson-ai) - [Using Code Editor](https://documentation.samson-connect.net/scripting/latest/docs/DevelopingScripts.md#using-code-editor) - [Embedding Python Scripts](https://documentation.samson-connect.net/scripting/latest/docs/DevelopingScripts.md#embedding-python-scripts) - [Installing Python packages](https://documentation.samson-connect.net/scripting/latest/docs/DevelopingScripts.md#installing-python-packages) - [GUI](https://documentation.samson-connect.net/scripting/latest/docs/DevelopingScripts.md#gui) - [Working with documents and nodes](https://documentation.samson-connect.net/scripting/latest/docs/WorkingWithDocuments.md) - [Documents](https://documentation.samson-connect.net/scripting/latest/docs/WorkingWithDocuments.md#documents) - [Moving around](https://documentation.samson-connect.net/scripting/latest/docs/WorkingWithDocuments.md#moving-around) - [Working with nodes](https://documentation.samson-connect.net/scripting/latest/docs/WorkingWithDocuments.md#working-with-nodes) - [Importing and exporting](https://documentation.samson-connect.net/scripting/latest/docs/ImportingAndExporting.md) - [Making operations undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md) - [Selecting nodes](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md) - [Select using actions](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md#select-using-actions) - [Select using NSL](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md#select-using-nsl) - [Select via nodes](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md#select-via-nodes) - [Clear selection](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md#clear-selection) - [Selection examples](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md#selection-examples) - [Getting nodes](https://documentation.samson-connect.net/scripting/latest/docs/GettingNodes.md) - [Units](https://documentation.samson-connect.net/scripting/latest/docs/Units.md) - [SBQuantity](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md) - [Type](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type.md) - [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md) - [List of color schemes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#list-of-color-schemes) - [Apply color](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#apply-color) - [Apply color from color palette](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#apply-color-from-color-palette) - [Apply color scheme](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#apply-color-scheme) - [Apply a color scheme with a color palette](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#apply-a-color-scheme-with-a-color-palette) - [Visualizing](https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.md) - [Applying visual models](https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.md#applying-visual-models) - [Applying visual presets](https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.md#applying-visual-presets) - [Building](https://documentation.samson-connect.net/scripting/latest/docs/Building.md) - [Creating a structural model](https://documentation.samson-connect.net/scripting/latest/docs/Building.md#creating-a-structural-model) - [Creating an atom](https://documentation.samson-connect.net/scripting/latest/docs/Building.md#creating-an-atom) - [Creating covalent bonds](https://documentation.samson-connect.net/scripting/latest/docs/Building.md#creating-covalent-bonds) - [Adding hydrogens](https://documentation.samson-connect.net/scripting/latest/docs/Building.md#adding-hydrogens) - [Minimizing systems](https://documentation.samson-connect.net/scripting/latest/docs/Building.md#minimizing-systems) - [Examples](https://documentation.samson-connect.net/scripting/latest/docs/Building.md#examples) - [Presenting and animating](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md) - [List of available animations](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#list-of-available-animations) - [How to create a presentation](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#how-to-create-a-presentation) - [How to create an animation](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#how-to-create-an-animation) - [Exporting a movie](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#exporting-a-movie) - [Rendering](https://documentation.samson-connect.net/scripting/latest/docs/Rendering.md) - [Rendering effects](https://documentation.samson-connect.net/scripting/latest/docs/Rendering.md#rendering-effects) - [Render presets](https://documentation.samson-connect.net/scripting/latest/docs/Rendering.md#render-presets) - [Rendering using Cycles](https://documentation.samson-connect.net/scripting/latest/docs/Rendering.md#rendering-using-cycles) - [Introspection: using extensions](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md) - [Getting proxies](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md#getting-proxies) - [Calling functions](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md#calling-functions) - [Examples](https://documentation.samson-connect.net/scripting/latest/docs/Examples.md) - [Animations](https://documentation.samson-connect.net/scripting/latest/docs/Examples.md#animations) - [Building systems](https://documentation.samson-connect.net/scripting/latest/docs/Examples.md#building-systems) - [Colorization and visualization](https://documentation.samson-connect.net/scripting/latest/docs/Examples.md#colorization-and-visualization) - [Exporting](https://documentation.samson-connect.net/scripting/latest/docs/Examples.md#exporting) - [Processing](https://documentation.samson-connect.net/scripting/latest/docs/Examples.md#processing) - [Selections](https://documentation.samson-connect.net/scripting/latest/docs/Examples.md#selections) - [Simulation](https://documentation.samson-connect.net/scripting/latest/docs/Examples.md#simulation) - [Apps and GUIs](https://documentation.samson-connect.net/scripting/latest/docs/Examples.md#apps-and-guis) ### API documentation Below the Python Scripting API description is subdivided into groups that correspond to the SAMSON [SDK Organization](https://documentation.samson-connect.net/developers/11.0.0/sdk-organization/#). - [Core](https://documentation.samson-connect.net/scripting/latest/docs/api/Core.md) - [Class](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class.md) - [Container](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container.md) - [Meta](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta.md) - [Reference](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference.md) - [Data Model](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel.md) - [Asset](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Asset.md) - [Color Scheme](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme.md) - [Data Graph](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph.md) - [Document](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document.md) - [Palette](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette.md) - [SBQuantity](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md) - [Type](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type.md) - [Visualization](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization.md) - [Facade](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade.md) - [SAMSON](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md) - [GUI](https://documentation.samson-connect.net/scripting/latest/docs/api/GUI.md) - [Action](https://documentation.samson-connect.net/scripting/latest/docs/api/GUI/Action.md) - [Modeling](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling.md) - [Dynamical Model](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel.md) - [Element](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element.md) - [Interaction Model](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel.md) - [Model](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model.md) - [Property Model](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/PropertyModel.md) - [Structural Model](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel.md) - [Visual Model](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel.md) - [Simulation](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation.md) - [Neighbor Search](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch.md) - [Simulator](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator.md) - [State Updater](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater.md) - [Changelog](https://documentation.samson-connect.net/scripting/latest/docs/changelog/Changelog.html) - [Available versions](https://documentation.samson-connect.net/scripting/latest/docs/Versions.html) - [SAMSON Connect](https://samson-connect.net/?utm_source=PythonScriptingGuide) - [Documentation Center](https://documentation.samson-connect.net?utm_source=PythonScriptingGuide) - [User Guide](https://documentation.samson-connect.net/users/latest/?utm_source=PythonScriptingGuide) - [Developer Guide](https://documentation.samson-connect.net/developers/latest/?utm_source=PythonScriptingGuide) - [Forum](https://forum.samson-connect.net?utm_source=PythonScriptingGuide) - [SAMSON Extensions](https://www.samson-connect.net/extensions?utm_source=PythonScriptingGuide) - [Download SAMSON](https://www.samson-connect.net/download?utm_source=PythonScriptingGuide) - [YouTube channel](https://www.youtube.com/@samsonconnect) ### Site files [Privacy Policy](https://www.samson-connect.net/privacyPolicy?utm_source=PythonScriptingGuide) [Terms of Use](https://www.samson-connect.net/termsOfUse?utm_source=PythonScriptingGuide) [llms.txt](https://documentation.samson-connect.net/scripting/latest/llms.txt) - an LLM-oriented map with links to Markdown files corresponding to each page of the Python Scripting Guide. [llms-full.txt](https://documentation.samson-connect.net/scripting/latest/llms-full.txt) - an LLM-oriented text representation of the Python Scripting Guide. --- # Getting started Source: https://documentation.samson-connect.net/scripting/latest/docs/GettingStarted.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/GettingStarted.md The Python Scripting extension in SAMSON provides Python bindings for the SAMSON API and an integrated Python console. The Python bindings follow the same overall structure as the [SAMSON SDK](https://documentation.samson-connect.net/developers/11.0.0/index.html#): classes have the same short names as in the SDK and functions keep the same names and parameters, except that some getter/setter pairs are exposed as Python properties where appropriate. This makes it easy to transfer code between Python and C++ with only minor modifications. !!! note "See also" [SAMSON User Guide](https://documentation.samson-connect.net/users/11.0.0/index.html#) [SAMSON Developer Guide](https://documentation.samson-connect.net/developers/11.0.0/index.html#) ### Importing samson module The Python Scripting module has a flat structure: most classes are exposed directly in the module, with the main exception being the [`samson.SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) sub-module that contains the available units. Python bindings for the SAMSON API are already imported in the embedded Jupyter Qt Console in the following way: ```python import samson from samson import * ``` So you don’t need to import anything and can directly use SAMSON classes, for example: Caption: Using SAMSON commands ```python # select ligands SAMSON.runCommand("Ligands") # apply Licorice to the current selection SAMSON.runCommand("Licorice") # clear the selection SAMSON.runCommand("Deselect all") ``` Caption: Change the camera view ```python # change the active camera's view using commands SAMSON.runCommand("Top view") # change the view directly via the active camera # get the active camera camera = SAMSON.getActiveCamera() # change the view of the camera camera.topView() ``` Caption: Clear selection in an undoable way ```python activeDocument = SAMSON.getActiveDocument() with SAMSON.holding('Clear selection'): activeDocument.clearSelection() ``` ### Getting help Apart from the online documentation, you can access help directly in the embedded Jupyter Qt Console: - `help(SBColor)` - prints the docstring in the console. - `SBColor?` - prints the docstring in the console without immediately flushing it; press `q` to exit. - `SBColor.__doc__` - prints a special attribute `__doc__` of modules, functions, classes, and methods. If you have any questions, please, check the [SAMSON forum](https://forum.samson-connect.net/?utm_source=PythonScriptingDocs) for similar topics or post your question there. ### Saving history You can save the history of commands and results in an HTML file by pressing `Ctrl+S` (on Win and Linux) or `Cmd+S` (on macOS) right in the terminal. To see the history of input commands you can use: ```python %history ``` If you want to save commands in a Python file you can use the `%save` magic: ```python # saves commands from the input cells 1 through 5 to a file called filename.py %save filename.py 1-5 ``` ### Running scripts To run your own script, you can do the following: ```python import os # change directory to the one which contains the file os.chdir('/path/to/your/script/') # run the file in the IPython's namespace (e.g., to have samson imported) %run -i file.py # or directly using IPython from IPython import get_ipython ipython = get_ipython() # note that you might need to use quotes for the file name, e.g. if it contains spaces ipython.run_line_magic("run", "-i \"/path/to/script.py\"") ``` ### Installing Python packages To install a Python package, go to *Python Console > Edit > Manage packages* and provide the package name and click *Install*. The Python console uses `pip` internally, so you can specify the package version, if necessary, in the same way as when using `pip`. --- # Running actions Source: https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md The SAMSON interface ([`SAMSON`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#module-samson.SAMSON)) provides the [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand) function to trigger actions and commands by the names you see in the SAMSON interface. !!! note We use words *action* and *command* interchangeably. ### Running actions by name The [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand) function accepts the name of an action, or a hierarchical path to it, and returns whether that action was found and triggered. Caption: Run a SAMSON action ```python # run the 'Receptors' command that selects receptors from the current selection # or from the active document if the current selection is empty if SAMSON.runCommand("Receptors") == False: print("Could not find the command") ``` This also searches for actions within sub-menus of other actions. So, for example, you can run the `Residues > Terminal residues` command as follows: ```python SAMSON.runCommand("Terminal residues") ``` If there is an ambiguity, for example because several actions have the same name, provide the full path with hierarchical levels separated by `>`, for example `Top parent action name > Parent action name > Action name`. Caption: Run a SAMSON command that is in a sub-menu ```python SAMSON.runCommand("Residues > Terminal residues") ``` You can also get an action ([`SBAction`](https://documentation.samson-connect.net/scripting/latest/docs/api/GUI/Action/SBGAction.md#samson.SBAction)) using [`SAMSON.getActionByText()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.getActionByText) function, check whether it exists, and trigger it: Caption: Find an action by its text and trigger it ```python action = SAMSON.getActionByText("Terminal residues") if action: print("Found the action") action.trigger() else: print("Could not find the action") ``` You can apply multiple commands one-by-one to **create a pipeline of actions**. Caption: Apply the Licorice visual model to ligands and hide the default structural representation of ligands ```python # run the command named 'Ligands' that selects ligands SAMSON.runCommand('Ligands') # apply visual models only if something was found (selected) if SAMSON.getActiveDocument().hasSelectedNodes(): # apply the Licorice visual model via the command named 'Licorice' SAMSON.runCommand('Licorice') # hide the current selection SAMSON.runCommand('Hide selection') # clear the current selection in the active document SAMSON.runCommand('Deselect all') ``` !!! note Most of the commands executed via [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand) are [undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo) because they internally use [`SAMSON.beginHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.beginHolding) and [`SAMSON.endHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.endHolding). For some actions, however, you may still want to wrap the call in [`SAMSON.holding`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.holding). See [Making operations undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo) for more information. ### Selecting nodes using runCommand and NSL The [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand) function can also be used to perform selections using [Node Specification Language (NSL)](https://documentation.samson-connect.net/users/11.0.0/nsl/#). Caption: Select using NSL string and runCommand ```python # select receptors and ligands SAMSON.runCommand("nsl: receptor or ligand") ``` Caption: Show residues in binding sites as licorice ```python # clear the current selection SAMSON.runCommand("Deselect all") # select residues within 5A of ligands # short version of NSL: n.t r w 5A of n.c lig SAMSON.runCommand("nsl: node.type residue within 5A of node.category ligand") if SAMSON.getActiveDocument().hasSelectedNodes(): # add Licorice visual model to the current selection SAMSON.runCommand("Licorice") # clear the current selection SAMSON.runCommand("Deselect all") ``` Please refer to [Select using NSL](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md#ps-select-using-nsl) for more information. ### Running actions by UUID Since action names can sometimes be ambiguous, you can also run an action using its UUID ([`SBUUID`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)): Caption: Run an action by its UUID ```python if SAMSON.runCommand(actionUUID) == False: print("Could not find the command") ``` You can get an action’s [`UUID`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID) via its [`UUID`](https://documentation.samson-connect.net/scripting/latest/docs/api/GUI/Action/SBGAction.md#samson.SBAction.UUID) property. You can also get an action ([`SBAction`](https://documentation.samson-connect.net/scripting/latest/docs/api/GUI/Action/SBGAction.md#samson.SBAction)) by its [`UUID`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID) using [`SAMSON.getAction()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.getAction) function, check whether it exists, and trigger it: Caption: Find an action by UUID and trigger it ```python action = SAMSON.getAction(SBUUID("")) if action: print("Found the action") action.trigger() else: print("Could not find the action") ``` --- # Developing scripts Source: https://documentation.samson-connect.net/scripting/latest/docs/DevelopingScripts.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/DevelopingScripts.md ### Using SAMSON AI **SAMSON AI** is the intelligent assistant for SAMSON. This assistant is designed to help you navigate SAMSON’s functionality and understand its commands, menus, editors, apps, and more. It can explain the platform’s functionality, all while providing links to relevant documentation for further understanding, and can also directly execute SAMSON commands. You can open the SAMSON AI via *Interface menu > Windows > Assistant* or via the `Ctrl+0` shortcut on Windows and Linux or `Cmd+0` on Mac. You can use SAMSON AI to help you script with Python. For that, use the **/script** command in the Assistant. Example: */script select all atoms and translate them in the z direction by 1 angstrom*. You can execute the suggested scripts directly from the Assistant. See more in [User guide - SAMSON AI](https://documentation.samson-connect.net/users/11.0.0/samson-ai/#). ### Using Code Editor The **Code editor** in SAMSON lets you open and modify Python scripts and other text files. It can also run Python files, whether they are embedded into documents or stored externally. To open the Code editor, click on *Interface menu > Code editor* or press `Ctrl+9` on Windows and Linux or `Cmd+9` on Mac. ### Embedding Python Scripts You can embed Python scripts directly into a SAMSON document making the document self-contained, so you can transfer documents between computers and share documents, and store whole pipelines in the document. ### Installing Python packages To install a Python package, go to *Python Console > Edit > Manage packages* and provide the package name and click *Install*. The Python console uses `pip` internally, so you can specify the package version, if necessary, in the same way as when using `pip`. ### GUI The SAMSON Python API provides a set of functions that you can use to interact with the user via pop-up dialogs, for example to get filenames, paths, strings, numbers, ranges, colors, color palettes, or a choice from a list. This lets you reuse existing SAMSON dialogs instead of creating your own. Please see [`SAMSON`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#module-samson.SAMSON) for the corresponding functions. To develop more complex dialogs and apps you will need to use **Qt**. SAMSON uses **Qt6** for GUI and the integrated Python environment installs **PySide6** (Qt6 bindings for Python) for you. So, to create GUI, please use **PySide6** or the **qtpy** wrapper which will automatically select the available Qt Python package. To learn more how to create GUIs with Qt, please refer to the [PySide6 documentation](https://doc.qt.io/qtforpython-6/index.html). !!! note "See also" Examples: [Apps and GUIs](https://documentation.samson-connect.net/scripting/latest/docs/Examples.md#ps-examples-gui) --- # Working with documents and nodes Source: https://documentation.samson-connect.net/scripting/latest/docs/WorkingWithDocuments.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/WorkingWithDocuments.md ### Documents SAMSON documents are hierarchies of SAMSON nodes. The hierarchy of the active document is visible in the *Document view*. SAMSON documents ([`SBDocument`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument)) may contain cameras ([`SBCamera`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentCamera.md#samson.SBCamera)), folders ([`SBFolder`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md#samson.SBFolder)), files ([`SBFile`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFile.md#samson.SBFile)), [structural nodes](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel.md#ps-structural-model-nodes) (e.g. molecules, residues, groups, atoms, bonds, conformations, paths, etc.), labels ([`SBLabel`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentLabel.md#samson.SBLabel)), notes ([`SBNote`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentNote.md#samson.SBNote)), visual models ([`SBVisualModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel)), simulators ([`SBSimulator`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulator.md#samson.SBSimulator)), etc. SAMSON maintains the information about models (structural nodes, visual models, etc), cameras, simulators, etc., in the document’s [data graph](https://documentation.samson-connect.net/developers/11.0.0/data-graph/#). See [User guide - Node types](https://documentation.samson-connect.net/users/11.0.0/node-types/#) for the description of types of nodes in SAMSON documents. In one SAMSON instance, you can have multiple open documents at the same time, but only one document is active at any given moment: the one you currently see in the *Document view*. The loaded or created molecules are placed in the active document. Caption: Get the active document ```python document = SAMSON.getActiveDocument() ``` !!! note "See also" User Guide: [Documents](https://documentation.samson-connect.net/users/11.0.0/documents/#) User Guide: [Node types](https://documentation.samson-connect.net/users/11.0.0/node-types/#) User Guide: [Building molecules](https://documentation.samson-connect.net/users/11.0.0/building-molecules/#) ### Moving around Each [`document`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument) has at least one camera ([`SBCamera`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentCamera.md#samson.SBCamera)). A camera provides a 3D view of visualizable objects. Basically, you may consider your screen as a camera pointing into the viewport and yourself as an operator seeing through the camera. Cameras and their positions and properties are saved and loaded together with a document. Caption: Change the active camera’s view using commands ```python SAMSON.runCommand("Top view") ``` Caption: Change the active camera’s view directly via its functionality ```python # get the active camera camera = SAMSON.getActiveCamera() # change the view of the camera camera.topView() ``` Having multiple cameras in a document can be useful if you want to switch quickly between different views (e.g., positions, projections, close-up views, and a full view) in the same document. To switch between cameras in the document: Caption: Change the active camera in a document ```python # get all cameras in the document cameraIndexer = document.getNodes("node.type camera") # make the operation undoable with SAMSON.holding("Change camera"): # change the document's active camera to the first camera in the document SAMSON.getActiveDocument().setActiveCamera(cameraIndexer[0]) ``` You can also access and modify other [`camera`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentCamera.md#samson.SBCamera)’s attributes. See [`SBCamera`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentCamera.md#samson.SBCamera) for more information and examples. !!! note "See also" User Guide: [Camera](https://documentation.samson-connect.net/users/11.0.0/camera/#) [`samson.SBCamera`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentCamera.md#samson.SBCamera) ### Working with nodes Each node has one and only one parent, and possibly some children or references to other nodes. See the following sections to learn how to work with nodes: - [Getting nodes](https://documentation.samson-connect.net/scripting/latest/docs/GettingNodes.md#ps-get-nodes) - [Selecting nodes](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md#ps-selecting) - [Building](https://documentation.samson-connect.net/scripting/latest/docs/Building.md#ps-building) !!! note "See also" User Guide: [Node types](https://documentation.samson-connect.net/users/11.0.0/node-types/#) --- # Importing and exporting Source: https://documentation.samson-connect.net/scripting/latest/docs/ImportingAndExporting.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/ImportingAndExporting.md SAMSON provides an extensive set of importers and exporters by default: [list of formats supported by default in SAMSON](https://documentation.samson-connect.net/users/latest/supported-formats/). !!! note More formats are supported through various extensions, see [SAMSON Connect - Marketplace](https://www.samson-connect.net/extensions). To import a file into SAMSON, use [`SAMSON.importFromFile()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.importFromFile). To export a system from SAMSON into a file, use [`SAMSON.exportToFile()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.exportToFile). Based on the file extension, SAMSON will detect which importer or exporter to use. Some importers and exporters have additional options. If no options are specified in [`SAMSON.importFromFile()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.importFromFile) or [`SAMSON.exportToFile()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.exportToFile), SAMSON may show a dialog asking the user to choose them. Let us for example import a molecule, apply some random perturbations to it, and export the result. In this example, we assume that the active document is empty (i.e., it contains no atoms) before importing a molecule. ```python import numpy as np # import molecule from a file in any supported format, e.g. pdb, xyz, mol2, sam SAMSON.importFromFile('/path/to/molecule.pdb') # get all atoms in the active document atomIndexer = SAMSON.getNodes('node.type atom') # apply some random perturbations to atoms for atom in atomIndexer: atom.setX(atom.getX() + SBQuantity.pm(10.0 * np.random.randn(1))) atom.setY(atom.getY() + SBQuantity.pm(10.0 * np.random.randn(1))) atom.setZ(atom.getZ() + SBQuantity.pm(10.0 * np.random.randn(1))) # export nodes into one of the supported formats, e.g. pdb, xyz, mol2, sam SAMSON.exportToFile(atomIndexer, '/path/to/molecule-modified.pdb') ``` Importers and exporters may have additional options. If you want to import or export using the default options already specified by the user, leave the parameters argument empty when calling [`SAMSON.importFromFile()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.importFromFile) or [`SAMSON.exportToFile()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.exportToFile). !!! note You can supply importer and exporter parameters via a map `SBValueMap`, which you can fill as a dictionary with a string as keys and `SBValue` as values. ```python # import with default options SAMSON.importFromFile('/path/to/molecule.pdb') # get all structural models from the active document nodeIndexer = SAMSON.getNodes('node.type sm') # export with default options SAMSON.exportToFile(nodeIndexer, '/path/to/molecule.pdb') ``` !!! note In [`SAMSON.importFromFile()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.importFromFile), you can also specify a folder into which you would like to import a file. By default, it is imported in the active document. --- # Making operations undoable Source: https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md SAMSON supports **Undo** and **Redo** for many operations. Most functions from the [SAMSON SDK](https://documentation.samson-connect.net/developers/11.0.0/index.html#) that modify the [data graph](https://documentation.samson-connect.net/developers/11.0.0/data-graph/#) can participate in undo/redo. However, simply calling such a function does not automatically make the operation visible in the [History](https://documentation.samson-connect.net/users/11.0.0/history/#). This behavior avoids filling the history with internal or temporary operations, for example when working on nodes that are not part of a document. To perform operations in an undoable way, use the [`SAMSON.holding`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.holding) **context manager**, which automatically turns holding on when entering the block and turns it off when leaving it. Alternatively, you can wrap the code manually using: - [`SAMSON.beginHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.beginHolding) - turns the Undo system on; provide a descriptive name of the action that should be shown in the [History](https://documentation.samson-connect.net/users/11.0.0/history/#), - [`SAMSON.endHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.endHolding) - turns the Undo system off. This makes the operation appear in the [History](https://documentation.samson-connect.net/users/11.0.0/history/#), where you or the user can undo it. Prefer the [`SAMSON.holding`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.holding) context manager because it automatically turns holding off upon exit. This is safer: if your script stops inside the context manager, holding is still cleaned up automatically, whereas a manual [`SAMSON.beginHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.beginHolding) without a matching [`SAMSON.endHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.endHolding) may leave SAMSON in an unwanted holding state. !!! note Wrapping operations that are not undoable by their implementation cannot make them undoable. !!! note Most of the commands executed via [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand) are [undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo) via the internal use of [`SAMSON.beginHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.beginHolding) and [`SAMSON.endHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.endHolding). But for some you might need to call them from within the context manager [`SAMSON.holding`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.holding) (or wrap them into [`SAMSON.beginHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.beginHolding) and [`SAMSON.endHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.endHolding) directly). !!! note "See also" User Guide: [History: Undo and redo](https://documentation.samson-connect.net/users/11.0.0/history/#) SAMSON SDK: [Undo and redo](https://documentation.samson-connect.net/developers/11.0.0/undo-and-redo/#) Examples: Caption: Selecting residues in an undoable way using the [`SAMSON.holding`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.holding) context manager ```python # make the operation undoable with SAMSON.holding('Select residues'): # get a node indexer of all residues in the active document residueIndexer = SAMSON.getNodes('node.type residue') # set selectionFlag to True for residues in the indexer for residue in residueIndexer: residue.selectionFlag = True ``` Caption: Selecting residues in undoable way by wrapping the code in [`SAMSON.beginHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.beginHolding) and [`SAMSON.endHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.endHolding) ```python # begin holding - turn the Undo system on SAMSON.beginHolding('Select residues') # get a node indexer of all residues in the active document residueIndexer = SAMSON.getNodes('node.type residue') # set selectionFlag to True for residues in the indexer for residue in residueIndexer: residue.selectionFlag = True # end holding - turn the Undo system off SAMSON.endHolding() ``` Caption: Renaming the active camera ```python # get the active camera camera = SAMSON.getActiveCamera() # begin holding - turn the Undo system on with SAMSON.holding('Change camera name'): # change the camera name camera.name = "New camera name" ``` When creating nodes not for some temporary use but in documents, it is necessary to make their creation undoable as well. Caption: Make node creation undoable ```python # create an instance of a structural model structuralModel = SBStructuralModel() # make the operation undoable with SAMSON.holding("Add node"): # hold the node to make it creation undoable SAMSON.hold(structuralModel) # create the node structuralModel.create() # add the visual model to the active document SAMSON.getActiveDocument().addChild(structuralModel) ``` !!! note When creating a hierarchy of nodes, e.g. a whole structural model, it is not necessary to call [`SAMSON.hold()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.hold) for each node - you can call it only for the root node, e.g. for the structural model, which will automatically make the creation of its children undoable as well. --- # Selecting nodes Source: https://documentation.samson-connect.net/scripting/latest/docs/Selecting.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md In SAMSON, to do some operations (inspect, edit, move, simulate, etc) with [nodes](https://documentation.samson-connect.net/users/11.0.0/node-types/#) (atoms, residues, molecules) it is necessary to select them. In Python Scripting, you can select nodes in several ways: - [using domain-specific selection actions](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md#ps-select-using-actions), e.g., the ones you can see in the **Select menu**, - [using the Node Specification Language (NSL)](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md#ps-select-using-nsl), - script selections in Python by combining these methods, utilizing the hierarchical information, relations between nodes and other node properties. !!! note "See also" User Guide: [Selecting](https://documentation.samson-connect.net/users/11.0.0/selecting/#) User Guide: [Node types](https://documentation.samson-connect.net/users/11.0.0/node-types/#) User Guide: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#) ### Select using actions You can run actions and commands available in SAMSON by the names shown in the interface (see [Running actions](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md#ps-run-command)). For that, use [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand), which accepts the name of an action, or a hierarchical path to it, and returns whether the action was found and triggered. Caption: Run a SAMSON action ```python # run the 'Receptor' command that selects receptors from the current selection # or from the active document if the current selection is empty if SAMSON.runCommand("Receptors") == False: print("Could not find the command") ``` This also searches for actions within sub-menus of other actions and commands. So, for example, you can run the `Residues > Terminal residues` command as follows: ```python SAMSON.runCommand("Terminal residues") ``` If there is an ambiguity, for example because several actions have the same name, then provide a path with hierarchical levels separated by `>`, for example: `Parent action name > Action name` Caption: Run a SAMSON command that is in a sub-menu ```python SAMSON.runCommand("Residues > Terminal residues") ``` !!! note "See also" [Running actions](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md#ps-run-command) ### Select using NSL SAMSON has a powerful [Node Specification Language (NSL)](https://documentation.samson-connect.net/users/11.0.0/nsl/#) that may be used to select data graph [nodes](https://documentation.samson-connect.net/users/11.0.0/node-types/#) based on their types and other various properties. If you want to select nodes directly from an [NSL](https://documentation.samson-connect.net/users/11.0.0/nsl/#) expression, then you can use the [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand) function to perform selections. For that, supply an [NSL](https://documentation.samson-connect.net/users/11.0.0/nsl/#) expression prefixed with `'nsl: '`, e.g. `'nsl: n.t a'` to select all atoms. Caption: Select using NSL string and runCommand ```python # select receptors and ligands SAMSON.runCommand("nsl: n.c receptor or n.c ligand") ``` !!! note When performing a selection with [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand) and [NSL](https://documentation.samson-connect.net/users/11.0.0/nsl/#), SAMSON will automatically make the selection action [undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo). ### Select via nodes Each [`node`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) has a [`selectionFlag`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.selectionFlag) property that you can modify to make the node selected or not. Caption: Selecting a node ```python # get the first node in the active document node = SAMSON.getActiveDocument().getChildren()[0] # make the operation undoable with SAMSON.holding('Select node'): node.selectionFlag = True ``` Often it is necessary to select nodes based on their hierarchy, attributes, or perform more complex selections. For that, you can use `getNodes` functions that return a node indexer ([`SBNodeIndexer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer), basically a list of nodes) based on the provided [NSL string](https://documentation.samson-connect.net/users/11.0.0/nsl/#): - [`SAMSON.getNodes`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.getNodes) from the [`SAMSON`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#module-samson.SAMSON) interface, returns a node indexer for the active document. - [`SBNode.getNodes`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.getNodes) applied to a specific node, returns a node indexer with nodes descending from this node. ```python # get a node indexer with all nodes in the active document # named "CA" (i.e., alpha Carbons) that are within 5 angstroms of any sulfur atom nodeIndexer = SAMSON.getNodes('"CA" within 5A of S') # make the operation undoable with SAMSON.holding('Select nodes'): # clear the selection in the active document # note: if you want to add to the current selection then don't invoke this function SAMSON.getActiveDocument().clearSelection() # loop over the nodes for node in nodeIndexer: # select nodes by setting the selectionFlag to True for them node.selectionFlag = True ``` Please refer to the [Getting nodes](https://documentation.samson-connect.net/scripting/latest/docs/GettingNodes.md#ps-get-nodes) section for more information and examples. ### Clear selection To clear selection in the active document: ```python # make the operation undoable with SAMSON.holding('Clear selection'): # clear the selection in the active document SAMSON.getActiveDocument().clearSelection() ``` If you are working not with an active document but with another document or some temporary nodes outside of a document then you can use `getNodes` functions with [NSL string](https://documentation.samson-connect.net/users/11.0.0/nsl/#) to obtain only the selected nodes and change their [`selectionFlag`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.selectionFlag) property. Caption: Clear selection flag of nodes ```python # get nodes descendant from a structuralModel node that have selectionFlag set to True nodeIndexer = structuralModel.getNodes('node.selectionFlag true') # loop over the nodes for node in nodeIndexer: # deselect nodes by setting the selectionFlag to False for them node.selectionFlag = False ``` ### Selection examples The example below shows how to select bonds which center lies in between of two planes: `z_min` and `z_max`. If you want to select bonds which center lies on a specific plane, just set `z_min=z_max`. Caption: Select bonds based on the bond center location ```python # get an indexer of all bonds in the active document. # Here we use the Node Specification Language to get only bonds bondIndexer = SAMSON.getNodes('node.type bond') # two planes: 1.5A and 3.5A z_min = SBQuantity.angstrom(1.5) z_max = SBQuantity.angstrom(3.5) # an indexer in which we will be adding the desired bonds selectionIndexer = SBNodeIndexer() # loop over all the bonds for bond in bondIndexer: # get the z-coordinate of the bond's mid point bondMidPointZ = bond.getMidPoint()[2] # check whether the bond lies in between of desired planes if bondMidPointZ >= z_min and bondMidPointZ <= z_max: # Add the bond to the selection indexer. # We can set the selectionFlag to True for the bond here, # but, for the sake of the example, we add the selected bonds in an indexer # which can be used later. selectionIndexer.addNode(bond) # make the operation undoable with SAMSON.holding("Select bonds"): # Clear the selection in the active document SAMSON.getActiveDocument().clearSelection() # loop over the desired bonds for bond in selectionIndexer: # select these bonds by setting the selectionFlag to True for them bond.selectionFlag = True ``` --- # Getting nodes Source: https://documentation.samson-connect.net/scripting/latest/docs/GettingNodes.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/GettingNodes.md Often you need to work on specific nodes, pass them to other functions, or perform more precise selections than the built-in actions provide (see [Selecting nodes](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md#ps-selecting)). For that, you can use the `getNodes` functions, which return a node indexer ([`SBNodeIndexer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer), essentially a list-like collection of nodes) based on a [Node Specification Language (NSL)](https://documentation.samson-connect.net/users/11.0.0/nsl/#) expression: - [`SAMSON.getNodes`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.getNodes) from the [`SAMSON`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#module-samson.SAMSON) interface, returns a node indexer for the active document. - [`SBNode.getNodes`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.getNodes) applied to a specific node, returns a node indexer with nodes descending from this node. !!! note "See also" User Guide: [Node types](https://documentation.samson-connect.net/users/11.0.0/node-types/#) User Guide: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#) Caption: Getting nodes using NSL ```python # get a node indexer with all hydrogens in the active document nodeIndexer1 = SAMSON.getNodes('Hydrogen') # add in this node indexer all carbons in the active document SAMSON.getNodes(nodeIndexer1, 'Carbon') # get a node indexer with all hydrogens bonded to oxygens in the active document nodeIndexer2 = SAMSON.getNodes('H linking O') # get a node indexer with all nodes named "CA" that are within 5 angstrom of any sulfur atom # in the active document nodeIndexer3 = SAMSON.getNodes('"CA" within 5A of S') # get a node indexer with all molecule nodes in the active document nodeIndexer4 = SAMSON.getNodes('node.type molecule') if len(nodeIndexer4): # get a node indexer with all atoms within the first molecule nodeIndexer5 = nodeIndexer4[0].getNodes('node.type atom') # populate a node indexer with all residues within the molecules from nodeIndexer4 nodeIndexer6 = SBNodeIndexer() for node in nodeIndexer4: node.getNodes(nodeIndexer6, 'node.type residue') ``` You can iterate over a node indexer much like a Python list: ```python # get a node indexer with all atoms in the active document nodeIndexer = SAMSON.getNodes('node.type atom') # print the size of the node indexer print(len(nodeIndexer)) if len(nodeIndexer): # prints information on the last node (atom) in the node indexer print(nodeIndexer[-1]) for node in nodeIndexer: # do something, e.g. print info on the node print(node) # usage of list comprehensions: # construct a list of x-coordinates of atoms in nanometers atomXCoords = [atom.getX().nm for atom in nodeIndexer] ``` You can delete or add a node from the indexer, or check if it is present in it: ```python # get a node indexer with all atoms in the active document nodeIndexer = SAMSON.getNodes('node.type atom') if len(nodeIndexer): # get the 1st atom from the node indexer atom = nodeIndexer[0] # remove the atom from the node indexer nodeIndexer.removeNode(atom) # check if the node indexer has the atom print(nodeIndexer.hasNode(atom)) # add atom back to the node indexer nodeIndexer.addNode(atom) ``` The next example shows a simple use of the NSL, node indexers, and how to make changes to node attributes. ```python # get a node indexer with all molecule nodes in the active document moleculeIndexer = SAMSON.getNodes('node.type molecule') if len(moleculeIndexer): # print info on the 1st molecule print(moleculeIndexer[0]) # get atoms that are in this molecule atomIndexer = moleculeIndexer[0].getNodes('node.type atom') if len(atomIndexer): # get the 1st atom in node indexer atom = atomIndexer[0] # print the atom type print(atom.type) # print the atom information print(atom) # return the atom's atomic weight print(atom.atomicWeight) # select the atom: it will be highlighted atom.selectionFlag = True # get the atom's position atom.getPosition() # shift the position of the chosen atom by 100 picometers (pm) in x-direction atom.setX(atom.getX() + SBQuantity.pm(100)) ``` --- # Units Source: https://documentation.samson-connect.net/scripting/latest/docs/Units.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/Units.md In SAMSON, physical quantities are strongly typed. Every physical quantity has associated [Units](https://documentation.samson-connect.net/developers/11.0.0/units/#). !!! note The full list of these units can be seen in the SAMSON SDK: [SBDQuantity](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDQuantity/#). Use these units whenever a function from the SAMSON API expects a quantity with physical units. These units are exposed in the [`samson.SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) sub-module so that you can create quantities, perform arithmetic with them, and pass them directly into SAMSON functions. ```python SBQuantity.picometer(1.20) SBQuantity.pm(1.20) SBQuantity.femtosecond(100.0) SBQuantity.fs(100.0) ``` The [`samson.SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) sub-module contains Python bindings for [SBDQuantity](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDQuantity/#) from SAMSON SDK - it allows you to operate with them, create your own quantities, and do arithmetic operations. Please refer to the [SBQuantity](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#ps-quantity) section for more information and the list of available classes. Python scripting exposes a number of classes that define basic [types](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type.md#ps-type) used in SAMSON, in particular for mathematical operations. ```python # create a position vector in length units pos = SBPosition3(0.0, 1.0, 2.0) # this is the same as pos = SBPhysicalVector3(SBQuantity.position(0.0), SBQuantity.position(1.0), SBQuantity.position(2.0)) # arithmetic operations with numbers, units, and vectors pos /= 2.0 pos * 1.5 # accessing components pos.x # x-component of the vector pos.x = 2 * pos.y pos[0] # x-component of the vector pos.value # components of the vector (read-only) # operations with vectors pos.norm() # returns norm of a vector pos += SBPhysicalVector3(SBQuantity.angstrom(1)) time = SBQuantity.femtosecond(1) # this will create a velocity vector in proper length/time units velocity = pos / time # position in angstroms pos2 = SBPhysicalVector3( SBQuantity.angstrom(1.14), SBQuantity.angstrom(3.14), SBQuantity.angstrom(2.7)) ``` Please refer to the [Type](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type.md#ps-type) section for more information and the list of available classes. - [SBQuantity](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md) - [Examples](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#examples) - [Mathematical functions](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#mathematical-functions) - [Conversion between unit systems](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#conversion-between-unit-systems) - [Unit systems](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#unit-systems) - [Physical constants](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#physical-constants) - [Type](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type.md) - [SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md) - [SBDateTime](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBDateTime.md) - [SBRandom](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBRandom.md) - [SBPhysicalVector3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalVector3.md) - [SBPhysicalVector6](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalVector6.md) - [SBPhysicalInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalInterval.md) - [SBPhysicalIAVector3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalIAVector3.md) - [SBPhysicalMatrix33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalMatrix33.md) - [SBPhysicalMatrix66](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalMatrix66.md) - [SBSpatialDomain](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialDomain.md) - [SBSpatialTransform](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialTransform.md) - [SBUnitCell](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBUnitCell.md) --- # SBQuantity Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md The `samson.SBQuantity` sub-module contains Python bindings for [SBDQuantity](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDQuantity/#) from SAMSON API - it contains all classes related to handling physical units in SAMSON. It allows you to operate with all the possible units from SAMSON API, create your own quantities, and do arithmetic operations on them. The next unit systems are available: - [SI Unit system](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSI.md#ps-unit-si) - [Atomic Units Unit System](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAU.md#ps-unit-au) - [Dalton Unit system](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDalton.md#ps-unit-dalton) - [Electronvolt Unit System](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvolt.md#ps-unit-electronvolt) - [KilocaloriePerMole Unit System](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMole.md#ps-unit-kcalpermol) Each unit system has an according base class and a set of convenience constructors for the most used units (see the description for each unit system). These convenience constructors present each unit in the unit system and their combinations and they internally call the unit system’s base class with proper `SBQuantity` units. In the case if there is no convenience constructor for a quantity in a unit system that you want to use, you can create it using the unit system’s base class by providing exponents and scales or by combining quantities with existing convenience constructors using arithmetic operations. ```python SBQuantity.dimensionless(3.14) SBQuantity.radian(3.14) SBQuantity.picometer(1.20) SBQuantity.pm(1.20) SBQuantity.femtosecond(100.0) SBQuantity.fs(100.0) ``` !!! note For now, unit systems support only the integer-based scales, e.g, SI unit system supports square length but not length to the power of 3/2. !!! note "See also" SAMSON SDK: [The SBDQuantity Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/DataModel/Quantity/#) SAMSON SDK: [SBDQuantity](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDQuantity/#) for the comprehensive list of available physical units. ### Examples To initialize a physical quantity you can use either the full name of the quantity or its short-name. For example, the next two definitions are equivalent: ```python SBQuantity.picometer(1.23) # is the same as SBQuantity.pm(1.23) print(SBQuantity.picometer(1.23) == SBQuantity.pm(1.23)) # True ``` It is possible to initialize quantities based on quantites of the same type, e.g.: ```python SBQuantity.angstrom(SBQuantity.nm(1)) # is the same as SBQuantity.angstrom(10) print(SBQuantity.angstrom(SBQuantity.nm(1)) == SBQuantity.angstrom(10)) # True ``` You can get a floating-point value of quantities in the next way: ```python l = SBQuantity.nanometer(1.2) t = SBQuantity.femtosecond(0.5) # the same using short-names: l = SBQuantity.nm(1.2) t = SBQuantity.fs(0.5) # get floating-point value l.value t.value SBQuantity.momentOfInertia(3.5).value ``` You can convert them to another quantity, like this: ```python l.picometer t.second # the same using short-names l.pm t.s SBQuantity.force(1.0).nN # force in nano Newtons ``` Arithmetic operations can be used with quantities, for example: ```python SBQuantity.nanometer(1.2) / SBQuantity.femtosecond(0.5) # equal to SBQuantity.picometerPerSecond(0.6) # or using short-names: SBQuantity.nm(1.2) / SBQuantity.fs(0.5) # equal to SBQuantity.pmPerS(0.6) ``` ### Mathematical functions The `samson.SBQuantity` module also provides a set of mathematical functions that can be used with quantities: - [Mathematical functions](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md) - [Mathematical functions for dimensionless SI units](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#mathematical-functions-for-dimensionless-si-units) - [`exp()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.exp) - [`log()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.log) - [`sin()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.sin) - [`asin()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.asin) - [`cos()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.cos) - [`acos()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.acos) - [`tan()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.tan) - [`atan()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.atan) - [Mathematical functions for all unit systems](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#mathematical-functions-for-all-unit-systems) - [`fabs()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.fabs) - [`floor()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.floor) - [`ceil()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.ceil) - [`round()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.round) - [`trunc()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.trunc) - [`sqrt()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.sqrt) - [`pow()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.pow) - [`root()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.root) - [`atan2()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md#samson.SBQuantity.atan2) ### Conversion between unit systems An `SBQuantity` object in each unit system has attributes that provide the possibility of converting it into an appropriate `SBQuantity` object in another unit systems, if possible. ```python # energy in the SI units energy = SBQuantity.energy(1.2) # conversion to eV in the Electronvolt Unit System print(energy.eV) # mass in SI units mass = SBQuantity.yoctogram(12) # from yoctogram to dalton (or using short names: mass.Da) mass_in_dalton = mass.dalton # from yoctogram to auMass mass_in_au = mass.auMass # energy in SI units energy = SBQuantity.kilojoule(13) # from joule to joulePerMole (or using short names: energy.JPerMol) energy_in_JPerMol = energy.joulePerMole # from joule to electronvolt (or using short-names: energy.eV) energy_in_eV = energy.electronvolt # from joule to kilocaloriePerMole (or using short-names: energy.kcalPerMol) energy_in_kcalPerMol = energy.kilocaloriePerMole # from joule to hartree (or using short-names: energy.Eh) energy_in_hartree = energy.hartree ``` The following conversions are defined: - [`samson.SBQuantity.mass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.mass) ↔ [`samson.SBQuantity.dalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.dalton) - [`samson.SBQuantity.mass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.mass) ↔ [`samson.SBQuantity.electronMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.electronMass) - [`samson.SBQuantity.dalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.dalton) ↔ [`samson.SBQuantity.kilogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kilogram) - [`samson.SBQuantity.dalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.dalton) ↔ [`samson.SBQuantity.gram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.gram) - [`samson.SBQuantity.dalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.dalton) ↔ [`samson.SBQuantity.yoctogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yoctogram) - [`samson.SBQuantity.electronMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.electronMass) ↔ [`samson.SBQuantity.dalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.dalton) - [`samson.SBQuantity.electronMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.electronMass) ↔ [`samson.SBQuantity.kilogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kilogram) - [`samson.SBQuantity.electronMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.electronMass) ↔ [`samson.SBQuantity.gram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.gram) - [`samson.SBQuantity.electronMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.electronMass) ↔ [`samson.SBQuantity.yoctogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yoctogram) - [`samson.SBQuantity.bohr`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.bohr) ↔ [`samson.SBQuantity.length`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.length) - [`samson.SBQuantity.bohr`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.bohr) ↔ [`samson.SBQuantity.meter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.meter) - [`samson.SBQuantity.bohr`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.bohr) ↔ [`samson.SBQuantity.nanometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nanometer) - [`samson.SBQuantity.bohr`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.bohr) ↔ [`samson.SBQuantity.picometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.picometer) - [`samson.SBQuantity.coulomb`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.coulomb) ↔ [`samson.SBQuantity.electronCharge`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.electronCharge) - [`samson.SBQuantity.auTime`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auTime) ↔ [`samson.SBQuantity.time`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.time) - [`samson.SBQuantity.auTime`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auTime) ↔ [`samson.SBQuantity.second`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.second) - [`samson.SBQuantity.auTime`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auTime) ↔ [`samson.SBQuantity.femtosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.femtosecond) - [`samson.SBQuantity.joule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.joule) ↔ [`samson.SBQuantity.joulePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.joulePerMole) - [`samson.SBQuantity.joule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.joule) ↔ [`samson.SBQuantity.hartree`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.hartree) - [`samson.SBQuantity.joulePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.joulePerMole) ↔ [`samson.SBQuantity.hartree`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.hartree) - [`samson.SBQuantity.joule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.joule) ↔ [`samson.SBQuantity.electronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md#samson.SBQuantity.electronvolt) - [`samson.SBQuantity.electronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md#samson.SBQuantity.electronvolt) ↔ [`samson.SBQuantity.kilojoule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kilojoule) - [`samson.SBQuantity.electronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md#samson.SBQuantity.electronvolt) ↔ [`samson.SBQuantity.zeptojoule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zeptojoule) - [`samson.SBQuantity.joulePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.joulePerMole) ↔ [`samson.SBQuantity.electronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md#samson.SBQuantity.electronvolt) - [`samson.SBQuantity.joule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.joule) ↔ [`samson.SBQuantity.kilocaloriePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.md#samson.SBQuantity.kilocaloriePerMole) - [`samson.SBQuantity.joulePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.joulePerMole) ↔ [`samson.SBQuantity.kilocaloriePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.md#samson.SBQuantity.kilocaloriePerMole) - [`samson.SBQuantity.hartree`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.hartree) ↔ [`samson.SBQuantity.electronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md#samson.SBQuantity.electronvolt) - [`samson.SBQuantity.hartree`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.hartree) ↔ [`samson.SBQuantity.kilocaloriePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.md#samson.SBQuantity.kilocaloriePerMole) - [`samson.SBQuantity.electronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md#samson.SBQuantity.electronvolt) ↔ [`samson.SBQuantity.kilocaloriePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.md#samson.SBQuantity.kilocaloriePerMole) ### Unit systems This module provides the possibility to operate with quantities in the following unit systems: - [SI Unit system](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSI.md) - [unitsSI](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md) - [`unitsSI`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI) - [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md) - [Dimensionless quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#dimensionless-quantities) - [Length](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#length) - [Mass](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#mass) - [Time](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#time) - [Intensity (Ampere)](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#intensity-ampere) - [Temperature](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#temperature) - [Amount of substance](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#amount-of-substance) - [Luminous intensity](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#luminous-intensity) - [Base quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#base-quantities) - [Derived quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#derived-quantities) - [Common derived quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#common-derived-quantities) - [Common velocity quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#common-velocity-quantities) - [Common acceleration quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#common-acceleration-quantities) - [Common momentum quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#common-momentum-quantities) - [Common momentum of inertia quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#common-momentum-of-inertia-quantities) - [Common force quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#common-force-quantities) - [Atomic Units Unit System](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAU.md) - [unitsAU](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md) - [`unitsAU`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU) - [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md) - [`electronMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.electronMass) - [`auMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auMass) - [`me`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.me) - [`electronCharge`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.electronCharge) - [`auCharge`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auCharge) - [`e`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.e) - [`auAction`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auAction) - [`hBar`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.hBar) - [`auCoulombConstant`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auCoulombConstant) - [`ec`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.ec) - [`auTime`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auTime) - [`bohr`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.bohr) - [`a0`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.a0) - [`hartree`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.hartree) - [`Eh`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.Eh) - [Dalton Unit system](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDalton.md) - [unitsDalton](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md) - [`unitsDalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton) - [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md) - [`unifiedAtomicMassUnit`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.unifiedAtomicMassUnit) - [`u`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.u) - [`gigadalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.gigadalton) - [`megadalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.megadalton) - [`kilodalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.kilodalton) - [`dalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.dalton) - [`GDa`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.GDa) - [`MDa`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.MDa) - [`kDa`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.kDa) - [`Da`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.Da) - [Electronvolt Unit System](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvolt.md) - [unitsElectronvolt](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md) - [`unitsElectronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt) - [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md) - [`electronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md#samson.SBQuantity.electronvolt) - [`eV`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md#samson.SBQuantity.eV) - [KilocaloriePerMole Unit System](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMole.md) - [unitsKilocaloriePerMole](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md) - [`unitsKilocaloriePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole) - [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.md) - [`kilocaloriePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.md#samson.SBQuantity.kilocaloriePerMole) - [`kcalPerMol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.md#samson.SBQuantity.kcalPerMol) See the list of all available units: - [List of defined quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsListOfDefinedQuantityTypes.md) - [SI units (International System of Units)](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsListOfDefinedQuantityTypes.md#si-units-international-system-of-units) - [Atomic Units](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsListOfDefinedQuantityTypes.md#atomic-units) - [Dalton Units](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsListOfDefinedQuantityTypes.md#dalton-units) - [Electronvolt Units](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsListOfDefinedQuantityTypes.md#electronvolt-units) - [KilocaloriePerMole Units](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsListOfDefinedQuantityTypes.md#kilocaloriepermole-units) ### Physical constants - [SBConstant](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/SBConstant.md) - [`SBConstant`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/SBConstant.md#samson.SBConstant) --- # Mathematical functions Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsMathFunctions.md The [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) module also provides a set of mathematical functions that can be used with quantities: ```python SBQuantity.exp(SBQuantity.dimensionless(2.2)) SBQuantity.sin(SBQuantity.radian(3.14)) SBQuantity.fabs(SBQuantity.position(-1.2)) SBQuantity.ceil(SBQuantity.energy(12.25)) ``` Below is the list of all mathematical functions applicable to quantities. ### Mathematical functions for dimensionless SI units The mathematical operations listed below are only for dimensionless SI units. ## API Reference ##### Function `samson.SBQuantity.exp` Signature: `samson.SBQuantity.exp(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI` Returns the exponential of physical quantity *q* (for dimensionless physical quantities only) ##### Function `samson.SBQuantity.log` Signature: `samson.SBQuantity.log(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI` Returns the logarithm of physical quantity *q* (for dimensionless physical quantities only) ##### Function `samson.SBQuantity.sin` Signature: `samson.SBQuantity.sin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI` Returns the sin of physical quantity *q* (for dimensionless physical quantities only) ##### Function `samson.SBQuantity.asin` Signature: `samson.SBQuantity.asin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI` Returns the asin of physical quantity *q* (for dimensionless physical quantities only) ##### Function `samson.SBQuantity.cos` Signature: `samson.SBQuantity.cos(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI` Returns the cos of physical quantity *q* (for dimensionless physical quantities only) ##### Function `samson.SBQuantity.acos` Signature: `samson.SBQuantity.acos(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI` Returns the acos of physical quantity *q* (for dimensionless physical quantities only) ##### Function `samson.SBQuantity.tan` Signature: `samson.SBQuantity.tan(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI` Returns the tan of physical quantity *q* (for dimensionless physical quantities only) ##### Function `samson.SBQuantity.atan` Signature: `samson.SBQuantity.atan(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI` Returns the atan of physical quantity *q* (for dimensionless physical quantities only) ### Mathematical functions for all unit systems The mathematical operations listed below are available for all units, including SI units. ##### Function `samson.SBQuantity.fabs` Signature: `samson.SBQuantity.fabs(*args, **kwargs)` Overloaded function. 1. fabs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Returns the absolute value of physical quantity *q* 2. fabs(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Returns the absolute value of physical quantity *q* 3. fabs(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Returns the absolute value of physical quantity *q* 4. fabs(q: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt Returns the absolute value of physical quantity *q* 5. fabs(q: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole Returns the absolute value of physical quantity *q* ##### Function `samson.SBQuantity.floor` Signature: `samson.SBQuantity.floor(*args, **kwargs)` Overloaded function. 1. floor(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Returns the floor value of physical quantity *q* 2. floor(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Returns the floor value of physical quantity *q* 3. floor(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Returns the floor value of physical quantity *q* 4. floor(q: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt Returns the floor value of physical quantity *q* 5. floor(q: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole Returns the floor value of physical quantity *q* ##### Function `samson.SBQuantity.ceil` Signature: `samson.SBQuantity.ceil(*args, **kwargs)` Overloaded function. 1. ceil(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Returns the ceil value of physical quantity *q* 2. ceil(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Returns the ceil value of physical quantity *q* 3. ceil(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Returns the ceil value of physical quantity *q* 4. ceil(q: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt Returns the ceil value of physical quantity *q* 5. ceil(q: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole Returns the ceil value of physical quantity *q* ##### Function `samson.SBQuantity.round` Signature: `samson.SBQuantity.round(*args, **kwargs)` Overloaded function. 1. round(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Returns the round value of physical quantity *q* 2. round(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Returns the round value of physical quantity *q* 3. round(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Returns the round value of physical quantity *q* 4. round(q: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt Returns the round value of physical quantity *q* 5. round(q: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole Returns the round value of physical quantity *q* ##### Function `samson.SBQuantity.trunc` Signature: `samson.SBQuantity.trunc(*args, **kwargs)` Overloaded function. 1. trunc(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Returns the trunc value of physical quantity *q* 2. trunc(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Returns the trunc value of physical quantity *q* 3. trunc(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Returns the trunc value of physical quantity *q* 4. trunc(q: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt Returns the trunc value of physical quantity *q* 5. trunc(q: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole Returns the trunc value of physical quantity *q* ##### Function `samson.SBQuantity.sqrt` Signature: `samson.SBQuantity.sqrt(*args, **kwargs)` Overloaded function. 1. sqrt(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Returns the square root of physical quantity *q* 2. sqrt(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Returns the square root of physical quantity *q* 3. sqrt(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Returns the square root of physical quantity *q* 4. sqrt(q: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt Returns the square root of physical quantity *q* 5. sqrt(q: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole Returns the square root of physical quantity *q* ##### Function `samson.SBQuantity.pow` Signature: `samson.SBQuantity.pow(*args, **kwargs)` Overloaded function. 1. pow(q: samson.SBQuantity.unitsSI, p: int) -> samson.SBQuantity.unitsSI Returns the *p*-th power of physical quantity *q* 2. pow(q: samson.SBQuantity.unitsAU, p: int) -> samson.SBQuantity.unitsAU Returns the *p*-th power of physical quantity *q* 3. pow(q: samson.SBQuantity.unitsDalton, p: int) -> samson.SBQuantity.unitsDalton Returns the *p*-th power of physical quantity *q* 4. pow(q: samson.SBQuantity.unitsElectronvolt, p: int) -> samson.SBQuantity.unitsElectronvolt Returns the *p*-th power of physical quantity *q* 5. pow(q: samson.SBQuantity.unitsKilocaloriePerMole, p: int) -> samson.SBQuantity.unitsKilocaloriePerMole Returns the *p*-th power of physical quantity *q* ##### Function `samson.SBQuantity.root` Signature: `samson.SBQuantity.root(*args, **kwargs)` Overloaded function. 1. root(q: samson.SBQuantity.unitsSI, p: int) -> samson.SBQuantity.unitsSI Returns the *p*-th root of physical quantity *q* 2. root(q: samson.SBQuantity.unitsAU, p: int) -> samson.SBQuantity.unitsAU Returns the *p*-th root of physical quantity *q* 3. root(q: samson.SBQuantity.unitsDalton, p: int) -> samson.SBQuantity.unitsDalton Returns the *p*-th root of physical quantity *q* 4. root(q: samson.SBQuantity.unitsElectronvolt, p: int) -> samson.SBQuantity.unitsElectronvolt Returns the *p*-th root of physical quantity *q* 5. root(q: samson.SBQuantity.unitsKilocaloriePerMole, p: int) -> samson.SBQuantity.unitsKilocaloriePerMole Returns the *p*-th root of physical quantity *q* ##### Function `samson.SBQuantity.atan2` Signature: `samson.SBQuantity.atan2(*args, **kwargs)` Overloaded function. 1. atan2(a: samson.SBQuantity.unitsSI, b: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Returns the atan2 of physical quantities *a* and *b* 2. atan2(a: samson.SBQuantity.unitsSI, b: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Returns the atan2 of physical quantities *a* and *b* 3. atan2(a: samson.SBQuantity.unitsSI, b: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Returns the atan2 of physical quantities *a* and *b* 4. atan2(a: samson.SBQuantity.unitsSI, b: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Returns the atan2 of physical quantities *a* and *b* 5. atan2(a: samson.SBQuantity.unitsSI, b: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Returns the atan2 of physical quantities *a* and *b* --- # SI Unit system Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSI.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSI.md You can check out this unit system’s functions in its base class: - [unitsSI](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md) - [`unitsSI`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI) - [`unitsSI.__add__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__add__) - [`unitsSI.__eq__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__eq__) - [`unitsSI.__ge__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__ge__) - [`unitsSI.__gt__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__gt__) - [`unitsSI.__iadd__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__iadd__) - [`unitsSI.__imul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__imul__) - [`unitsSI.__isub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__isub__) - [`unitsSI.__itruediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__itruediv__) - [`unitsSI.__le__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__le__) - [`unitsSI.__lt__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__lt__) - [`unitsSI.__mul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__mul__) - [`unitsSI.__ne__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__ne__) - [`unitsSI.__neg__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__neg__) - [`unitsSI.__radd__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__radd__) - [`unitsSI.__rmul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__rmul__) - [`unitsSI.__rsub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__rsub__) - [`unitsSI.__rtruediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__rtruediv__) - [`unitsSI.__sub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__sub__) - [`unitsSI.__truediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.__truediv__) - [`unitsSI.fromLinearInterpolation()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.fromLinearInterpolation) - [`unitsSI.setZero()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.setZero) - [`unitsSI.str()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.str) - [`unitsSI.toDebugString()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.toDebugString) - [`unitsSI.A`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.A) - [`unitsSI.Da`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.Da) - [`unitsSI.Eh`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.Eh) - [`unitsSI.GHz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.GHz) - [`unitsSI.Hz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.Hz) - [`unitsSI.J`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.J) - [`unitsSI.JPerMol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.JPerMol) - [`unitsSI.JPerMolToEh`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.JPerMolToEh) - [`unitsSI.JPerMolToeV`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.JPerMolToeV) - [`unitsSI.JperMolTokcalPerMol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.JperMolTokcalPerMol) - [`unitsSI.K`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.K) - [`unitsSI.MHz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.MHz) - [`unitsSI.N`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.N) - [`unitsSI.a0`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.a0) - [`unitsSI.aA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.aA) - [`unitsSI.aK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.aK) - [`unitsSI.acd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.acd) - [`unitsSI.ag`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ag) - [`unitsSI.am`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.am) - [`unitsSI.amol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.amol) - [`unitsSI.ampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ampere) - [`unitsSI.angstrom`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.angstrom) - [`unitsSI.as`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.as) - [`unitsSI.attoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.attoampere) - [`unitsSI.attocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.attocandela) - [`unitsSI.attogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.attogram) - [`unitsSI.attokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.attokelvin) - [`unitsSI.attometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.attometer) - [`unitsSI.attomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.attomole) - [`unitsSI.attosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.attosecond) - [`unitsSI.auAction`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.auAction) - [`unitsSI.auCharge`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.auCharge) - [`unitsSI.auMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.auMass) - [`unitsSI.auTime`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.auTime) - [`unitsSI.bohr`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.bohr) - [`unitsSI.cA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.cA) - [`unitsSI.cK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.cK) - [`unitsSI.candela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.candela) - [`unitsSI.ccd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ccd) - [`unitsSI.cd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.cd) - [`unitsSI.centiampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.centiampere) - [`unitsSI.centicandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.centicandela) - [`unitsSI.centigram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.centigram) - [`unitsSI.centikelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.centikelvin) - [`unitsSI.centimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.centimeter) - [`unitsSI.centimole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.centimole) - [`unitsSI.centisecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.centisecond) - [`unitsSI.cg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.cg) - [`unitsSI.cm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.cm) - [`unitsSI.cmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.cmol) - [`unitsSI.cs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.cs) - [`unitsSI.dA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.dA) - [`unitsSI.dK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.dK) - [`unitsSI.daA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.daA) - [`unitsSI.daK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.daK) - [`unitsSI.dacd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.dacd) - [`unitsSI.dag`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.dag) - [`unitsSI.dalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.dalton) - [`unitsSI.dam`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.dam) - [`unitsSI.damol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.damol) - [`unitsSI.dcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.dcd) - [`unitsSI.decaampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.decaampere) - [`unitsSI.decacandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.decacandela) - [`unitsSI.decagram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.decagram) - [`unitsSI.decakelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.decakelvin) - [`unitsSI.decameter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.decameter) - [`unitsSI.decamole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.decamole) - [`unitsSI.deciampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.deciampere) - [`unitsSI.decicandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.decicandela) - [`unitsSI.decigram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.decigram) - [`unitsSI.decikelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.decikelvin) - [`unitsSI.decimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.decimeter) - [`unitsSI.decimole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.decimole) - [`unitsSI.decisecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.decisecond) - [`unitsSI.dg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.dg) - [`unitsSI.dm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.dm) - [`unitsSI.dmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.dmol) - [`unitsSI.ds`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ds) - [`unitsSI.eV`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.eV) - [`unitsSI.electronCharge`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.electronCharge) - [`unitsSI.electronMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.electronMass) - [`unitsSI.electronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.electronvolt) - [`unitsSI.fA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.fA) - [`unitsSI.fK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.fK) - [`unitsSI.fcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.fcd) - [`unitsSI.femtoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.femtoampere) - [`unitsSI.femtocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.femtocandela) - [`unitsSI.femtogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.femtogram) - [`unitsSI.femtokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.femtokelvin) - [`unitsSI.femtometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.femtometer) - [`unitsSI.femtomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.femtomole) - [`unitsSI.femtosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.femtosecond) - [`unitsSI.fg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.fg) - [`unitsSI.fm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.fm) - [`unitsSI.fmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.fmol) - [`unitsSI.fs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.fs) - [`unitsSI.g`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.g) - [`unitsSI.gigahertz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.gigahertz) - [`unitsSI.gram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.gram) - [`unitsSI.hA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hA) - [`unitsSI.hBar`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hBar) - [`unitsSI.hK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hK) - [`unitsSI.hartree`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hartree) - [`unitsSI.hcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hcd) - [`unitsSI.hectoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hectoampere) - [`unitsSI.hectocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hectocandela) - [`unitsSI.hectogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hectogram) - [`unitsSI.hectokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hectokelvin) - [`unitsSI.hectometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hectometer) - [`unitsSI.hectomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hectomole) - [`unitsSI.hertz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hertz) - [`unitsSI.hg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hg) - [`unitsSI.hm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hm) - [`unitsSI.hmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.hmol) - [`unitsSI.isDimensionless`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.isDimensionless) - [`unitsSI.joule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.joule) - [`unitsSI.joulePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.joulePerMole) - [`unitsSI.joulePerMoleToElectronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.joulePerMoleToElectronvolt) - [`unitsSI.joulePerMoleToHartree`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.joulePerMoleToHartree) - [`unitsSI.joulePerMoleToKilocaloriePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.joulePerMoleToKilocaloriePerMole) - [`unitsSI.kA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kA) - [`unitsSI.kHz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kHz) - [`unitsSI.kJ`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kJ) - [`unitsSI.kK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kK) - [`unitsSI.kcalPerMol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kcalPerMol) - [`unitsSI.kcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kcd) - [`unitsSI.kelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kelvin) - [`unitsSI.kg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kg) - [`unitsSI.kiloampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kiloampere) - [`unitsSI.kilocaloriePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kilocaloriePerMole) - [`unitsSI.kilocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kilocandela) - [`unitsSI.kilogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kilogram) - [`unitsSI.kilohertz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kilohertz) - [`unitsSI.kilojoule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kilojoule) - [`unitsSI.kilokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kilokelvin) - [`unitsSI.kilometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kilometer) - [`unitsSI.kilomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kilomole) - [`unitsSI.km`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.km) - [`unitsSI.kmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.kmol) - [`unitsSI.m`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.m) - [`unitsSI.mA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.mA) - [`unitsSI.mK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.mK) - [`unitsSI.mcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.mcd) - [`unitsSI.megahertz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.megahertz) - [`unitsSI.meter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.meter) - [`unitsSI.mg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.mg) - [`unitsSI.microampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.microampere) - [`unitsSI.microcandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.microcandela) - [`unitsSI.microgram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.microgram) - [`unitsSI.microkelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.microkelvin) - [`unitsSI.micrometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.micrometer) - [`unitsSI.micromole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.micromole) - [`unitsSI.microsecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.microsecond) - [`unitsSI.milliampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.milliampere) - [`unitsSI.millicandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.millicandela) - [`unitsSI.milligram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.milligram) - [`unitsSI.millikelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.millikelvin) - [`unitsSI.millimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.millimeter) - [`unitsSI.millimole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.millimole) - [`unitsSI.millisecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.millisecond) - [`unitsSI.mm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.mm) - [`unitsSI.mmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.mmol) - [`unitsSI.mol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.mol) - [`unitsSI.mole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.mole) - [`unitsSI.ms`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ms) - [`unitsSI.nA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nA) - [`unitsSI.nK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nK) - [`unitsSI.nN`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nN) - [`unitsSI.nanoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nanoampere) - [`unitsSI.nanocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nanocandela) - [`unitsSI.nanogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nanogram) - [`unitsSI.nanokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nanokelvin) - [`unitsSI.nanometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nanometer) - [`unitsSI.nanomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nanomole) - [`unitsSI.nanonewton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nanonewton) - [`unitsSI.nanosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nanosecond) - [`unitsSI.ncd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ncd) - [`unitsSI.newton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.newton) - [`unitsSI.ng`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ng) - [`unitsSI.nm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nm) - [`unitsSI.nmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.nmol) - [`unitsSI.ns`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ns) - [`unitsSI.pA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.pA) - [`unitsSI.pK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.pK) - [`unitsSI.pN`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.pN) - [`unitsSI.pcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.pcd) - [`unitsSI.pg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.pg) - [`unitsSI.picoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.picoampere) - [`unitsSI.picocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.picocandela) - [`unitsSI.picogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.picogram) - [`unitsSI.picokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.picokelvin) - [`unitsSI.picometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.picometer) - [`unitsSI.picomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.picomole) - [`unitsSI.piconewton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.piconewton) - [`unitsSI.picosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.picosecond) - [`unitsSI.pm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.pm) - [`unitsSI.pmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.pmol) - [`unitsSI.ps`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ps) - [`unitsSI.s`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.s) - [`unitsSI.second`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.second) - [`unitsSI.sizeOfUnitSystem`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.sizeOfUnitSystem) - [`unitsSI.uA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.uA) - [`unitsSI.uK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.uK) - [`unitsSI.ucd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ucd) - [`unitsSI.ug`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ug) - [`unitsSI.um`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.um) - [`unitsSI.umol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.umol) - [`unitsSI.us`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.us) - [`unitsSI.value`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.value) - [`unitsSI.yA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.yA) - [`unitsSI.yK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.yK) - [`unitsSI.ycd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ycd) - [`unitsSI.yg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.yg) - [`unitsSI.ym`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ym) - [`unitsSI.ymol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ymol) - [`unitsSI.yoctoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.yoctoampere) - [`unitsSI.yoctocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.yoctocandela) - [`unitsSI.yoctogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.yoctogram) - [`unitsSI.yoctokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.yoctokelvin) - [`unitsSI.yoctometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.yoctometer) - [`unitsSI.yoctomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.yoctomole) - [`unitsSI.yoctosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.yoctosecond) - [`unitsSI.ys`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.ys) - [`unitsSI.zA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zA) - [`unitsSI.zJ`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zJ) - [`unitsSI.zK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zK) - [`unitsSI.zcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zcd) - [`unitsSI.zeptoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zeptoampere) - [`unitsSI.zeptocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zeptocandela) - [`unitsSI.zeptogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zeptogram) - [`unitsSI.zeptojoule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zeptojoule) - [`unitsSI.zeptokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zeptokelvin) - [`unitsSI.zeptometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zeptometer) - [`unitsSI.zeptomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zeptomole) - [`unitsSI.zeptosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zeptosecond) - [`unitsSI.zg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zg) - [`unitsSI.zm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zm) - [`unitsSI.zmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zmol) - [`unitsSI.zs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI.zs) There are multiple convenience constructors available for the commonly used units. These convenience constructors internally call the unit system’s base class with proper units. In the case if there is no convenience constructor for a quantity in this unit system that you want to use, you can create it using the base class by providing exponents and scales or by combining quantities with existing convenience constructors using arithmetic operations. ```python SBQuantity.picometer(1.20) SBQuantity.pm(1.20) SBQuantity.femtosecond(100.0) SBQuantity.fs(100.0) ``` - [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md) - [Dimensionless quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#dimensionless-quantities) - [`dimensionless`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.dimensionless) - [`radian`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.radian) - [`rad`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.rad) - [`degree`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.degree) - [`deg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.deg) - [`steradian`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.steradian) - [`sr`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.sr) - [Length](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#length) - [`kilometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kilometer) - [`hectometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hectometer) - [`decameter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.decameter) - [`meter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.meter) - [`decimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.decimeter) - [`centimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.centimeter) - [`millimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.millimeter) - [`micrometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.micrometer) - [`nanometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nanometer) - [`angstrom`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.angstrom) - [`picometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.picometer) - [`femtometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.femtometer) - [`attometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.attometer) - [`zeptometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zeptometer) - [`yoctometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yoctometer) - [`km`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.km) - [`hm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hm) - [`dam`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.dam) - [`m`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.m) - [`dm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.dm) - [`cm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cm) - [`mm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.mm) - [`um`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.um) - [`nm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nm) - [`pm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.pm) - [`fm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.fm) - [`am`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.am) - [`zm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zm) - [`ym`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ym) - [`inverseKilometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseKilometer) - [`inverseHectometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseHectometer) - [`inverseDecameter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseDecameter) - [`inverseMeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMeter) - [`inverseDecimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseDecimeter) - [`inverseCentimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCentimeter) - [`inverseMillimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMillimeter) - [`inverseMicrometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMicrometer) - [`inverseNanometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseNanometer) - [`inverseAngstrom`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseAngstrom) - [`inversePicometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inversePicometer) - [`inverseFemtometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseFemtometer) - [`inverseAttometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseAttometer) - [`inverseZeptometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseZeptometer) - [`inverseYoctometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseYoctometer) - [`inverseKm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseKm) - [`inverseHm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseHm) - [`inverseDam`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseDam) - [`inverseM`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseM) - [`inverseDm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseDm) - [`inverseCm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCm) - [`inverseMm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMm) - [`inverseUm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseUm) - [`inverseNm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseNm) - [`inversePm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inversePm) - [`inverseFm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseFm) - [`inverseAm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseAm) - [`inverseZm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseZm) - [`inverseYm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseYm) - [`squareKilometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareKilometer) - [`squareHectometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareHectometer) - [`squareDecameter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareDecameter) - [`squareMeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareMeter) - [`squareDecimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareDecimeter) - [`squareCentimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareCentimeter) - [`squareMillimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareMillimeter) - [`squareMicrometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareMicrometer) - [`squareNanometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareNanometer) - [`squareAngstrom`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareAngstrom) - [`squarePicometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squarePicometer) - [`squareFemtometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareFemtometer) - [`squareAttometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareAttometer) - [`squareZeptometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareZeptometer) - [`squareYoctometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareYoctometer) - [`squareKm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareKm) - [`squareHm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareHm) - [`squareDam`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareDam) - [`squareM`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareM) - [`squareDm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareDm) - [`squareCm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareCm) - [`squareMm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareMm) - [`squareUm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareUm) - [`squareNm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareNm) - [`squarePm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squarePm) - [`squareFm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareFm) - [`squareAm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareAm) - [`squareZm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareZm) - [`squareYm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareYm) - [`inverseSquareKilometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareKilometer) - [`inverseSquareHectometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareHectometer) - [`inverseSquareDecameter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareDecameter) - [`inverseSquareMeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareMeter) - [`inverseSquareDecimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareDecimeter) - [`inverseSquareCentimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareCentimeter) - [`inverseSquareMillimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareMillimeter) - [`inverseSquareMicrometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareMicrometer) - [`inverseSquareNanometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareNanometer) - [`inverseSquareAngstrom`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareAngstrom) - [`inverseSquarePicometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquarePicometer) - [`inverseSquareFemtometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareFemtometer) - [`inverseSquareAttometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareAttometer) - [`inverseSquareZeptometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareZeptometer) - [`inverseSquareYoctometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareYoctometer) - [`inverseSquareKm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareKm) - [`inverseSquareHm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareHm) - [`inverseSquareDam`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareDam) - [`inverseSquareM`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareM) - [`inverseSquareDm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareDm) - [`inverseSquareCm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareCm) - [`inverseSquareMm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareMm) - [`inverseSquareUm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareUm) - [`inverseSquareNm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareNm) - [`inverseSquarePm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquarePm) - [`inverseSquareFm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareFm) - [`inverseSquareAm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareAm) - [`inverseSquareZm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareZm) - [`inverseSquareYm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareYm) - [`cubicKilometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicKilometer) - [`cubicHectometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicHectometer) - [`cubicDecameter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicDecameter) - [`cubicMeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicMeter) - [`cubicDecimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicDecimeter) - [`cubicCentimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicCentimeter) - [`cubicMillimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicMillimeter) - [`cubicMicrometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicMicrometer) - [`cubicNanometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicNanometer) - [`cubicAngstrom`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicAngstrom) - [`cubicPicometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicPicometer) - [`cubicFemtometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicFemtometer) - [`cubicAttometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicAttometer) - [`cubicZeptometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicZeptometer) - [`cubicYoctometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicYoctometer) - [`cubicKm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicKm) - [`cubicHm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicHm) - [`cubicDam`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicDam) - [`cubicM`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicM) - [`cubicDm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicDm) - [`cubicCm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicCm) - [`cubicMm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicMm) - [`cubicUm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicUm) - [`cubicNm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicNm) - [`cubicPm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicPm) - [`cubicFm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicFm) - [`cubicAm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicAm) - [`cubicZm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicZm) - [`cubicYm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicYm) - [`inverseCubicKilometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicKilometer) - [`inverseCubicHectometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicHectometer) - [`inverseCubicDecameter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicDecameter) - [`inverseCubicMeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicMeter) - [`inverseCubicDecimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicDecimeter) - [`inverseCubicCentimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicCentimeter) - [`inverseCubicMillimeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicMillimeter) - [`inverseCubicMicrometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicMicrometer) - [`inverseCubicNanometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicNanometer) - [`inverseCubicAngstrom`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicAngstrom) - [`inverseCubicPicometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicPicometer) - [`inverseCubicFemtometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicFemtometer) - [`inverseCubicAttometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicAttometer) - [`inverseCubicZeptometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicZeptometer) - [`inverseCubicYoctometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicYoctometer) - [`inverseCubicKm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicKm) - [`inverseCubicHm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicHm) - [`inverseCubicDam`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicDam) - [`inverseCubicM`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicM) - [`inverseCubicDm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicDm) - [`inverseCubicCm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicCm) - [`inverseCubicMm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicMm) - [`inverseCubicUm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicUm) - [`inverseCubicNm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicNm) - [`inverseCubicPm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicPm) - [`inverseCubicFm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicFm) - [`inverseCubicAm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicAm) - [`inverseCubicZm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicZm) - [`inverseCubicYm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicYm) - [`fermi`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.fermi) - [`micron`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.micron) - [Mass](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#mass) - [`kilogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kilogram) - [`hectogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hectogram) - [`decagram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.decagram) - [`gram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.gram) - [`decigram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.decigram) - [`centigram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.centigram) - [`milligram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.milligram) - [`microgram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.microgram) - [`nanogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nanogram) - [`picogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.picogram) - [`femtogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.femtogram) - [`attogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.attogram) - [`zeptogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zeptogram) - [`yoctogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yoctogram) - [`kg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kg) - [`hg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hg) - [`dag`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.dag) - [`g`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.g) - [`dg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.dg) - [`cg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cg) - [`mg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.mg) - [`ug`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ug) - [`ng`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ng) - [`pg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.pg) - [`fg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.fg) - [`ag`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ag) - [`zg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zg) - [`yg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yg) - [`inverseKilogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseKilogram) - [`inverseHectogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseHectogram) - [`inverseDecagram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseDecagram) - [`inverseGram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseGram) - [`inverseDecigram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseDecigram) - [`inverseCentigram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCentigram) - [`inverseMilligram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMilligram) - [`inverseMicrogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMicrogram) - [`inverseNanogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseNanogram) - [`inversePicogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inversePicogram) - [`inverseFemtogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseFemtogram) - [`inverseAttogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseAttogram) - [`inverseZeptogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseZeptogram) - [`inverseYoctogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseYoctogram) - [`inverseKg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseKg) - [`inverseHg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseHg) - [`inverseDag`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseDag) - [`inverseG`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseG) - [`inverseDg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseDg) - [`inverseCg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCg) - [`inverseMg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMg) - [`inverseUg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseUg) - [`inverseNg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseNg) - [`inversePg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inversePg) - [`inverseFg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseFg) - [`inverseAg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseAg) - [`inverseZg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseZg) - [`inverseYg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseYg) - [Time](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#time) - [`second`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.second) - [`decisecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.decisecond) - [`centisecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.centisecond) - [`millisecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.millisecond) - [`microsecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.microsecond) - [`nanosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nanosecond) - [`picosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.picosecond) - [`femtosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.femtosecond) - [`attosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.attosecond) - [`zeptosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zeptosecond) - [`yoctosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yoctosecond) - [`s`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.s) - [`ds`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ds) - [`cs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cs) - [`ms`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ms) - [`us`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.us) - [`ns`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ns) - [`ps`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ps) - [`fs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.fs) - [`zs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zs) - [`ys`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ys) - [`inverseSecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSecond) - [`inverseDecisecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseDecisecond) - [`inverseCentisecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCentisecond) - [`inverseMillisecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMillisecond) - [`inverseMicrosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMicrosecond) - [`inverseNanosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseNanosecond) - [`inversePicosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inversePicosecond) - [`inverseFemtosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseFemtosecond) - [`inverseAttosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseAttosecond) - [`inverseZeptosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseZeptosecond) - [`inverseYoctosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseYoctosecond) - [`inverseS`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseS) - [`inverseDs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseDs) - [`inverseCs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCs) - [`inverseMs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMs) - [`inverseUs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseUs) - [`inverseNs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseNs) - [`inversePs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inversePs) - [`inverseFs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseFs) - [`inverseAs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseAs) - [`inverseZs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseZs) - [`inverseYs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseYs) - [`inverseSquareFemtosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareFemtosecond) - [Intensity (Ampere)](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#intensity-ampere) - [`kiloampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kiloampere) - [`hectoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hectoampere) - [`decaampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.decaampere) - [`ampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ampere) - [`deciampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.deciampere) - [`centiampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.centiampere) - [`milliampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.milliampere) - [`microampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.microampere) - [`nanoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nanoampere) - [`picoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.picoampere) - [`femtoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.femtoampere) - [`attoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.attoampere) - [`zeptoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zeptoampere) - [`yoctoampere`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yoctoampere) - [`kA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kA) - [`hA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hA) - [`daA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.daA) - [`A`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.A) - [`dA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.dA) - [`cA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cA) - [`mA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.mA) - [`uA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.uA) - [`nA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nA) - [`pA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.pA) - [`fA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.fA) - [`aA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.aA) - [`zA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zA) - [`yA`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yA) - [Temperature](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#temperature) - [`kilokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kilokelvin) - [`hectokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hectokelvin) - [`decakelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.decakelvin) - [`kelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kelvin) - [`decikelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.decikelvin) - [`centikelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.centikelvin) - [`millikelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.millikelvin) - [`microkelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.microkelvin) - [`nanokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nanokelvin) - [`picokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.picokelvin) - [`femtokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.femtokelvin) - [`attokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.attokelvin) - [`zeptokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zeptokelvin) - [`yoctokelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yoctokelvin) - [`kK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kK) - [`hK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hK) - [`daK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.daK) - [`K`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.K) - [`dK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.dK) - [`cK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cK) - [`mK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.mK) - [`uK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.uK) - [`nK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nK) - [`pK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.pK) - [`fK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.fK) - [`aK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.aK) - [`zK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zK) - [`yK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yK) - [Amount of substance](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#amount-of-substance) - [`kilomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kilomole) - [`hectomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hectomole) - [`decamole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.decamole) - [`mole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.mole) - [`decimole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.decimole) - [`centimole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.centimole) - [`millimole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.millimole) - [`micromole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.micromole) - [`nanomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nanomole) - [`picomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.picomole) - [`femtomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.femtomole) - [`attomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.attomole) - [`zeptomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zeptomole) - [`yoctomole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yoctomole) - [`kmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kmol) - [`hmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hmol) - [`damol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.damol) - [`mol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.mol) - [`dmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.dmol) - [`cmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cmol) - [`mmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.mmol) - [`umol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.umol) - [`nmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nmol) - [`pmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.pmol) - [`fmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.fmol) - [`amol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.amol) - [`zmol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zmol) - [`ymol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ymol) - [Luminous intensity](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#luminous-intensity) - [`kilocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kilocandela) - [`hectocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hectocandela) - [`decacandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.decacandela) - [`candela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.candela) - [`decicandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.decicandela) - [`centicandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.centicandela) - [`millicandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.millicandela) - [`microcandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.microcandela) - [`nanocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nanocandela) - [`picocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.picocandela) - [`femtocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.femtocandela) - [`attocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.attocandela) - [`zeptocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zeptocandela) - [`yoctocandela`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yoctocandela) - [`kcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kcd) - [`hcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hcd) - [`dacd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.dacd) - [`cd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cd) - [`dcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.dcd) - [`ccd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ccd) - [`mcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.mcd) - [`ucd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ucd) - [`ncd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ncd) - [`pcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.pcd) - [`fcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.fcd) - [`acd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.acd) - [`zcd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zcd) - [`ycd`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ycd) - [Base quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#base-quantities) - [`length`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.length) - [`squareLength`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareLength) - [`cubicLength`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicLength) - [`inverseLength`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseLength) - [`inverseSquareLength`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareLength) - [`inverseCubicLength`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicLength) - [`distance`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.distance) - [`squareDistance`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareDistance) - [`cubicDistance`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.cubicDistance) - [`inverseDistance`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseDistance) - [`inverseSquareDistance`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareDistance) - [`inverseCubicDistance`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseCubicDistance) - [`mass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.mass) - [`squareMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareMass) - [`inverseMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMass) - [`inverseSquareMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareMass) - [`time`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.time) - [`squareTime`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareTime) - [`inverseTime`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseTime) - [`inverseSquareTime`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareTime) - [`intensity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.intensity) - [`squareIntensity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareIntensity) - [`inverseIntensity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseIntensity) - [`inverseSquareIntensity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareIntensity) - [`temperature`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.temperature) - [`squareTemperature`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareTemperature) - [`inverseTemperature`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseTemperature) - [`inverseSquareTemperature`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareTemperature) - [`amountOfSubstance`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.amountOfSubstance) - [`squareAmountOfSubstance`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareAmountOfSubstance) - [`inverseAmountOfSubstance`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseAmountOfSubstance) - [`inverseSquareAmountOfSubstance`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareAmountOfSubstance) - [`luminousIntensity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.luminousIntensity) - [`squareLuminousIntensity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.squareLuminousIntensity) - [`inverseLuminousIntensity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseLuminousIntensity) - [`inverseSquareLuminousIntensity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseSquareLuminousIntensity) - [Derived quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#derived-quantities) - [`electricCharge`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.electricCharge) - [`voltage`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.voltage) - [`electricField`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.electricField) - [`magneticDensity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.magneticDensity) - [`angularVelocity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.angularVelocity) - [`angularAcceleration`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.angularAcceleration) - [`pressure`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.pressure) - [`lengthMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.lengthMass) - [`inverseLengthInverseMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseLengthInverseMass) - [`area`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.area) - [`inverseArea`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseArea) - [`volume`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.volume) - [`inverseVolume`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseVolume) - [`position`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.position) - [`velocity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.velocity) - [`acceleration`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.acceleration) - [`force`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.force) - [`energy`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.energy) - [`inverseForce`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseForce) - [`lengthPerForce`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.lengthPerForce) - [`forcePerLength`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.forcePerLength) - [`energyPerSquareLength`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.energyPerSquareLength) - [`momentum`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.momentum) - [`inverseMomentum`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMomentum) - [`momentOfInertia`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.momentOfInertia) - [`inverseMomentOfInertia`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.inverseMomentOfInertia) - [`electronDensity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.electronDensity) - [Common derived quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#common-derived-quantities) - [`gigahertz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.gigahertz) - [`megahertz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.megahertz) - [`kilohertz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kilohertz) - [`hertz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.hertz) - [`GHz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.GHz) - [`MHz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.MHz) - [`kHz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kHz) - [`Hz`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.Hz) - [`piconewton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.piconewton) - [`nanonewton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nanonewton) - [`newton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.newton) - [`pN`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.pN) - [`nN`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nN) - [`N`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.N) - [`Pa`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.Pa) - [`kilojoule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kilojoule) - [`joule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.joule) - [`zeptojoule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zeptojoule) - [`kJ`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kJ) - [`J`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.J) - [`zJ`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zJ) - [`joulePerKelvin`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.joulePerKelvin) - [`JPerK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.JPerK) - [`joulePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.joulePerMole) - [`kilojoulePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kilojoulePerMole) - [`JPerMol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.JPerMol) - [`kJPerMol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.kJPerMol) - [`jouleSecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.jouleSecond) - [`JS`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.JS) - [`watt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.watt) - [`W`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.W) - [`coulomb`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.coulomb) - [`zeptocoulomb`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zeptocoulomb) - [`C`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.C) - [`zC`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.zC) - [`coulombPerMeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.coulombPerMeter) - [`CPerM`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.CPerM) - [`coulombPerSquareMeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.coulombPerSquareMeter) - [`CPerM2`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.CPerM2) - [`volt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.volt) - [`V`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.V) - [`voltPerMeter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.voltPerMeter) - [`VPerM`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.VPerM) - [`farad`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.farad) - [`F`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.F) - [`ohm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ohm) - [`O`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.O) - [`siemens`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.siemens) - [`S`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.S) - [`weber`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.weber) - [`Wb`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.Wb) - [`tesla`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.tesla) - [`gigatesla`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.gigatesla) - [`T`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.T) - [`GT`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.GT) - [`henry`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.henry) - [`H`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.H) - [`lumen`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.lumen) - [`lm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.lm) - [`lux`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.lux) - [`lx`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.lx) - [`becquerel`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.becquerel) - [`Bq`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.Bq) - [`gray`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.gray) - [`sievert`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.sievert) - [`Gy`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.Gy) - [`Sv`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.Sv) - [`katal`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.katal) - [`Kat`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.Kat) - [Common velocity quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#common-velocity-quantities) - [`picometerPerSecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.picometerPerSecond) - [`picometerPerFemtosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.picometerPerFemtosecond) - [`pmPerS`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.pmPerS) - [`pmPerFs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.pmPerFs) - [`perSecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.perSecond) - [`radianPerSecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.radianPerSecond) - [`degreePerSecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.degreePerSecond) - [`perS`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.perS) - [`radPerS`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.radPerS) - [`degPerS`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.degPerS) - [Common acceleration quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#common-acceleration-quantities) - [`picometerPerSquareFemtosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.picometerPerSquareFemtosecond) - [`pmPerSquareFs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.pmPerSquareFs) - [Common momentum quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#common-momentum-quantities) - [`yoctogramPicometerPerFemtosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yoctogramPicometerPerFemtosecond) - [`ygPmPerFs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ygPmPerFs) - [Common momentum of inertia quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#common-momentum-of-inertia-quantities) - [`yoctogramSquarePicometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.yoctogramSquarePicometer) - [`perYoctogramPerSquarePicometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.perYoctogramPerSquarePicometer) - [`ygSquarePm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.ygSquarePm) - [`perYgPerSquarePm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.perYgPerSquarePm) - [Common force quantities](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#common-force-quantities) - [`nanonewtonPerPicometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nanonewtonPerPicometer) - [`nNPerPm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.nNPerPm) --- # unitsSI Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md This is the base class for SI units. !!! note "See also" [SI Unit system](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSI.md#ps-unit-si) [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#ps-unit-si-constructors) ## API Reference #### Class `samson.SBQuantity.unitsSI` Signature: `class samson.SBQuantity.unitsSI(*args, **kwargs)` Bases: `pybind11_object` Units system, serves as a wrapper between SBQuantity and Python Overloaded function. 1. __init__(self: samson.SBQuantity.unitsSI) -> None Constructs the zero dimensionless unit 2. __init__(self: samson.SBQuantity.unitsSI, v: float) -> None Constructs the dimensionless unit with the given value v 3. __init__(self: samson.SBQuantity.unitsSI, value: float, scale: list[int], exponent: list[int]) -> None Construct the physical unit with value, scale and exponent 4. __init__(self: samson.SBQuantity.unitsSI, u: samson.SBQuantity.unitsSI) -> None Constructs the physical unit from the given physical unit u ##### Method `samson.SBQuantity.unitsSI.__add__` Signature: `__add__(*args, **kwargs)` Overloaded function. 1. __add__(self: samson.SBQuantity.unitsSI, arg0: float) -> samson.SBQuantity.unitsSI 2. __add__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI ##### Method `samson.SBQuantity.unitsSI.__eq__` Signature: `__eq__(*args, **kwargs)` Overloaded function. 1. __eq__(self: samson.SBQuantity.unitsSI, arg0: float) -> bool 2. __eq__(self: samson.SBQuantity.unitsSI, arg0: float) -> bool 3. __eq__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> bool ##### Method `samson.SBQuantity.unitsSI.__ge__` Signature: `__ge__(*args, **kwargs)` Overloaded function. 1. __ge__(self: samson.SBQuantity.unitsSI, arg0: float) -> bool 2. __ge__(self: samson.SBQuantity.unitsSI, arg0: float) -> bool 3. __ge__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> bool ##### Method `samson.SBQuantity.unitsSI.__gt__` Signature: `__gt__(*args, **kwargs)` Overloaded function. 1. __gt__(self: samson.SBQuantity.unitsSI, arg0: float) -> bool 2. __gt__(self: samson.SBQuantity.unitsSI, arg0: float) -> bool 3. __gt__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> bool ##### Method `samson.SBQuantity.unitsSI.__iadd__` Signature: `__iadd__(*args, **kwargs)` Overloaded function. 1. __iadd__(self: samson.SBQuantity.unitsSI, arg0: float) -> samson.SBQuantity.unitsSI 2. __iadd__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI ##### Method `samson.SBQuantity.unitsSI.__imul__` Signature: `__imul__(*args, **kwargs)` Overloaded function. 1. __imul__(self: samson.SBQuantity.unitsSI, arg0: float) -> samson.SBQuantity.unitsSI 2. __imul__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI ##### Method `samson.SBQuantity.unitsSI.__isub__` Signature: `__isub__(*args, **kwargs)` Overloaded function. 1. __isub__(self: samson.SBQuantity.unitsSI, arg0: float) -> samson.SBQuantity.unitsSI 2. __isub__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI ##### Method `samson.SBQuantity.unitsSI.__itruediv__` Signature: `__itruediv__(*args, **kwargs)` Overloaded function. 1. __itruediv__(self: samson.SBQuantity.unitsSI, arg0: float) -> samson.SBQuantity.unitsSI 2. __itruediv__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI ##### Method `samson.SBQuantity.unitsSI.__le__` Signature: `__le__(*args, **kwargs)` Overloaded function. 1. __le__(self: samson.SBQuantity.unitsSI, arg0: float) -> bool 2. __le__(self: samson.SBQuantity.unitsSI, arg0: float) -> bool 3. __le__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> bool ##### Method `samson.SBQuantity.unitsSI.__lt__` Signature: `__lt__(*args, **kwargs)` Overloaded function. 1. __lt__(self: samson.SBQuantity.unitsSI, arg0: float) -> bool 2. __lt__(self: samson.SBQuantity.unitsSI, arg0: float) -> bool 3. __lt__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> bool ##### Method `samson.SBQuantity.unitsSI.__mul__` Signature: `__mul__(*args, **kwargs)` Overloaded function. 1. __mul__(self: samson.SBQuantity.unitsSI, arg0: float) -> samson.SBQuantity.unitsSI 2. __mul__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI ##### Method `samson.SBQuantity.unitsSI.__ne__` Signature: `__ne__(*args, **kwargs)` Overloaded function. 1. __ne__(self: samson.SBQuantity.unitsSI, arg0: float) -> bool 2. __ne__(self: samson.SBQuantity.unitsSI, arg0: float) -> bool 3. __ne__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> bool ##### Method `samson.SBQuantity.unitsSI.__neg__` Signature: `__neg__(self: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI` ##### Method `samson.SBQuantity.unitsSI.__radd__` Signature: `__radd__(self: samson.SBQuantity.unitsSI, arg0: float) -> samson.SBQuantity.unitsSI` ##### Method `samson.SBQuantity.unitsSI.__rmul__` Signature: `__rmul__(self: samson.SBQuantity.unitsSI, arg0: float) -> samson.SBQuantity.unitsSI` ##### Method `samson.SBQuantity.unitsSI.__rsub__` Signature: `__rsub__(self: samson.SBQuantity.unitsSI, arg0: float) -> samson.SBQuantity.unitsSI` ##### Method `samson.SBQuantity.unitsSI.__rtruediv__` Signature: `__rtruediv__(self: samson.SBQuantity.unitsSI, arg0: float) -> samson.SBQuantity.unitsSI` ##### Method `samson.SBQuantity.unitsSI.__sub__` Signature: `__sub__(*args, **kwargs)` Overloaded function. 1. __sub__(self: samson.SBQuantity.unitsSI, arg0: float) -> samson.SBQuantity.unitsSI 2. __sub__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI ##### Method `samson.SBQuantity.unitsSI.__truediv__` Signature: `__truediv__(*args, **kwargs)` Overloaded function. 1. __truediv__(self: samson.SBQuantity.unitsSI, arg0: float) -> samson.SBQuantity.unitsSI 2. __truediv__(self: samson.SBQuantity.unitsSI, arg0: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI ##### Method `samson.SBQuantity.unitsSI.fromLinearInterpolation` Signature: `static fromLinearInterpolation(q0: samson.SBQuantity.unitsSI, q1: samson.SBQuantity.unitsSI, alpha: float) -> samson.SBQuantity.unitsSI` Returns a linear interpolation between two physical quantities *q0* and *q1* for a parameter *alpha* in the closed unit interval [0, 1]. ##### Method `samson.SBQuantity.unitsSI.setZero` Signature: `setZero(self: samson.SBQuantity.unitsSI) -> None` Sets the value to zero ##### Method `samson.SBQuantity.unitsSI.str` Signature: `str(self: samson.SBQuantity.unitsSI, fullName: bool = False) -> str` Converts the physical quantity to a string (with a full unit name when *fullName* is *True*.) ##### Method `samson.SBQuantity.unitsSI.toDebugString` Signature: `toDebugString(self: samson.SBQuantity.unitsSI) -> str` Returns a verbose debug string for this quantity. ##### Property `samson.SBQuantity.unitsSI.A` Signature: `property A` quantity in ampere ##### Property `samson.SBQuantity.unitsSI.Da` Signature: `property Da` convert to dalton ##### Property `samson.SBQuantity.unitsSI.Eh` Signature: `property Eh` convert to hartree ##### Property `samson.SBQuantity.unitsSI.GHz` Signature: `property GHz` quantity in gigahertz ##### Property `samson.SBQuantity.unitsSI.Hz` Signature: `property Hz` quantity in hertz ##### Property `samson.SBQuantity.unitsSI.J` Signature: `property J` convert to joule ##### Property `samson.SBQuantity.unitsSI.JPerMol` Signature: `property JPerMol` convert to joulePerMole ##### Property `samson.SBQuantity.unitsSI.JPerMolToEh` Signature: `property JPerMolToEh` convert to hartree ##### Property `samson.SBQuantity.unitsSI.JPerMolToeV` Signature: `property JPerMolToeV` convert to electronvolt ##### Property `samson.SBQuantity.unitsSI.JperMolTokcalPerMol` Signature: `property JperMolTokcalPerMol` convert to kilocaloriePerMole ##### Property `samson.SBQuantity.unitsSI.K` Signature: `property K` quantity in kelvin ##### Property `samson.SBQuantity.unitsSI.MHz` Signature: `property MHz` quantity in megahertz ##### Property `samson.SBQuantity.unitsSI.N` Signature: `property N` quantity in newton ##### Property `samson.SBQuantity.unitsSI.a0` Signature: `property a0` convert to a0 ##### Property `samson.SBQuantity.unitsSI.aA` Signature: `property aA` quantity in attoampere ##### Property `samson.SBQuantity.unitsSI.aK` Signature: `property aK` quantity in attokelvin ##### Property `samson.SBQuantity.unitsSI.acd` Signature: `property acd` quantity in attocandela ##### Property `samson.SBQuantity.unitsSI.ag` Signature: `property ag` quantity in attogram ##### Property `samson.SBQuantity.unitsSI.am` Signature: `property am` quantity in attometer ##### Property `samson.SBQuantity.unitsSI.amol` Signature: `property amol` quantity in attomole ##### Property `samson.SBQuantity.unitsSI.ampere` Signature: `property ampere` quantity in ampere ##### Property `samson.SBQuantity.unitsSI.angstrom` Signature: `property angstrom` quantity in angstrom ##### Property `samson.SBQuantity.unitsSI.as` Signature: `property as` quantity in attosecond ##### Property `samson.SBQuantity.unitsSI.attoampere` Signature: `property attoampere` quantity in attoampere ##### Property `samson.SBQuantity.unitsSI.attocandela` Signature: `property attocandela` quantity in attocandela ##### Property `samson.SBQuantity.unitsSI.attogram` Signature: `property attogram` quantity in attogram ##### Property `samson.SBQuantity.unitsSI.attokelvin` Signature: `property attokelvin` quantity in attokelvin ##### Property `samson.SBQuantity.unitsSI.attometer` Signature: `property attometer` quantity in attometer ##### Property `samson.SBQuantity.unitsSI.attomole` Signature: `property attomole` quantity in attomole ##### Property `samson.SBQuantity.unitsSI.attosecond` Signature: `property attosecond` quantity in attosecond ##### Property `samson.SBQuantity.unitsSI.auAction` Signature: `property auAction` convert to auAction ##### Property `samson.SBQuantity.unitsSI.auCharge` Signature: `property auCharge` convert to auCharge ##### Property `samson.SBQuantity.unitsSI.auMass` Signature: `property auMass` convert to auMass ##### Property `samson.SBQuantity.unitsSI.auTime` Signature: `property auTime` convert to auTime ##### Property `samson.SBQuantity.unitsSI.bohr` Signature: `property bohr` convert to bohr ##### Property `samson.SBQuantity.unitsSI.cA` Signature: `property cA` quantity in centiampere ##### Property `samson.SBQuantity.unitsSI.cK` Signature: `property cK` quantity in centikelvin ##### Property `samson.SBQuantity.unitsSI.candela` Signature: `property candela` quantity in candela ##### Property `samson.SBQuantity.unitsSI.ccd` Signature: `property ccd` quantity in centicandela ##### Property `samson.SBQuantity.unitsSI.cd` Signature: `property cd` quantity in candela ##### Property `samson.SBQuantity.unitsSI.centiampere` Signature: `property centiampere` quantity in centiampere ##### Property `samson.SBQuantity.unitsSI.centicandela` Signature: `property centicandela` quantity in centicandela ##### Property `samson.SBQuantity.unitsSI.centigram` Signature: `property centigram` quantity in centigram ##### Property `samson.SBQuantity.unitsSI.centikelvin` Signature: `property centikelvin` quantity in centikelvin ##### Property `samson.SBQuantity.unitsSI.centimeter` Signature: `property centimeter` quantity in centimeter ##### Property `samson.SBQuantity.unitsSI.centimole` Signature: `property centimole` quantity in centimole ##### Property `samson.SBQuantity.unitsSI.centisecond` Signature: `property centisecond` quantity in centisecond ##### Property `samson.SBQuantity.unitsSI.cg` Signature: `property cg` quantity in centigram ##### Property `samson.SBQuantity.unitsSI.cm` Signature: `property cm` quantity in centimeter ##### Property `samson.SBQuantity.unitsSI.cmol` Signature: `property cmol` quantity in centimole ##### Property `samson.SBQuantity.unitsSI.cs` Signature: `property cs` quantity in centisecond ##### Property `samson.SBQuantity.unitsSI.dA` Signature: `property dA` quantity in deciampere ##### Property `samson.SBQuantity.unitsSI.dK` Signature: `property dK` quantity in decikelvin ##### Property `samson.SBQuantity.unitsSI.daA` Signature: `property daA` quantity in decaampere ##### Property `samson.SBQuantity.unitsSI.daK` Signature: `property daK` quantity in decakelvin ##### Property `samson.SBQuantity.unitsSI.dacd` Signature: `property dacd` quantity in decacandela ##### Property `samson.SBQuantity.unitsSI.dag` Signature: `property dag` quantity in decagram ##### Property `samson.SBQuantity.unitsSI.dalton` Signature: `property dalton` convert to dalton ##### Property `samson.SBQuantity.unitsSI.dam` Signature: `property dam` quantity in decameter ##### Property `samson.SBQuantity.unitsSI.damol` Signature: `property damol` quantity in decamole ##### Property `samson.SBQuantity.unitsSI.dcd` Signature: `property dcd` quantity in decicandela ##### Property `samson.SBQuantity.unitsSI.decaampere` Signature: `property decaampere` quantity in decaampere ##### Property `samson.SBQuantity.unitsSI.decacandela` Signature: `property decacandela` quantity in decacandela ##### Property `samson.SBQuantity.unitsSI.decagram` Signature: `property decagram` quantity in decagram ##### Property `samson.SBQuantity.unitsSI.decakelvin` Signature: `property decakelvin` quantity in decakelvin ##### Property `samson.SBQuantity.unitsSI.decameter` Signature: `property decameter` quantity in decameter ##### Property `samson.SBQuantity.unitsSI.decamole` Signature: `property decamole` quantity in decamole ##### Property `samson.SBQuantity.unitsSI.deciampere` Signature: `property deciampere` quantity in deciampere ##### Property `samson.SBQuantity.unitsSI.decicandela` Signature: `property decicandela` quantity in decicandela ##### Property `samson.SBQuantity.unitsSI.decigram` Signature: `property decigram` quantity in decigram ##### Property `samson.SBQuantity.unitsSI.decikelvin` Signature: `property decikelvin` quantity in decikelvin ##### Property `samson.SBQuantity.unitsSI.decimeter` Signature: `property decimeter` quantity in decimeter ##### Property `samson.SBQuantity.unitsSI.decimole` Signature: `property decimole` quantity in decimole ##### Property `samson.SBQuantity.unitsSI.decisecond` Signature: `property decisecond` quantity in decisecond ##### Property `samson.SBQuantity.unitsSI.dg` Signature: `property dg` quantity in decigram ##### Property `samson.SBQuantity.unitsSI.dm` Signature: `property dm` quantity in decimeter ##### Property `samson.SBQuantity.unitsSI.dmol` Signature: `property dmol` quantity in decimole ##### Property `samson.SBQuantity.unitsSI.ds` Signature: `property ds` quantity in decisecond ##### Property `samson.SBQuantity.unitsSI.eV` Signature: `property eV` convert to electronvolt ##### Property `samson.SBQuantity.unitsSI.electronCharge` Signature: `property electronCharge` convert to electronCharge ##### Property `samson.SBQuantity.unitsSI.electronMass` Signature: `property electronMass` convert to electronMass ##### Property `samson.SBQuantity.unitsSI.electronvolt` Signature: `property electronvolt` convert to electronvolt ##### Property `samson.SBQuantity.unitsSI.fA` Signature: `property fA` quantity in femtoampere ##### Property `samson.SBQuantity.unitsSI.fK` Signature: `property fK` quantity in femtokelvin ##### Property `samson.SBQuantity.unitsSI.fcd` Signature: `property fcd` quantity in femtocandela ##### Property `samson.SBQuantity.unitsSI.femtoampere` Signature: `property femtoampere` quantity in femtoampere ##### Property `samson.SBQuantity.unitsSI.femtocandela` Signature: `property femtocandela` quantity in femtocandela ##### Property `samson.SBQuantity.unitsSI.femtogram` Signature: `property femtogram` quantity in femtogram ##### Property `samson.SBQuantity.unitsSI.femtokelvin` Signature: `property femtokelvin` quantity in femtokelvin ##### Property `samson.SBQuantity.unitsSI.femtometer` Signature: `property femtometer` quantity in femtometer ##### Property `samson.SBQuantity.unitsSI.femtomole` Signature: `property femtomole` quantity in femtomole ##### Property `samson.SBQuantity.unitsSI.femtosecond` Signature: `property femtosecond` quantity in femtosecond ##### Property `samson.SBQuantity.unitsSI.fg` Signature: `property fg` quantity in femtogram ##### Property `samson.SBQuantity.unitsSI.fm` Signature: `property fm` quantity in femtometer ##### Property `samson.SBQuantity.unitsSI.fmol` Signature: `property fmol` quantity in femtomole ##### Property `samson.SBQuantity.unitsSI.fs` Signature: `property fs` quantity in femtosecond ##### Property `samson.SBQuantity.unitsSI.g` Signature: `property g` quantity in gram ##### Property `samson.SBQuantity.unitsSI.gigahertz` Signature: `property gigahertz` quantity in gigahertz ##### Property `samson.SBQuantity.unitsSI.gram` Signature: `property gram` quantity in gram ##### Property `samson.SBQuantity.unitsSI.hA` Signature: `property hA` quantity in hectoampere ##### Property `samson.SBQuantity.unitsSI.hBar` Signature: `property hBar` convert to hBar ##### Property `samson.SBQuantity.unitsSI.hK` Signature: `property hK` quantity in hectokelvin ##### Property `samson.SBQuantity.unitsSI.hartree` Signature: `property hartree` convert to hartree ##### Property `samson.SBQuantity.unitsSI.hcd` Signature: `property hcd` quantity in hectocandela ##### Property `samson.SBQuantity.unitsSI.hectoampere` Signature: `property hectoampere` quantity in hectoampere ##### Property `samson.SBQuantity.unitsSI.hectocandela` Signature: `property hectocandela` quantity in hectocandela ##### Property `samson.SBQuantity.unitsSI.hectogram` Signature: `property hectogram` quantity in hectogram ##### Property `samson.SBQuantity.unitsSI.hectokelvin` Signature: `property hectokelvin` quantity in hectokelvin ##### Property `samson.SBQuantity.unitsSI.hectometer` Signature: `property hectometer` quantity in hectometer ##### Property `samson.SBQuantity.unitsSI.hectomole` Signature: `property hectomole` quantity in hectomole ##### Property `samson.SBQuantity.unitsSI.hertz` Signature: `property hertz` quantity in hertz ##### Property `samson.SBQuantity.unitsSI.hg` Signature: `property hg` quantity in hectogram ##### Property `samson.SBQuantity.unitsSI.hm` Signature: `property hm` quantity in hectometer ##### Property `samson.SBQuantity.unitsSI.hmol` Signature: `property hmol` quantity in hectomole ##### Property `samson.SBQuantity.unitsSI.isDimensionless` Signature: `property isDimensionless` Returns *True* if the unit is dimensionless ##### Property `samson.SBQuantity.unitsSI.joule` Signature: `property joule` convert to joule ##### Property `samson.SBQuantity.unitsSI.joulePerMole` Signature: `property joulePerMole` convert to joulePerMole ##### Property `samson.SBQuantity.unitsSI.joulePerMoleToElectronvolt` Signature: `property joulePerMoleToElectronvolt` convert to electronvolt ##### Property `samson.SBQuantity.unitsSI.joulePerMoleToHartree` Signature: `property joulePerMoleToHartree` convert to hartree ##### Property `samson.SBQuantity.unitsSI.joulePerMoleToKilocaloriePerMole` Signature: `property joulePerMoleToKilocaloriePerMole` convert to kilocaloriePerMole ##### Property `samson.SBQuantity.unitsSI.kA` Signature: `property kA` quantity in kiloampere ##### Property `samson.SBQuantity.unitsSI.kHz` Signature: `property kHz` quantity in kilohertz ##### Property `samson.SBQuantity.unitsSI.kJ` Signature: `property kJ` quantity in kilojoule ##### Property `samson.SBQuantity.unitsSI.kK` Signature: `property kK` quantity in kilokelvin ##### Property `samson.SBQuantity.unitsSI.kcalPerMol` Signature: `property kcalPerMol` convert to kilocaloriePerMole ##### Property `samson.SBQuantity.unitsSI.kcd` Signature: `property kcd` quantity in kilocandela ##### Property `samson.SBQuantity.unitsSI.kelvin` Signature: `property kelvin` quantity in kelvin ##### Property `samson.SBQuantity.unitsSI.kg` Signature: `property kg` quantity in kilogram ##### Property `samson.SBQuantity.unitsSI.kiloampere` Signature: `property kiloampere` quantity in kiloampere ##### Property `samson.SBQuantity.unitsSI.kilocaloriePerMole` Signature: `property kilocaloriePerMole` convert to kilocaloriePerMole ##### Property `samson.SBQuantity.unitsSI.kilocandela` Signature: `property kilocandela` quantity in kilocandela ##### Property `samson.SBQuantity.unitsSI.kilogram` Signature: `property kilogram` quantity in kilogram ##### Property `samson.SBQuantity.unitsSI.kilohertz` Signature: `property kilohertz` quantity in kilohertz ##### Property `samson.SBQuantity.unitsSI.kilojoule` Signature: `property kilojoule` quantity in kilojoule ##### Property `samson.SBQuantity.unitsSI.kilokelvin` Signature: `property kilokelvin` quantity in kilokelvin ##### Property `samson.SBQuantity.unitsSI.kilometer` Signature: `property kilometer` quantity in kilometer ##### Property `samson.SBQuantity.unitsSI.kilomole` Signature: `property kilomole` quantity in kilomole ##### Property `samson.SBQuantity.unitsSI.km` Signature: `property km` quantity in kilometer ##### Property `samson.SBQuantity.unitsSI.kmol` Signature: `property kmol` quantity in kilomole ##### Property `samson.SBQuantity.unitsSI.m` Signature: `property m` quantity in meter ##### Property `samson.SBQuantity.unitsSI.mA` Signature: `property mA` quantity in milliampere ##### Property `samson.SBQuantity.unitsSI.mK` Signature: `property mK` quantity in millikelvin ##### Property `samson.SBQuantity.unitsSI.mcd` Signature: `property mcd` quantity in millicandela ##### Property `samson.SBQuantity.unitsSI.megahertz` Signature: `property megahertz` quantity in megahertz ##### Property `samson.SBQuantity.unitsSI.meter` Signature: `property meter` quantity in meter ##### Property `samson.SBQuantity.unitsSI.mg` Signature: `property mg` quantity in milligram ##### Property `samson.SBQuantity.unitsSI.microampere` Signature: `property microampere` quantity in microampere ##### Property `samson.SBQuantity.unitsSI.microcandela` Signature: `property microcandela` quantity in microcandela ##### Property `samson.SBQuantity.unitsSI.microgram` Signature: `property microgram` quantity in microgram ##### Property `samson.SBQuantity.unitsSI.microkelvin` Signature: `property microkelvin` quantity in microkelvin ##### Property `samson.SBQuantity.unitsSI.micrometer` Signature: `property micrometer` quantity in micrometer ##### Property `samson.SBQuantity.unitsSI.micromole` Signature: `property micromole` quantity in micromole ##### Property `samson.SBQuantity.unitsSI.microsecond` Signature: `property microsecond` quantity in microsecond ##### Property `samson.SBQuantity.unitsSI.milliampere` Signature: `property milliampere` quantity in milliampere ##### Property `samson.SBQuantity.unitsSI.millicandela` Signature: `property millicandela` quantity in millicandela ##### Property `samson.SBQuantity.unitsSI.milligram` Signature: `property milligram` quantity in milligram ##### Property `samson.SBQuantity.unitsSI.millikelvin` Signature: `property millikelvin` quantity in millikelvin ##### Property `samson.SBQuantity.unitsSI.millimeter` Signature: `property millimeter` quantity in millimeter ##### Property `samson.SBQuantity.unitsSI.millimole` Signature: `property millimole` quantity in millimole ##### Property `samson.SBQuantity.unitsSI.millisecond` Signature: `property millisecond` quantity in millisecond ##### Property `samson.SBQuantity.unitsSI.mm` Signature: `property mm` quantity in millimeter ##### Property `samson.SBQuantity.unitsSI.mmol` Signature: `property mmol` quantity in millimole ##### Property `samson.SBQuantity.unitsSI.mol` Signature: `property mol` quantity in mole ##### Property `samson.SBQuantity.unitsSI.mole` Signature: `property mole` quantity in mole ##### Property `samson.SBQuantity.unitsSI.ms` Signature: `property ms` quantity in millisecond ##### Property `samson.SBQuantity.unitsSI.nA` Signature: `property nA` quantity in nanoampere ##### Property `samson.SBQuantity.unitsSI.nK` Signature: `property nK` quantity in nanokelvin ##### Property `samson.SBQuantity.unitsSI.nN` Signature: `property nN` quantity in nanonewton ##### Property `samson.SBQuantity.unitsSI.nanoampere` Signature: `property nanoampere` quantity in nanoampere ##### Property `samson.SBQuantity.unitsSI.nanocandela` Signature: `property nanocandela` quantity in nanocandela ##### Property `samson.SBQuantity.unitsSI.nanogram` Signature: `property nanogram` quantity in nanogram ##### Property `samson.SBQuantity.unitsSI.nanokelvin` Signature: `property nanokelvin` quantity in nanokelvin ##### Property `samson.SBQuantity.unitsSI.nanometer` Signature: `property nanometer` quantity in nanometer ##### Property `samson.SBQuantity.unitsSI.nanomole` Signature: `property nanomole` quantity in nanomole ##### Property `samson.SBQuantity.unitsSI.nanonewton` Signature: `property nanonewton` quantity in nanonewton ##### Property `samson.SBQuantity.unitsSI.nanosecond` Signature: `property nanosecond` quantity in nanosecond ##### Property `samson.SBQuantity.unitsSI.ncd` Signature: `property ncd` quantity in nanocandela ##### Property `samson.SBQuantity.unitsSI.newton` Signature: `property newton` quantity in newton ##### Property `samson.SBQuantity.unitsSI.ng` Signature: `property ng` quantity in nanogram ##### Property `samson.SBQuantity.unitsSI.nm` Signature: `property nm` quantity in nanometer ##### Property `samson.SBQuantity.unitsSI.nmol` Signature: `property nmol` quantity in nanomole ##### Property `samson.SBQuantity.unitsSI.ns` Signature: `property ns` quantity in nanosecond ##### Property `samson.SBQuantity.unitsSI.pA` Signature: `property pA` quantity in picoampere ##### Property `samson.SBQuantity.unitsSI.pK` Signature: `property pK` quantity in picokelvin ##### Property `samson.SBQuantity.unitsSI.pN` Signature: `property pN` quantity in piconewton ##### Property `samson.SBQuantity.unitsSI.pcd` Signature: `property pcd` quantity in picocandela ##### Property `samson.SBQuantity.unitsSI.pg` Signature: `property pg` quantity in picogram ##### Property `samson.SBQuantity.unitsSI.picoampere` Signature: `property picoampere` quantity in picoampere ##### Property `samson.SBQuantity.unitsSI.picocandela` Signature: `property picocandela` quantity in picocandela ##### Property `samson.SBQuantity.unitsSI.picogram` Signature: `property picogram` quantity in picogram ##### Property `samson.SBQuantity.unitsSI.picokelvin` Signature: `property picokelvin` quantity in picokelvin ##### Property `samson.SBQuantity.unitsSI.picometer` Signature: `property picometer` quantity in picometer ##### Property `samson.SBQuantity.unitsSI.picomole` Signature: `property picomole` quantity in picomole ##### Property `samson.SBQuantity.unitsSI.piconewton` Signature: `property piconewton` quantity in piconewton ##### Property `samson.SBQuantity.unitsSI.picosecond` Signature: `property picosecond` quantity in picosecond ##### Property `samson.SBQuantity.unitsSI.pm` Signature: `property pm` quantity in picometer ##### Property `samson.SBQuantity.unitsSI.pmol` Signature: `property pmol` quantity in picomole ##### Property `samson.SBQuantity.unitsSI.ps` Signature: `property ps` quantity in picosecond ##### Property `samson.SBQuantity.unitsSI.s` Signature: `property s` quantity in second ##### Property `samson.SBQuantity.unitsSI.second` Signature: `property second` quantity in second ##### Property `samson.SBQuantity.unitsSI.sizeOfUnitSystem` Signature: `property sizeOfUnitSystem` Returns the number of base dimensions in this unit system. ##### Property `samson.SBQuantity.unitsSI.uA` Signature: `property uA` quantity in microampere ##### Property `samson.SBQuantity.unitsSI.uK` Signature: `property uK` quantity in microkelvin ##### Property `samson.SBQuantity.unitsSI.ucd` Signature: `property ucd` quantity in microcandela ##### Property `samson.SBQuantity.unitsSI.ug` Signature: `property ug` quantity in microgram ##### Property `samson.SBQuantity.unitsSI.um` Signature: `property um` quantity in micrometer ##### Property `samson.SBQuantity.unitsSI.umol` Signature: `property umol` quantity in micromole ##### Property `samson.SBQuantity.unitsSI.us` Signature: `property us` quantity in microsecond ##### Property `samson.SBQuantity.unitsSI.value` Signature: `property value` Returns value of the unit ##### Property `samson.SBQuantity.unitsSI.yA` Signature: `property yA` quantity in yoctoampere ##### Property `samson.SBQuantity.unitsSI.yK` Signature: `property yK` quantity in yoctokelvin ##### Property `samson.SBQuantity.unitsSI.ycd` Signature: `property ycd` quantity in yoctocandela ##### Property `samson.SBQuantity.unitsSI.yg` Signature: `property yg` quantity in yoctogram ##### Property `samson.SBQuantity.unitsSI.ym` Signature: `property ym` quantity in yoctometer ##### Property `samson.SBQuantity.unitsSI.ymol` Signature: `property ymol` quantity in yoctomole ##### Property `samson.SBQuantity.unitsSI.yoctoampere` Signature: `property yoctoampere` quantity in yoctoampere ##### Property `samson.SBQuantity.unitsSI.yoctocandela` Signature: `property yoctocandela` quantity in yoctocandela ##### Property `samson.SBQuantity.unitsSI.yoctogram` Signature: `property yoctogram` quantity in yoctogram ##### Property `samson.SBQuantity.unitsSI.yoctokelvin` Signature: `property yoctokelvin` quantity in yoctokelvin ##### Property `samson.SBQuantity.unitsSI.yoctometer` Signature: `property yoctometer` quantity in yoctometer ##### Property `samson.SBQuantity.unitsSI.yoctomole` Signature: `property yoctomole` quantity in yoctomole ##### Property `samson.SBQuantity.unitsSI.yoctosecond` Signature: `property yoctosecond` quantity in yoctosecond ##### Property `samson.SBQuantity.unitsSI.ys` Signature: `property ys` quantity in yoctosecond ##### Property `samson.SBQuantity.unitsSI.zA` Signature: `property zA` quantity in zeptoampere ##### Property `samson.SBQuantity.unitsSI.zJ` Signature: `property zJ` quantity in zeptojoule ##### Property `samson.SBQuantity.unitsSI.zK` Signature: `property zK` quantity in zeptokelvin ##### Property `samson.SBQuantity.unitsSI.zcd` Signature: `property zcd` quantity in zeptocandela ##### Property `samson.SBQuantity.unitsSI.zeptoampere` Signature: `property zeptoampere` quantity in zeptoampere ##### Property `samson.SBQuantity.unitsSI.zeptocandela` Signature: `property zeptocandela` quantity in zeptocandela ##### Property `samson.SBQuantity.unitsSI.zeptogram` Signature: `property zeptogram` quantity in zeptogram ##### Property `samson.SBQuantity.unitsSI.zeptojoule` Signature: `property zeptojoule` quantity in zeptojoule ##### Property `samson.SBQuantity.unitsSI.zeptokelvin` Signature: `property zeptokelvin` quantity in zeptokelvin ##### Property `samson.SBQuantity.unitsSI.zeptometer` Signature: `property zeptometer` quantity in zeptometer ##### Property `samson.SBQuantity.unitsSI.zeptomole` Signature: `property zeptomole` quantity in zeptomole ##### Property `samson.SBQuantity.unitsSI.zeptosecond` Signature: `property zeptosecond` quantity in zeptosecond ##### Property `samson.SBQuantity.unitsSI.zg` Signature: `property zg` quantity in zeptogram ##### Property `samson.SBQuantity.unitsSI.zm` Signature: `property zm` quantity in zeptometer ##### Property `samson.SBQuantity.unitsSI.zmol` Signature: `property zmol` quantity in zeptomole ##### Property `samson.SBQuantity.unitsSI.zs` Signature: `property zs` quantity in zeptosecond --- # Convenience constructors Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md ### Dimensionless quantities ## API Reference ##### Class `samson.SBQuantity.dimensionless` Signature: `class samson.SBQuantity.dimensionless(*args, **kwargs)` Bases: Overloaded function. 1. dimensionless(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dimensionless’ with the given value v 2. dimensionless(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dimensionless’ from the given physical unit u ##### Class `samson.SBQuantity.radian` Signature: `class samson.SBQuantity.radian(*args, **kwargs)` Bases: Overloaded function. 1. radian(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘radian’ with the given value v 2. radian(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘radian’ from the given physical unit u ##### Class `samson.SBQuantity.rad` Signature: `class samson.SBQuantity.rad(*args, **kwargs)` Bases: Overloaded function. 1. rad(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘rad’ with the given value v 2. rad(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘rad’ from the given physical unit u ##### Class `samson.SBQuantity.degree` Signature: `class samson.SBQuantity.degree(*args, **kwargs)` Bases: Overloaded function. 1. degree(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘degree’ with the given value v 2. degree(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘degree’ from the given physical unit u ##### Class `samson.SBQuantity.deg` Signature: `class samson.SBQuantity.deg(*args, **kwargs)` Bases: Overloaded function. 1. deg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘deg’ with the given value v 2. deg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘deg’ from the given physical unit u ##### Class `samson.SBQuantity.steradian` Signature: `class samson.SBQuantity.steradian(*args, **kwargs)` Bases: Overloaded function. 1. steradian(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘steradian’ with the given value v 2. steradian(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘steradian’ from the given physical unit u ##### Class `samson.SBQuantity.sr` Signature: `class samson.SBQuantity.sr(*args, **kwargs)` Bases: Overloaded function. 1. sr(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘sr’ with the given value v 2. sr(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘sr’ from the given physical unit u ### Length ##### Class `samson.SBQuantity.kilometer` Signature: `class samson.SBQuantity.kilometer(*args, **kwargs)` Bases: Overloaded function. 1. kilometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilometer’ with the given value v 2. kilometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilometer’ from the given physical unit u ##### Class `samson.SBQuantity.hectometer` Signature: `class samson.SBQuantity.hectometer(*args, **kwargs)` Bases: Overloaded function. 1. hectometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hectometer’ with the given value v 2. hectometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hectometer’ from the given physical unit u ##### Class `samson.SBQuantity.decameter` Signature: `class samson.SBQuantity.decameter(*args, **kwargs)` Bases: Overloaded function. 1. decameter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decameter’ with the given value v 2. decameter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decameter’ from the given physical unit u ##### Class `samson.SBQuantity.meter` Signature: `class samson.SBQuantity.meter(*args, **kwargs)` Bases: Overloaded function. 1. meter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘meter’ with the given value v 2. meter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘meter’ from the given physical unit u ##### Class `samson.SBQuantity.decimeter` Signature: `class samson.SBQuantity.decimeter(*args, **kwargs)` Bases: Overloaded function. 1. decimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decimeter’ with the given value v 2. decimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decimeter’ from the given physical unit u ##### Class `samson.SBQuantity.centimeter` Signature: `class samson.SBQuantity.centimeter(*args, **kwargs)` Bases: Overloaded function. 1. centimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centimeter’ with the given value v 2. centimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centimeter’ from the given physical unit u ##### Class `samson.SBQuantity.millimeter` Signature: `class samson.SBQuantity.millimeter(*args, **kwargs)` Bases: Overloaded function. 1. millimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘millimeter’ with the given value v 2. millimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘millimeter’ from the given physical unit u ##### Class `samson.SBQuantity.micrometer` Signature: `class samson.SBQuantity.micrometer(*args, **kwargs)` Bases: Overloaded function. 1. micrometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘micrometer’ with the given value v 2. micrometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘micrometer’ from the given physical unit u ##### Class `samson.SBQuantity.nanometer` Signature: `class samson.SBQuantity.nanometer(*args, **kwargs)` Bases: Overloaded function. 1. nanometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanometer’ with the given value v 2. nanometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanometer’ from the given physical unit u ##### Class `samson.SBQuantity.angstrom` Signature: `class samson.SBQuantity.angstrom(*args, **kwargs)` Bases: Overloaded function. 1. angstrom(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘angstrom’ with the given value v 2. angstrom(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘angstrom’ from the given physical unit u ##### Class `samson.SBQuantity.picometer` Signature: `class samson.SBQuantity.picometer(*args, **kwargs)` Bases: Overloaded function. 1. picometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picometer’ with the given value v 2. picometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picometer’ from the given physical unit u ##### Class `samson.SBQuantity.femtometer` Signature: `class samson.SBQuantity.femtometer(*args, **kwargs)` Bases: Overloaded function. 1. femtometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtometer’ with the given value v 2. femtometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtometer’ from the given physical unit u ##### Class `samson.SBQuantity.attometer` Signature: `class samson.SBQuantity.attometer(*args, **kwargs)` Bases: Overloaded function. 1. attometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attometer’ with the given value v 2. attometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attometer’ from the given physical unit u ##### Class `samson.SBQuantity.zeptometer` Signature: `class samson.SBQuantity.zeptometer(*args, **kwargs)` Bases: Overloaded function. 1. zeptometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptometer’ with the given value v 2. zeptometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptometer’ from the given physical unit u ##### Class `samson.SBQuantity.yoctometer` Signature: `class samson.SBQuantity.yoctometer(*args, **kwargs)` Bases: Overloaded function. 1. yoctometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctometer’ with the given value v 2. yoctometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctometer’ from the given physical unit u ##### Class `samson.SBQuantity.km` Signature: `class samson.SBQuantity.km(*args, **kwargs)` Bases: Overloaded function. 1. km(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘km’ with the given value v 2. km(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘km’ from the given physical unit u ##### Class `samson.SBQuantity.hm` Signature: `class samson.SBQuantity.hm(*args, **kwargs)` Bases: Overloaded function. 1. hm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hm’ with the given value v 2. hm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hm’ from the given physical unit u ##### Class `samson.SBQuantity.dam` Signature: `class samson.SBQuantity.dam(*args, **kwargs)` Bases: Overloaded function. 1. dam(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dam’ with the given value v 2. dam(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dam’ from the given physical unit u ##### Class `samson.SBQuantity.m` Signature: `class samson.SBQuantity.m(*args, **kwargs)` Bases: Overloaded function. 1. m(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘m’ with the given value v 2. m(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘m’ from the given physical unit u ##### Class `samson.SBQuantity.dm` Signature: `class samson.SBQuantity.dm(*args, **kwargs)` Bases: Overloaded function. 1. dm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dm’ with the given value v 2. dm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dm’ from the given physical unit u ##### Class `samson.SBQuantity.cm` Signature: `class samson.SBQuantity.cm(*args, **kwargs)` Bases: Overloaded function. 1. cm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cm’ with the given value v 2. cm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cm’ from the given physical unit u ##### Class `samson.SBQuantity.mm` Signature: `class samson.SBQuantity.mm(*args, **kwargs)` Bases: Overloaded function. 1. mm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mm’ with the given value v 2. mm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mm’ from the given physical unit u ##### Class `samson.SBQuantity.um` Signature: `class samson.SBQuantity.um(*args, **kwargs)` Bases: Overloaded function. 1. um(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘um’ with the given value v 2. um(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘um’ from the given physical unit u ##### Class `samson.SBQuantity.nm` Signature: `class samson.SBQuantity.nm(*args, **kwargs)` Bases: Overloaded function. 1. nm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nm’ with the given value v 2. nm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nm’ from the given physical unit u ##### Class `samson.SBQuantity.pm` Signature: `class samson.SBQuantity.pm(*args, **kwargs)` Bases: Overloaded function. 1. pm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pm’ with the given value v 2. pm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pm’ from the given physical unit u ##### Class `samson.SBQuantity.fm` Signature: `class samson.SBQuantity.fm(*args, **kwargs)` Bases: Overloaded function. 1. fm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fm’ with the given value v 2. fm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fm’ from the given physical unit u ##### Class `samson.SBQuantity.am` Signature: `class samson.SBQuantity.am(*args, **kwargs)` Bases: Overloaded function. 1. am(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘am’ with the given value v 2. am(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘am’ from the given physical unit u ##### Class `samson.SBQuantity.zm` Signature: `class samson.SBQuantity.zm(*args, **kwargs)` Bases: Overloaded function. 1. zm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zm’ with the given value v 2. zm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zm’ from the given physical unit u ##### Class `samson.SBQuantity.ym` Signature: `class samson.SBQuantity.ym(*args, **kwargs)` Bases: Overloaded function. 1. ym(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ym’ with the given value v 2. ym(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ym’ from the given physical unit u ##### Class `samson.SBQuantity.inverseKilometer` Signature: `class samson.SBQuantity.inverseKilometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseKilometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseKilometer’ with the given value v 2. inverseKilometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseKilometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseHectometer` Signature: `class samson.SBQuantity.inverseHectometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseHectometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseHectometer’ with the given value v 2. inverseHectometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseHectometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseDecameter` Signature: `class samson.SBQuantity.inverseDecameter(*args, **kwargs)` Bases: Overloaded function. 1. inverseDecameter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDecameter’ with the given value v 2. inverseDecameter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDecameter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMeter` Signature: `class samson.SBQuantity.inverseMeter(*args, **kwargs)` Bases: Overloaded function. 1. inverseMeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMeter’ with the given value v 2. inverseMeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMeter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseDecimeter` Signature: `class samson.SBQuantity.inverseDecimeter(*args, **kwargs)` Bases: Overloaded function. 1. inverseDecimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDecimeter’ with the given value v 2. inverseDecimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDecimeter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCentimeter` Signature: `class samson.SBQuantity.inverseCentimeter(*args, **kwargs)` Bases: Overloaded function. 1. inverseCentimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCentimeter’ with the given value v 2. inverseCentimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCentimeter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMillimeter` Signature: `class samson.SBQuantity.inverseMillimeter(*args, **kwargs)` Bases: Overloaded function. 1. inverseMillimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMillimeter’ with the given value v 2. inverseMillimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMillimeter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMicrometer` Signature: `class samson.SBQuantity.inverseMicrometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseMicrometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMicrometer’ with the given value v 2. inverseMicrometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMicrometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseNanometer` Signature: `class samson.SBQuantity.inverseNanometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseNanometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseNanometer’ with the given value v 2. inverseNanometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseNanometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseAngstrom` Signature: `class samson.SBQuantity.inverseAngstrom(*args, **kwargs)` Bases: Overloaded function. 1. inverseAngstrom(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAngstrom’ with the given value v 2. inverseAngstrom(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAngstrom’ from the given physical unit u ##### Class `samson.SBQuantity.inversePicometer` Signature: `class samson.SBQuantity.inversePicometer(*args, **kwargs)` Bases: Overloaded function. 1. inversePicometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inversePicometer’ with the given value v 2. inversePicometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inversePicometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseFemtometer` Signature: `class samson.SBQuantity.inverseFemtometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseFemtometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseFemtometer’ with the given value v 2. inverseFemtometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseFemtometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseAttometer` Signature: `class samson.SBQuantity.inverseAttometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseAttometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAttometer’ with the given value v 2. inverseAttometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAttometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseZeptometer` Signature: `class samson.SBQuantity.inverseZeptometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseZeptometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseZeptometer’ with the given value v 2. inverseZeptometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseZeptometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseYoctometer` Signature: `class samson.SBQuantity.inverseYoctometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseYoctometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseYoctometer’ with the given value v 2. inverseYoctometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseYoctometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseKm` Signature: `class samson.SBQuantity.inverseKm(*args, **kwargs)` Bases: Overloaded function. 1. inverseKm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseKm’ with the given value v 2. inverseKm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseKm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseHm` Signature: `class samson.SBQuantity.inverseHm(*args, **kwargs)` Bases: Overloaded function. 1. inverseHm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseHm’ with the given value v 2. inverseHm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseHm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseDam` Signature: `class samson.SBQuantity.inverseDam(*args, **kwargs)` Bases: Overloaded function. 1. inverseDam(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDam’ with the given value v 2. inverseDam(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDam’ from the given physical unit u ##### Class `samson.SBQuantity.inverseM` Signature: `class samson.SBQuantity.inverseM(*args, **kwargs)` Bases: Overloaded function. 1. inverseM(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseM’ with the given value v 2. inverseM(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseM’ from the given physical unit u ##### Class `samson.SBQuantity.inverseDm` Signature: `class samson.SBQuantity.inverseDm(*args, **kwargs)` Bases: Overloaded function. 1. inverseDm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDm’ with the given value v 2. inverseDm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCm` Signature: `class samson.SBQuantity.inverseCm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCm’ with the given value v 2. inverseCm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMm` Signature: `class samson.SBQuantity.inverseMm(*args, **kwargs)` Bases: Overloaded function. 1. inverseMm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMm’ with the given value v 2. inverseMm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseUm` Signature: `class samson.SBQuantity.inverseUm(*args, **kwargs)` Bases: Overloaded function. 1. inverseUm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseUm’ with the given value v 2. inverseUm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseUm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseNm` Signature: `class samson.SBQuantity.inverseNm(*args, **kwargs)` Bases: Overloaded function. 1. inverseNm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseNm’ with the given value v 2. inverseNm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseNm’ from the given physical unit u ##### Class `samson.SBQuantity.inversePm` Signature: `class samson.SBQuantity.inversePm(*args, **kwargs)` Bases: Overloaded function. 1. inversePm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inversePm’ with the given value v 2. inversePm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inversePm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseFm` Signature: `class samson.SBQuantity.inverseFm(*args, **kwargs)` Bases: Overloaded function. 1. inverseFm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseFm’ with the given value v 2. inverseFm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseFm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseAm` Signature: `class samson.SBQuantity.inverseAm(*args, **kwargs)` Bases: Overloaded function. 1. inverseAm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAm’ with the given value v 2. inverseAm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseZm` Signature: `class samson.SBQuantity.inverseZm(*args, **kwargs)` Bases: Overloaded function. 1. inverseZm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseZm’ with the given value v 2. inverseZm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseZm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseYm` Signature: `class samson.SBQuantity.inverseYm(*args, **kwargs)` Bases: Overloaded function. 1. inverseYm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseYm’ with the given value v 2. inverseYm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseYm’ from the given physical unit u ##### Class `samson.SBQuantity.squareKilometer` Signature: `class samson.SBQuantity.squareKilometer(*args, **kwargs)` Bases: Overloaded function. 1. squareKilometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareKilometer’ with the given value v 2. squareKilometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareKilometer’ from the given physical unit u ##### Class `samson.SBQuantity.squareHectometer` Signature: `class samson.SBQuantity.squareHectometer(*args, **kwargs)` Bases: Overloaded function. 1. squareHectometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareHectometer’ with the given value v 2. squareHectometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareHectometer’ from the given physical unit u ##### Class `samson.SBQuantity.squareDecameter` Signature: `class samson.SBQuantity.squareDecameter(*args, **kwargs)` Bases: Overloaded function. 1. squareDecameter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareDecameter’ with the given value v 2. squareDecameter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareDecameter’ from the given physical unit u ##### Class `samson.SBQuantity.squareMeter` Signature: `class samson.SBQuantity.squareMeter(*args, **kwargs)` Bases: Overloaded function. 1. squareMeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareMeter’ with the given value v 2. squareMeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareMeter’ from the given physical unit u ##### Class `samson.SBQuantity.squareDecimeter` Signature: `class samson.SBQuantity.squareDecimeter(*args, **kwargs)` Bases: Overloaded function. 1. squareDecimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareDecimeter’ with the given value v 2. squareDecimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareDecimeter’ from the given physical unit u ##### Class `samson.SBQuantity.squareCentimeter` Signature: `class samson.SBQuantity.squareCentimeter(*args, **kwargs)` Bases: Overloaded function. 1. squareCentimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareCentimeter’ with the given value v 2. squareCentimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareCentimeter’ from the given physical unit u ##### Class `samson.SBQuantity.squareMillimeter` Signature: `class samson.SBQuantity.squareMillimeter(*args, **kwargs)` Bases: Overloaded function. 1. squareMillimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareMillimeter’ with the given value v 2. squareMillimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareMillimeter’ from the given physical unit u ##### Class `samson.SBQuantity.squareMicrometer` Signature: `class samson.SBQuantity.squareMicrometer(*args, **kwargs)` Bases: Overloaded function. 1. squareMicrometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareMicrometer’ with the given value v 2. squareMicrometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareMicrometer’ from the given physical unit u ##### Class `samson.SBQuantity.squareNanometer` Signature: `class samson.SBQuantity.squareNanometer(*args, **kwargs)` Bases: Overloaded function. 1. squareNanometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareNanometer’ with the given value v 2. squareNanometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareNanometer’ from the given physical unit u ##### Class `samson.SBQuantity.squareAngstrom` Signature: `class samson.SBQuantity.squareAngstrom(*args, **kwargs)` Bases: Overloaded function. 1. squareAngstrom(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareAngstrom’ with the given value v 2. squareAngstrom(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareAngstrom’ from the given physical unit u ##### Class `samson.SBQuantity.squarePicometer` Signature: `class samson.SBQuantity.squarePicometer(*args, **kwargs)` Bases: Overloaded function. 1. squarePicometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squarePicometer’ with the given value v 2. squarePicometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squarePicometer’ from the given physical unit u ##### Class `samson.SBQuantity.squareFemtometer` Signature: `class samson.SBQuantity.squareFemtometer(*args, **kwargs)` Bases: Overloaded function. 1. squareFemtometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareFemtometer’ with the given value v 2. squareFemtometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareFemtometer’ from the given physical unit u ##### Class `samson.SBQuantity.squareAttometer` Signature: `class samson.SBQuantity.squareAttometer(*args, **kwargs)` Bases: Overloaded function. 1. squareAttometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareAttometer’ with the given value v 2. squareAttometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareAttometer’ from the given physical unit u ##### Class `samson.SBQuantity.squareZeptometer` Signature: `class samson.SBQuantity.squareZeptometer(*args, **kwargs)` Bases: Overloaded function. 1. squareZeptometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareZeptometer’ with the given value v 2. squareZeptometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareZeptometer’ from the given physical unit u ##### Class `samson.SBQuantity.squareYoctometer` Signature: `class samson.SBQuantity.squareYoctometer(*args, **kwargs)` Bases: Overloaded function. 1. squareYoctometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareYoctometer’ with the given value v 2. squareYoctometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareYoctometer’ from the given physical unit u ##### Class `samson.SBQuantity.squareKm` Signature: `class samson.SBQuantity.squareKm(*args, **kwargs)` Bases: Overloaded function. 1. squareKm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareKm’ with the given value v 2. squareKm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareKm’ from the given physical unit u ##### Class `samson.SBQuantity.squareHm` Signature: `class samson.SBQuantity.squareHm(*args, **kwargs)` Bases: Overloaded function. 1. squareHm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareHm’ with the given value v 2. squareHm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareHm’ from the given physical unit u ##### Class `samson.SBQuantity.squareDam` Signature: `class samson.SBQuantity.squareDam(*args, **kwargs)` Bases: Overloaded function. 1. squareDam(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareDam’ with the given value v 2. squareDam(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareDam’ from the given physical unit u ##### Class `samson.SBQuantity.squareM` Signature: `class samson.SBQuantity.squareM(*args, **kwargs)` Bases: Overloaded function. 1. squareM(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareM’ with the given value v 2. squareM(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareM’ from the given physical unit u ##### Class `samson.SBQuantity.squareDm` Signature: `class samson.SBQuantity.squareDm(*args, **kwargs)` Bases: Overloaded function. 1. squareDm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareDm’ with the given value v 2. squareDm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareDm’ from the given physical unit u ##### Class `samson.SBQuantity.squareCm` Signature: `class samson.SBQuantity.squareCm(*args, **kwargs)` Bases: Overloaded function. 1. squareCm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareCm’ with the given value v 2. squareCm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareCm’ from the given physical unit u ##### Class `samson.SBQuantity.squareMm` Signature: `class samson.SBQuantity.squareMm(*args, **kwargs)` Bases: Overloaded function. 1. squareMm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareMm’ with the given value v 2. squareMm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareMm’ from the given physical unit u ##### Class `samson.SBQuantity.squareUm` Signature: `class samson.SBQuantity.squareUm(*args, **kwargs)` Bases: Overloaded function. 1. squareUm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareUm’ with the given value v 2. squareUm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareUm’ from the given physical unit u ##### Class `samson.SBQuantity.squareNm` Signature: `class samson.SBQuantity.squareNm(*args, **kwargs)` Bases: Overloaded function. 1. squareNm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareNm’ with the given value v 2. squareNm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareNm’ from the given physical unit u ##### Class `samson.SBQuantity.squarePm` Signature: `class samson.SBQuantity.squarePm(*args, **kwargs)` Bases: Overloaded function. 1. squarePm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squarePm’ with the given value v 2. squarePm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squarePm’ from the given physical unit u ##### Class `samson.SBQuantity.squareFm` Signature: `class samson.SBQuantity.squareFm(*args, **kwargs)` Bases: Overloaded function. 1. squareFm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareFm’ with the given value v 2. squareFm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareFm’ from the given physical unit u ##### Class `samson.SBQuantity.squareAm` Signature: `class samson.SBQuantity.squareAm(*args, **kwargs)` Bases: Overloaded function. 1. squareAm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareAm’ with the given value v 2. squareAm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareAm’ from the given physical unit u ##### Class `samson.SBQuantity.squareZm` Signature: `class samson.SBQuantity.squareZm(*args, **kwargs)` Bases: Overloaded function. 1. squareZm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareZm’ with the given value v 2. squareZm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareZm’ from the given physical unit u ##### Class `samson.SBQuantity.squareYm` Signature: `class samson.SBQuantity.squareYm(*args, **kwargs)` Bases: Overloaded function. 1. squareYm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareYm’ with the given value v 2. squareYm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareYm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareKilometer` Signature: `class samson.SBQuantity.inverseSquareKilometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareKilometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareKilometer’ with the given value v 2. inverseSquareKilometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareKilometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareHectometer` Signature: `class samson.SBQuantity.inverseSquareHectometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareHectometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareHectometer’ with the given value v 2. inverseSquareHectometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareHectometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareDecameter` Signature: `class samson.SBQuantity.inverseSquareDecameter(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareDecameter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareDecameter’ with the given value v 2. inverseSquareDecameter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareDecameter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareMeter` Signature: `class samson.SBQuantity.inverseSquareMeter(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareMeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareMeter’ with the given value v 2. inverseSquareMeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareMeter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareDecimeter` Signature: `class samson.SBQuantity.inverseSquareDecimeter(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareDecimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareDecimeter’ with the given value v 2. inverseSquareDecimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareDecimeter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareCentimeter` Signature: `class samson.SBQuantity.inverseSquareCentimeter(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareCentimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareCentimeter’ with the given value v 2. inverseSquareCentimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareCentimeter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareMillimeter` Signature: `class samson.SBQuantity.inverseSquareMillimeter(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareMillimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareMillimeter’ with the given value v 2. inverseSquareMillimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareMillimeter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareMicrometer` Signature: `class samson.SBQuantity.inverseSquareMicrometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareMicrometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareMicrometer’ with the given value v 2. inverseSquareMicrometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareMicrometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareNanometer` Signature: `class samson.SBQuantity.inverseSquareNanometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareNanometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareNanometer’ with the given value v 2. inverseSquareNanometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareNanometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareAngstrom` Signature: `class samson.SBQuantity.inverseSquareAngstrom(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareAngstrom(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareAngstrom’ with the given value v 2. inverseSquareAngstrom(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareAngstrom’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquarePicometer` Signature: `class samson.SBQuantity.inverseSquarePicometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquarePicometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquarePicometer’ with the given value v 2. inverseSquarePicometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquarePicometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareFemtometer` Signature: `class samson.SBQuantity.inverseSquareFemtometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareFemtometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareFemtometer’ with the given value v 2. inverseSquareFemtometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareFemtometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareAttometer` Signature: `class samson.SBQuantity.inverseSquareAttometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareAttometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareAttometer’ with the given value v 2. inverseSquareAttometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareAttometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareZeptometer` Signature: `class samson.SBQuantity.inverseSquareZeptometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareZeptometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareZeptometer’ with the given value v 2. inverseSquareZeptometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareZeptometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareYoctometer` Signature: `class samson.SBQuantity.inverseSquareYoctometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareYoctometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareYoctometer’ with the given value v 2. inverseSquareYoctometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareYoctometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareKm` Signature: `class samson.SBQuantity.inverseSquareKm(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareKm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareKm’ with the given value v 2. inverseSquareKm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareKm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareHm` Signature: `class samson.SBQuantity.inverseSquareHm(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareHm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareHm’ with the given value v 2. inverseSquareHm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareHm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareDam` Signature: `class samson.SBQuantity.inverseSquareDam(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareDam(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareDam’ with the given value v 2. inverseSquareDam(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareDam’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareM` Signature: `class samson.SBQuantity.inverseSquareM(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareM(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareM’ with the given value v 2. inverseSquareM(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareM’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareDm` Signature: `class samson.SBQuantity.inverseSquareDm(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareDm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareDm’ with the given value v 2. inverseSquareDm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareDm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareCm` Signature: `class samson.SBQuantity.inverseSquareCm(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareCm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareCm’ with the given value v 2. inverseSquareCm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareCm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareMm` Signature: `class samson.SBQuantity.inverseSquareMm(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareMm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareMm’ with the given value v 2. inverseSquareMm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareMm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareUm` Signature: `class samson.SBQuantity.inverseSquareUm(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareUm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareUm’ with the given value v 2. inverseSquareUm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareUm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareNm` Signature: `class samson.SBQuantity.inverseSquareNm(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareNm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareNm’ with the given value v 2. inverseSquareNm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareNm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquarePm` Signature: `class samson.SBQuantity.inverseSquarePm(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquarePm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquarePm’ with the given value v 2. inverseSquarePm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquarePm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareFm` Signature: `class samson.SBQuantity.inverseSquareFm(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareFm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareFm’ with the given value v 2. inverseSquareFm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareFm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareAm` Signature: `class samson.SBQuantity.inverseSquareAm(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareAm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareAm’ with the given value v 2. inverseSquareAm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareAm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareZm` Signature: `class samson.SBQuantity.inverseSquareZm(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareZm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareZm’ with the given value v 2. inverseSquareZm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareZm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareYm` Signature: `class samson.SBQuantity.inverseSquareYm(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareYm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareYm’ with the given value v 2. inverseSquareYm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareYm’ from the given physical unit u ##### Class `samson.SBQuantity.cubicKilometer` Signature: `class samson.SBQuantity.cubicKilometer(*args, **kwargs)` Bases: Overloaded function. 1. cubicKilometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicKilometer’ with the given value v 2. cubicKilometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicKilometer’ from the given physical unit u ##### Class `samson.SBQuantity.cubicHectometer` Signature: `class samson.SBQuantity.cubicHectometer(*args, **kwargs)` Bases: Overloaded function. 1. cubicHectometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicHectometer’ with the given value v 2. cubicHectometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicHectometer’ from the given physical unit u ##### Class `samson.SBQuantity.cubicDecameter` Signature: `class samson.SBQuantity.cubicDecameter(*args, **kwargs)` Bases: Overloaded function. 1. cubicDecameter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicDecameter’ with the given value v 2. cubicDecameter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicDecameter’ from the given physical unit u ##### Class `samson.SBQuantity.cubicMeter` Signature: `class samson.SBQuantity.cubicMeter(*args, **kwargs)` Bases: Overloaded function. 1. cubicMeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicMeter’ with the given value v 2. cubicMeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicMeter’ from the given physical unit u ##### Class `samson.SBQuantity.cubicDecimeter` Signature: `class samson.SBQuantity.cubicDecimeter(*args, **kwargs)` Bases: Overloaded function. 1. cubicDecimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicDecimeter’ with the given value v 2. cubicDecimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicDecimeter’ from the given physical unit u ##### Class `samson.SBQuantity.cubicCentimeter` Signature: `class samson.SBQuantity.cubicCentimeter(*args, **kwargs)` Bases: Overloaded function. 1. cubicCentimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicCentimeter’ with the given value v 2. cubicCentimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicCentimeter’ from the given physical unit u ##### Class `samson.SBQuantity.cubicMillimeter` Signature: `class samson.SBQuantity.cubicMillimeter(*args, **kwargs)` Bases: Overloaded function. 1. cubicMillimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicMillimeter’ with the given value v 2. cubicMillimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicMillimeter’ from the given physical unit u ##### Class `samson.SBQuantity.cubicMicrometer` Signature: `class samson.SBQuantity.cubicMicrometer(*args, **kwargs)` Bases: Overloaded function. 1. cubicMicrometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicMicrometer’ with the given value v 2. cubicMicrometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicMicrometer’ from the given physical unit u ##### Class `samson.SBQuantity.cubicNanometer` Signature: `class samson.SBQuantity.cubicNanometer(*args, **kwargs)` Bases: Overloaded function. 1. cubicNanometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicNanometer’ with the given value v 2. cubicNanometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicNanometer’ from the given physical unit u ##### Class `samson.SBQuantity.cubicAngstrom` Signature: `class samson.SBQuantity.cubicAngstrom(*args, **kwargs)` Bases: Overloaded function. 1. cubicAngstrom(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicAngstrom’ with the given value v 2. cubicAngstrom(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicAngstrom’ from the given physical unit u ##### Class `samson.SBQuantity.cubicPicometer` Signature: `class samson.SBQuantity.cubicPicometer(*args, **kwargs)` Bases: Overloaded function. 1. cubicPicometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicPicometer’ with the given value v 2. cubicPicometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicPicometer’ from the given physical unit u ##### Class `samson.SBQuantity.cubicFemtometer` Signature: `class samson.SBQuantity.cubicFemtometer(*args, **kwargs)` Bases: Overloaded function. 1. cubicFemtometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicFemtometer’ with the given value v 2. cubicFemtometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicFemtometer’ from the given physical unit u ##### Class `samson.SBQuantity.cubicAttometer` Signature: `class samson.SBQuantity.cubicAttometer(*args, **kwargs)` Bases: Overloaded function. 1. cubicAttometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicAttometer’ with the given value v 2. cubicAttometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicAttometer’ from the given physical unit u ##### Class `samson.SBQuantity.cubicZeptometer` Signature: `class samson.SBQuantity.cubicZeptometer(*args, **kwargs)` Bases: Overloaded function. 1. cubicZeptometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicZeptometer’ with the given value v 2. cubicZeptometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicZeptometer’ from the given physical unit u ##### Class `samson.SBQuantity.cubicYoctometer` Signature: `class samson.SBQuantity.cubicYoctometer(*args, **kwargs)` Bases: Overloaded function. 1. cubicYoctometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicYoctometer’ with the given value v 2. cubicYoctometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicYoctometer’ from the given physical unit u ##### Class `samson.SBQuantity.cubicKm` Signature: `class samson.SBQuantity.cubicKm(*args, **kwargs)` Bases: Overloaded function. 1. cubicKm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicKm’ with the given value v 2. cubicKm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicKm’ from the given physical unit u ##### Class `samson.SBQuantity.cubicHm` Signature: `class samson.SBQuantity.cubicHm(*args, **kwargs)` Bases: Overloaded function. 1. cubicHm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicHm’ with the given value v 2. cubicHm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicHm’ from the given physical unit u ##### Class `samson.SBQuantity.cubicDam` Signature: `class samson.SBQuantity.cubicDam(*args, **kwargs)` Bases: Overloaded function. 1. cubicDam(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicDam’ with the given value v 2. cubicDam(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicDam’ from the given physical unit u ##### Class `samson.SBQuantity.cubicM` Signature: `class samson.SBQuantity.cubicM(*args, **kwargs)` Bases: Overloaded function. 1. cubicM(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicM’ with the given value v 2. cubicM(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicM’ from the given physical unit u ##### Class `samson.SBQuantity.cubicDm` Signature: `class samson.SBQuantity.cubicDm(*args, **kwargs)` Bases: Overloaded function. 1. cubicDm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicDm’ with the given value v 2. cubicDm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicDm’ from the given physical unit u ##### Class `samson.SBQuantity.cubicCm` Signature: `class samson.SBQuantity.cubicCm(*args, **kwargs)` Bases: Overloaded function. 1. cubicCm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicCm’ with the given value v 2. cubicCm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicCm’ from the given physical unit u ##### Class `samson.SBQuantity.cubicMm` Signature: `class samson.SBQuantity.cubicMm(*args, **kwargs)` Bases: Overloaded function. 1. cubicMm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicMm’ with the given value v 2. cubicMm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicMm’ from the given physical unit u ##### Class `samson.SBQuantity.cubicUm` Signature: `class samson.SBQuantity.cubicUm(*args, **kwargs)` Bases: Overloaded function. 1. cubicUm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicUm’ with the given value v 2. cubicUm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicUm’ from the given physical unit u ##### Class `samson.SBQuantity.cubicNm` Signature: `class samson.SBQuantity.cubicNm(*args, **kwargs)` Bases: Overloaded function. 1. cubicNm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicNm’ with the given value v 2. cubicNm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicNm’ from the given physical unit u ##### Class `samson.SBQuantity.cubicPm` Signature: `class samson.SBQuantity.cubicPm(*args, **kwargs)` Bases: Overloaded function. 1. cubicPm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicPm’ with the given value v 2. cubicPm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicPm’ from the given physical unit u ##### Class `samson.SBQuantity.cubicFm` Signature: `class samson.SBQuantity.cubicFm(*args, **kwargs)` Bases: Overloaded function. 1. cubicFm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicFm’ with the given value v 2. cubicFm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicFm’ from the given physical unit u ##### Class `samson.SBQuantity.cubicAm` Signature: `class samson.SBQuantity.cubicAm(*args, **kwargs)` Bases: Overloaded function. 1. cubicAm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicAm’ with the given value v 2. cubicAm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicAm’ from the given physical unit u ##### Class `samson.SBQuantity.cubicZm` Signature: `class samson.SBQuantity.cubicZm(*args, **kwargs)` Bases: Overloaded function. 1. cubicZm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicZm’ with the given value v 2. cubicZm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicZm’ from the given physical unit u ##### Class `samson.SBQuantity.cubicYm` Signature: `class samson.SBQuantity.cubicYm(*args, **kwargs)` Bases: Overloaded function. 1. cubicYm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicYm’ with the given value v 2. cubicYm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicYm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicKilometer` Signature: `class samson.SBQuantity.inverseCubicKilometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicKilometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicKilometer’ with the given value v 2. inverseCubicKilometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicKilometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicHectometer` Signature: `class samson.SBQuantity.inverseCubicHectometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicHectometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicHectometer’ with the given value v 2. inverseCubicHectometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicHectometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicDecameter` Signature: `class samson.SBQuantity.inverseCubicDecameter(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicDecameter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicDecameter’ with the given value v 2. inverseCubicDecameter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicDecameter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicMeter` Signature: `class samson.SBQuantity.inverseCubicMeter(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicMeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicMeter’ with the given value v 2. inverseCubicMeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicMeter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicDecimeter` Signature: `class samson.SBQuantity.inverseCubicDecimeter(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicDecimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicDecimeter’ with the given value v 2. inverseCubicDecimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicDecimeter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicCentimeter` Signature: `class samson.SBQuantity.inverseCubicCentimeter(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicCentimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicCentimeter’ with the given value v 2. inverseCubicCentimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicCentimeter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicMillimeter` Signature: `class samson.SBQuantity.inverseCubicMillimeter(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicMillimeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicMillimeter’ with the given value v 2. inverseCubicMillimeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicMillimeter’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicMicrometer` Signature: `class samson.SBQuantity.inverseCubicMicrometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicMicrometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicMicrometer’ with the given value v 2. inverseCubicMicrometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicMicrometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicNanometer` Signature: `class samson.SBQuantity.inverseCubicNanometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicNanometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicNanometer’ with the given value v 2. inverseCubicNanometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicNanometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicAngstrom` Signature: `class samson.SBQuantity.inverseCubicAngstrom(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicAngstrom(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicAngstrom’ with the given value v 2. inverseCubicAngstrom(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicAngstrom’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicPicometer` Signature: `class samson.SBQuantity.inverseCubicPicometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicPicometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicPicometer’ with the given value v 2. inverseCubicPicometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicPicometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicFemtometer` Signature: `class samson.SBQuantity.inverseCubicFemtometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicFemtometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicFemtometer’ with the given value v 2. inverseCubicFemtometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicFemtometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicAttometer` Signature: `class samson.SBQuantity.inverseCubicAttometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicAttometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicAttometer’ with the given value v 2. inverseCubicAttometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicAttometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicZeptometer` Signature: `class samson.SBQuantity.inverseCubicZeptometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicZeptometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicZeptometer’ with the given value v 2. inverseCubicZeptometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicZeptometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicYoctometer` Signature: `class samson.SBQuantity.inverseCubicYoctometer(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicYoctometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicYoctometer’ with the given value v 2. inverseCubicYoctometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicYoctometer’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicKm` Signature: `class samson.SBQuantity.inverseCubicKm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicKm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicKm’ with the given value v 2. inverseCubicKm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicKm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicHm` Signature: `class samson.SBQuantity.inverseCubicHm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicHm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicHm’ with the given value v 2. inverseCubicHm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicHm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicDam` Signature: `class samson.SBQuantity.inverseCubicDam(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicDam(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicDam’ with the given value v 2. inverseCubicDam(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicDam’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicM` Signature: `class samson.SBQuantity.inverseCubicM(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicM(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicM’ with the given value v 2. inverseCubicM(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicM’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicDm` Signature: `class samson.SBQuantity.inverseCubicDm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicDm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicDm’ with the given value v 2. inverseCubicDm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicDm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicCm` Signature: `class samson.SBQuantity.inverseCubicCm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicCm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicCm’ with the given value v 2. inverseCubicCm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicCm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicMm` Signature: `class samson.SBQuantity.inverseCubicMm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicMm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicMm’ with the given value v 2. inverseCubicMm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicMm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicUm` Signature: `class samson.SBQuantity.inverseCubicUm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicUm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicUm’ with the given value v 2. inverseCubicUm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicUm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicNm` Signature: `class samson.SBQuantity.inverseCubicNm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicNm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicNm’ with the given value v 2. inverseCubicNm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicNm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicPm` Signature: `class samson.SBQuantity.inverseCubicPm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicPm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicPm’ with the given value v 2. inverseCubicPm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicPm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicFm` Signature: `class samson.SBQuantity.inverseCubicFm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicFm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicFm’ with the given value v 2. inverseCubicFm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicFm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicAm` Signature: `class samson.SBQuantity.inverseCubicAm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicAm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicAm’ with the given value v 2. inverseCubicAm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicAm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicZm` Signature: `class samson.SBQuantity.inverseCubicZm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicZm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicZm’ with the given value v 2. inverseCubicZm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicZm’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicYm` Signature: `class samson.SBQuantity.inverseCubicYm(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicYm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicYm’ with the given value v 2. inverseCubicYm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicYm’ from the given physical unit u ##### Class `samson.SBQuantity.fermi` Signature: `class samson.SBQuantity.fermi(*args, **kwargs)` Bases: Overloaded function. 1. fermi(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fermi’ with the given value v 2. fermi(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fermi’ from the given physical unit u ##### Class `samson.SBQuantity.micron` Signature: `class samson.SBQuantity.micron(*args, **kwargs)` Bases: Overloaded function. 1. micron(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘micron’ with the given value v 2. micron(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘micron’ from the given physical unit u ### Mass ##### Class `samson.SBQuantity.kilogram` Signature: `class samson.SBQuantity.kilogram(*args, **kwargs)` Bases: Overloaded function. 1. kilogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilogram’ with the given value v 2. kilogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilogram’ from the given physical unit u ##### Class `samson.SBQuantity.hectogram` Signature: `class samson.SBQuantity.hectogram(*args, **kwargs)` Bases: Overloaded function. 1. hectogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hectogram’ with the given value v 2. hectogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hectogram’ from the given physical unit u ##### Class `samson.SBQuantity.decagram` Signature: `class samson.SBQuantity.decagram(*args, **kwargs)` Bases: Overloaded function. 1. decagram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decagram’ with the given value v 2. decagram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decagram’ from the given physical unit u ##### Class `samson.SBQuantity.gram` Signature: `class samson.SBQuantity.gram(*args, **kwargs)` Bases: Overloaded function. 1. gram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘gram’ with the given value v 2. gram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘gram’ from the given physical unit u ##### Class `samson.SBQuantity.decigram` Signature: `class samson.SBQuantity.decigram(*args, **kwargs)` Bases: Overloaded function. 1. decigram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decigram’ with the given value v 2. decigram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decigram’ from the given physical unit u ##### Class `samson.SBQuantity.centigram` Signature: `class samson.SBQuantity.centigram(*args, **kwargs)` Bases: Overloaded function. 1. centigram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centigram’ with the given value v 2. centigram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centigram’ from the given physical unit u ##### Class `samson.SBQuantity.milligram` Signature: `class samson.SBQuantity.milligram(*args, **kwargs)` Bases: Overloaded function. 1. milligram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘milligram’ with the given value v 2. milligram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘milligram’ from the given physical unit u ##### Class `samson.SBQuantity.microgram` Signature: `class samson.SBQuantity.microgram(*args, **kwargs)` Bases: Overloaded function. 1. microgram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘microgram’ with the given value v 2. microgram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘microgram’ from the given physical unit u ##### Class `samson.SBQuantity.nanogram` Signature: `class samson.SBQuantity.nanogram(*args, **kwargs)` Bases: Overloaded function. 1. nanogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanogram’ with the given value v 2. nanogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanogram’ from the given physical unit u ##### Class `samson.SBQuantity.picogram` Signature: `class samson.SBQuantity.picogram(*args, **kwargs)` Bases: Overloaded function. 1. picogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picogram’ with the given value v 2. picogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picogram’ from the given physical unit u ##### Class `samson.SBQuantity.femtogram` Signature: `class samson.SBQuantity.femtogram(*args, **kwargs)` Bases: Overloaded function. 1. femtogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtogram’ with the given value v 2. femtogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtogram’ from the given physical unit u ##### Class `samson.SBQuantity.attogram` Signature: `class samson.SBQuantity.attogram(*args, **kwargs)` Bases: Overloaded function. 1. attogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attogram’ with the given value v 2. attogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attogram’ from the given physical unit u ##### Class `samson.SBQuantity.zeptogram` Signature: `class samson.SBQuantity.zeptogram(*args, **kwargs)` Bases: Overloaded function. 1. zeptogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptogram’ with the given value v 2. zeptogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptogram’ from the given physical unit u ##### Class `samson.SBQuantity.yoctogram` Signature: `class samson.SBQuantity.yoctogram(*args, **kwargs)` Bases: Overloaded function. 1. yoctogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctogram’ with the given value v 2. yoctogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctogram’ from the given physical unit u ##### Class `samson.SBQuantity.kg` Signature: `class samson.SBQuantity.kg(*args, **kwargs)` Bases: Overloaded function. 1. kg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kg’ with the given value v 2. kg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kg’ from the given physical unit u ##### Class `samson.SBQuantity.hg` Signature: `class samson.SBQuantity.hg(*args, **kwargs)` Bases: Overloaded function. 1. hg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hg’ with the given value v 2. hg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hg’ from the given physical unit u ##### Class `samson.SBQuantity.dag` Signature: `class samson.SBQuantity.dag(*args, **kwargs)` Bases: Overloaded function. 1. dag(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dag’ with the given value v 2. dag(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dag’ from the given physical unit u ##### Class `samson.SBQuantity.g` Signature: `class samson.SBQuantity.g(*args, **kwargs)` Bases: Overloaded function. 1. g(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘g’ with the given value v 2. g(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘g’ from the given physical unit u ##### Class `samson.SBQuantity.dg` Signature: `class samson.SBQuantity.dg(*args, **kwargs)` Bases: Overloaded function. 1. dg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dg’ with the given value v 2. dg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dg’ from the given physical unit u ##### Class `samson.SBQuantity.cg` Signature: `class samson.SBQuantity.cg(*args, **kwargs)` Bases: Overloaded function. 1. cg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cg’ with the given value v 2. cg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cg’ from the given physical unit u ##### Class `samson.SBQuantity.mg` Signature: `class samson.SBQuantity.mg(*args, **kwargs)` Bases: Overloaded function. 1. mg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mg’ with the given value v 2. mg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mg’ from the given physical unit u ##### Class `samson.SBQuantity.ug` Signature: `class samson.SBQuantity.ug(*args, **kwargs)` Bases: Overloaded function. 1. ug(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ug’ with the given value v 2. ug(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ug’ from the given physical unit u ##### Class `samson.SBQuantity.ng` Signature: `class samson.SBQuantity.ng(*args, **kwargs)` Bases: Overloaded function. 1. ng(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ng’ with the given value v 2. ng(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ng’ from the given physical unit u ##### Class `samson.SBQuantity.pg` Signature: `class samson.SBQuantity.pg(*args, **kwargs)` Bases: Overloaded function. 1. pg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pg’ with the given value v 2. pg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pg’ from the given physical unit u ##### Class `samson.SBQuantity.fg` Signature: `class samson.SBQuantity.fg(*args, **kwargs)` Bases: Overloaded function. 1. fg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fg’ with the given value v 2. fg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fg’ from the given physical unit u ##### Class `samson.SBQuantity.ag` Signature: `class samson.SBQuantity.ag(*args, **kwargs)` Bases: Overloaded function. 1. ag(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ag’ with the given value v 2. ag(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ag’ from the given physical unit u ##### Class `samson.SBQuantity.zg` Signature: `class samson.SBQuantity.zg(*args, **kwargs)` Bases: Overloaded function. 1. zg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zg’ with the given value v 2. zg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zg’ from the given physical unit u ##### Class `samson.SBQuantity.yg` Signature: `class samson.SBQuantity.yg(*args, **kwargs)` Bases: Overloaded function. 1. yg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yg’ with the given value v 2. yg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yg’ from the given physical unit u ##### Class `samson.SBQuantity.inverseKilogram` Signature: `class samson.SBQuantity.inverseKilogram(*args, **kwargs)` Bases: Overloaded function. 1. inverseKilogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseKilogram’ with the given value v 2. inverseKilogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseKilogram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseHectogram` Signature: `class samson.SBQuantity.inverseHectogram(*args, **kwargs)` Bases: Overloaded function. 1. inverseHectogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseHectogram’ with the given value v 2. inverseHectogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseHectogram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseDecagram` Signature: `class samson.SBQuantity.inverseDecagram(*args, **kwargs)` Bases: Overloaded function. 1. inverseDecagram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDecagram’ with the given value v 2. inverseDecagram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDecagram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseGram` Signature: `class samson.SBQuantity.inverseGram(*args, **kwargs)` Bases: Overloaded function. 1. inverseGram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseGram’ with the given value v 2. inverseGram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseGram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseDecigram` Signature: `class samson.SBQuantity.inverseDecigram(*args, **kwargs)` Bases: Overloaded function. 1. inverseDecigram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDecigram’ with the given value v 2. inverseDecigram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDecigram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCentigram` Signature: `class samson.SBQuantity.inverseCentigram(*args, **kwargs)` Bases: Overloaded function. 1. inverseCentigram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCentigram’ with the given value v 2. inverseCentigram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCentigram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMilligram` Signature: `class samson.SBQuantity.inverseMilligram(*args, **kwargs)` Bases: Overloaded function. 1. inverseMilligram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMilligram’ with the given value v 2. inverseMilligram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMilligram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMicrogram` Signature: `class samson.SBQuantity.inverseMicrogram(*args, **kwargs)` Bases: Overloaded function. 1. inverseMicrogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMicrogram’ with the given value v 2. inverseMicrogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMicrogram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseNanogram` Signature: `class samson.SBQuantity.inverseNanogram(*args, **kwargs)` Bases: Overloaded function. 1. inverseNanogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseNanogram’ with the given value v 2. inverseNanogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseNanogram’ from the given physical unit u ##### Class `samson.SBQuantity.inversePicogram` Signature: `class samson.SBQuantity.inversePicogram(*args, **kwargs)` Bases: Overloaded function. 1. inversePicogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inversePicogram’ with the given value v 2. inversePicogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inversePicogram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseFemtogram` Signature: `class samson.SBQuantity.inverseFemtogram(*args, **kwargs)` Bases: Overloaded function. 1. inverseFemtogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseFemtogram’ with the given value v 2. inverseFemtogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseFemtogram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseAttogram` Signature: `class samson.SBQuantity.inverseAttogram(*args, **kwargs)` Bases: Overloaded function. 1. inverseAttogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAttogram’ with the given value v 2. inverseAttogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAttogram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseZeptogram` Signature: `class samson.SBQuantity.inverseZeptogram(*args, **kwargs)` Bases: Overloaded function. 1. inverseZeptogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseZeptogram’ with the given value v 2. inverseZeptogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseZeptogram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseYoctogram` Signature: `class samson.SBQuantity.inverseYoctogram(*args, **kwargs)` Bases: Overloaded function. 1. inverseYoctogram(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseYoctogram’ with the given value v 2. inverseYoctogram(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseYoctogram’ from the given physical unit u ##### Class `samson.SBQuantity.inverseKg` Signature: `class samson.SBQuantity.inverseKg(*args, **kwargs)` Bases: Overloaded function. 1. inverseKg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseKg’ with the given value v 2. inverseKg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseKg’ from the given physical unit u ##### Class `samson.SBQuantity.inverseHg` Signature: `class samson.SBQuantity.inverseHg(*args, **kwargs)` Bases: Overloaded function. 1. inverseHg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseHg’ with the given value v 2. inverseHg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseHg’ from the given physical unit u ##### Class `samson.SBQuantity.inverseDag` Signature: `class samson.SBQuantity.inverseDag(*args, **kwargs)` Bases: Overloaded function. 1. inverseDag(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDag’ with the given value v 2. inverseDag(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDag’ from the given physical unit u ##### Class `samson.SBQuantity.inverseG` Signature: `class samson.SBQuantity.inverseG(*args, **kwargs)` Bases: Overloaded function. 1. inverseG(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseG’ with the given value v 2. inverseG(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseG’ from the given physical unit u ##### Class `samson.SBQuantity.inverseDg` Signature: `class samson.SBQuantity.inverseDg(*args, **kwargs)` Bases: Overloaded function. 1. inverseDg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDg’ with the given value v 2. inverseDg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDg’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCg` Signature: `class samson.SBQuantity.inverseCg(*args, **kwargs)` Bases: Overloaded function. 1. inverseCg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCg’ with the given value v 2. inverseCg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCg’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMg` Signature: `class samson.SBQuantity.inverseMg(*args, **kwargs)` Bases: Overloaded function. 1. inverseMg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMg’ with the given value v 2. inverseMg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMg’ from the given physical unit u ##### Class `samson.SBQuantity.inverseUg` Signature: `class samson.SBQuantity.inverseUg(*args, **kwargs)` Bases: Overloaded function. 1. inverseUg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseUg’ with the given value v 2. inverseUg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseUg’ from the given physical unit u ##### Class `samson.SBQuantity.inverseNg` Signature: `class samson.SBQuantity.inverseNg(*args, **kwargs)` Bases: Overloaded function. 1. inverseNg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseNg’ with the given value v 2. inverseNg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseNg’ from the given physical unit u ##### Class `samson.SBQuantity.inversePg` Signature: `class samson.SBQuantity.inversePg(*args, **kwargs)` Bases: Overloaded function. 1. inversePg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inversePg’ with the given value v 2. inversePg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inversePg’ from the given physical unit u ##### Class `samson.SBQuantity.inverseFg` Signature: `class samson.SBQuantity.inverseFg(*args, **kwargs)` Bases: Overloaded function. 1. inverseFg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseFg’ with the given value v 2. inverseFg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseFg’ from the given physical unit u ##### Class `samson.SBQuantity.inverseAg` Signature: `class samson.SBQuantity.inverseAg(*args, **kwargs)` Bases: Overloaded function. 1. inverseAg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAg’ with the given value v 2. inverseAg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAg’ from the given physical unit u ##### Class `samson.SBQuantity.inverseZg` Signature: `class samson.SBQuantity.inverseZg(*args, **kwargs)` Bases: Overloaded function. 1. inverseZg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseZg’ with the given value v 2. inverseZg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseZg’ from the given physical unit u ##### Class `samson.SBQuantity.inverseYg` Signature: `class samson.SBQuantity.inverseYg(*args, **kwargs)` Bases: Overloaded function. 1. inverseYg(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseYg’ with the given value v 2. inverseYg(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseYg’ from the given physical unit u ### Time ##### Class `samson.SBQuantity.second` Signature: `class samson.SBQuantity.second(*args, **kwargs)` Bases: Overloaded function. 1. second(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘second’ with the given value v 2. second(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘second’ from the given physical unit u ##### Class `samson.SBQuantity.decisecond` Signature: `class samson.SBQuantity.decisecond(*args, **kwargs)` Bases: Overloaded function. 1. decisecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decisecond’ with the given value v 2. decisecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decisecond’ from the given physical unit u ##### Class `samson.SBQuantity.centisecond` Signature: `class samson.SBQuantity.centisecond(*args, **kwargs)` Bases: Overloaded function. 1. centisecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centisecond’ with the given value v 2. centisecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centisecond’ from the given physical unit u ##### Class `samson.SBQuantity.millisecond` Signature: `class samson.SBQuantity.millisecond(*args, **kwargs)` Bases: Overloaded function. 1. millisecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘millisecond’ with the given value v 2. millisecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘millisecond’ from the given physical unit u ##### Class `samson.SBQuantity.microsecond` Signature: `class samson.SBQuantity.microsecond(*args, **kwargs)` Bases: Overloaded function. 1. microsecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘microsecond’ with the given value v 2. microsecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘microsecond’ from the given physical unit u ##### Class `samson.SBQuantity.nanosecond` Signature: `class samson.SBQuantity.nanosecond(*args, **kwargs)` Bases: Overloaded function. 1. nanosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanosecond’ with the given value v 2. nanosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanosecond’ from the given physical unit u ##### Class `samson.SBQuantity.picosecond` Signature: `class samson.SBQuantity.picosecond(*args, **kwargs)` Bases: Overloaded function. 1. picosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picosecond’ with the given value v 2. picosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picosecond’ from the given physical unit u ##### Class `samson.SBQuantity.femtosecond` Signature: `class samson.SBQuantity.femtosecond(*args, **kwargs)` Bases: Overloaded function. 1. femtosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtosecond’ with the given value v 2. femtosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtosecond’ from the given physical unit u ##### Class `samson.SBQuantity.attosecond` Signature: `class samson.SBQuantity.attosecond(*args, **kwargs)` Bases: Overloaded function. 1. attosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attosecond’ with the given value v 2. attosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attosecond’ from the given physical unit u ##### Class `samson.SBQuantity.zeptosecond` Signature: `class samson.SBQuantity.zeptosecond(*args, **kwargs)` Bases: Overloaded function. 1. zeptosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptosecond’ with the given value v 2. zeptosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptosecond’ from the given physical unit u ##### Class `samson.SBQuantity.yoctosecond` Signature: `class samson.SBQuantity.yoctosecond(*args, **kwargs)` Bases: Overloaded function. 1. yoctosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctosecond’ with the given value v 2. yoctosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctosecond’ from the given physical unit u ##### Class `samson.SBQuantity.s` Signature: `class samson.SBQuantity.s(*args, **kwargs)` Bases: Overloaded function. 1. s(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘s’ with the given value v 2. s(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘s’ from the given physical unit u ##### Class `samson.SBQuantity.ds` Signature: `class samson.SBQuantity.ds(*args, **kwargs)` Bases: Overloaded function. 1. ds(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ds’ with the given value v 2. ds(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ds’ from the given physical unit u ##### Class `samson.SBQuantity.cs` Signature: `class samson.SBQuantity.cs(*args, **kwargs)` Bases: Overloaded function. 1. cs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cs’ with the given value v 2. cs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cs’ from the given physical unit u ##### Class `samson.SBQuantity.ms` Signature: `class samson.SBQuantity.ms(*args, **kwargs)` Bases: Overloaded function. 1. ms(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ms’ with the given value v 2. ms(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ms’ from the given physical unit u ##### Class `samson.SBQuantity.us` Signature: `class samson.SBQuantity.us(*args, **kwargs)` Bases: Overloaded function. 1. us(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘us’ with the given value v 2. us(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘us’ from the given physical unit u ##### Class `samson.SBQuantity.ns` Signature: `class samson.SBQuantity.ns(*args, **kwargs)` Bases: Overloaded function. 1. ns(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ns’ with the given value v 2. ns(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ns’ from the given physical unit u ##### Class `samson.SBQuantity.ps` Signature: `class samson.SBQuantity.ps(*args, **kwargs)` Bases: Overloaded function. 1. ps(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ps’ with the given value v 2. ps(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ps’ from the given physical unit u ##### Class `samson.SBQuantity.fs` Signature: `class samson.SBQuantity.fs(*args, **kwargs)` Bases: Overloaded function. 1. fs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fs’ with the given value v 2. fs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fs’ from the given physical unit u ##### Class `samson.SBQuantity.zs` Signature: `class samson.SBQuantity.zs(*args, **kwargs)` Bases: Overloaded function. 1. zs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zs’ with the given value v 2. zs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zs’ from the given physical unit u ##### Class `samson.SBQuantity.ys` Signature: `class samson.SBQuantity.ys(*args, **kwargs)` Bases: Overloaded function. 1. ys(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ys’ with the given value v 2. ys(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ys’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSecond` Signature: `class samson.SBQuantity.inverseSecond(*args, **kwargs)` Bases: Overloaded function. 1. inverseSecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSecond’ with the given value v 2. inverseSecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSecond’ from the given physical unit u ##### Class `samson.SBQuantity.inverseDecisecond` Signature: `class samson.SBQuantity.inverseDecisecond(*args, **kwargs)` Bases: Overloaded function. 1. inverseDecisecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDecisecond’ with the given value v 2. inverseDecisecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDecisecond’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCentisecond` Signature: `class samson.SBQuantity.inverseCentisecond(*args, **kwargs)` Bases: Overloaded function. 1. inverseCentisecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCentisecond’ with the given value v 2. inverseCentisecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCentisecond’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMillisecond` Signature: `class samson.SBQuantity.inverseMillisecond(*args, **kwargs)` Bases: Overloaded function. 1. inverseMillisecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMillisecond’ with the given value v 2. inverseMillisecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMillisecond’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMicrosecond` Signature: `class samson.SBQuantity.inverseMicrosecond(*args, **kwargs)` Bases: Overloaded function. 1. inverseMicrosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMicrosecond’ with the given value v 2. inverseMicrosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMicrosecond’ from the given physical unit u ##### Class `samson.SBQuantity.inverseNanosecond` Signature: `class samson.SBQuantity.inverseNanosecond(*args, **kwargs)` Bases: Overloaded function. 1. inverseNanosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseNanosecond’ with the given value v 2. inverseNanosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseNanosecond’ from the given physical unit u ##### Class `samson.SBQuantity.inversePicosecond` Signature: `class samson.SBQuantity.inversePicosecond(*args, **kwargs)` Bases: Overloaded function. 1. inversePicosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inversePicosecond’ with the given value v 2. inversePicosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inversePicosecond’ from the given physical unit u ##### Class `samson.SBQuantity.inverseFemtosecond` Signature: `class samson.SBQuantity.inverseFemtosecond(*args, **kwargs)` Bases: Overloaded function. 1. inverseFemtosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseFemtosecond’ with the given value v 2. inverseFemtosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseFemtosecond’ from the given physical unit u ##### Class `samson.SBQuantity.inverseAttosecond` Signature: `class samson.SBQuantity.inverseAttosecond(*args, **kwargs)` Bases: Overloaded function. 1. inverseAttosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAttosecond’ with the given value v 2. inverseAttosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAttosecond’ from the given physical unit u ##### Class `samson.SBQuantity.inverseZeptosecond` Signature: `class samson.SBQuantity.inverseZeptosecond(*args, **kwargs)` Bases: Overloaded function. 1. inverseZeptosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseZeptosecond’ with the given value v 2. inverseZeptosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseZeptosecond’ from the given physical unit u ##### Class `samson.SBQuantity.inverseYoctosecond` Signature: `class samson.SBQuantity.inverseYoctosecond(*args, **kwargs)` Bases: Overloaded function. 1. inverseYoctosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseYoctosecond’ with the given value v 2. inverseYoctosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseYoctosecond’ from the given physical unit u ##### Class `samson.SBQuantity.inverseS` Signature: `class samson.SBQuantity.inverseS(*args, **kwargs)` Bases: Overloaded function. 1. inverseS(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseS’ with the given value v 2. inverseS(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseS’ from the given physical unit u ##### Class `samson.SBQuantity.inverseDs` Signature: `class samson.SBQuantity.inverseDs(*args, **kwargs)` Bases: Overloaded function. 1. inverseDs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDs’ with the given value v 2. inverseDs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDs’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCs` Signature: `class samson.SBQuantity.inverseCs(*args, **kwargs)` Bases: Overloaded function. 1. inverseCs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCs’ with the given value v 2. inverseCs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCs’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMs` Signature: `class samson.SBQuantity.inverseMs(*args, **kwargs)` Bases: Overloaded function. 1. inverseMs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMs’ with the given value v 2. inverseMs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMs’ from the given physical unit u ##### Class `samson.SBQuantity.inverseUs` Signature: `class samson.SBQuantity.inverseUs(*args, **kwargs)` Bases: Overloaded function. 1. inverseUs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseUs’ with the given value v 2. inverseUs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseUs’ from the given physical unit u ##### Class `samson.SBQuantity.inverseNs` Signature: `class samson.SBQuantity.inverseNs(*args, **kwargs)` Bases: Overloaded function. 1. inverseNs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseNs’ with the given value v 2. inverseNs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseNs’ from the given physical unit u ##### Class `samson.SBQuantity.inversePs` Signature: `class samson.SBQuantity.inversePs(*args, **kwargs)` Bases: Overloaded function. 1. inversePs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inversePs’ with the given value v 2. inversePs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inversePs’ from the given physical unit u ##### Class `samson.SBQuantity.inverseFs` Signature: `class samson.SBQuantity.inverseFs(*args, **kwargs)` Bases: Overloaded function. 1. inverseFs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseFs’ with the given value v 2. inverseFs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseFs’ from the given physical unit u ##### Class `samson.SBQuantity.inverseAs` Signature: `class samson.SBQuantity.inverseAs(*args, **kwargs)` Bases: Overloaded function. 1. inverseAs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAs’ with the given value v 2. inverseAs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAs’ from the given physical unit u ##### Class `samson.SBQuantity.inverseZs` Signature: `class samson.SBQuantity.inverseZs(*args, **kwargs)` Bases: Overloaded function. 1. inverseZs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseZs’ with the given value v 2. inverseZs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseZs’ from the given physical unit u ##### Class `samson.SBQuantity.inverseYs` Signature: `class samson.SBQuantity.inverseYs(*args, **kwargs)` Bases: Overloaded function. 1. inverseYs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseYs’ with the given value v 2. inverseYs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseYs’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareFemtosecond` Signature: `class samson.SBQuantity.inverseSquareFemtosecond(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareFemtosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareFemtosecond’ with the given value v 2. inverseSquareFemtosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareFemtosecond’ from the given physical unit u ### Intensity (Ampere) ##### Class `samson.SBQuantity.kiloampere` Signature: `class samson.SBQuantity.kiloampere(*args, **kwargs)` Bases: Overloaded function. 1. kiloampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kiloampere’ with the given value v 2. kiloampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kiloampere’ from the given physical unit u ##### Class `samson.SBQuantity.hectoampere` Signature: `class samson.SBQuantity.hectoampere(*args, **kwargs)` Bases: Overloaded function. 1. hectoampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hectoampere’ with the given value v 2. hectoampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hectoampere’ from the given physical unit u ##### Class `samson.SBQuantity.decaampere` Signature: `class samson.SBQuantity.decaampere(*args, **kwargs)` Bases: Overloaded function. 1. decaampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decaampere’ with the given value v 2. decaampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decaampere’ from the given physical unit u ##### Class `samson.SBQuantity.ampere` Signature: `class samson.SBQuantity.ampere(*args, **kwargs)` Bases: Overloaded function. 1. ampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ampere’ with the given value v 2. ampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ampere’ from the given physical unit u ##### Class `samson.SBQuantity.deciampere` Signature: `class samson.SBQuantity.deciampere(*args, **kwargs)` Bases: Overloaded function. 1. deciampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘deciampere’ with the given value v 2. deciampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘deciampere’ from the given physical unit u ##### Class `samson.SBQuantity.centiampere` Signature: `class samson.SBQuantity.centiampere(*args, **kwargs)` Bases: Overloaded function. 1. centiampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centiampere’ with the given value v 2. centiampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centiampere’ from the given physical unit u ##### Class `samson.SBQuantity.milliampere` Signature: `class samson.SBQuantity.milliampere(*args, **kwargs)` Bases: Overloaded function. 1. milliampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘milliampere’ with the given value v 2. milliampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘milliampere’ from the given physical unit u ##### Class `samson.SBQuantity.microampere` Signature: `class samson.SBQuantity.microampere(*args, **kwargs)` Bases: Overloaded function. 1. microampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘microampere’ with the given value v 2. microampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘microampere’ from the given physical unit u ##### Class `samson.SBQuantity.nanoampere` Signature: `class samson.SBQuantity.nanoampere(*args, **kwargs)` Bases: Overloaded function. 1. nanoampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanoampere’ with the given value v 2. nanoampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanoampere’ from the given physical unit u ##### Class `samson.SBQuantity.picoampere` Signature: `class samson.SBQuantity.picoampere(*args, **kwargs)` Bases: Overloaded function. 1. picoampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picoampere’ with the given value v 2. picoampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picoampere’ from the given physical unit u ##### Class `samson.SBQuantity.femtoampere` Signature: `class samson.SBQuantity.femtoampere(*args, **kwargs)` Bases: Overloaded function. 1. femtoampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtoampere’ with the given value v 2. femtoampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtoampere’ from the given physical unit u ##### Class `samson.SBQuantity.attoampere` Signature: `class samson.SBQuantity.attoampere(*args, **kwargs)` Bases: Overloaded function. 1. attoampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attoampere’ with the given value v 2. attoampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attoampere’ from the given physical unit u ##### Class `samson.SBQuantity.zeptoampere` Signature: `class samson.SBQuantity.zeptoampere(*args, **kwargs)` Bases: Overloaded function. 1. zeptoampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptoampere’ with the given value v 2. zeptoampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptoampere’ from the given physical unit u ##### Class `samson.SBQuantity.yoctoampere` Signature: `class samson.SBQuantity.yoctoampere(*args, **kwargs)` Bases: Overloaded function. 1. yoctoampere(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctoampere’ with the given value v 2. yoctoampere(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctoampere’ from the given physical unit u ##### Class `samson.SBQuantity.kA` Signature: `class samson.SBQuantity.kA(*args, **kwargs)` Bases: Overloaded function. 1. kA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kA’ with the given value v 2. kA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kA’ from the given physical unit u ##### Class `samson.SBQuantity.hA` Signature: `class samson.SBQuantity.hA(*args, **kwargs)` Bases: Overloaded function. 1. hA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hA’ with the given value v 2. hA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hA’ from the given physical unit u ##### Class `samson.SBQuantity.daA` Signature: `class samson.SBQuantity.daA(*args, **kwargs)` Bases: Overloaded function. 1. daA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘daA’ with the given value v 2. daA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘daA’ from the given physical unit u ##### Class `samson.SBQuantity.A` Signature: `class samson.SBQuantity.A(*args, **kwargs)` Bases: Overloaded function. 1. A(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘A’ with the given value v 2. A(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘A’ from the given physical unit u ##### Class `samson.SBQuantity.dA` Signature: `class samson.SBQuantity.dA(*args, **kwargs)` Bases: Overloaded function. 1. dA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dA’ with the given value v 2. dA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dA’ from the given physical unit u ##### Class `samson.SBQuantity.cA` Signature: `class samson.SBQuantity.cA(*args, **kwargs)` Bases: Overloaded function. 1. cA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cA’ with the given value v 2. cA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cA’ from the given physical unit u ##### Class `samson.SBQuantity.mA` Signature: `class samson.SBQuantity.mA(*args, **kwargs)` Bases: Overloaded function. 1. mA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mA’ with the given value v 2. mA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mA’ from the given physical unit u ##### Class `samson.SBQuantity.uA` Signature: `class samson.SBQuantity.uA(*args, **kwargs)` Bases: Overloaded function. 1. uA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘uA’ with the given value v 2. uA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘uA’ from the given physical unit u ##### Class `samson.SBQuantity.nA` Signature: `class samson.SBQuantity.nA(*args, **kwargs)` Bases: Overloaded function. 1. nA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nA’ with the given value v 2. nA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nA’ from the given physical unit u ##### Class `samson.SBQuantity.pA` Signature: `class samson.SBQuantity.pA(*args, **kwargs)` Bases: Overloaded function. 1. pA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pA’ with the given value v 2. pA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pA’ from the given physical unit u ##### Class `samson.SBQuantity.fA` Signature: `class samson.SBQuantity.fA(*args, **kwargs)` Bases: Overloaded function. 1. fA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fA’ with the given value v 2. fA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fA’ from the given physical unit u ##### Class `samson.SBQuantity.aA` Signature: `class samson.SBQuantity.aA(*args, **kwargs)` Bases: Overloaded function. 1. aA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘aA’ with the given value v 2. aA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘aA’ from the given physical unit u ##### Class `samson.SBQuantity.zA` Signature: `class samson.SBQuantity.zA(*args, **kwargs)` Bases: Overloaded function. 1. zA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zA’ with the given value v 2. zA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zA’ from the given physical unit u ##### Class `samson.SBQuantity.yA` Signature: `class samson.SBQuantity.yA(*args, **kwargs)` Bases: Overloaded function. 1. yA(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yA’ with the given value v 2. yA(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yA’ from the given physical unit u ### Temperature ##### Class `samson.SBQuantity.kilokelvin` Signature: `class samson.SBQuantity.kilokelvin(*args, **kwargs)` Bases: Overloaded function. 1. kilokelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilokelvin’ with the given value v 2. kilokelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilokelvin’ from the given physical unit u ##### Class `samson.SBQuantity.hectokelvin` Signature: `class samson.SBQuantity.hectokelvin(*args, **kwargs)` Bases: Overloaded function. 1. hectokelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hectokelvin’ with the given value v 2. hectokelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hectokelvin’ from the given physical unit u ##### Class `samson.SBQuantity.decakelvin` Signature: `class samson.SBQuantity.decakelvin(*args, **kwargs)` Bases: Overloaded function. 1. decakelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decakelvin’ with the given value v 2. decakelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decakelvin’ from the given physical unit u ##### Class `samson.SBQuantity.kelvin` Signature: `class samson.SBQuantity.kelvin(*args, **kwargs)` Bases: Overloaded function. 1. kelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kelvin’ with the given value v 2. kelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kelvin’ from the given physical unit u ##### Class `samson.SBQuantity.decikelvin` Signature: `class samson.SBQuantity.decikelvin(*args, **kwargs)` Bases: Overloaded function. 1. decikelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decikelvin’ with the given value v 2. decikelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decikelvin’ from the given physical unit u ##### Class `samson.SBQuantity.centikelvin` Signature: `class samson.SBQuantity.centikelvin(*args, **kwargs)` Bases: Overloaded function. 1. centikelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centikelvin’ with the given value v 2. centikelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centikelvin’ from the given physical unit u ##### Class `samson.SBQuantity.millikelvin` Signature: `class samson.SBQuantity.millikelvin(*args, **kwargs)` Bases: Overloaded function. 1. millikelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘millikelvin’ with the given value v 2. millikelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘millikelvin’ from the given physical unit u ##### Class `samson.SBQuantity.microkelvin` Signature: `class samson.SBQuantity.microkelvin(*args, **kwargs)` Bases: Overloaded function. 1. microkelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘microkelvin’ with the given value v 2. microkelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘microkelvin’ from the given physical unit u ##### Class `samson.SBQuantity.nanokelvin` Signature: `class samson.SBQuantity.nanokelvin(*args, **kwargs)` Bases: Overloaded function. 1. nanokelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanokelvin’ with the given value v 2. nanokelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanokelvin’ from the given physical unit u ##### Class `samson.SBQuantity.picokelvin` Signature: `class samson.SBQuantity.picokelvin(*args, **kwargs)` Bases: Overloaded function. 1. picokelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picokelvin’ with the given value v 2. picokelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picokelvin’ from the given physical unit u ##### Class `samson.SBQuantity.femtokelvin` Signature: `class samson.SBQuantity.femtokelvin(*args, **kwargs)` Bases: Overloaded function. 1. femtokelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtokelvin’ with the given value v 2. femtokelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtokelvin’ from the given physical unit u ##### Class `samson.SBQuantity.attokelvin` Signature: `class samson.SBQuantity.attokelvin(*args, **kwargs)` Bases: Overloaded function. 1. attokelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attokelvin’ with the given value v 2. attokelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attokelvin’ from the given physical unit u ##### Class `samson.SBQuantity.zeptokelvin` Signature: `class samson.SBQuantity.zeptokelvin(*args, **kwargs)` Bases: Overloaded function. 1. zeptokelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptokelvin’ with the given value v 2. zeptokelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptokelvin’ from the given physical unit u ##### Class `samson.SBQuantity.yoctokelvin` Signature: `class samson.SBQuantity.yoctokelvin(*args, **kwargs)` Bases: Overloaded function. 1. yoctokelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctokelvin’ with the given value v 2. yoctokelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctokelvin’ from the given physical unit u ##### Class `samson.SBQuantity.kK` Signature: `class samson.SBQuantity.kK(*args, **kwargs)` Bases: Overloaded function. 1. kK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kK’ with the given value v 2. kK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kK’ from the given physical unit u ##### Class `samson.SBQuantity.hK` Signature: `class samson.SBQuantity.hK(*args, **kwargs)` Bases: Overloaded function. 1. hK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hK’ with the given value v 2. hK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hK’ from the given physical unit u ##### Class `samson.SBQuantity.daK` Signature: `class samson.SBQuantity.daK(*args, **kwargs)` Bases: Overloaded function. 1. daK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘daK’ with the given value v 2. daK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘daK’ from the given physical unit u ##### Class `samson.SBQuantity.K` Signature: `class samson.SBQuantity.K(*args, **kwargs)` Bases: Overloaded function. 1. K(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘K’ with the given value v 2. K(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘K’ from the given physical unit u ##### Class `samson.SBQuantity.dK` Signature: `class samson.SBQuantity.dK(*args, **kwargs)` Bases: Overloaded function. 1. dK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dK’ with the given value v 2. dK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dK’ from the given physical unit u ##### Class `samson.SBQuantity.cK` Signature: `class samson.SBQuantity.cK(*args, **kwargs)` Bases: Overloaded function. 1. cK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cK’ with the given value v 2. cK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cK’ from the given physical unit u ##### Class `samson.SBQuantity.mK` Signature: `class samson.SBQuantity.mK(*args, **kwargs)` Bases: Overloaded function. 1. mK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mK’ with the given value v 2. mK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mK’ from the given physical unit u ##### Class `samson.SBQuantity.uK` Signature: `class samson.SBQuantity.uK(*args, **kwargs)` Bases: Overloaded function. 1. uK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘uK’ with the given value v 2. uK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘uK’ from the given physical unit u ##### Class `samson.SBQuantity.nK` Signature: `class samson.SBQuantity.nK(*args, **kwargs)` Bases: Overloaded function. 1. nK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nK’ with the given value v 2. nK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nK’ from the given physical unit u ##### Class `samson.SBQuantity.pK` Signature: `class samson.SBQuantity.pK(*args, **kwargs)` Bases: Overloaded function. 1. pK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pK’ with the given value v 2. pK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pK’ from the given physical unit u ##### Class `samson.SBQuantity.fK` Signature: `class samson.SBQuantity.fK(*args, **kwargs)` Bases: Overloaded function. 1. fK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fK’ with the given value v 2. fK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fK’ from the given physical unit u ##### Class `samson.SBQuantity.aK` Signature: `class samson.SBQuantity.aK(*args, **kwargs)` Bases: Overloaded function. 1. aK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘aK’ with the given value v 2. aK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘aK’ from the given physical unit u ##### Class `samson.SBQuantity.zK` Signature: `class samson.SBQuantity.zK(*args, **kwargs)` Bases: Overloaded function. 1. zK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zK’ with the given value v 2. zK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zK’ from the given physical unit u ##### Class `samson.SBQuantity.yK` Signature: `class samson.SBQuantity.yK(*args, **kwargs)` Bases: Overloaded function. 1. yK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yK’ with the given value v 2. yK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yK’ from the given physical unit u ### Amount of substance ##### Class `samson.SBQuantity.kilomole` Signature: `class samson.SBQuantity.kilomole(*args, **kwargs)` Bases: Overloaded function. 1. kilomole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilomole’ with the given value v 2. kilomole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilomole’ from the given physical unit u ##### Class `samson.SBQuantity.hectomole` Signature: `class samson.SBQuantity.hectomole(*args, **kwargs)` Bases: Overloaded function. 1. hectomole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hectomole’ with the given value v 2. hectomole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hectomole’ from the given physical unit u ##### Class `samson.SBQuantity.decamole` Signature: `class samson.SBQuantity.decamole(*args, **kwargs)` Bases: Overloaded function. 1. decamole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decamole’ with the given value v 2. decamole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decamole’ from the given physical unit u ##### Class `samson.SBQuantity.mole` Signature: `class samson.SBQuantity.mole(*args, **kwargs)` Bases: Overloaded function. 1. mole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mole’ with the given value v 2. mole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mole’ from the given physical unit u ##### Class `samson.SBQuantity.decimole` Signature: `class samson.SBQuantity.decimole(*args, **kwargs)` Bases: Overloaded function. 1. decimole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decimole’ with the given value v 2. decimole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decimole’ from the given physical unit u ##### Class `samson.SBQuantity.centimole` Signature: `class samson.SBQuantity.centimole(*args, **kwargs)` Bases: Overloaded function. 1. centimole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centimole’ with the given value v 2. centimole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centimole’ from the given physical unit u ##### Class `samson.SBQuantity.millimole` Signature: `class samson.SBQuantity.millimole(*args, **kwargs)` Bases: Overloaded function. 1. millimole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘millimole’ with the given value v 2. millimole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘millimole’ from the given physical unit u ##### Class `samson.SBQuantity.micromole` Signature: `class samson.SBQuantity.micromole(*args, **kwargs)` Bases: Overloaded function. 1. micromole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘micromole’ with the given value v 2. micromole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘micromole’ from the given physical unit u ##### Class `samson.SBQuantity.nanomole` Signature: `class samson.SBQuantity.nanomole(*args, **kwargs)` Bases: Overloaded function. 1. nanomole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanomole’ with the given value v 2. nanomole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanomole’ from the given physical unit u ##### Class `samson.SBQuantity.picomole` Signature: `class samson.SBQuantity.picomole(*args, **kwargs)` Bases: Overloaded function. 1. picomole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picomole’ with the given value v 2. picomole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picomole’ from the given physical unit u ##### Class `samson.SBQuantity.femtomole` Signature: `class samson.SBQuantity.femtomole(*args, **kwargs)` Bases: Overloaded function. 1. femtomole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtomole’ with the given value v 2. femtomole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtomole’ from the given physical unit u ##### Class `samson.SBQuantity.attomole` Signature: `class samson.SBQuantity.attomole(*args, **kwargs)` Bases: Overloaded function. 1. attomole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attomole’ with the given value v 2. attomole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attomole’ from the given physical unit u ##### Class `samson.SBQuantity.zeptomole` Signature: `class samson.SBQuantity.zeptomole(*args, **kwargs)` Bases: Overloaded function. 1. zeptomole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptomole’ with the given value v 2. zeptomole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptomole’ from the given physical unit u ##### Class `samson.SBQuantity.yoctomole` Signature: `class samson.SBQuantity.yoctomole(*args, **kwargs)` Bases: Overloaded function. 1. yoctomole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctomole’ with the given value v 2. yoctomole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctomole’ from the given physical unit u ##### Class `samson.SBQuantity.kmol` Signature: `class samson.SBQuantity.kmol(*args, **kwargs)` Bases: Overloaded function. 1. kmol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kmol’ with the given value v 2. kmol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kmol’ from the given physical unit u ##### Class `samson.SBQuantity.hmol` Signature: `class samson.SBQuantity.hmol(*args, **kwargs)` Bases: Overloaded function. 1. hmol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hmol’ with the given value v 2. hmol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hmol’ from the given physical unit u ##### Class `samson.SBQuantity.damol` Signature: `class samson.SBQuantity.damol(*args, **kwargs)` Bases: Overloaded function. 1. damol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘damol’ with the given value v 2. damol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘damol’ from the given physical unit u ##### Class `samson.SBQuantity.mol` Signature: `class samson.SBQuantity.mol(*args, **kwargs)` Bases: Overloaded function. 1. mol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mol’ with the given value v 2. mol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mol’ from the given physical unit u ##### Class `samson.SBQuantity.dmol` Signature: `class samson.SBQuantity.dmol(*args, **kwargs)` Bases: Overloaded function. 1. dmol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dmol’ with the given value v 2. dmol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dmol’ from the given physical unit u ##### Class `samson.SBQuantity.cmol` Signature: `class samson.SBQuantity.cmol(*args, **kwargs)` Bases: Overloaded function. 1. cmol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cmol’ with the given value v 2. cmol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cmol’ from the given physical unit u ##### Class `samson.SBQuantity.mmol` Signature: `class samson.SBQuantity.mmol(*args, **kwargs)` Bases: Overloaded function. 1. mmol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mmol’ with the given value v 2. mmol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mmol’ from the given physical unit u ##### Class `samson.SBQuantity.umol` Signature: `class samson.SBQuantity.umol(*args, **kwargs)` Bases: Overloaded function. 1. umol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘umol’ with the given value v 2. umol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘umol’ from the given physical unit u ##### Class `samson.SBQuantity.nmol` Signature: `class samson.SBQuantity.nmol(*args, **kwargs)` Bases: Overloaded function. 1. nmol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nmol’ with the given value v 2. nmol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nmol’ from the given physical unit u ##### Class `samson.SBQuantity.pmol` Signature: `class samson.SBQuantity.pmol(*args, **kwargs)` Bases: Overloaded function. 1. pmol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pmol’ with the given value v 2. pmol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pmol’ from the given physical unit u ##### Class `samson.SBQuantity.fmol` Signature: `class samson.SBQuantity.fmol(*args, **kwargs)` Bases: Overloaded function. 1. fmol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fmol’ with the given value v 2. fmol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fmol’ from the given physical unit u ##### Class `samson.SBQuantity.amol` Signature: `class samson.SBQuantity.amol(*args, **kwargs)` Bases: Overloaded function. 1. amol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘amol’ with the given value v 2. amol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘amol’ from the given physical unit u ##### Class `samson.SBQuantity.zmol` Signature: `class samson.SBQuantity.zmol(*args, **kwargs)` Bases: Overloaded function. 1. zmol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zmol’ with the given value v 2. zmol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zmol’ from the given physical unit u ##### Class `samson.SBQuantity.ymol` Signature: `class samson.SBQuantity.ymol(*args, **kwargs)` Bases: Overloaded function. 1. ymol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ymol’ with the given value v 2. ymol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ymol’ from the given physical unit u ### Luminous intensity ##### Class `samson.SBQuantity.kilocandela` Signature: `class samson.SBQuantity.kilocandela(*args, **kwargs)` Bases: Overloaded function. 1. kilocandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilocandela’ with the given value v 2. kilocandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilocandela’ from the given physical unit u ##### Class `samson.SBQuantity.hectocandela` Signature: `class samson.SBQuantity.hectocandela(*args, **kwargs)` Bases: Overloaded function. 1. hectocandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hectocandela’ with the given value v 2. hectocandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hectocandela’ from the given physical unit u ##### Class `samson.SBQuantity.decacandela` Signature: `class samson.SBQuantity.decacandela(*args, **kwargs)` Bases: Overloaded function. 1. decacandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decacandela’ with the given value v 2. decacandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decacandela’ from the given physical unit u ##### Class `samson.SBQuantity.candela` Signature: `class samson.SBQuantity.candela(*args, **kwargs)` Bases: Overloaded function. 1. candela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘candela’ with the given value v 2. candela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘candela’ from the given physical unit u ##### Class `samson.SBQuantity.decicandela` Signature: `class samson.SBQuantity.decicandela(*args, **kwargs)` Bases: Overloaded function. 1. decicandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decicandela’ with the given value v 2. decicandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘decicandela’ from the given physical unit u ##### Class `samson.SBQuantity.centicandela` Signature: `class samson.SBQuantity.centicandela(*args, **kwargs)` Bases: Overloaded function. 1. centicandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centicandela’ with the given value v 2. centicandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘centicandela’ from the given physical unit u ##### Class `samson.SBQuantity.millicandela` Signature: `class samson.SBQuantity.millicandela(*args, **kwargs)` Bases: Overloaded function. 1. millicandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘millicandela’ with the given value v 2. millicandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘millicandela’ from the given physical unit u ##### Class `samson.SBQuantity.microcandela` Signature: `class samson.SBQuantity.microcandela(*args, **kwargs)` Bases: Overloaded function. 1. microcandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘microcandela’ with the given value v 2. microcandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘microcandela’ from the given physical unit u ##### Class `samson.SBQuantity.nanocandela` Signature: `class samson.SBQuantity.nanocandela(*args, **kwargs)` Bases: Overloaded function. 1. nanocandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanocandela’ with the given value v 2. nanocandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanocandela’ from the given physical unit u ##### Class `samson.SBQuantity.picocandela` Signature: `class samson.SBQuantity.picocandela(*args, **kwargs)` Bases: Overloaded function. 1. picocandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picocandela’ with the given value v 2. picocandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picocandela’ from the given physical unit u ##### Class `samson.SBQuantity.femtocandela` Signature: `class samson.SBQuantity.femtocandela(*args, **kwargs)` Bases: Overloaded function. 1. femtocandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtocandela’ with the given value v 2. femtocandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘femtocandela’ from the given physical unit u ##### Class `samson.SBQuantity.attocandela` Signature: `class samson.SBQuantity.attocandela(*args, **kwargs)` Bases: Overloaded function. 1. attocandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attocandela’ with the given value v 2. attocandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘attocandela’ from the given physical unit u ##### Class `samson.SBQuantity.zeptocandela` Signature: `class samson.SBQuantity.zeptocandela(*args, **kwargs)` Bases: Overloaded function. 1. zeptocandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptocandela’ with the given value v 2. zeptocandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptocandela’ from the given physical unit u ##### Class `samson.SBQuantity.yoctocandela` Signature: `class samson.SBQuantity.yoctocandela(*args, **kwargs)` Bases: Overloaded function. 1. yoctocandela(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctocandela’ with the given value v 2. yoctocandela(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctocandela’ from the given physical unit u ##### Class `samson.SBQuantity.kcd` Signature: `class samson.SBQuantity.kcd(*args, **kwargs)` Bases: Overloaded function. 1. kcd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kcd’ with the given value v 2. kcd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kcd’ from the given physical unit u ##### Class `samson.SBQuantity.hcd` Signature: `class samson.SBQuantity.hcd(*args, **kwargs)` Bases: Overloaded function. 1. hcd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hcd’ with the given value v 2. hcd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hcd’ from the given physical unit u ##### Class `samson.SBQuantity.dacd` Signature: `class samson.SBQuantity.dacd(*args, **kwargs)` Bases: Overloaded function. 1. dacd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dacd’ with the given value v 2. dacd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dacd’ from the given physical unit u ##### Class `samson.SBQuantity.cd` Signature: `class samson.SBQuantity.cd(*args, **kwargs)` Bases: Overloaded function. 1. cd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cd’ with the given value v 2. cd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cd’ from the given physical unit u ##### Class `samson.SBQuantity.dcd` Signature: `class samson.SBQuantity.dcd(*args, **kwargs)` Bases: Overloaded function. 1. dcd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dcd’ with the given value v 2. dcd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘dcd’ from the given physical unit u ##### Class `samson.SBQuantity.ccd` Signature: `class samson.SBQuantity.ccd(*args, **kwargs)` Bases: Overloaded function. 1. ccd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ccd’ with the given value v 2. ccd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ccd’ from the given physical unit u ##### Class `samson.SBQuantity.mcd` Signature: `class samson.SBQuantity.mcd(*args, **kwargs)` Bases: Overloaded function. 1. mcd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mcd’ with the given value v 2. mcd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mcd’ from the given physical unit u ##### Class `samson.SBQuantity.ucd` Signature: `class samson.SBQuantity.ucd(*args, **kwargs)` Bases: Overloaded function. 1. ucd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ucd’ with the given value v 2. ucd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ucd’ from the given physical unit u ##### Class `samson.SBQuantity.ncd` Signature: `class samson.SBQuantity.ncd(*args, **kwargs)` Bases: Overloaded function. 1. ncd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ncd’ with the given value v 2. ncd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ncd’ from the given physical unit u ##### Class `samson.SBQuantity.pcd` Signature: `class samson.SBQuantity.pcd(*args, **kwargs)` Bases: Overloaded function. 1. pcd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pcd’ with the given value v 2. pcd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pcd’ from the given physical unit u ##### Class `samson.SBQuantity.fcd` Signature: `class samson.SBQuantity.fcd(*args, **kwargs)` Bases: Overloaded function. 1. fcd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fcd’ with the given value v 2. fcd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘fcd’ from the given physical unit u ##### Class `samson.SBQuantity.acd` Signature: `class samson.SBQuantity.acd(*args, **kwargs)` Bases: Overloaded function. 1. acd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘acd’ with the given value v 2. acd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘acd’ from the given physical unit u ##### Class `samson.SBQuantity.zcd` Signature: `class samson.SBQuantity.zcd(*args, **kwargs)` Bases: Overloaded function. 1. zcd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zcd’ with the given value v 2. zcd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zcd’ from the given physical unit u ##### Class `samson.SBQuantity.ycd` Signature: `class samson.SBQuantity.ycd(*args, **kwargs)` Bases: Overloaded function. 1. ycd(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ycd’ with the given value v 2. ycd(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ycd’ from the given physical unit u ### Base quantities ##### Class `samson.SBQuantity.length` Signature: `class samson.SBQuantity.length(*args, **kwargs)` Bases: Overloaded function. 1. length(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘length’ with the given value v 2. length(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘length’ from the given physical unit u ##### Class `samson.SBQuantity.squareLength` Signature: `class samson.SBQuantity.squareLength(*args, **kwargs)` Bases: Overloaded function. 1. squareLength(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareLength’ with the given value v 2. squareLength(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareLength’ from the given physical unit u ##### Class `samson.SBQuantity.cubicLength` Signature: `class samson.SBQuantity.cubicLength(*args, **kwargs)` Bases: Overloaded function. 1. cubicLength(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicLength’ with the given value v 2. cubicLength(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicLength’ from the given physical unit u ##### Class `samson.SBQuantity.inverseLength` Signature: `class samson.SBQuantity.inverseLength(*args, **kwargs)` Bases: Overloaded function. 1. inverseLength(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseLength’ with the given value v 2. inverseLength(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseLength’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareLength` Signature: `class samson.SBQuantity.inverseSquareLength(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareLength(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareLength’ with the given value v 2. inverseSquareLength(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareLength’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicLength` Signature: `class samson.SBQuantity.inverseCubicLength(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicLength(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicLength’ with the given value v 2. inverseCubicLength(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicLength’ from the given physical unit u ##### Class `samson.SBQuantity.distance` Signature: `class samson.SBQuantity.distance(*args, **kwargs)` Bases: Overloaded function. 1. distance(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘distance’ with the given value v 2. distance(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘distance’ from the given physical unit u ##### Class `samson.SBQuantity.squareDistance` Signature: `class samson.SBQuantity.squareDistance(*args, **kwargs)` Bases: Overloaded function. 1. squareDistance(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareDistance’ with the given value v 2. squareDistance(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareDistance’ from the given physical unit u ##### Class `samson.SBQuantity.cubicDistance` Signature: `class samson.SBQuantity.cubicDistance(*args, **kwargs)` Bases: Overloaded function. 1. cubicDistance(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicDistance’ with the given value v 2. cubicDistance(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘cubicDistance’ from the given physical unit u ##### Class `samson.SBQuantity.inverseDistance` Signature: `class samson.SBQuantity.inverseDistance(*args, **kwargs)` Bases: Overloaded function. 1. inverseDistance(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDistance’ with the given value v 2. inverseDistance(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseDistance’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareDistance` Signature: `class samson.SBQuantity.inverseSquareDistance(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareDistance(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareDistance’ with the given value v 2. inverseSquareDistance(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareDistance’ from the given physical unit u ##### Class `samson.SBQuantity.inverseCubicDistance` Signature: `class samson.SBQuantity.inverseCubicDistance(*args, **kwargs)` Bases: Overloaded function. 1. inverseCubicDistance(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicDistance’ with the given value v 2. inverseCubicDistance(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseCubicDistance’ from the given physical unit u ##### Class `samson.SBQuantity.mass` Signature: `class samson.SBQuantity.mass(*args, **kwargs)` Bases: Overloaded function. 1. mass(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mass’ with the given value v 2. mass(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘mass’ from the given physical unit u ##### Class `samson.SBQuantity.squareMass` Signature: `class samson.SBQuantity.squareMass(*args, **kwargs)` Bases: Overloaded function. 1. squareMass(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareMass’ with the given value v 2. squareMass(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareMass’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMass` Signature: `class samson.SBQuantity.inverseMass(*args, **kwargs)` Bases: Overloaded function. 1. inverseMass(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMass’ with the given value v 2. inverseMass(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMass’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareMass` Signature: `class samson.SBQuantity.inverseSquareMass(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareMass(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareMass’ with the given value v 2. inverseSquareMass(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareMass’ from the given physical unit u ##### Class `samson.SBQuantity.time` Signature: `class samson.SBQuantity.time(*args, **kwargs)` Bases: Overloaded function. 1. time(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘time’ with the given value v 2. time(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘time’ from the given physical unit u ##### Class `samson.SBQuantity.squareTime` Signature: `class samson.SBQuantity.squareTime(*args, **kwargs)` Bases: Overloaded function. 1. squareTime(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareTime’ with the given value v 2. squareTime(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareTime’ from the given physical unit u ##### Class `samson.SBQuantity.inverseTime` Signature: `class samson.SBQuantity.inverseTime(*args, **kwargs)` Bases: Overloaded function. 1. inverseTime(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseTime’ with the given value v 2. inverseTime(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseTime’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareTime` Signature: `class samson.SBQuantity.inverseSquareTime(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareTime(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareTime’ with the given value v 2. inverseSquareTime(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareTime’ from the given physical unit u ##### Class `samson.SBQuantity.intensity` Signature: `class samson.SBQuantity.intensity(*args, **kwargs)` Bases: Overloaded function. 1. intensity(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘intensity’ with the given value v 2. intensity(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘intensity’ from the given physical unit u ##### Class `samson.SBQuantity.squareIntensity` Signature: `class samson.SBQuantity.squareIntensity(*args, **kwargs)` Bases: Overloaded function. 1. squareIntensity(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareIntensity’ with the given value v 2. squareIntensity(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareIntensity’ from the given physical unit u ##### Class `samson.SBQuantity.inverseIntensity` Signature: `class samson.SBQuantity.inverseIntensity(*args, **kwargs)` Bases: Overloaded function. 1. inverseIntensity(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseIntensity’ with the given value v 2. inverseIntensity(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseIntensity’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareIntensity` Signature: `class samson.SBQuantity.inverseSquareIntensity(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareIntensity(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareIntensity’ with the given value v 2. inverseSquareIntensity(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareIntensity’ from the given physical unit u ##### Class `samson.SBQuantity.temperature` Signature: `class samson.SBQuantity.temperature(*args, **kwargs)` Bases: Overloaded function. 1. temperature(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘temperature’ with the given value v 2. temperature(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘temperature’ from the given physical unit u ##### Class `samson.SBQuantity.squareTemperature` Signature: `class samson.SBQuantity.squareTemperature(*args, **kwargs)` Bases: Overloaded function. 1. squareTemperature(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareTemperature’ with the given value v 2. squareTemperature(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareTemperature’ from the given physical unit u ##### Class `samson.SBQuantity.inverseTemperature` Signature: `class samson.SBQuantity.inverseTemperature(*args, **kwargs)` Bases: Overloaded function. 1. inverseTemperature(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseTemperature’ with the given value v 2. inverseTemperature(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseTemperature’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareTemperature` Signature: `class samson.SBQuantity.inverseSquareTemperature(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareTemperature(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareTemperature’ with the given value v 2. inverseSquareTemperature(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareTemperature’ from the given physical unit u ##### Class `samson.SBQuantity.amountOfSubstance` Signature: `class samson.SBQuantity.amountOfSubstance(*args, **kwargs)` Bases: Overloaded function. 1. amountOfSubstance(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘amountOfSubstance’ with the given value v 2. amountOfSubstance(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘amountOfSubstance’ from the given physical unit u ##### Class `samson.SBQuantity.squareAmountOfSubstance` Signature: `class samson.SBQuantity.squareAmountOfSubstance(*args, **kwargs)` Bases: Overloaded function. 1. squareAmountOfSubstance(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareAmountOfSubstance’ with the given value v 2. squareAmountOfSubstance(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareAmountOfSubstance’ from the given physical unit u ##### Class `samson.SBQuantity.inverseAmountOfSubstance` Signature: `class samson.SBQuantity.inverseAmountOfSubstance(*args, **kwargs)` Bases: Overloaded function. 1. inverseAmountOfSubstance(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAmountOfSubstance’ with the given value v 2. inverseAmountOfSubstance(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseAmountOfSubstance’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareAmountOfSubstance` Signature: `class samson.SBQuantity.inverseSquareAmountOfSubstance(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareAmountOfSubstance(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareAmountOfSubstance’ with the given value v 2. inverseSquareAmountOfSubstance(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareAmountOfSubstance’ from the given physical unit u ##### Class `samson.SBQuantity.luminousIntensity` Signature: `class samson.SBQuantity.luminousIntensity(*args, **kwargs)` Bases: Overloaded function. 1. luminousIntensity(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘luminousIntensity’ with the given value v 2. luminousIntensity(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘luminousIntensity’ from the given physical unit u ##### Class `samson.SBQuantity.squareLuminousIntensity` Signature: `class samson.SBQuantity.squareLuminousIntensity(*args, **kwargs)` Bases: Overloaded function. 1. squareLuminousIntensity(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareLuminousIntensity’ with the given value v 2. squareLuminousIntensity(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘squareLuminousIntensity’ from the given physical unit u ##### Class `samson.SBQuantity.inverseLuminousIntensity` Signature: `class samson.SBQuantity.inverseLuminousIntensity(*args, **kwargs)` Bases: Overloaded function. 1. inverseLuminousIntensity(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseLuminousIntensity’ with the given value v 2. inverseLuminousIntensity(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseLuminousIntensity’ from the given physical unit u ##### Class `samson.SBQuantity.inverseSquareLuminousIntensity` Signature: `class samson.SBQuantity.inverseSquareLuminousIntensity(*args, **kwargs)` Bases: Overloaded function. 1. inverseSquareLuminousIntensity(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareLuminousIntensity’ with the given value v 2. inverseSquareLuminousIntensity(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseSquareLuminousIntensity’ from the given physical unit u ### Derived quantities ##### Class `samson.SBQuantity.electricCharge` Signature: `class samson.SBQuantity.electricCharge(*args, **kwargs)` Bases: Overloaded function. 1. electricCharge(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘electricCharge’ with the given value v 2. electricCharge(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘electricCharge’ from the given physical unit u ##### Class `samson.SBQuantity.voltage` Signature: `class samson.SBQuantity.voltage(*args, **kwargs)` Bases: Overloaded function. 1. voltage(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘voltage’ with the given value v 2. voltage(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘voltage’ from the given physical unit u ##### Class `samson.SBQuantity.electricField` Signature: `class samson.SBQuantity.electricField(*args, **kwargs)` Bases: Overloaded function. 1. electricField(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘electricField’ with the given value v 2. electricField(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘electricField’ from the given physical unit u ##### Class `samson.SBQuantity.magneticDensity` Signature: `class samson.SBQuantity.magneticDensity(*args, **kwargs)` Bases: Overloaded function. 1. magneticDensity(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘magneticDensity’ with the given value v 2. magneticDensity(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘magneticDensity’ from the given physical unit u ##### Class `samson.SBQuantity.angularVelocity` Signature: `class samson.SBQuantity.angularVelocity(*args, **kwargs)` Bases: Overloaded function. 1. angularVelocity(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘angularVelocity’ with the given value v 2. angularVelocity(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘angularVelocity’ from the given physical unit u ##### Class `samson.SBQuantity.angularAcceleration` Signature: `class samson.SBQuantity.angularAcceleration(*args, **kwargs)` Bases: Overloaded function. 1. angularAcceleration(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘angularAcceleration’ with the given value v 2. angularAcceleration(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘angularAcceleration’ from the given physical unit u ##### Class `samson.SBQuantity.pressure` Signature: `class samson.SBQuantity.pressure(*args, **kwargs)` Bases: Overloaded function. 1. pressure(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pressure’ with the given value v 2. pressure(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pressure’ from the given physical unit u ##### Class `samson.SBQuantity.lengthMass` Signature: `class samson.SBQuantity.lengthMass(*args, **kwargs)` Bases: Overloaded function. 1. lengthMass(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘lengthMass’ with the given value v 2. lengthMass(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘lengthMass’ from the given physical unit u ##### Class `samson.SBQuantity.inverseLengthInverseMass` Signature: `class samson.SBQuantity.inverseLengthInverseMass(*args, **kwargs)` Bases: Overloaded function. 1. inverseLengthInverseMass(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseLengthInverseMass’ with the given value v 2. inverseLengthInverseMass(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseLengthInverseMass’ from the given physical unit u ##### Class `samson.SBQuantity.area` Signature: `class samson.SBQuantity.area(*args, **kwargs)` Bases: Overloaded function. 1. area(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘area’ with the given value v 2. area(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘area’ from the given physical unit u ##### Class `samson.SBQuantity.inverseArea` Signature: `class samson.SBQuantity.inverseArea(*args, **kwargs)` Bases: Overloaded function. 1. inverseArea(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseArea’ with the given value v 2. inverseArea(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseArea’ from the given physical unit u ##### Class `samson.SBQuantity.volume` Signature: `class samson.SBQuantity.volume(*args, **kwargs)` Bases: Overloaded function. 1. volume(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘volume’ with the given value v 2. volume(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘volume’ from the given physical unit u ##### Class `samson.SBQuantity.inverseVolume` Signature: `class samson.SBQuantity.inverseVolume(*args, **kwargs)` Bases: Overloaded function. 1. inverseVolume(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseVolume’ with the given value v 2. inverseVolume(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseVolume’ from the given physical unit u ##### Class `samson.SBQuantity.position` Signature: `class samson.SBQuantity.position(*args, **kwargs)` Bases: Overloaded function. 1. position(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘position’ with the given value v 2. position(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘position’ from the given physical unit u ##### Class `samson.SBQuantity.velocity` Signature: `class samson.SBQuantity.velocity(*args, **kwargs)` Bases: Overloaded function. 1. velocity(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘velocity’ with the given value v 2. velocity(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘velocity’ from the given physical unit u ##### Class `samson.SBQuantity.acceleration` Signature: `class samson.SBQuantity.acceleration(*args, **kwargs)` Bases: Overloaded function. 1. acceleration(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘acceleration’ with the given value v 2. acceleration(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘acceleration’ from the given physical unit u ##### Class `samson.SBQuantity.force` Signature: `class samson.SBQuantity.force(*args, **kwargs)` Bases: Overloaded function. 1. force(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘force’ with the given value v 2. force(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘force’ from the given physical unit u ##### Class `samson.SBQuantity.energy` Signature: `class samson.SBQuantity.energy(*args, **kwargs)` Bases: Overloaded function. 1. energy(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘energy’ with the given value v 2. energy(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘energy’ from the given physical unit u ##### Class `samson.SBQuantity.inverseForce` Signature: `class samson.SBQuantity.inverseForce(*args, **kwargs)` Bases: Overloaded function. 1. inverseForce(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseForce’ with the given value v 2. inverseForce(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseForce’ from the given physical unit u ##### Class `samson.SBQuantity.lengthPerForce` Signature: `class samson.SBQuantity.lengthPerForce(*args, **kwargs)` Bases: Overloaded function. 1. lengthPerForce(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘lengthPerForce’ with the given value v 2. lengthPerForce(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘lengthPerForce’ from the given physical unit u ##### Class `samson.SBQuantity.forcePerLength` Signature: `class samson.SBQuantity.forcePerLength(*args, **kwargs)` Bases: Overloaded function. 1. forcePerLength(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘forcePerLength’ with the given value v 2. forcePerLength(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘forcePerLength’ from the given physical unit u ##### Class `samson.SBQuantity.energyPerSquareLength` Signature: `class samson.SBQuantity.energyPerSquareLength(*args, **kwargs)` Bases: Overloaded function. 1. energyPerSquareLength(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘energyPerSquareLength’ with the given value v 2. energyPerSquareLength(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘energyPerSquareLength’ from the given physical unit u ##### Class `samson.SBQuantity.momentum` Signature: `class samson.SBQuantity.momentum(*args, **kwargs)` Bases: Overloaded function. 1. momentum(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘momentum’ with the given value v 2. momentum(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘momentum’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMomentum` Signature: `class samson.SBQuantity.inverseMomentum(*args, **kwargs)` Bases: Overloaded function. 1. inverseMomentum(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMomentum’ with the given value v 2. inverseMomentum(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMomentum’ from the given physical unit u ##### Class `samson.SBQuantity.momentOfInertia` Signature: `class samson.SBQuantity.momentOfInertia(*args, **kwargs)` Bases: Overloaded function. 1. momentOfInertia(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘momentOfInertia’ with the given value v 2. momentOfInertia(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘momentOfInertia’ from the given physical unit u ##### Class `samson.SBQuantity.inverseMomentOfInertia` Signature: `class samson.SBQuantity.inverseMomentOfInertia(*args, **kwargs)` Bases: Overloaded function. 1. inverseMomentOfInertia(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMomentOfInertia’ with the given value v 2. inverseMomentOfInertia(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘inverseMomentOfInertia’ from the given physical unit u ##### Class `samson.SBQuantity.electronDensity` Signature: `class samson.SBQuantity.electronDensity(*args, **kwargs)` Bases: Overloaded function. 1. electronDensity(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘electronDensity’ with the given value v 2. electronDensity(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘electronDensity’ from the given physical unit u ### Common derived quantities ##### Class `samson.SBQuantity.gigahertz` Signature: `class samson.SBQuantity.gigahertz(*args, **kwargs)` Bases: Overloaded function. 1. gigahertz(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘gigahertz’ with the given value v 2. gigahertz(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘gigahertz’ from the given physical unit u ##### Class `samson.SBQuantity.megahertz` Signature: `class samson.SBQuantity.megahertz(*args, **kwargs)` Bases: Overloaded function. 1. megahertz(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘megahertz’ with the given value v 2. megahertz(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘megahertz’ from the given physical unit u ##### Class `samson.SBQuantity.kilohertz` Signature: `class samson.SBQuantity.kilohertz(*args, **kwargs)` Bases: Overloaded function. 1. kilohertz(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilohertz’ with the given value v 2. kilohertz(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilohertz’ from the given physical unit u ##### Class `samson.SBQuantity.hertz` Signature: `class samson.SBQuantity.hertz(*args, **kwargs)` Bases: Overloaded function. 1. hertz(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hertz’ with the given value v 2. hertz(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘hertz’ from the given physical unit u ##### Class `samson.SBQuantity.GHz` Signature: `class samson.SBQuantity.GHz(*args, **kwargs)` Bases: Overloaded function. 1. GHz(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘GHz’ with the given value v 2. GHz(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘GHz’ from the given physical unit u ##### Class `samson.SBQuantity.MHz` Signature: `class samson.SBQuantity.MHz(*args, **kwargs)` Bases: Overloaded function. 1. MHz(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘MHz’ with the given value v 2. MHz(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘MHz’ from the given physical unit u ##### Class `samson.SBQuantity.kHz` Signature: `class samson.SBQuantity.kHz(*args, **kwargs)` Bases: Overloaded function. 1. kHz(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kHz’ with the given value v 2. kHz(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kHz’ from the given physical unit u ##### Class `samson.SBQuantity.Hz` Signature: `class samson.SBQuantity.Hz(*args, **kwargs)` Bases: Overloaded function. 1. Hz(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Hz’ with the given value v 2. Hz(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Hz’ from the given physical unit u ##### Class `samson.SBQuantity.piconewton` Signature: `class samson.SBQuantity.piconewton(*args, **kwargs)` Bases: Overloaded function. 1. piconewton(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘piconewton’ with the given value v 2. piconewton(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘piconewton’ from the given physical unit u ##### Class `samson.SBQuantity.nanonewton` Signature: `class samson.SBQuantity.nanonewton(*args, **kwargs)` Bases: Overloaded function. 1. nanonewton(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanonewton’ with the given value v 2. nanonewton(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanonewton’ from the given physical unit u ##### Class `samson.SBQuantity.newton` Signature: `class samson.SBQuantity.newton(*args, **kwargs)` Bases: Overloaded function. 1. newton(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘newton’ with the given value v 2. newton(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘newton’ from the given physical unit u ##### Class `samson.SBQuantity.pN` Signature: `class samson.SBQuantity.pN(*args, **kwargs)` Bases: Overloaded function. 1. pN(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pN’ with the given value v 2. pN(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pN’ from the given physical unit u ##### Class `samson.SBQuantity.nN` Signature: `class samson.SBQuantity.nN(*args, **kwargs)` Bases: Overloaded function. 1. nN(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nN’ with the given value v 2. nN(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nN’ from the given physical unit u ##### Class `samson.SBQuantity.N` Signature: `class samson.SBQuantity.N(*args, **kwargs)` Bases: Overloaded function. 1. N(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘N’ with the given value v 2. N(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘N’ from the given physical unit u ##### Class `samson.SBQuantity.Pa` Signature: `class samson.SBQuantity.Pa(*args, **kwargs)` Bases: Overloaded function. 1. Pa(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Pa’ with the given value v 2. Pa(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Pa’ from the given physical unit u ##### Class `samson.SBQuantity.kilojoule` Signature: `class samson.SBQuantity.kilojoule(*args, **kwargs)` Bases: Overloaded function. 1. kilojoule(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilojoule’ with the given value v 2. kilojoule(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilojoule’ from the given physical unit u ##### Class `samson.SBQuantity.joule` Signature: `class samson.SBQuantity.joule(*args, **kwargs)` Bases: Overloaded function. 1. joule(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘joule’ with the given value v 2. joule(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘joule’ from the given physical unit u ##### Class `samson.SBQuantity.zeptojoule` Signature: `class samson.SBQuantity.zeptojoule(*args, **kwargs)` Bases: Overloaded function. 1. zeptojoule(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptojoule’ with the given value v 2. zeptojoule(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptojoule’ from the given physical unit u ##### Class `samson.SBQuantity.kJ` Signature: `class samson.SBQuantity.kJ(*args, **kwargs)` Bases: Overloaded function. 1. kJ(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kJ’ with the given value v 2. kJ(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kJ’ from the given physical unit u ##### Class `samson.SBQuantity.J` Signature: `class samson.SBQuantity.J(*args, **kwargs)` Bases: Overloaded function. 1. J(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘J’ with the given value v 2. J(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘J’ from the given physical unit u ##### Class `samson.SBQuantity.zJ` Signature: `class samson.SBQuantity.zJ(*args, **kwargs)` Bases: Overloaded function. 1. zJ(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zJ’ with the given value v 2. zJ(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zJ’ from the given physical unit u ##### Class `samson.SBQuantity.joulePerKelvin` Signature: `class samson.SBQuantity.joulePerKelvin(*args, **kwargs)` Bases: Overloaded function. 1. joulePerKelvin(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘joulePerKelvin’ with the given value v 2. joulePerKelvin(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘joulePerKelvin’ from the given physical unit u ##### Class `samson.SBQuantity.JPerK` Signature: `class samson.SBQuantity.JPerK(*args, **kwargs)` Bases: Overloaded function. 1. JPerK(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘JPerK’ with the given value v 2. JPerK(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘JPerK’ from the given physical unit u ##### Class `samson.SBQuantity.joulePerMole` Signature: `class samson.SBQuantity.joulePerMole(*args, **kwargs)` Bases: Overloaded function. 1. joulePerMole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘joulePerMole’ with the given value v 2. joulePerMole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘joulePerMole’ from the given physical unit u ##### Class `samson.SBQuantity.kilojoulePerMole` Signature: `class samson.SBQuantity.kilojoulePerMole(*args, **kwargs)` Bases: Overloaded function. 1. kilojoulePerMole(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilojoulePerMole’ with the given value v 2. kilojoulePerMole(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kilojoulePerMole’ from the given physical unit u ##### Class `samson.SBQuantity.JPerMol` Signature: `class samson.SBQuantity.JPerMol(*args, **kwargs)` Bases: Overloaded function. 1. JPerMol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘JPerMol’ with the given value v 2. JPerMol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘JPerMol’ from the given physical unit u ##### Class `samson.SBQuantity.kJPerMol` Signature: `class samson.SBQuantity.kJPerMol(*args, **kwargs)` Bases: Overloaded function. 1. kJPerMol(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kJPerMol’ with the given value v 2. kJPerMol(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘kJPerMol’ from the given physical unit u ##### Class `samson.SBQuantity.jouleSecond` Signature: `class samson.SBQuantity.jouleSecond(*args, **kwargs)` Bases: Overloaded function. 1. jouleSecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘jouleSecond’ with the given value v 2. jouleSecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘jouleSecond’ from the given physical unit u ##### Class `samson.SBQuantity.JS` Signature: `class samson.SBQuantity.JS(*args, **kwargs)` Bases: Overloaded function. 1. JS(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘JS’ with the given value v 2. JS(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘JS’ from the given physical unit u ##### Class `samson.SBQuantity.watt` Signature: `class samson.SBQuantity.watt(*args, **kwargs)` Bases: Overloaded function. 1. watt(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘watt’ with the given value v 2. watt(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘watt’ from the given physical unit u ##### Class `samson.SBQuantity.W` Signature: `class samson.SBQuantity.W(*args, **kwargs)` Bases: Overloaded function. 1. W(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘W’ with the given value v 2. W(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘W’ from the given physical unit u ##### Class `samson.SBQuantity.coulomb` Signature: `class samson.SBQuantity.coulomb(*args, **kwargs)` Bases: Overloaded function. 1. coulomb(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘coulomb’ with the given value v 2. coulomb(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘coulomb’ from the given physical unit u ##### Class `samson.SBQuantity.zeptocoulomb` Signature: `class samson.SBQuantity.zeptocoulomb(*args, **kwargs)` Bases: Overloaded function. 1. zeptocoulomb(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptocoulomb’ with the given value v 2. zeptocoulomb(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zeptocoulomb’ from the given physical unit u ##### Class `samson.SBQuantity.C` Signature: `class samson.SBQuantity.C(*args, **kwargs)` Bases: Overloaded function. 1. C(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘C’ with the given value v 2. C(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘C’ from the given physical unit u ##### Class `samson.SBQuantity.zC` Signature: `class samson.SBQuantity.zC(*args, **kwargs)` Bases: Overloaded function. 1. zC(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zC’ with the given value v 2. zC(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘zC’ from the given physical unit u ##### Class `samson.SBQuantity.coulombPerMeter` Signature: `class samson.SBQuantity.coulombPerMeter(*args, **kwargs)` Bases: Overloaded function. 1. coulombPerMeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘coulombPerMeter’ with the given value v 2. coulombPerMeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘coulombPerMeter’ from the given physical unit u ##### Class `samson.SBQuantity.CPerM` Signature: `class samson.SBQuantity.CPerM(*args, **kwargs)` Bases: Overloaded function. 1. CPerM(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘CPerM’ with the given value v 2. CPerM(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘CPerM’ from the given physical unit u ##### Class `samson.SBQuantity.coulombPerSquareMeter` Signature: `class samson.SBQuantity.coulombPerSquareMeter(*args, **kwargs)` Bases: Overloaded function. 1. coulombPerSquareMeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘coulombPerSquareMeter’ with the given value v 2. coulombPerSquareMeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘coulombPerSquareMeter’ from the given physical unit u ##### Class `samson.SBQuantity.CPerM2` Signature: `class samson.SBQuantity.CPerM2(*args, **kwargs)` Bases: Overloaded function. 1. CPerM2(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘CPerM2’ with the given value v 2. CPerM2(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘CPerM2’ from the given physical unit u ##### Class `samson.SBQuantity.volt` Signature: `class samson.SBQuantity.volt(*args, **kwargs)` Bases: Overloaded function. 1. volt(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘volt’ with the given value v 2. volt(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘volt’ from the given physical unit u ##### Class `samson.SBQuantity.V` Signature: `class samson.SBQuantity.V(*args, **kwargs)` Bases: Overloaded function. 1. V(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘V’ with the given value v 2. V(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘V’ from the given physical unit u ##### Class `samson.SBQuantity.voltPerMeter` Signature: `class samson.SBQuantity.voltPerMeter(*args, **kwargs)` Bases: Overloaded function. 1. voltPerMeter(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘voltPerMeter’ with the given value v 2. voltPerMeter(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘voltPerMeter’ from the given physical unit u ##### Class `samson.SBQuantity.VPerM` Signature: `class samson.SBQuantity.VPerM(*args, **kwargs)` Bases: Overloaded function. 1. VPerM(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘VPerM’ with the given value v 2. VPerM(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘VPerM’ from the given physical unit u ##### Class `samson.SBQuantity.farad` Signature: `class samson.SBQuantity.farad(*args, **kwargs)` Bases: Overloaded function. 1. farad(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘farad’ with the given value v 2. farad(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘farad’ from the given physical unit u ##### Class `samson.SBQuantity.F` Signature: `class samson.SBQuantity.F(*args, **kwargs)` Bases: Overloaded function. 1. F(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘F’ with the given value v 2. F(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘F’ from the given physical unit u ##### Class `samson.SBQuantity.ohm` Signature: `class samson.SBQuantity.ohm(*args, **kwargs)` Bases: Overloaded function. 1. ohm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ohm’ with the given value v 2. ohm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ohm’ from the given physical unit u ##### Class `samson.SBQuantity.O` Signature: `class samson.SBQuantity.O(*args, **kwargs)` Bases: Overloaded function. 1. O(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘O’ with the given value v 2. O(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘O’ from the given physical unit u ##### Class `samson.SBQuantity.siemens` Signature: `class samson.SBQuantity.siemens(*args, **kwargs)` Bases: Overloaded function. 1. siemens(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘siemens’ with the given value v 2. siemens(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘siemens’ from the given physical unit u ##### Class `samson.SBQuantity.S` Signature: `class samson.SBQuantity.S(*args, **kwargs)` Bases: Overloaded function. 1. S(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘S’ with the given value v 2. S(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘S’ from the given physical unit u ##### Class `samson.SBQuantity.weber` Signature: `class samson.SBQuantity.weber(*args, **kwargs)` Bases: Overloaded function. 1. weber(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘weber’ with the given value v 2. weber(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘weber’ from the given physical unit u ##### Class `samson.SBQuantity.Wb` Signature: `class samson.SBQuantity.Wb(*args, **kwargs)` Bases: Overloaded function. 1. Wb(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Wb’ with the given value v 2. Wb(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Wb’ from the given physical unit u ##### Class `samson.SBQuantity.tesla` Signature: `class samson.SBQuantity.tesla(*args, **kwargs)` Bases: Overloaded function. 1. tesla(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘tesla’ with the given value v 2. tesla(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘tesla’ from the given physical unit u ##### Class `samson.SBQuantity.gigatesla` Signature: `class samson.SBQuantity.gigatesla(*args, **kwargs)` Bases: Overloaded function. 1. gigatesla(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘gigatesla’ with the given value v 2. gigatesla(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘gigatesla’ from the given physical unit u ##### Class `samson.SBQuantity.T` Signature: `class samson.SBQuantity.T(*args, **kwargs)` Bases: Overloaded function. 1. T(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘T’ with the given value v 2. T(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘T’ from the given physical unit u ##### Class `samson.SBQuantity.GT` Signature: `class samson.SBQuantity.GT(*args, **kwargs)` Bases: Overloaded function. 1. GT(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘GT’ with the given value v 2. GT(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘GT’ from the given physical unit u ##### Class `samson.SBQuantity.henry` Signature: `class samson.SBQuantity.henry(*args, **kwargs)` Bases: Overloaded function. 1. henry(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘henry’ with the given value v 2. henry(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘henry’ from the given physical unit u ##### Class `samson.SBQuantity.H` Signature: `class samson.SBQuantity.H(*args, **kwargs)` Bases: Overloaded function. 1. H(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘H’ with the given value v 2. H(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘H’ from the given physical unit u ##### Class `samson.SBQuantity.lumen` Signature: `class samson.SBQuantity.lumen(*args, **kwargs)` Bases: Overloaded function. 1. lumen(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘lumen’ with the given value v 2. lumen(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘lumen’ from the given physical unit u ##### Class `samson.SBQuantity.lm` Signature: `class samson.SBQuantity.lm(*args, **kwargs)` Bases: Overloaded function. 1. lm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘lm’ with the given value v 2. lm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘lm’ from the given physical unit u ##### Class `samson.SBQuantity.lux` Signature: `class samson.SBQuantity.lux(*args, **kwargs)` Bases: Overloaded function. 1. lux(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘lux’ with the given value v 2. lux(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘lux’ from the given physical unit u ##### Class `samson.SBQuantity.lx` Signature: `class samson.SBQuantity.lx(*args, **kwargs)` Bases: Overloaded function. 1. lx(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘lx’ with the given value v 2. lx(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘lx’ from the given physical unit u ##### Class `samson.SBQuantity.becquerel` Signature: `class samson.SBQuantity.becquerel(*args, **kwargs)` Bases: Overloaded function. 1. becquerel(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘becquerel’ with the given value v 2. becquerel(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘becquerel’ from the given physical unit u ##### Class `samson.SBQuantity.Bq` Signature: `class samson.SBQuantity.Bq(*args, **kwargs)` Bases: Overloaded function. 1. Bq(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Bq’ with the given value v 2. Bq(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Bq’ from the given physical unit u ##### Class `samson.SBQuantity.gray` Signature: `class samson.SBQuantity.gray(*args, **kwargs)` Bases: Overloaded function. 1. gray(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘gray’ with the given value v 2. gray(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘gray’ from the given physical unit u ##### Class `samson.SBQuantity.sievert` Signature: `class samson.SBQuantity.sievert(*args, **kwargs)` Bases: Overloaded function. 1. sievert(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘sievert’ with the given value v 2. sievert(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘sievert’ from the given physical unit u ##### Class `samson.SBQuantity.Gy` Signature: `class samson.SBQuantity.Gy(*args, **kwargs)` Bases: Overloaded function. 1. Gy(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Gy’ with the given value v 2. Gy(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Gy’ from the given physical unit u ##### Class `samson.SBQuantity.Sv` Signature: `class samson.SBQuantity.Sv(*args, **kwargs)` Bases: Overloaded function. 1. Sv(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Sv’ with the given value v 2. Sv(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Sv’ from the given physical unit u ##### Class `samson.SBQuantity.katal` Signature: `class samson.SBQuantity.katal(*args, **kwargs)` Bases: Overloaded function. 1. katal(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘katal’ with the given value v 2. katal(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘katal’ from the given physical unit u ##### Class `samson.SBQuantity.Kat` Signature: `class samson.SBQuantity.Kat(*args, **kwargs)` Bases: Overloaded function. 1. Kat(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Kat’ with the given value v 2. Kat(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘Kat’ from the given physical unit u ### Common velocity quantities ##### Class `samson.SBQuantity.picometerPerSecond` Signature: `class samson.SBQuantity.picometerPerSecond(*args, **kwargs)` Bases: Overloaded function. 1. picometerPerSecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picometerPerSecond’ with the given value v 2. picometerPerSecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picometerPerSecond’ from the given physical unit u ##### Class `samson.SBQuantity.picometerPerFemtosecond` Signature: `class samson.SBQuantity.picometerPerFemtosecond(*args, **kwargs)` Bases: Overloaded function. 1. picometerPerFemtosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picometerPerFemtosecond’ with the given value v 2. picometerPerFemtosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picometerPerFemtosecond’ from the given physical unit u ##### Class `samson.SBQuantity.pmPerS` Signature: `class samson.SBQuantity.pmPerS(*args, **kwargs)` Bases: Overloaded function. 1. pmPerS(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pmPerS’ with the given value v 2. pmPerS(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pmPerS’ from the given physical unit u ##### Class `samson.SBQuantity.pmPerFs` Signature: `class samson.SBQuantity.pmPerFs(*args, **kwargs)` Bases: Overloaded function. 1. pmPerFs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pmPerFs’ with the given value v 2. pmPerFs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pmPerFs’ from the given physical unit u ##### Class `samson.SBQuantity.perSecond` Signature: `class samson.SBQuantity.perSecond(*args, **kwargs)` Bases: Overloaded function. 1. perSecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘perSecond’ with the given value v 2. perSecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘perSecond’ from the given physical unit u ##### Class `samson.SBQuantity.radianPerSecond` Signature: `class samson.SBQuantity.radianPerSecond(*args, **kwargs)` Bases: Overloaded function. 1. radianPerSecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘radianPerSecond’ with the given value v 2. radianPerSecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘radianPerSecond’ from the given physical unit u ##### Class `samson.SBQuantity.degreePerSecond` Signature: `class samson.SBQuantity.degreePerSecond(*args, **kwargs)` Bases: Overloaded function. 1. degreePerSecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘degreePerSecond’ with the given value v 2. degreePerSecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘degreePerSecond’ from the given physical unit u ##### Class `samson.SBQuantity.perS` Signature: `class samson.SBQuantity.perS(*args, **kwargs)` Bases: Overloaded function. 1. perS(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘perS’ with the given value v 2. perS(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘perS’ from the given physical unit u ##### Class `samson.SBQuantity.radPerS` Signature: `class samson.SBQuantity.radPerS(*args, **kwargs)` Bases: Overloaded function. 1. radPerS(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘radPerS’ with the given value v 2. radPerS(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘radPerS’ from the given physical unit u ##### Class `samson.SBQuantity.degPerS` Signature: `class samson.SBQuantity.degPerS(*args, **kwargs)` Bases: Overloaded function. 1. degPerS(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘degPerS’ with the given value v 2. degPerS(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘degPerS’ from the given physical unit u ### Common acceleration quantities ##### Class `samson.SBQuantity.picometerPerSquareFemtosecond` Signature: `class samson.SBQuantity.picometerPerSquareFemtosecond(*args, **kwargs)` Bases: Overloaded function. 1. picometerPerSquareFemtosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picometerPerSquareFemtosecond’ with the given value v 2. picometerPerSquareFemtosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘picometerPerSquareFemtosecond’ from the given physical unit u ##### Class `samson.SBQuantity.pmPerSquareFs` Signature: `class samson.SBQuantity.pmPerSquareFs(*args, **kwargs)` Bases: Overloaded function. 1. pmPerSquareFs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pmPerSquareFs’ with the given value v 2. pmPerSquareFs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘pmPerSquareFs’ from the given physical unit u ### Common momentum quantities ##### Class `samson.SBQuantity.yoctogramPicometerPerFemtosecond` Signature: `class samson.SBQuantity.yoctogramPicometerPerFemtosecond(*args, **kwargs)` Bases: Overloaded function. 1. yoctogramPicometerPerFemtosecond(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctogramPicometerPerFemtosecond’ with the given value v 2. yoctogramPicometerPerFemtosecond(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctogramPicometerPerFemtosecond’ from the given physical unit u ##### Class `samson.SBQuantity.ygPmPerFs` Signature: `class samson.SBQuantity.ygPmPerFs(*args, **kwargs)` Bases: Overloaded function. 1. ygPmPerFs(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ygPmPerFs’ with the given value v 2. ygPmPerFs(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ygPmPerFs’ from the given physical unit u ### Common momentum of inertia quantities ##### Class `samson.SBQuantity.yoctogramSquarePicometer` Signature: `class samson.SBQuantity.yoctogramSquarePicometer(*args, **kwargs)` Bases: Overloaded function. 1. yoctogramSquarePicometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctogramSquarePicometer’ with the given value v 2. yoctogramSquarePicometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘yoctogramSquarePicometer’ from the given physical unit u ##### Class `samson.SBQuantity.perYoctogramPerSquarePicometer` Signature: `class samson.SBQuantity.perYoctogramPerSquarePicometer(*args, **kwargs)` Bases: Overloaded function. 1. perYoctogramPerSquarePicometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘perYoctogramPerSquarePicometer’ with the given value v 2. perYoctogramPerSquarePicometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘perYoctogramPerSquarePicometer’ from the given physical unit u ##### Class `samson.SBQuantity.ygSquarePm` Signature: `class samson.SBQuantity.ygSquarePm(*args, **kwargs)` Bases: Overloaded function. 1. ygSquarePm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ygSquarePm’ with the given value v 2. ygSquarePm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘ygSquarePm’ from the given physical unit u ##### Class `samson.SBQuantity.perYgPerSquarePm` Signature: `class samson.SBQuantity.perYgPerSquarePm(*args, **kwargs)` Bases: Overloaded function. 1. perYgPerSquarePm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘perYgPerSquarePm’ with the given value v 2. perYgPerSquarePm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘perYgPerSquarePm’ from the given physical unit u ### Common force quantities ##### Class `samson.SBQuantity.nanonewtonPerPicometer` Signature: `class samson.SBQuantity.nanonewtonPerPicometer(*args, **kwargs)` Bases: Overloaded function. 1. nanonewtonPerPicometer(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanonewtonPerPicometer’ with the given value v 2. nanonewtonPerPicometer(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nanonewtonPerPicometer’ from the given physical unit u ##### Class `samson.SBQuantity.nNPerPm` Signature: `class samson.SBQuantity.nNPerPm(*args, **kwargs)` Bases: Overloaded function. 1. nNPerPm(v: float) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nNPerPm’ with the given value v 2. nNPerPm(q: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Constructs the physical unit ‘nNPerPm’ from the given physical unit u --- # Atomic Units Unit System Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAU.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAU.md You can check out this unit system’s functions in its base class: - [unitsAU](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md) - [`unitsAU`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU) - [`unitsAU.__add__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__add__) - [`unitsAU.__eq__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__eq__) - [`unitsAU.__ge__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__ge__) - [`unitsAU.__gt__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__gt__) - [`unitsAU.__iadd__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__iadd__) - [`unitsAU.__imul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__imul__) - [`unitsAU.__isub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__isub__) - [`unitsAU.__itruediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__itruediv__) - [`unitsAU.__le__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__le__) - [`unitsAU.__lt__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__lt__) - [`unitsAU.__mul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__mul__) - [`unitsAU.__ne__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__ne__) - [`unitsAU.__neg__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__neg__) - [`unitsAU.__radd__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__radd__) - [`unitsAU.__rmul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__rmul__) - [`unitsAU.__rsub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__rsub__) - [`unitsAU.__rtruediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__rtruediv__) - [`unitsAU.__sub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__sub__) - [`unitsAU.__truediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.__truediv__) - [`unitsAU.fromLinearInterpolation()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.fromLinearInterpolation) - [`unitsAU.setZero()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.setZero) - [`unitsAU.str()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.str) - [`unitsAU.toDebugString()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.toDebugString) - [`unitsAU.C`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.C) - [`unitsAU.Da`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.Da) - [`unitsAU.J`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.J) - [`unitsAU.JPerMol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.JPerMol) - [`unitsAU.JS`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.JS) - [`unitsAU.angstrom`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.angstrom) - [`unitsAU.coulomb`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.coulomb) - [`unitsAU.dalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.dalton) - [`unitsAU.eV`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.eV) - [`unitsAU.electronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.electronvolt) - [`unitsAU.femtosecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.femtosecond) - [`unitsAU.fs`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.fs) - [`unitsAU.g`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.g) - [`unitsAU.gram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.gram) - [`unitsAU.isDimensionless`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.isDimensionless) - [`unitsAU.joule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.joule) - [`unitsAU.joulePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.joulePerMole) - [`unitsAU.jouleSecond`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.jouleSecond) - [`unitsAU.kcalPerMol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.kcalPerMol) - [`unitsAU.kg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.kg) - [`unitsAU.kilocaloriePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.kilocaloriePerMole) - [`unitsAU.kilogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.kilogram) - [`unitsAU.length`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.length) - [`unitsAU.m`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.m) - [`unitsAU.mass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.mass) - [`unitsAU.meter`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.meter) - [`unitsAU.nanometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.nanometer) - [`unitsAU.nm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.nm) - [`unitsAU.picometer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.picometer) - [`unitsAU.pm`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.pm) - [`unitsAU.s`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.s) - [`unitsAU.second`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.second) - [`unitsAU.sizeOfUnitSystem`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.sizeOfUnitSystem) - [`unitsAU.time`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.time) - [`unitsAU.value`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.value) - [`unitsAU.yg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.yg) - [`unitsAU.yoctogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md#samson.SBQuantity.unitsAU.yoctogram) There are multiple convenience constructors available for the commonly used units. These convenience constructors internally call the unit system’s base class with proper units. In the case if there is no convenience constructor for a quantity in this unit system that you want to use, you can create it using the base class by providing exponents and scales or by combining quantities with existing convenience constructors using arithmetic operations. ```python SBQuantity.auMass(1.20) SBQuantity.auCharge(1.0) SBQuantity.bohr(1.0) ``` - [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md) - [`electronMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.electronMass) - [`auMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auMass) - [`me`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.me) - [`electronCharge`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.electronCharge) - [`auCharge`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auCharge) - [`e`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.e) - [`auAction`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auAction) - [`hBar`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.hBar) - [`auCoulombConstant`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auCoulombConstant) - [`ec`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.ec) - [`auTime`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.auTime) - [`bohr`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.bohr) - [`a0`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.a0) - [`hartree`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.hartree) - [`Eh`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#samson.SBQuantity.Eh) --- # unitsAU Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUClass.md This is the base class for Atomic Units (AU). !!! note "See also" [Atomic Units Unit System](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAU.md#ps-unit-au) [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md#ps-unit-au-constructors) ## API Reference #### Class `samson.SBQuantity.unitsAU` Signature: `class samson.SBQuantity.unitsAU(*args, **kwargs)` Bases: `pybind11_object` Units system, serves as a wrapper between SBQuantity and Python Overloaded function. 1. __init__(self: samson.SBQuantity.unitsAU) -> None Constructs the zero dimensionless unit 2. __init__(self: samson.SBQuantity.unitsAU, v: float) -> None Constructs the dimensionless unit with the given value v 3. __init__(self: samson.SBQuantity.unitsAU, value: float, scale: list[int], exponent: list[int]) -> None Construct the physical unit with value, scale and exponent 4. __init__(self: samson.SBQuantity.unitsAU, u: samson.SBQuantity.unitsAU) -> None Constructs the physical unit from the given physical unit u ##### Method `samson.SBQuantity.unitsAU.__add__` Signature: `__add__(*args, **kwargs)` Overloaded function. 1. __add__(self: samson.SBQuantity.unitsAU, arg0: float) -> samson.SBQuantity.unitsAU 2. __add__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU ##### Method `samson.SBQuantity.unitsAU.__eq__` Signature: `__eq__(*args, **kwargs)` Overloaded function. 1. __eq__(self: samson.SBQuantity.unitsAU, arg0: float) -> bool 2. __eq__(self: samson.SBQuantity.unitsAU, arg0: float) -> bool 3. __eq__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> bool ##### Method `samson.SBQuantity.unitsAU.__ge__` Signature: `__ge__(*args, **kwargs)` Overloaded function. 1. __ge__(self: samson.SBQuantity.unitsAU, arg0: float) -> bool 2. __ge__(self: samson.SBQuantity.unitsAU, arg0: float) -> bool 3. __ge__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> bool ##### Method `samson.SBQuantity.unitsAU.__gt__` Signature: `__gt__(*args, **kwargs)` Overloaded function. 1. __gt__(self: samson.SBQuantity.unitsAU, arg0: float) -> bool 2. __gt__(self: samson.SBQuantity.unitsAU, arg0: float) -> bool 3. __gt__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> bool ##### Method `samson.SBQuantity.unitsAU.__iadd__` Signature: `__iadd__(*args, **kwargs)` Overloaded function. 1. __iadd__(self: samson.SBQuantity.unitsAU, arg0: float) -> samson.SBQuantity.unitsAU 2. __iadd__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU ##### Method `samson.SBQuantity.unitsAU.__imul__` Signature: `__imul__(*args, **kwargs)` Overloaded function. 1. __imul__(self: samson.SBQuantity.unitsAU, arg0: float) -> samson.SBQuantity.unitsAU 2. __imul__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU ##### Method `samson.SBQuantity.unitsAU.__isub__` Signature: `__isub__(*args, **kwargs)` Overloaded function. 1. __isub__(self: samson.SBQuantity.unitsAU, arg0: float) -> samson.SBQuantity.unitsAU 2. __isub__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU ##### Method `samson.SBQuantity.unitsAU.__itruediv__` Signature: `__itruediv__(*args, **kwargs)` Overloaded function. 1. __itruediv__(self: samson.SBQuantity.unitsAU, arg0: float) -> samson.SBQuantity.unitsAU 2. __itruediv__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU ##### Method `samson.SBQuantity.unitsAU.__le__` Signature: `__le__(*args, **kwargs)` Overloaded function. 1. __le__(self: samson.SBQuantity.unitsAU, arg0: float) -> bool 2. __le__(self: samson.SBQuantity.unitsAU, arg0: float) -> bool 3. __le__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> bool ##### Method `samson.SBQuantity.unitsAU.__lt__` Signature: `__lt__(*args, **kwargs)` Overloaded function. 1. __lt__(self: samson.SBQuantity.unitsAU, arg0: float) -> bool 2. __lt__(self: samson.SBQuantity.unitsAU, arg0: float) -> bool 3. __lt__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> bool ##### Method `samson.SBQuantity.unitsAU.__mul__` Signature: `__mul__(*args, **kwargs)` Overloaded function. 1. __mul__(self: samson.SBQuantity.unitsAU, arg0: float) -> samson.SBQuantity.unitsAU 2. __mul__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU ##### Method `samson.SBQuantity.unitsAU.__ne__` Signature: `__ne__(*args, **kwargs)` Overloaded function. 1. __ne__(self: samson.SBQuantity.unitsAU, arg0: float) -> bool 2. __ne__(self: samson.SBQuantity.unitsAU, arg0: float) -> bool 3. __ne__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> bool ##### Method `samson.SBQuantity.unitsAU.__neg__` Signature: `__neg__(self: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU` ##### Method `samson.SBQuantity.unitsAU.__radd__` Signature: `__radd__(self: samson.SBQuantity.unitsAU, arg0: float) -> samson.SBQuantity.unitsAU` ##### Method `samson.SBQuantity.unitsAU.__rmul__` Signature: `__rmul__(self: samson.SBQuantity.unitsAU, arg0: float) -> samson.SBQuantity.unitsAU` ##### Method `samson.SBQuantity.unitsAU.__rsub__` Signature: `__rsub__(self: samson.SBQuantity.unitsAU, arg0: float) -> samson.SBQuantity.unitsAU` ##### Method `samson.SBQuantity.unitsAU.__rtruediv__` Signature: `__rtruediv__(self: samson.SBQuantity.unitsAU, arg0: float) -> samson.SBQuantity.unitsAU` ##### Method `samson.SBQuantity.unitsAU.__sub__` Signature: `__sub__(*args, **kwargs)` Overloaded function. 1. __sub__(self: samson.SBQuantity.unitsAU, arg0: float) -> samson.SBQuantity.unitsAU 2. __sub__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU ##### Method `samson.SBQuantity.unitsAU.__truediv__` Signature: `__truediv__(*args, **kwargs)` Overloaded function. 1. __truediv__(self: samson.SBQuantity.unitsAU, arg0: float) -> samson.SBQuantity.unitsAU 2. __truediv__(self: samson.SBQuantity.unitsAU, arg0: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU ##### Method `samson.SBQuantity.unitsAU.fromLinearInterpolation` Signature: `static fromLinearInterpolation(q0: samson.SBQuantity.unitsAU, q1: samson.SBQuantity.unitsAU, alpha: float) -> samson.SBQuantity.unitsAU` Returns a linear interpolation between two physical quantities *q0* and *q1* for a parameter *alpha* in the closed unit interval [0, 1]. ##### Method `samson.SBQuantity.unitsAU.setZero` Signature: `setZero(self: samson.SBQuantity.unitsAU) -> None` Sets the value to zero ##### Method `samson.SBQuantity.unitsAU.str` Signature: `str(self: samson.SBQuantity.unitsAU, fullName: bool = False) -> str` Converts the physical quantity to a string (with a full unit name when *fullName* is *True*.) ##### Method `samson.SBQuantity.unitsAU.toDebugString` Signature: `toDebugString(self: samson.SBQuantity.unitsAU) -> str` Returns a verbose debug string for this quantity. ##### Property `samson.SBQuantity.unitsAU.C` Signature: `property C` convert to coulomb ##### Property `samson.SBQuantity.unitsAU.Da` Signature: `property Da` convert to dalton ##### Property `samson.SBQuantity.unitsAU.J` Signature: `property J` convert to joule ##### Property `samson.SBQuantity.unitsAU.JPerMol` Signature: `property JPerMol` convert to joulePerMole ##### Property `samson.SBQuantity.unitsAU.JS` Signature: `property JS` convert to jouleSecond ##### Property `samson.SBQuantity.unitsAU.angstrom` Signature: `property angstrom` convert to angstrom ##### Property `samson.SBQuantity.unitsAU.coulomb` Signature: `property coulomb` convert to coulomb ##### Property `samson.SBQuantity.unitsAU.dalton` Signature: `property dalton` convert to dalton ##### Property `samson.SBQuantity.unitsAU.eV` Signature: `property eV` convert to electronvolt ##### Property `samson.SBQuantity.unitsAU.electronvolt` Signature: `property electronvolt` convert to electronvolt ##### Property `samson.SBQuantity.unitsAU.femtosecond` Signature: `property femtosecond` convert to femtosecond ##### Property `samson.SBQuantity.unitsAU.fs` Signature: `property fs` convert to femtosecond ##### Property `samson.SBQuantity.unitsAU.g` Signature: `property g` convert to gram ##### Property `samson.SBQuantity.unitsAU.gram` Signature: `property gram` convert to gram ##### Property `samson.SBQuantity.unitsAU.isDimensionless` Signature: `property isDimensionless` Returns *True* if the unit is dimensionless ##### Property `samson.SBQuantity.unitsAU.joule` Signature: `property joule` convert to joule ##### Property `samson.SBQuantity.unitsAU.joulePerMole` Signature: `property joulePerMole` convert to joulePerMole ##### Property `samson.SBQuantity.unitsAU.jouleSecond` Signature: `property jouleSecond` convert to jouleSecond ##### Property `samson.SBQuantity.unitsAU.kcalPerMol` Signature: `property kcalPerMol` convert to kilocaloriePerMole ##### Property `samson.SBQuantity.unitsAU.kg` Signature: `property kg` convert to kilogram ##### Property `samson.SBQuantity.unitsAU.kilocaloriePerMole` Signature: `property kilocaloriePerMole` convert to kilocaloriePerMole ##### Property `samson.SBQuantity.unitsAU.kilogram` Signature: `property kilogram` convert to kilogram ##### Property `samson.SBQuantity.unitsAU.length` Signature: `property length` convert to length ##### Property `samson.SBQuantity.unitsAU.m` Signature: `property m` convert to meter ##### Property `samson.SBQuantity.unitsAU.mass` Signature: `property mass` convert to mass ##### Property `samson.SBQuantity.unitsAU.meter` Signature: `property meter` convert to meter ##### Property `samson.SBQuantity.unitsAU.nanometer` Signature: `property nanometer` convert to nanometer ##### Property `samson.SBQuantity.unitsAU.nm` Signature: `property nm` convert to nanometer ##### Property `samson.SBQuantity.unitsAU.picometer` Signature: `property picometer` convert to picometer ##### Property `samson.SBQuantity.unitsAU.pm` Signature: `property pm` convert to picometer ##### Property `samson.SBQuantity.unitsAU.s` Signature: `property s` convert to second ##### Property `samson.SBQuantity.unitsAU.second` Signature: `property second` convert to second ##### Property `samson.SBQuantity.unitsAU.sizeOfUnitSystem` Signature: `property sizeOfUnitSystem` Returns the number of base dimensions in this unit system. ##### Property `samson.SBQuantity.unitsAU.time` Signature: `property time` convert to time ##### Property `samson.SBQuantity.unitsAU.value` Signature: `property value` Returns value of the unit ##### Property `samson.SBQuantity.unitsAU.yg` Signature: `property yg` convert to yoctogram ##### Property `samson.SBQuantity.unitsAU.yoctogram` Signature: `property yoctogram` convert to yoctogram --- # Convenience constructors Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsAUConvenienceConstructors.md ## API Reference #### Class `samson.SBQuantity.electronMass` Signature: `class samson.SBQuantity.electronMass(*args, **kwargs)` Bases: Overloaded function. 1. electronMass(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘electronMass’ with the given value v 2. electronMass(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘electronMass’ from the given physical unit u #### Class `samson.SBQuantity.auMass` Signature: `class samson.SBQuantity.auMass(*args, **kwargs)` Bases: Overloaded function. 1. auMass(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘auMass’ with the given value v 2. auMass(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘auMass’ from the given physical unit u #### Class `samson.SBQuantity.me` Signature: `class samson.SBQuantity.me(*args, **kwargs)` Bases: Overloaded function. 1. me(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘me’ with the given value v 2. me(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘me’ from the given physical unit u #### Class `samson.SBQuantity.electronCharge` Signature: `class samson.SBQuantity.electronCharge(*args, **kwargs)` Bases: Overloaded function. 1. electronCharge(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘electronCharge’ with the given value v 2. electronCharge(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘electronCharge’ from the given physical unit u #### Class `samson.SBQuantity.auCharge` Signature: `class samson.SBQuantity.auCharge(*args, **kwargs)` Bases: Overloaded function. 1. auCharge(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘auCharge’ with the given value v 2. auCharge(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘auCharge’ from the given physical unit u #### Class `samson.SBQuantity.e` Signature: `class samson.SBQuantity.e(*args, **kwargs)` Bases: Overloaded function. 1. e(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘e’ with the given value v 2. e(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘e’ from the given physical unit u #### Class `samson.SBQuantity.auAction` Signature: `class samson.SBQuantity.auAction(*args, **kwargs)` Bases: Overloaded function. 1. auAction(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘auAction’ with the given value v 2. auAction(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘auAction’ from the given physical unit u #### Class `samson.SBQuantity.hBar` Signature: `class samson.SBQuantity.hBar(*args, **kwargs)` Bases: Overloaded function. 1. hBar(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘hBar’ with the given value v 2. hBar(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘hBar’ from the given physical unit u #### Class `samson.SBQuantity.auCoulombConstant` Signature: `class samson.SBQuantity.auCoulombConstant(*args, **kwargs)` Bases: Overloaded function. 1. auCoulombConstant(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘auCoulombConstant’ with the given value v 2. auCoulombConstant(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘auCoulombConstant’ from the given physical unit u #### Class `samson.SBQuantity.ec` Signature: `class samson.SBQuantity.ec(*args, **kwargs)` Bases: Overloaded function. 1. ec(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘ec’ with the given value v 2. ec(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘ec’ from the given physical unit u #### Class `samson.SBQuantity.auTime` Signature: `class samson.SBQuantity.auTime(*args, **kwargs)` Bases: Overloaded function. 1. auTime(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘auTime’ with the given value v 2. auTime(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘auTime’ from the given physical unit u #### Class `samson.SBQuantity.bohr` Signature: `class samson.SBQuantity.bohr(*args, **kwargs)` Bases: Overloaded function. 1. bohr(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘bohr’ with the given value v 2. bohr(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘bohr’ from the given physical unit u #### Class `samson.SBQuantity.a0` Signature: `class samson.SBQuantity.a0(*args, **kwargs)` Bases: Overloaded function. 1. a0(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘a0’ with the given value v 2. a0(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘a0’ from the given physical unit u #### Class `samson.SBQuantity.hartree` Signature: `class samson.SBQuantity.hartree(*args, **kwargs)` Bases: Overloaded function. 1. hartree(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘hartree’ with the given value v 2. hartree(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘hartree’ from the given physical unit u #### Class `samson.SBQuantity.Eh` Signature: `class samson.SBQuantity.Eh(*args, **kwargs)` Bases: Overloaded function. 1. Eh(v: float) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘Eh’ with the given value v 2. Eh(q: samson.SBQuantity.unitsAU) -> samson.SBQuantity.unitsAU Constructs the physical unit ‘Eh’ from the given physical unit u --- # Dalton Unit system Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDalton.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDalton.md You can check out this unit system’s functions in its base class: - [unitsDalton](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md) - [`unitsDalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton) - [`unitsDalton.__add__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__add__) - [`unitsDalton.__eq__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__eq__) - [`unitsDalton.__ge__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__ge__) - [`unitsDalton.__gt__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__gt__) - [`unitsDalton.__iadd__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__iadd__) - [`unitsDalton.__imul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__imul__) - [`unitsDalton.__isub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__isub__) - [`unitsDalton.__itruediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__itruediv__) - [`unitsDalton.__le__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__le__) - [`unitsDalton.__lt__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__lt__) - [`unitsDalton.__mul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__mul__) - [`unitsDalton.__ne__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__ne__) - [`unitsDalton.__neg__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__neg__) - [`unitsDalton.__radd__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__radd__) - [`unitsDalton.__rmul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__rmul__) - [`unitsDalton.__rsub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__rsub__) - [`unitsDalton.__rtruediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__rtruediv__) - [`unitsDalton.__sub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__sub__) - [`unitsDalton.__truediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.__truediv__) - [`unitsDalton.fromLinearInterpolation()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.fromLinearInterpolation) - [`unitsDalton.setZero()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.setZero) - [`unitsDalton.str()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.str) - [`unitsDalton.toDebugString()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.toDebugString) - [`unitsDalton.Da`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.Da) - [`unitsDalton.auMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.auMass) - [`unitsDalton.dalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.dalton) - [`unitsDalton.electronMass`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.electronMass) - [`unitsDalton.g`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.g) - [`unitsDalton.gDa`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.gDa) - [`unitsDalton.gigadalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.gigadalton) - [`unitsDalton.gram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.gram) - [`unitsDalton.isDimensionless`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.isDimensionless) - [`unitsDalton.kDa`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.kDa) - [`unitsDalton.kg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.kg) - [`unitsDalton.kilodalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.kilodalton) - [`unitsDalton.kilogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.kilogram) - [`unitsDalton.mDa`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.mDa) - [`unitsDalton.megadalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.megadalton) - [`unitsDalton.sizeOfUnitSystem`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.sizeOfUnitSystem) - [`unitsDalton.value`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.value) - [`unitsDalton.yg`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.yg) - [`unitsDalton.yoctogram`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md#samson.SBQuantity.unitsDalton.yoctogram) There are multiple convenience constructors available for the commonly used units. These convenience constructors internally call the unit system’s base class with proper units. In the case if there is no convenience constructor for a quantity in this unit system that you want to use, you can create it using the base class by providing exponents and scales or by combining quantities with existing convenience constructors using arithmetic operations. ```python SBQuantity.dalton(1.2) SBQuantity.Da(1.2) SBQuantity.u(1.2) ``` - [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md) - [`unifiedAtomicMassUnit`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.unifiedAtomicMassUnit) - [`u`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.u) - [`gigadalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.gigadalton) - [`megadalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.megadalton) - [`kilodalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.kilodalton) - [`dalton`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.dalton) - [`GDa`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.GDa) - [`MDa`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.MDa) - [`kDa`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.kDa) - [`Da`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#samson.SBQuantity.Da) --- # unitsDalton Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonClass.md This is the base class for Dalton Units. !!! note "See also" [Dalton Unit system](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDalton.md#ps-unit-dalton) [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md#ps-unit-dalton-constructors) ## API Reference #### Class `samson.SBQuantity.unitsDalton` Signature: `class samson.SBQuantity.unitsDalton(*args, **kwargs)` Bases: `pybind11_object` Units system, serves as a wrapper between SBQuantity and Python Overloaded function. 1. __init__(self: samson.SBQuantity.unitsDalton) -> None Constructs the zero dimensionless unit 2. __init__(self: samson.SBQuantity.unitsDalton, v: float) -> None Constructs the dimensionless unit with the given value v 3. __init__(self: samson.SBQuantity.unitsDalton, value: float, scale: list[int], exponent: list[int]) -> None Construct the physical unit with value, scale and exponent 4. __init__(self: samson.SBQuantity.unitsDalton, u: samson.SBQuantity.unitsDalton) -> None Constructs the physical unit from the given physical unit u ##### Method `samson.SBQuantity.unitsDalton.__add__` Signature: `__add__(*args, **kwargs)` Overloaded function. 1. __add__(self: samson.SBQuantity.unitsDalton, arg0: float) -> samson.SBQuantity.unitsDalton 2. __add__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton ##### Method `samson.SBQuantity.unitsDalton.__eq__` Signature: `__eq__(*args, **kwargs)` Overloaded function. 1. __eq__(self: samson.SBQuantity.unitsDalton, arg0: float) -> bool 2. __eq__(self: samson.SBQuantity.unitsDalton, arg0: float) -> bool 3. __eq__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> bool ##### Method `samson.SBQuantity.unitsDalton.__ge__` Signature: `__ge__(*args, **kwargs)` Overloaded function. 1. __ge__(self: samson.SBQuantity.unitsDalton, arg0: float) -> bool 2. __ge__(self: samson.SBQuantity.unitsDalton, arg0: float) -> bool 3. __ge__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> bool ##### Method `samson.SBQuantity.unitsDalton.__gt__` Signature: `__gt__(*args, **kwargs)` Overloaded function. 1. __gt__(self: samson.SBQuantity.unitsDalton, arg0: float) -> bool 2. __gt__(self: samson.SBQuantity.unitsDalton, arg0: float) -> bool 3. __gt__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> bool ##### Method `samson.SBQuantity.unitsDalton.__iadd__` Signature: `__iadd__(*args, **kwargs)` Overloaded function. 1. __iadd__(self: samson.SBQuantity.unitsDalton, arg0: float) -> samson.SBQuantity.unitsDalton 2. __iadd__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton ##### Method `samson.SBQuantity.unitsDalton.__imul__` Signature: `__imul__(*args, **kwargs)` Overloaded function. 1. __imul__(self: samson.SBQuantity.unitsDalton, arg0: float) -> samson.SBQuantity.unitsDalton 2. __imul__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton ##### Method `samson.SBQuantity.unitsDalton.__isub__` Signature: `__isub__(*args, **kwargs)` Overloaded function. 1. __isub__(self: samson.SBQuantity.unitsDalton, arg0: float) -> samson.SBQuantity.unitsDalton 2. __isub__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton ##### Method `samson.SBQuantity.unitsDalton.__itruediv__` Signature: `__itruediv__(*args, **kwargs)` Overloaded function. 1. __itruediv__(self: samson.SBQuantity.unitsDalton, arg0: float) -> samson.SBQuantity.unitsDalton 2. __itruediv__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton ##### Method `samson.SBQuantity.unitsDalton.__le__` Signature: `__le__(*args, **kwargs)` Overloaded function. 1. __le__(self: samson.SBQuantity.unitsDalton, arg0: float) -> bool 2. __le__(self: samson.SBQuantity.unitsDalton, arg0: float) -> bool 3. __le__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> bool ##### Method `samson.SBQuantity.unitsDalton.__lt__` Signature: `__lt__(*args, **kwargs)` Overloaded function. 1. __lt__(self: samson.SBQuantity.unitsDalton, arg0: float) -> bool 2. __lt__(self: samson.SBQuantity.unitsDalton, arg0: float) -> bool 3. __lt__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> bool ##### Method `samson.SBQuantity.unitsDalton.__mul__` Signature: `__mul__(*args, **kwargs)` Overloaded function. 1. __mul__(self: samson.SBQuantity.unitsDalton, arg0: float) -> samson.SBQuantity.unitsDalton 2. __mul__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton ##### Method `samson.SBQuantity.unitsDalton.__ne__` Signature: `__ne__(*args, **kwargs)` Overloaded function. 1. __ne__(self: samson.SBQuantity.unitsDalton, arg0: float) -> bool 2. __ne__(self: samson.SBQuantity.unitsDalton, arg0: float) -> bool 3. __ne__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> bool ##### Method `samson.SBQuantity.unitsDalton.__neg__` Signature: `__neg__(self: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton` ##### Method `samson.SBQuantity.unitsDalton.__radd__` Signature: `__radd__(self: samson.SBQuantity.unitsDalton, arg0: float) -> samson.SBQuantity.unitsDalton` ##### Method `samson.SBQuantity.unitsDalton.__rmul__` Signature: `__rmul__(self: samson.SBQuantity.unitsDalton, arg0: float) -> samson.SBQuantity.unitsDalton` ##### Method `samson.SBQuantity.unitsDalton.__rsub__` Signature: `__rsub__(self: samson.SBQuantity.unitsDalton, arg0: float) -> samson.SBQuantity.unitsDalton` ##### Method `samson.SBQuantity.unitsDalton.__rtruediv__` Signature: `__rtruediv__(self: samson.SBQuantity.unitsDalton, arg0: float) -> samson.SBQuantity.unitsDalton` ##### Method `samson.SBQuantity.unitsDalton.__sub__` Signature: `__sub__(*args, **kwargs)` Overloaded function. 1. __sub__(self: samson.SBQuantity.unitsDalton, arg0: float) -> samson.SBQuantity.unitsDalton 2. __sub__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton ##### Method `samson.SBQuantity.unitsDalton.__truediv__` Signature: `__truediv__(*args, **kwargs)` Overloaded function. 1. __truediv__(self: samson.SBQuantity.unitsDalton, arg0: float) -> samson.SBQuantity.unitsDalton 2. __truediv__(self: samson.SBQuantity.unitsDalton, arg0: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton ##### Method `samson.SBQuantity.unitsDalton.fromLinearInterpolation` Signature: `static fromLinearInterpolation(q0: samson.SBQuantity.unitsDalton, q1: samson.SBQuantity.unitsDalton, alpha: float) -> samson.SBQuantity.unitsDalton` Returns a linear interpolation between two physical quantities *q0* and *q1* for a parameter *alpha* in the closed unit interval [0, 1]. ##### Method `samson.SBQuantity.unitsDalton.setZero` Signature: `setZero(self: samson.SBQuantity.unitsDalton) -> None` Sets the value to zero ##### Method `samson.SBQuantity.unitsDalton.str` Signature: `str(self: samson.SBQuantity.unitsDalton, fullName: bool = False) -> str` Converts the physical quantity to a string (with a full unit name when *fullName* is *True*.) ##### Method `samson.SBQuantity.unitsDalton.toDebugString` Signature: `toDebugString(self: samson.SBQuantity.unitsDalton) -> str` Returns a verbose debug string for this quantity. ##### Property `samson.SBQuantity.unitsDalton.Da` Signature: `property Da` quantity in dalton ##### Property `samson.SBQuantity.unitsDalton.auMass` Signature: `property auMass` convert to auMass ##### Property `samson.SBQuantity.unitsDalton.dalton` Signature: `property dalton` quantity in dalton ##### Property `samson.SBQuantity.unitsDalton.electronMass` Signature: `property electronMass` convert to electronMass ##### Property `samson.SBQuantity.unitsDalton.g` Signature: `property g` convert to gram ##### Property `samson.SBQuantity.unitsDalton.gDa` Signature: `property gDa` quantity in gigadalton ##### Property `samson.SBQuantity.unitsDalton.gigadalton` Signature: `property gigadalton` quantity in gigadalton ##### Property `samson.SBQuantity.unitsDalton.gram` Signature: `property gram` convert to gram ##### Property `samson.SBQuantity.unitsDalton.isDimensionless` Signature: `property isDimensionless` Returns *True* if the unit is dimensionless ##### Property `samson.SBQuantity.unitsDalton.kDa` Signature: `property kDa` quantity in kilodalton ##### Property `samson.SBQuantity.unitsDalton.kg` Signature: `property kg` convert to kilogram ##### Property `samson.SBQuantity.unitsDalton.kilodalton` Signature: `property kilodalton` quantity in kilodalton ##### Property `samson.SBQuantity.unitsDalton.kilogram` Signature: `property kilogram` convert to kilogram ##### Property `samson.SBQuantity.unitsDalton.mDa` Signature: `property mDa` quantity in megadalton ##### Property `samson.SBQuantity.unitsDalton.megadalton` Signature: `property megadalton` quantity in megadalton ##### Property `samson.SBQuantity.unitsDalton.sizeOfUnitSystem` Signature: `property sizeOfUnitSystem` Returns the number of base dimensions in this unit system. ##### Property `samson.SBQuantity.unitsDalton.value` Signature: `property value` Returns value of the unit ##### Property `samson.SBQuantity.unitsDalton.yg` Signature: `property yg` convert to yoctogram ##### Property `samson.SBQuantity.unitsDalton.yoctogram` Signature: `property yoctogram` convert to yoctogram --- # Convenience constructors Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsDaltonConvenienceConstructors.md ## API Reference #### Class `samson.SBQuantity.unifiedAtomicMassUnit` Signature: `class samson.SBQuantity.unifiedAtomicMassUnit(*args, **kwargs)` Bases: Overloaded function. 1. unifiedAtomicMassUnit(v: float) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘unifiedAtomicMassUnit’ with the given value v 2. unifiedAtomicMassUnit(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘unifiedAtomicMassUnit’ from the given physical unit u #### Class `samson.SBQuantity.u` Signature: `class samson.SBQuantity.u(*args, **kwargs)` Bases: Overloaded function. 1. u(v: float) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘u’ with the given value v 2. u(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘u’ from the given physical unit u #### Class `samson.SBQuantity.gigadalton` Signature: `class samson.SBQuantity.gigadalton(*args, **kwargs)` Bases: Overloaded function. 1. gigadalton(v: float) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘gigadalton’ with the given value v 2. gigadalton(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘gigadalton’ from the given physical unit u #### Class `samson.SBQuantity.megadalton` Signature: `class samson.SBQuantity.megadalton(*args, **kwargs)` Bases: Overloaded function. 1. megadalton(v: float) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘megadalton’ with the given value v 2. megadalton(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘megadalton’ from the given physical unit u #### Class `samson.SBQuantity.kilodalton` Signature: `class samson.SBQuantity.kilodalton(*args, **kwargs)` Bases: Overloaded function. 1. kilodalton(v: float) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘kilodalton’ with the given value v 2. kilodalton(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘kilodalton’ from the given physical unit u #### Class `samson.SBQuantity.dalton` Signature: `class samson.SBQuantity.dalton(*args, **kwargs)` Bases: Overloaded function. 1. dalton(v: float) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘dalton’ with the given value v 2. dalton(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘dalton’ from the given physical unit u #### Class `samson.SBQuantity.GDa` Signature: `class samson.SBQuantity.GDa(*args, **kwargs)` Bases: Overloaded function. 1. GDa(v: float) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘GDa’ with the given value v 2. GDa(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘GDa’ from the given physical unit u #### Class `samson.SBQuantity.MDa` Signature: `class samson.SBQuantity.MDa(*args, **kwargs)` Bases: Overloaded function. 1. MDa(v: float) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘MDa’ with the given value v 2. MDa(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘MDa’ from the given physical unit u #### Class `samson.SBQuantity.kDa` Signature: `class samson.SBQuantity.kDa(*args, **kwargs)` Bases: Overloaded function. 1. kDa(v: float) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘kDa’ with the given value v 2. kDa(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘kDa’ from the given physical unit u #### Class `samson.SBQuantity.Da` Signature: `class samson.SBQuantity.Da(*args, **kwargs)` Bases: Overloaded function. 1. Da(v: float) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘Da’ with the given value v 2. Da(q: samson.SBQuantity.unitsDalton) -> samson.SBQuantity.unitsDalton Constructs the physical unit ‘Da’ from the given physical unit u --- # Electronvolt Unit System Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvolt.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvolt.md You can check out this unit system’s functions in its base class: - [unitsElectronvolt](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md) - [`unitsElectronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt) - [`unitsElectronvolt.__add__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__add__) - [`unitsElectronvolt.__eq__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__eq__) - [`unitsElectronvolt.__ge__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__ge__) - [`unitsElectronvolt.__gt__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__gt__) - [`unitsElectronvolt.__iadd__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__iadd__) - [`unitsElectronvolt.__imul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__imul__) - [`unitsElectronvolt.__isub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__isub__) - [`unitsElectronvolt.__itruediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__itruediv__) - [`unitsElectronvolt.__le__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__le__) - [`unitsElectronvolt.__lt__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__lt__) - [`unitsElectronvolt.__mul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__mul__) - [`unitsElectronvolt.__ne__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__ne__) - [`unitsElectronvolt.__neg__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__neg__) - [`unitsElectronvolt.__radd__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__radd__) - [`unitsElectronvolt.__rmul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__rmul__) - [`unitsElectronvolt.__rsub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__rsub__) - [`unitsElectronvolt.__rtruediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__rtruediv__) - [`unitsElectronvolt.__sub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__sub__) - [`unitsElectronvolt.__truediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.__truediv__) - [`unitsElectronvolt.fromLinearInterpolation()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.fromLinearInterpolation) - [`unitsElectronvolt.setZero()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.setZero) - [`unitsElectronvolt.str()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.str) - [`unitsElectronvolt.toDebugString()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.toDebugString) - [`unitsElectronvolt.Eh`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.Eh) - [`unitsElectronvolt.J`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.J) - [`unitsElectronvolt.JPerMol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.JPerMol) - [`unitsElectronvolt.hartree`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.hartree) - [`unitsElectronvolt.isDimensionless`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.isDimensionless) - [`unitsElectronvolt.joule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.joule) - [`unitsElectronvolt.joulePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.joulePerMole) - [`unitsElectronvolt.kJ`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.kJ) - [`unitsElectronvolt.kcalPerMol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.kcalPerMol) - [`unitsElectronvolt.kilocaloriePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.kilocaloriePerMole) - [`unitsElectronvolt.kilojoule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.kilojoule) - [`unitsElectronvolt.sizeOfUnitSystem`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.sizeOfUnitSystem) - [`unitsElectronvolt.value`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.value) - [`unitsElectronvolt.zJ`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.zJ) - [`unitsElectronvolt.zeptojoule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md#samson.SBQuantity.unitsElectronvolt.zeptojoule) There are multiple convenience constructors available for the commonly used units. These convenience constructors internally call the unit system’s base class with proper units. In the case if there is no convenience constructor for a quantity in this unit system that you want to use, you can create it using the base class by providing exponents and scales or by combining quantities with existing convenience constructors using arithmetic operations. ```python SBQuantity.electronvolt(1.0) SBQuantity.eV(1.0) ``` - [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md) - [`electronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md#samson.SBQuantity.electronvolt) - [`eV`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md#samson.SBQuantity.eV) --- # unitsElectronvolt Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltClass.md This is the base class for the Electronvolt Unit. !!! note "See also" [Electronvolt Unit System](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvolt.md#ps-unit-electronvolt) [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md#ps-unit-electronvolt-constructors) ## API Reference #### Class `samson.SBQuantity.unitsElectronvolt` Signature: `class samson.SBQuantity.unitsElectronvolt(*args, **kwargs)` Bases: `pybind11_object` Units system, serves as a wrapper between SBQuantity and Python Overloaded function. 1. __init__(self: samson.SBQuantity.unitsElectronvolt) -> None Constructs the zero dimensionless unit 2. __init__(self: samson.SBQuantity.unitsElectronvolt, v: float) -> None Constructs the dimensionless unit with the given value v 3. __init__(self: samson.SBQuantity.unitsElectronvolt, value: float, scale: list[int], exponent: list[int]) -> None Construct the physical unit with value, scale and exponent 4. __init__(self: samson.SBQuantity.unitsElectronvolt, u: samson.SBQuantity.unitsElectronvolt) -> None Constructs the physical unit from the given physical unit u ##### Method `samson.SBQuantity.unitsElectronvolt.__add__` Signature: `__add__(*args, **kwargs)` Overloaded function. 1. __add__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> samson.SBQuantity.unitsElectronvolt 2. __add__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt ##### Method `samson.SBQuantity.unitsElectronvolt.__eq__` Signature: `__eq__(*args, **kwargs)` Overloaded function. 1. __eq__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> bool 2. __eq__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> bool 3. __eq__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> bool ##### Method `samson.SBQuantity.unitsElectronvolt.__ge__` Signature: `__ge__(*args, **kwargs)` Overloaded function. 1. __ge__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> bool 2. __ge__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> bool 3. __ge__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> bool ##### Method `samson.SBQuantity.unitsElectronvolt.__gt__` Signature: `__gt__(*args, **kwargs)` Overloaded function. 1. __gt__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> bool 2. __gt__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> bool 3. __gt__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> bool ##### Method `samson.SBQuantity.unitsElectronvolt.__iadd__` Signature: `__iadd__(*args, **kwargs)` Overloaded function. 1. __iadd__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> samson.SBQuantity.unitsElectronvolt 2. __iadd__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt ##### Method `samson.SBQuantity.unitsElectronvolt.__imul__` Signature: `__imul__(*args, **kwargs)` Overloaded function. 1. __imul__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> samson.SBQuantity.unitsElectronvolt 2. __imul__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt ##### Method `samson.SBQuantity.unitsElectronvolt.__isub__` Signature: `__isub__(*args, **kwargs)` Overloaded function. 1. __isub__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> samson.SBQuantity.unitsElectronvolt 2. __isub__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt ##### Method `samson.SBQuantity.unitsElectronvolt.__itruediv__` Signature: `__itruediv__(*args, **kwargs)` Overloaded function. 1. __itruediv__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> samson.SBQuantity.unitsElectronvolt 2. __itruediv__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt ##### Method `samson.SBQuantity.unitsElectronvolt.__le__` Signature: `__le__(*args, **kwargs)` Overloaded function. 1. __le__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> bool 2. __le__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> bool 3. __le__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> bool ##### Method `samson.SBQuantity.unitsElectronvolt.__lt__` Signature: `__lt__(*args, **kwargs)` Overloaded function. 1. __lt__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> bool 2. __lt__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> bool 3. __lt__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> bool ##### Method `samson.SBQuantity.unitsElectronvolt.__mul__` Signature: `__mul__(*args, **kwargs)` Overloaded function. 1. __mul__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> samson.SBQuantity.unitsElectronvolt 2. __mul__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt ##### Method `samson.SBQuantity.unitsElectronvolt.__ne__` Signature: `__ne__(*args, **kwargs)` Overloaded function. 1. __ne__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> bool 2. __ne__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> bool 3. __ne__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> bool ##### Method `samson.SBQuantity.unitsElectronvolt.__neg__` Signature: `__neg__(self: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt` ##### Method `samson.SBQuantity.unitsElectronvolt.__radd__` Signature: `__radd__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> samson.SBQuantity.unitsElectronvolt` ##### Method `samson.SBQuantity.unitsElectronvolt.__rmul__` Signature: `__rmul__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> samson.SBQuantity.unitsElectronvolt` ##### Method `samson.SBQuantity.unitsElectronvolt.__rsub__` Signature: `__rsub__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> samson.SBQuantity.unitsElectronvolt` ##### Method `samson.SBQuantity.unitsElectronvolt.__rtruediv__` Signature: `__rtruediv__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> samson.SBQuantity.unitsElectronvolt` ##### Method `samson.SBQuantity.unitsElectronvolt.__sub__` Signature: `__sub__(*args, **kwargs)` Overloaded function. 1. __sub__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> samson.SBQuantity.unitsElectronvolt 2. __sub__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt ##### Method `samson.SBQuantity.unitsElectronvolt.__truediv__` Signature: `__truediv__(*args, **kwargs)` Overloaded function. 1. __truediv__(self: samson.SBQuantity.unitsElectronvolt, arg0: float) -> samson.SBQuantity.unitsElectronvolt 2. __truediv__(self: samson.SBQuantity.unitsElectronvolt, arg0: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt ##### Method `samson.SBQuantity.unitsElectronvolt.fromLinearInterpolation` Signature: `static fromLinearInterpolation(q0: samson.SBQuantity.unitsElectronvolt, q1: samson.SBQuantity.unitsElectronvolt, alpha: float) -> samson.SBQuantity.unitsElectronvolt` Returns a linear interpolation between two physical quantities *q0* and *q1* for a parameter *alpha* in the closed unit interval [0, 1]. ##### Method `samson.SBQuantity.unitsElectronvolt.setZero` Signature: `setZero(self: samson.SBQuantity.unitsElectronvolt) -> None` Sets the value to zero ##### Method `samson.SBQuantity.unitsElectronvolt.str` Signature: `str(self: samson.SBQuantity.unitsElectronvolt, fullName: bool = False) -> str` Converts the physical quantity to a string (with a full unit name when *fullName* is *True*.) ##### Method `samson.SBQuantity.unitsElectronvolt.toDebugString` Signature: `toDebugString(self: samson.SBQuantity.unitsElectronvolt) -> str` Returns a verbose debug string for this quantity. ##### Property `samson.SBQuantity.unitsElectronvolt.Eh` Signature: `property Eh` convert to hartree ##### Property `samson.SBQuantity.unitsElectronvolt.J` Signature: `property J` convert to joule ##### Property `samson.SBQuantity.unitsElectronvolt.JPerMol` Signature: `property JPerMol` convert to joulePerMole ##### Property `samson.SBQuantity.unitsElectronvolt.hartree` Signature: `property hartree` convert to hartree ##### Property `samson.SBQuantity.unitsElectronvolt.isDimensionless` Signature: `property isDimensionless` Returns *True* if the unit is dimensionless ##### Property `samson.SBQuantity.unitsElectronvolt.joule` Signature: `property joule` convert to joule ##### Property `samson.SBQuantity.unitsElectronvolt.joulePerMole` Signature: `property joulePerMole` convert to joulePerMole ##### Property `samson.SBQuantity.unitsElectronvolt.kJ` Signature: `property kJ` convert to kilojoule ##### Property `samson.SBQuantity.unitsElectronvolt.kcalPerMol` Signature: `property kcalPerMol` convert to kilocaloriePerMole ##### Property `samson.SBQuantity.unitsElectronvolt.kilocaloriePerMole` Signature: `property kilocaloriePerMole` convert to kilocaloriePerMole ##### Property `samson.SBQuantity.unitsElectronvolt.kilojoule` Signature: `property kilojoule` convert to kilojoule ##### Property `samson.SBQuantity.unitsElectronvolt.sizeOfUnitSystem` Signature: `property sizeOfUnitSystem` Returns the number of base dimensions in this unit system. ##### Property `samson.SBQuantity.unitsElectronvolt.value` Signature: `property value` Returns value of the unit ##### Property `samson.SBQuantity.unitsElectronvolt.zJ` Signature: `property zJ` convert to zeptojoule ##### Property `samson.SBQuantity.unitsElectronvolt.zeptojoule` Signature: `property zeptojoule` convert to zeptojoule --- # Convenience constructors Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsElectronvoltConvenienceConstructors.md ## API Reference #### Class `samson.SBQuantity.electronvolt` Signature: `class samson.SBQuantity.electronvolt(*args, **kwargs)` Bases: Overloaded function. 1. electronvolt(v: float) -> samson.SBQuantity.unitsElectronvolt Constructs the physical unit ‘electronvolt’ with the given value v 2. electronvolt(q: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt Constructs the physical unit ‘electronvolt’ from the given physical unit u #### Class `samson.SBQuantity.eV` Signature: `class samson.SBQuantity.eV(*args, **kwargs)` Bases: Overloaded function. 1. eV(v: float) -> samson.SBQuantity.unitsElectronvolt Constructs the physical unit ‘eV’ with the given value v 2. eV(q: samson.SBQuantity.unitsElectronvolt) -> samson.SBQuantity.unitsElectronvolt Constructs the physical unit ‘eV’ from the given physical unit u --- # KilocaloriePerMole Unit System Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMole.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMole.md You can check out this unit system’s functions in its base class: - [unitsKilocaloriePerMole](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md) - [`unitsKilocaloriePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole) - [`unitsKilocaloriePerMole.__add__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__add__) - [`unitsKilocaloriePerMole.__eq__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__eq__) - [`unitsKilocaloriePerMole.__ge__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__ge__) - [`unitsKilocaloriePerMole.__gt__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__gt__) - [`unitsKilocaloriePerMole.__iadd__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__iadd__) - [`unitsKilocaloriePerMole.__imul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__imul__) - [`unitsKilocaloriePerMole.__isub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__isub__) - [`unitsKilocaloriePerMole.__itruediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__itruediv__) - [`unitsKilocaloriePerMole.__le__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__le__) - [`unitsKilocaloriePerMole.__lt__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__lt__) - [`unitsKilocaloriePerMole.__mul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__mul__) - [`unitsKilocaloriePerMole.__ne__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__ne__) - [`unitsKilocaloriePerMole.__neg__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__neg__) - [`unitsKilocaloriePerMole.__radd__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__radd__) - [`unitsKilocaloriePerMole.__rmul__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__rmul__) - [`unitsKilocaloriePerMole.__rsub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__rsub__) - [`unitsKilocaloriePerMole.__rtruediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__rtruediv__) - [`unitsKilocaloriePerMole.__sub__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__sub__) - [`unitsKilocaloriePerMole.__truediv__()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.__truediv__) - [`unitsKilocaloriePerMole.fromLinearInterpolation()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.fromLinearInterpolation) - [`unitsKilocaloriePerMole.setZero()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.setZero) - [`unitsKilocaloriePerMole.str()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.str) - [`unitsKilocaloriePerMole.toDebugString()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.toDebugString) - [`unitsKilocaloriePerMole.Eh`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.Eh) - [`unitsKilocaloriePerMole.J`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.J) - [`unitsKilocaloriePerMole.JPerMol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.JPerMol) - [`unitsKilocaloriePerMole.eV`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.eV) - [`unitsKilocaloriePerMole.electronvolt`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.electronvolt) - [`unitsKilocaloriePerMole.hartree`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.hartree) - [`unitsKilocaloriePerMole.isDimensionless`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.isDimensionless) - [`unitsKilocaloriePerMole.joule`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.joule) - [`unitsKilocaloriePerMole.joulePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.joulePerMole) - [`unitsKilocaloriePerMole.sizeOfUnitSystem`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.sizeOfUnitSystem) - [`unitsKilocaloriePerMole.value`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md#samson.SBQuantity.unitsKilocaloriePerMole.value) There are multiple convenience constructors available for the commonly used units. These convenience constructors internally call the unit system’s base class with proper units. In the case if there is no convenience constructor for a quantity in this unit system that you want to use, you can create it using the base class by providing exponents and scales or by combining quantities with existing convenience constructors using arithmetic operations. ```python SBQuantity.kilocaloriePerMole(1.0) SBQuantity.kcalPerMol(1.0) ``` - [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.md) - [`kilocaloriePerMole`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.md#samson.SBQuantity.kilocaloriePerMole) - [`kcalPerMol`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.md#samson.SBQuantity.kcalPerMol) --- # unitsKilocaloriePerMole Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleClass.md This is the base class for the KilocaloriePerMole Unit. !!! note "See also" [KilocaloriePerMole Unit System](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMole.md#ps-unit-kcalpermol) [Convenience constructors](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.md#ps-unit-kcalpermol-constructors) ## API Reference #### Class `samson.SBQuantity.unitsKilocaloriePerMole` Signature: `class samson.SBQuantity.unitsKilocaloriePerMole(*args, **kwargs)` Bases: `pybind11_object` Units system, serves as a wrapper between SBQuantity and Python Overloaded function. 1. __init__(self: samson.SBQuantity.unitsKilocaloriePerMole) -> None Constructs the zero dimensionless unit 2. __init__(self: samson.SBQuantity.unitsKilocaloriePerMole, v: float) -> None Constructs the dimensionless unit with the given value v 3. __init__(self: samson.SBQuantity.unitsKilocaloriePerMole, value: float, scale: list[int], exponent: list[int]) -> None Construct the physical unit with value, scale and exponent 4. __init__(self: samson.SBQuantity.unitsKilocaloriePerMole, u: samson.SBQuantity.unitsKilocaloriePerMole) -> None Constructs the physical unit from the given physical unit u ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__add__` Signature: `__add__(*args, **kwargs)` Overloaded function. 1. __add__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> samson.SBQuantity.unitsKilocaloriePerMole 2. __add__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__eq__` Signature: `__eq__(*args, **kwargs)` Overloaded function. 1. __eq__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> bool 2. __eq__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> bool 3. __eq__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> bool ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__ge__` Signature: `__ge__(*args, **kwargs)` Overloaded function. 1. __ge__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> bool 2. __ge__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> bool 3. __ge__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> bool ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__gt__` Signature: `__gt__(*args, **kwargs)` Overloaded function. 1. __gt__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> bool 2. __gt__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> bool 3. __gt__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> bool ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__iadd__` Signature: `__iadd__(*args, **kwargs)` Overloaded function. 1. __iadd__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> samson.SBQuantity.unitsKilocaloriePerMole 2. __iadd__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__imul__` Signature: `__imul__(*args, **kwargs)` Overloaded function. 1. __imul__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> samson.SBQuantity.unitsKilocaloriePerMole 2. __imul__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__isub__` Signature: `__isub__(*args, **kwargs)` Overloaded function. 1. __isub__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> samson.SBQuantity.unitsKilocaloriePerMole 2. __isub__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__itruediv__` Signature: `__itruediv__(*args, **kwargs)` Overloaded function. 1. __itruediv__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> samson.SBQuantity.unitsKilocaloriePerMole 2. __itruediv__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__le__` Signature: `__le__(*args, **kwargs)` Overloaded function. 1. __le__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> bool 2. __le__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> bool 3. __le__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> bool ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__lt__` Signature: `__lt__(*args, **kwargs)` Overloaded function. 1. __lt__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> bool 2. __lt__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> bool 3. __lt__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> bool ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__mul__` Signature: `__mul__(*args, **kwargs)` Overloaded function. 1. __mul__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> samson.SBQuantity.unitsKilocaloriePerMole 2. __mul__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__ne__` Signature: `__ne__(*args, **kwargs)` Overloaded function. 1. __ne__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> bool 2. __ne__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> bool 3. __ne__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> bool ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__neg__` Signature: `__neg__(self: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole` ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__radd__` Signature: `__radd__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> samson.SBQuantity.unitsKilocaloriePerMole` ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__rmul__` Signature: `__rmul__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> samson.SBQuantity.unitsKilocaloriePerMole` ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__rsub__` Signature: `__rsub__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> samson.SBQuantity.unitsKilocaloriePerMole` ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__rtruediv__` Signature: `__rtruediv__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> samson.SBQuantity.unitsKilocaloriePerMole` ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__sub__` Signature: `__sub__(*args, **kwargs)` Overloaded function. 1. __sub__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> samson.SBQuantity.unitsKilocaloriePerMole 2. __sub__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.__truediv__` Signature: `__truediv__(*args, **kwargs)` Overloaded function. 1. __truediv__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: float) -> samson.SBQuantity.unitsKilocaloriePerMole 2. __truediv__(self: samson.SBQuantity.unitsKilocaloriePerMole, arg0: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.fromLinearInterpolation` Signature: `static fromLinearInterpolation(q0: samson.SBQuantity.unitsKilocaloriePerMole, q1: samson.SBQuantity.unitsKilocaloriePerMole, alpha: float) -> samson.SBQuantity.unitsKilocaloriePerMole` Returns a linear interpolation between two physical quantities *q0* and *q1* for a parameter *alpha* in the closed unit interval [0, 1]. ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.setZero` Signature: `setZero(self: samson.SBQuantity.unitsKilocaloriePerMole) -> None` Sets the value to zero ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.str` Signature: `str(self: samson.SBQuantity.unitsKilocaloriePerMole, fullName: bool = False) -> str` Converts the physical quantity to a string (with a full unit name when *fullName* is *True*.) ##### Method `samson.SBQuantity.unitsKilocaloriePerMole.toDebugString` Signature: `toDebugString(self: samson.SBQuantity.unitsKilocaloriePerMole) -> str` Returns a verbose debug string for this quantity. ##### Property `samson.SBQuantity.unitsKilocaloriePerMole.Eh` Signature: `property Eh` convert to hartree ##### Property `samson.SBQuantity.unitsKilocaloriePerMole.J` Signature: `property J` convert to joule ##### Property `samson.SBQuantity.unitsKilocaloriePerMole.JPerMol` Signature: `property JPerMol` convert to joulePerMole ##### Property `samson.SBQuantity.unitsKilocaloriePerMole.eV` Signature: `property eV` convert to electronvolt ##### Property `samson.SBQuantity.unitsKilocaloriePerMole.electronvolt` Signature: `property electronvolt` convert to electronvolt ##### Property `samson.SBQuantity.unitsKilocaloriePerMole.hartree` Signature: `property hartree` convert to hartree ##### Property `samson.SBQuantity.unitsKilocaloriePerMole.isDimensionless` Signature: `property isDimensionless` Returns *True* if the unit is dimensionless ##### Property `samson.SBQuantity.unitsKilocaloriePerMole.joule` Signature: `property joule` convert to joule ##### Property `samson.SBQuantity.unitsKilocaloriePerMole.joulePerMole` Signature: `property joulePerMole` convert to joulePerMole ##### Property `samson.SBQuantity.unitsKilocaloriePerMole.sizeOfUnitSystem` Signature: `property sizeOfUnitSystem` Returns the number of base dimensions in this unit system. ##### Property `samson.SBQuantity.unitsKilocaloriePerMole.value` Signature: `property value` Returns value of the unit --- # Convenience constructors Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsKilocaloriePerMoleConvenienceConstructors.md ## API Reference #### Class `samson.SBQuantity.kilocaloriePerMole` Signature: `class samson.SBQuantity.kilocaloriePerMole(*args, **kwargs)` Bases: Overloaded function. 1. kilocaloriePerMole(v: float) -> samson.SBQuantity.unitsKilocaloriePerMole Constructs the physical unit ‘kilocaloriePerMole’ with the given value v 2. kilocaloriePerMole(q: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole Constructs the physical unit ‘kilocaloriePerMole’ from the given physical unit u #### Class `samson.SBQuantity.kcalPerMol` Signature: `class samson.SBQuantity.kcalPerMol(*args, **kwargs)` Bases: Overloaded function. 1. kcalPerMol(v: float) -> samson.SBQuantity.unitsKilocaloriePerMole Constructs the physical unit ‘kcalPerMol’ with the given value v 2. kcalPerMol(q: samson.SBQuantity.unitsKilocaloriePerMole) -> samson.SBQuantity.unitsKilocaloriePerMole Constructs the physical unit ‘kcalPerMol’ from the given physical unit u --- # List of defined quantities Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsListOfDefinedQuantityTypes.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsListOfDefinedQuantityTypes.md ### SI units (International System of Units) #### dimensionless - `SBQuantity.dimensionless` - `SBQuantity.radian` (`SBQuantity.rad`) - `SBQuantity.degree` (`SBQuantity.deg`) - `SBQuantity.steradian` (`SBQuantity.sr`) #### length - `SBQuantity.kilometer` (`SBQuantity.km`) - `SBQuantity.hectometer` (`SBQuantity.hm`) - `SBQuantity.decameter` (`SBQuantity.dam`) - `SBQuantity.meter` (`SBQuantity.m`) - `SBQuantity.decimeter` (`SBQuantity.dm`) - `SBQuantity.centimeter` (`SBQuantity.cm`) - `SBQuantity.millimeter` (`SBQuantity.mm`) - `SBQuantity.micrometer` (`SBQuantity.um`, `SBQuantity.micron`) - `SBQuantity.nanometer` (`SBQuantity.nm`) - `SBQuantity.angstrom` - `SBQuantity.picometer` (`SBQuantity.pm`) - `SBQuantity.femtometer` (`SBQuantity.fm`, `SBQuantity.fermi`) - `SBQuantity.attometer` (`SBQuantity.am`) - `SBQuantity.zeptometer(zm`) - `SBQuantity.yoctometer` (`SBQuantity.ym`) - `SBQuantity.zeptometer(zm`) - `SBQuantity.yoctometer` (`SBQuantity.ym`) There are also auxiliary physical quantities defined for inverse, square, inverse square, cubic, and inverse cubic length, e.g.: `SBQuantity.inversePicometer` (`SBQuantity.inversePm`), `SBQuantity.squarePicometer` (`SBQuantity.squarePm`), `SBQuantity.inverseSquarePicometer` (`SBQuantity.inverseSquarePm`), `SBQuantity.cubicPicometer` (`SBQuantity.cubicPm`), `SBQuantity.inverseCubicPicometer` (`SBQuantity.inverseCubicPm`). #### mass - `SBQuantity.kilogram` (`SBQuantity.kg`) - `SBQuantity.hectogram` (`SBQuantity.hg`) - `SBQuantity.decagram` (`SBQuantity.dag`) - `SBQuantity.gram` (`SBQuantity.g`) - `SBQuantity.decigram` (`SBQuantity.dg`) - `SBQuantity.centigram` (`SBQuantity.cg`) - `SBQuantity.milligram` (`SBQuantity.mg`) - `SBQuantity.microgram` (`SBQuantity.ug`) - `SBQuantity.nanogram` (`SBQuantity.ng`) - `SBQuantity.picogram` (`SBQuantity.pg`) - `SBQuantity.femtogram` (`SBQuantity.fg`) - `SBQuantity.attogram` (`SBQuantity.ag`) - `SBQuantity.zeptogram` (`SBQuantity.zg`) - `SBQuantity.yoctogram` (`SBQuantity.yg`) There are also auxiliary physical quantities defined for inverse mass, e.g.: `SBQuantity.inverseKilogram` (`SBQuantity.inverseKg`). #### time - `SBQuantity.second` (`SBQuantity.s`) - `SBQuantity.decisecond` (`SBQuantity.ds`) - `SBQuantity.centisecond` (`SBQuantity.cs`) - `SBQuantity.millisecond` (`SBQuantity.ms`) - `SBQuantity.microsecond` (`SBQuantity.us`) - `SBQuantity.nanosecond` (`SBQuantity.ns`) - `SBQuantity.picosecond` (`SBQuantity.ps`) - `SBQuantity.femtosecond` (`SBQuantity.fs`) - `SBQuantity.attosecond` - `SBQuantity.zeptosecond` (`SBQuantity.zs`) - `SBQuantity.yoctosecond` (`SBQuantity.ys`) There are also auxiliary physical quantities defined for inverse time, e.g.: `SBQuantity.inverseFemtosecond` (`SBQuantity.inverseFs`). #### electric current - `SBQuantity.kiloampere` (`SBQuantity.kA`) - `SBQuantity.hectoampere` (`SBQuantity.hA`) - `SBQuantity.decaampere` (`SBQuantity.daA`) - `SBQuantity.ampere` (`SBQuantity.A`) - `SBQuantity.deciampere` (`SBQuantity.dA`) - `SBQuantity.centiampere` (`SBQuantity.cA`) - `SBQuantity.milliampere` (`SBQuantity.mA`) - `SBQuantity.microampere` (`SBQuantity.uA`) - `SBQuantity.nanoampere` (`SBQuantity.nA`) - `SBQuantity.picoampere` (`SBQuantity.pA`) - `SBQuantity.femtoampere` (`SBQuantity.fA`) - `SBQuantity.attoampere` (`SBQuantity.aA`) - `SBQuantity.zeptoampere` (`SBQuantity.zA`) - `SBQuantity.yoctoampere` (`SBQuantity.yA`) #### temperature - `SBQuantity.kilokelvin` (`SBQuantity.kK`) - `SBQuantity.hectokelvin` (`SBQuantity.hK`) - `SBQuantity.decakelvin` (`SBQuantity.daK`) - `SBQuantity.kelvin` (`SBQuantity.K`) - `SBQuantity.decikelvin` (`SBQuantity.dK`) - `SBQuantity.centikelvin` (`SBQuantity.cK`) - `SBQuantity.millikelvin` (`SBQuantity.mK`) - `SBQuantity.microkelvin` (`SBQuantity.uK`) - `SBQuantity.nanokelvin` (`SBQuantity.nK`) - `SBQuantity.picokelvin` (`SBQuantity.pK`) - `SBQuantity.femtokelvin` (`SBQuantity.fK`) - `SBQuantity.attokelvin` (`SBQuantity.aK`) - `SBQuantity.zeptokelvin` (`SBQuantity.zK`) - `SBQuantity.yoctokelvin` (`SBQuantity.yK`) #### amount of substance - `SBQuantity.kilomole` (`SBQuantity.kmol`) - `SBQuantity.hectomole` (`SBQuantity.hmol`) - `SBQuantity.decamole` (`SBQuantity.damol`) - `SBQuantity.mole` (`SBQuantity.mol`) - `SBQuantity.decimole` (`SBQuantity.dmol`) - `SBQuantity.centimole` (`SBQuantity.cmol`) - `SBQuantity.millimole` (`SBQuantity.mmol`) - `SBQuantity.micromole` (`SBQuantity.umol`) - `SBQuantity.nanomole` (`SBQuantity.nmol`) - `SBQuantity.picomole` (`SBQuantity.pmol`) - `SBQuantity.femtomole` (`SBQuantity.fmol`) - `SBQuantity.attomole` (`SBQuantity.amol`) - `SBQuantity.zeptomole` (`SBQuantity.zmol`) - `SBQuantity.yoctomole` (`SBQuantity.ymol`) #### luminous intensity - `SBQuantity.kilocandela` (`SBQuantity.kcd`) - `SBQuantity.hectocandela` (`SBQuantity.hcd`) - `SBQuantity.decacandela` (`SBQuantity.dacd`) - `SBQuantity.candela` (`SBQuantity.cd`) - `SBQuantity.decicandela` (`SBQuantity.dcd`) - `SBQuantity.centicandela` (`SBQuantity.ccd`) - `SBQuantity.millicandela` (`SBQuantity.mcd`) - `SBQuantity.microcandela` (`SBQuantity.ucd`) - `SBQuantity.nanocandela` (`SBQuantity.ncd`) - `SBQuantity.picocandela` (`SBQuantity.pcd`) - `SBQuantity.femtocandela` (`SBQuantity.fcd`) - `SBQuantity.attocandela` (`SBQuantity.acd`) - `SBQuantity.zeptocandela` (`SBQuantity.zcd`) - `SBQuantity.yoctocandela` (`SBQuantity.ycd`) #### derived units - `SBQuantity.gigahertz` (`SBQuantity.GHz`) - `SBQuantity.megahertz` (`SBQuantity.MHz`) - `SBQuantity.kilohertz` (`SBQuantity.KHz`) - `SBQuantity.hertz` (`SBQuantity.Hz`) - `SBQuantity.piconewton` (`SBQuantity.pN`) - `SBQuantity.nanonewton` (`SBQuantity.nN`) - `SBQuantity.newton` (`SBQuantity.N`) - `SBQuantity.Pascal` (`SBQuantity.Pa`) - `SBQuantity.zeptojoule` (`SBQuantity.zJ`) - `SBQuantity.kilojoule` (`SBQuantity.kJ`) - `SBQuantity.joule` (`SBQuantity.J`) - `SBQuantity.joulePerKelvin` (`SBQuantity.jPerK`) - `SBQuantity.joulePerMole` (`SBQuantity.jPerMol`) - `SBQuantity.kilojoulePerMole` (`SBQuantity.kjPerMol`) - `SBQuantity.jouleSecond` (`SBQuantity.jS`) - `SBQuantity.watt` (`SBQuantity.W`) - `SBQuantity.coulomb` (`SBQuantity.C`) - `SBQuantity.zeptocoulomb` (`SBQuantity.zC`) - `SBQuantity.coulombPerMeter` (`SBQuantity.CPerM`) - `SBQuantity.coulombPerSquareMeter` (`SBQuantity.CPerM2`) - `SBQuantity.volt` (`SBQuantity.V`) - `SBQuantity.farad` (`SBQuantity.F`) - `SBQuantity.ohm` (`SBQuantity.O`) - `SBQuantity.siemens` (`SBQuantity.S`) - `SBQuantity.weber` (`SBQuantity.Wb`) - `SBQuantity.tesla` (`SBQuantity.T`) - `SBQuantity.gigatesla` (`SBQuantity.GT`) - `SBQuantity.henry` (`SBQuantity.H`) - `SBQuantity.lumen` - `SBQuantity.lux` (`SBQuantity.lx`) - `SBQuantity.becquerel` (`SBQuantity.Bq`) - `SBQuantity.gray` (`SBQuantity.Gy`) - `SBQuantity.sievert` (`SBQuantity.Sv`) - `SBQuantity.katal` (`SBQuantity.Kat`) - `SBQuantity.picometerPerSecond` (`SBQuantity.pmPerS`) - `SBQuantity.picometerPerFemtosecond` (`SBQuantity.pmPerFs`) - `SBQuantity.perSecond` (`SBQuantity.perS`) - `SBQuantity.radianPerSecond` (`SBQuantity.radPerS`) - `SBQuantity.degreePerSecond` (`SBQuantity.degPerS`) - `SBQuantity.picometerPerSquareFemtosecond` (`SBQuantity.pmPerSquareFs`) - `SBQuantity.yoctogramPicometerPerFemtosecond` (`SBQuantity.ygPmPerFs`) - `SBQuantity.yoctogramSquarePicometer` (`SBQuantity.ygSquarePm`) - `SBQuantity.perYoctogramPerSquarePicometer` (`SBQuantity.perYgPerSquarePm`) - `SBQuantity.nanonewtonPerPicometer` (`SBQuantity.nNPerPm`) #### default types - `SBQuantity.length` (== `SBQuantity.picometer`) - `SBQuantity.squareLength` - `SBQuantity.cubicLength` - `SBQuantity.inverseLength` - `SBQuantity.inverseSquareLength` - `SBQuantity.inverseCubicLength` - `SBQuantity.distance` (== `SBQuantity.length`) - `SBQuantity.squareDistance` - `SBQuantity.cubicDistance` - `SBQuantity.inverseDistance` - `SBQuantity.inverseSquareDistance` - `SBQuantity.inverseCubicDistance` - `SBQuantity.mass` (== `SBQuantity.yoctogram`) - `SBQuantity.squareMass` - `SBQuantity.inverseMass` - `SBQuantity.inverseSquareMass` - `SBQuantity.time` (== `SBQuantity.femtosecond`) - `SBQuantity.squareTime` - `SBQuantity.inverseTime` - `SBQuantity.inverseSquareTime` - `SBQuantity.intensity` (== `SBQuantity.nanoampere`) - `SBQuantity.squareIntensity` - `SBQuantity.inverseIntensity` - `SBQuantity.inverseSquareIntensity` - `SBQuantity.temperature` (== `SBQuantity.kelvin`) - `SBQuantity.squareTemperature` - `SBQuantity.inverseTemperature` - `SBQuantity.inverseSquareTemperature` - `SBQuantity.amountOfSubstance` (== `SBQuantity.mole`) - `SBQuantity.squareAmountOfSubstance` - `SBQuantity.inverseAmountOfSubstance` - `SBQuantity.inverseSquareAmountOfSubstance` - `SBQuantity.luminousIntensity` (== `SBQuantity.candela`) - `SBQuantity.squareLuminousIntensity` - `SBQuantity.inverseLuminousIntensity` - `SBQuantity.inverseSquareLuminousIntensity` - `SBQuantity.electricCharge` (== `SBQuantity.squareTime`) - `SBQuantity.voltage` (== `SBQuantity.mass` x `SBQuantity.squareLength`) - `SBQuantity.electricField` (== `SBQuantity.voltage` / `SBQuantity.time`) - `SBQuantity.magneticDensity` (== `SBQuantity.mass` x `SBQuantity.inverseIntensity` x `SBQuantity.inverseSquareTime`) - `SBQuantity.angularVelocity` (== `SBQuantity.inverseTime`) - `SBQuantity.angularAcceleration` (== `SBQuantity.inverseSquareTime`) - `SBQuantity.pressure` (== `SBQuantity.inverseMass` x `SBQuantity.length` x `SBQuantity.inverseSquareTime`) - `SBQuantity.lengthMass` (== `SBQuantity.length` x `SBQuantity.mass`) - `SBQuantity.inverseLengthInverseMass` (== `SBQuantity.1` / `SBQuantity.lengthMass`) - `SBQuantity.area` (== `SBQuantity.squareLength`) - `SBQuantity.inverseArea` (== `SBQuantity.inverseSquareLength`) - `SBQuantity.volume` (== `SBQuantity.cubicLength`) - `SBQuantity.inverseVolume` (== `SBQuantity.inverseCubicLength`) - `SBQuantity.position` (== `SBQuantity.length`) - `SBQuantity.velocity` (== `SBQuantity.length` / `SBQuantity.time`) - `SBQuantity.acceleration` (== `SBQuantity.length` / `SBQuantity.squareTime`) - `SBQuantity.force` (== `SBQuantity.mass` x `SBQuantity.length` x `SBQuantity.inverseSquareTime`) - `SBQuantity.energy` (== `SBQuantity.mass` x `SBQuantity.squareLength` x `SBQuantity.inverseSquareTime`) - `SBQuantity.inverseForce` (== `SBQuantity.1` / `SBQuantity.force`) - `SBQuantity.lengthPerForce` (== `SBQuantity.length` / `SBQuantity.force`) - `SBQuantity.forcePerLength` (== `SBQuantity.force` / `SBQuantity.length`) - `SBQuantity.energyPerSquareLength` (== `SBQuantity.energy` / `SBQuantity.squareLength`) - `SBQuantity.momentum` (== `SBQuantity.mass` x `SBQuantity.length` x `SBQuantity.inverseTime`) - `SBQuantity.inverseMomentum` (== `SBQuantity.1` / `SBQuantity.momentum`) - `SBQuantity.momentOfInertia` (== `SBQuantity.mass` x `SBQuantity.squareLength`) - `SBQuantity.inverseMomentOfInertia` (== `SBQuantity.1` / `SBQuantity.momentOfIntertia`) - `SBQuantity.electronDensity` (== `SBQuantity.inverseVolume`) ### Atomic Units - `SBQuantity.electronMass` (`SBQuantity.auMass, me`) - `SBQuantity.electronCharge` (`SBQuantity.auCharge, e`) - `SBQuantity.auAction` (`SBQuantity.hBar`) - `SBQuantity.auCoulombConstant` (`SBQuantity.ec`) - `SBQuantity.auTime` - `SBQuantity.bohr` (`SBQuantity.a0`) - `SBQuantity.hartree` (`SBQuantity.Eh`) ### Dalton Units - `SBQuantity.unifiedAtomicMassUnit` (`SBQuantity.u`) - `SBQuantity.unifiedAtomicMassUnit` (`SBQuantity.u`) - `SBQuantity.dalton` (`SBQuantity.Da`) - `SBQuantity.kilodalton` (`SBQuantity.KDa`) - `SBQuantity.megadalton` (`SBQuantity.MDa`) - `SBQuantity.gigadalton` (`SBQuantity.GDa`) ### Electronvolt Units - `SBQuantity.electronvolt` (`SBQuantity.eV`) ### KilocaloriePerMole Units - `SBQuantity.kilocaloriePerMole` (`SBQuantity.kcalPerMol`) --- # SBConstant Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/SBConstant.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/SBConstant.md This class provides a set of standard physical constants. You can access them in the following way: ```python SBConstant.Pi SBConstant.Pi * SBConstant.RadToDeg SBConstant.kB ``` !!! note "See also" SAMSON SDK: [SBDQuantityConstant](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDQuantityConstant/#) ## API Reference #### Class `samson.SBConstant` Signature: `class samson.SBConstant` Bases: `pybind11_object` This class holds several useful physical constants. ##### Method `samson.SBConstant.getDegreesFromRadians` Signature: `static getDegreesFromRadians(angle: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI` Converts radians in degrees in the interval [-180, 180] **Parameters** - **angle** (*samson.SBQuantity*) – An angle in radians **Returns** - An angle in degrees in the interval [-180, 180] **Return type** - samson.SBQuantity ##### Attribute `samson.SBConstant.DegToRad` Signature: `DegToRad = 0.017453292519943295` ##### Attribute `samson.SBConstant.NA` Signature: `NA = 6.02214e+23 mol^-1` ##### Attribute `samson.SBConstant.Pi` Signature: `Pi = 3.141592653589793` ##### Attribute `samson.SBConstant.RadToDeg` Signature: `RadToDeg = 57.29577951308232` ##### Attribute `samson.SBConstant.avogadroConstant` Signature: `avogadroConstant = 6.02214e+23 mol^-1` ##### Attribute `samson.SBConstant.bohrRadius` Signature: `bohrRadius = 52.9177 pm` ##### Attribute `samson.SBConstant.boltzmannConstant` Signature: `boltzmannConstant = 0.0138065 pm^2.yg.fs^-2.K^-1` ##### Attribute `samson.SBConstant.c` Signature: `c = 2.99792e+08 m.s^-1` ##### Attribute `samson.SBConstant.coulombConstant` Signature: `coulombConstant = 8.98755e+09 m^3.kg.s^-4.A^-2` ##### Attribute `samson.SBConstant.electronMass` Signature: `electronMass = 0.000910938 yg` ##### Attribute `samson.SBConstant.kB` Signature: `kB = 0.0138065 pm^2.yg.fs^-2.K^-1` ##### Attribute `samson.SBConstant.neutronMass` Signature: `neutronMass = 1.67493 yg` ##### Attribute `samson.SBConstant.protonMass` Signature: `protonMass = 1.67262 yg` ##### Attribute `samson.SBConstant.speedOfLight` Signature: `speedOfLight = 2.99792e+08 m.s^-1` --- # Type Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type.md The classes below define the basic types used throughout SAMSON, especially for mathematical operations, colors, spatial transformations, random numbers, and date/time values. !!! note "See also" SAMSON SDK: [The SBDType Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/DataModel/Type/#) - [SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md) - [`SBColor`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) - [SBDateTime](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBDateTime.md) - [`SBDateTime`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBDateTime.md#samson.SBDateTime) - [SBRandom](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBRandom.md) - [`SBRandom`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBRandom.md#samson.SBRandom) - [SBPhysicalVector3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalVector3.md) - [SBAcceleration3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/acceleration3.md) - [SBAngularAcceleration3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/angularAcceleration3.md) - [SBAngularVelocity3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/angularVelocity3.md) - [SBVector3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md) - [SBEnergy3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/energy3.md) - [SBForce3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/force3.md) - [SBInverseLength3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/inverseLength3.md) - [SBInverseMomentum3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/inverseMomentum3.md) - [SBLength3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/length3.md) - [SBMomentum3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/momentum3.md) - [SBPicometerPerSecond3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/picometerPerSecond3.md) - [SBPosition3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md) - [SBRadian3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/radian3.md) - [SBRadianPerSecond3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/radianPerSecond3.md) - [SBSquareLength3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/squareLength3.md) - [SBTorque3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/torque3.md) - [SBVelocity3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/velocity3.md) - [`SBPhysicalVector3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalVector3.md#samson.SBPhysicalVector3) - [SBPhysicalVector6](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalVector6.md) - [SBAcceleration6](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/acceleration6.md) - [SBVector6](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/dimensionless6.md) - [SBForce6](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/force6.md) - [SBVelocity6](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/velocity6.md) - [`SBPhysicalVector6`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalVector6.md#samson.SBPhysicalVector6) - [SBPhysicalInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalInterval.md) - [SBAccelerationInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/accelerationInterval.md) - [SBInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/dimensionlessInterval.md) - [SBEnergyInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/energyInterval.md) - [SBForceInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/forceInterval.md) - [SBLengthInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/lengthInterval.md) - [SBMomentumInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/momentumInterval.md) - [SBPositionInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/positionInterval.md) - [SBSquareLengthInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/squareLengthInterval.md) - [SBVelocityInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/velocityInterval.md) - [`SBPhysicalInterval`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalInterval.md#samson.SBPhysicalInterval) - [SBPhysicalIAVector3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalIAVector3.md) - [SBIAAcceleration3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/accelerationInterval3.md) - [SBIAVector3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/dimensionlessInterval3.md) - [SBIAForce3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/forceInterval3.md) - [SBIALength3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/lengthInterval3.md) - [SBIAMomentum3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/momentumInterval3.md) - [SBIAPosition3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/positionInterval3.md) - [SBIARadian3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/radianInterval3.md) - [SBIARadianPerSecond3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/radianPerSecondInterval3.md) - [SBIAVelocity3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/velocityInterval3.md) - [`SBPhysicalIAVector3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalIAVector3.md#samson.SBPhysicalIAVector3) - [SBPhysicalMatrix33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalMatrix33.md) - [SBMatrix33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md) - [SBInverseMass33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/inverseMass33.md) - [SBInverseInertiaTensor33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/inverseMomentOfInertia33.md) - [SBMass33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/mass33.md) - [SBInertiaTensor33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/momentOfInertia33.md) - [`SBPhysicalMatrix33`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalMatrix33.md#samson.SBPhysicalMatrix33) - [SBPhysicalMatrix66](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalMatrix66.md) - [SBMatrix66](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/dimensionless66.md) - [SBInertia66](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/inertia66.md) - [SBInverseInertia66](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/inverseInertia66.md) - [`SBPhysicalMatrix66`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalMatrix66.md#samson.SBPhysicalMatrix66) - [SBSpatialDomain](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialDomain.md) - [`SBSpatialDomain`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialDomain.md#samson.SBSpatialDomain) - [SBSpatialTransform](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialTransform.md) - [`SBSpatialTransform`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialTransform.md#samson.SBSpatialTransform) - [SBUnitCell](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBUnitCell.md) - [`SBUnitCell`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBUnitCell.md#samson.SBUnitCell) --- # SBColor Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md This class describes a color and can be used to colorize e.g. atoms individually. Please refer to the [Apply color](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-apply-color) section to lear how to apply colors to nodes. This class also provides functionality to convert between different color spaces: - sRGB (standard RGB) - HSV (Hue Saturation Value) - HCL (CIE L*u*v* in cylindrical coordinates, a.k.a. CIE LCh_uv) - CIE L*u*v* - CIE L*a*b* - CIE L*a*b* in cylindrical coordinates, a.k.a. CIE LCh_ab - CIE XYZ with D65/2° standard illuminant To use any functionality in this module, pass a list with 3 floating point values in a function, e.g.: Caption: Convert colors between color spaces ```python color_in_sRGB = [1.0, 0.0, 0.0] # red color in sRGB color space color_in_HCL = SBColor.toHCL(color_in_sRGB) ``` Note that the conversion is not exact. For example, a conversion from *sRGB* to *HCL* and then back from *HCL* to *sRGB* will result in values that might slightly differ from the original ones by some numerical error due to approximations in conversion functions. You can also ligthen or darken the color using `SBColor.lightenSRGBColor()` and `SBColor.darkenSRGBColor()` functions respectively. !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDTypeColor](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypeColor/#) ## API Reference #### Class `samson.SBColor` Signature: `class samson.SBColor(*args, **kwargs)` Bases: `pybind11_object` This class describes a color. SAMSON API: [SBDTypeColor](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypeColor/#) Overloaded function. 1. __init__(self: samson.SBColor) -> None Constructs a color (1.0, 1.0, 1.0, 1.0) .. rubric:: Examples ```pycon >>> color = SBColor() >>> print(color) [1.000000, 1.000000, 1.000000, 1.000000] ``` 2. __init__(self: samson.SBColor, red: float, green: float, blue: float, alpha: float = 1.0) -> None Constructs a color (red, green, blue, alpha). Arguments should be in the range [0.0, 1.0]. **Parameters** - **red** (*float*) – The red component of RGB-color. - **green** (*float*) – The green component of RGB-color. - **blue** (*float*) – The blue component of RGB-color. - **alpha** (*float**,**default=1.0*) – The alpha component (transparency). ##### Examples ```pycon >>> color = SBColor(0.25, 0.5, 0.75, 1.0) >>> print(color) [0.250000, 0.500000, 0.750000, 1.000000] ``` 3. __init__(self: samson.SBColor, red: int, green: int, blue: int, alpha: int = 255) -> None Constructs a color (red, green, blue, alpha). Arguments should be in the range [0, 255]. **Parameters** - **red** (*int*) – The red component of RGB-color. - **green** (*int*) – The green component of RGB-color. - **blue** (*int*) – The blue component of RGB-color. - **alpha** (*int**,**default=255*) – The alpha component (transparency). ##### Examples ```pycon >>> color = SBColor(120, 160, 200, 255) >>> print(color) [0.470588, 0.627451, 0.784314, 1.000000] ``` 4. __init__(self: samson.SBColor, hexColor: str) -> None Constructs a color from the hex color. **Parameters** - **hexColor** (*string*) – The hex color. It can start with ‘#’ or not and should contain a hex triplet (six-digit or eight-digit). ##### Examples ```pycon >>> color = SBColor("#0099CC") >>> print(color) [0.000000, 0.600000, 0.800000, 1.000000] ``` 5. __init__(self: samson.SBColor, color: samson.SBColor) -> None Constructs a color based on another color *color*. ##### Method `samson.SBColor.CIELabfromCIEXYZ` Signature: `static CIELabfromCIEXYZ(arg0: list[float]) -> list[float]` Converts CIE XYZ D65/2° to CIE L*a*b* ##### Method `samson.SBColor.CIELabfromCylindricalCIELab` Signature: `static CIELabfromCylindricalCIELab(arg0: list[float]) -> list[float]` Converts CIE L*a*b* in cylindrical coordinates (a.k.a. CIE LCh_ab) to CIE L*a*b* ##### Method `samson.SBColor.CIELabfromSRGB` Signature: `static CIELabfromSRGB(arg0: list[float]) -> list[float]` Converts color from standard RGB (sRGB) color space to CIE L*a*b* color space ##### Method `samson.SBColor.CIELuvfromCIEXYZ` Signature: `static CIELuvfromCIEXYZ(arg0: list[float]) -> list[float]` Converts CIE XYZ D65/2° to CIE L*u*v* ##### Method `samson.SBColor.CIELuvfromCylindricalCIELuv` Signature: `static CIELuvfromCylindricalCIELuv(arg0: list[float]) -> list[float]` Converts CIE L*u*v* in cylindrical coordinates (a.k.a. CIE LCh_uv) to CIE L*u*v* ##### Method `samson.SBColor.CIEXYZfromCIELab` Signature: `static CIEXYZfromCIELab(arg0: list[float]) -> list[float]` Converts CIE L*a*b* to CIE XYZ D65/2° ##### Method `samson.SBColor.CIEXYZfromCIELuv` Signature: `static CIEXYZfromCIELuv(arg0: list[float]) -> list[float]` Converts CIE L*u*v* to CIE XYZ D65/2° ##### Method `samson.SBColor.CIEXYZfromRGB` Signature: `static CIEXYZfromRGB(arg0: list[float]) -> list[float]` Converts linear RGB to CIE XYZ with D65/2° standard illuminant ##### Method `samson.SBColor.CIEXYZfromSRGB` Signature: `static CIEXYZfromSRGB(arg0: list[float]) -> list[float]` Converts device independent standard RGB (sRGB) to CIE XYZ with D65/2° standard illuminant ##### Method `samson.SBColor.HCLfromSRGB` Signature: `static HCLfromSRGB(arg0: list[float]) -> list[float]` Converts standard RGB (sRGB) color to HCL color (cylindrical representation of CIE L*u*v* a.k.a. CIE LCh_uv) ##### Method `samson.SBColor.HSVfromSRGB` Signature: `static HSVfromSRGB(arg0: list[float]) -> list[float]` Converts sRGB color (as in SBColor) to HSV (Hue Saturation Value) ##### Method `samson.SBColor.RGBfromCIEXYZ` Signature: `static RGBfromCIEXYZ(arg0: list[float]) -> list[float]` Converts CIE XYZ with D65/2° standard illuminant to linear RGB ##### Method `samson.SBColor.RGBfromSRGB` Signature: `static RGBfromSRGB(arg0: list[float]) -> list[float]` Converts standard RGB (sRGB) values to linear RGB values. ##### Method `samson.SBColor.SRGBfromCIELab` Signature: `static SRGBfromCIELab(arg0: list[float]) -> list[float]` Converts color from CIE L*a*b* color space to standard RGB (sRGB) color space ##### Method `samson.SBColor.SRGBfromCIEXYZ` Signature: `static SRGBfromCIEXYZ(arg0: list[float]) -> list[float]` Converts CIEXYZ with D65/2° standard illuminant to device independent standard RGB (sRGB) ##### Method `samson.SBColor.SRGBfromCylindricalCIELab` Signature: `static SRGBfromCylindricalCIELab(arg0: list[float]) -> list[float]` Converts CIE L*a*b* in cylindrical coordinates (a.k.a. CIE LCh_ab) to standard RGB (sRGB) ##### Method `samson.SBColor.SRGBfromCylindricalCIELuv` Signature: `static SRGBfromCylindricalCIELuv(arg0: list[float]) -> list[float]` Converts CIE L*u*v* in cylindrical coordinates (a.k.a. CIE LCh_uv) to standard RGB (sRGB) ##### Method `samson.SBColor.SRGBfromHCL` Signature: `static SRGBfromHCL(arg0: list[float]) -> list[float]` Converts HCL color (cylindrical representation of CIE L*u*v* a.k.a. CIE LCh_uv) to standard RGB (sRGB) color ##### Method `samson.SBColor.SRGBfromHSV` Signature: `static SRGBfromHSV(arg0: list[float]) -> list[float]` Converts HSV color (Hue Saturation Value) to sRGB color (as in SBColor) ##### Method `samson.SBColor.SRGBfromRGB` Signature: `static SRGBfromRGB(arg0: list[float]) -> list[float]` Converts linear RGB values to standard RGB (sRGB) values. ##### Method `samson.SBColor.SRGBtoGrayscale` Signature: `static SRGBtoGrayscale(red: float, green: float, blue: float) -> float` Converts sRGB to grayscale ##### Method `samson.SBColor.bound` Signature: `bound(self: samson.SBColor) -> samson.SBColor` Bounds this color in place with components within [0, 1] ##### Method `samson.SBColor.bounded` Signature: `bounded(self: samson.SBColor) -> samson.SBColor` Returns a bounded version of the color with components within [0, 1] ##### Method `samson.SBColor.cylindricalCIELabfromCIELab` Signature: `static cylindricalCIELabfromCIELab(arg0: list[float]) -> list[float]` Converts CIE L*a*b* to CIE L*a*b* in cylindrical coordinates (a.k.a. CIE LCh_ab) ##### Method `samson.SBColor.cylindricalCIELabfromSRGB` Signature: `static cylindricalCIELabfromSRGB(arg0: list[float]) -> list[float]` Converts standard RGB (sRGB) to CIE L*a*b* in cylindrical coordinates a.k.a. (CIE LCh_ab) ##### Method `samson.SBColor.cylindricalCIELuvfromCIELuv` Signature: `static cylindricalCIELuvfromCIELuv(arg0: list[float]) -> list[float]` Converts CIE L*u*v* to CIE L*u*v* in cylindrical coordinates (a.k.a. CIE LCh_uv) ##### Method `samson.SBColor.cylindricalCIELuvfromSRGB` Signature: `static cylindricalCIELuvfromSRGB(arg0: list[float]) -> list[float]` Converts standard RGB (sRGB) to CIE L*u*v* in cylindrical coordinates (a.k.a. CIE LCh_uv) ##### Method `samson.SBColor.darkenSRGBColor` Signature: `static darkenSRGBColor(color: samson.SBColor, amount: float) -> samson.SBColor` Darkens the standard RGB (sRGB) color by the amount` amount`. **Parameters** - **color** ([*samson.SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) – The input color. - **amount** (*float*) – The amount by which the color should be darkened. **Returns** - The output color. **Return type** - [samson.SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) ###### Examples ```pycon >>> color = SBColor(0.25, 0.5, 0.75, 1.0) >>> darkened_color = SBColor.darkenSRGBColor(color, 0.1) >>> print(darkened_color) [0.226566, 0.482166, 0.730498, 1.000000] ``` ##### Method `samson.SBColor.freeze` Signature: `freeze(self: samson.SBColor) -> samson.SBColor` Mixes this color with the frozen color ##### Method `samson.SBColor.fromHCL` Signature: `static fromHCL(*args, **kwargs)` Overloaded function. 1. fromHCL(hue: float, chroma: float, luminance: float) -> samson.SBColor Creates a color from the given HCL (CIE LCh_uv) color 2. fromHCL(arg0: list[float]) -> list[float] Converts HCL color (cylindrical representation of CIE L*u*v* a.k.a. CIE LCh_uv) to sRGB color (as in SBColor) ##### Method `samson.SBColor.fromHSV` Signature: `static fromHSV(*args, **kwargs)` Overloaded function. 1. fromHSV(hue: float, saturation: float, value: float) -> samson.SBColor Creates a color from the given HSV color 2. fromHSV(arg0: list[float]) -> list[float] Converts HSV color (Hue Saturation Value) to sRGB color (as in SBColor) ##### Method `samson.SBColor.frozen` Signature: `frozen(self: samson.SBColor) -> samson.SBColor` Returns a frozen version of the color ##### Method `samson.SBColor.getRGBString` Signature: `getRGBString(self: samson.SBColor, includeAlpha: bool = False) -> str` Returns the color as an RGB or RGBA string. ##### Method `samson.SBColor.lightenSRGBColor` Signature: `static lightenSRGBColor(color: samson.SBColor, amount: float) -> samson.SBColor` Lightens the standard RGB (sRGB) color by the amount *amount*. **Parameters** - **color** ([*samson.SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) – The input color. - **amount** (*float*) – The amount by which the color should be lightened. **Returns** - The output color. **Return type** - [samson.SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) ###### Examples ```pycon >>> color = SBColor(0.25, 0.5, 0.75, 1.0) >>> lightened_color = SBColor.lightenSRGBColor(color, 0.1) >>> print(lightened_color) [0.272724, 0.517956, 0.769592, 1.000000] ``` ##### Method `samson.SBColor.print` Signature: `print(self: samson.SBColor, offset: int = 0) -> None` Prints some debugging information in stdout. ##### Method `samson.SBColor.toGrayscale` Signature: `toGrayscale(self: samson.SBColor) -> float` Returns the grayscale representation of the color. ##### Method `samson.SBColor.toHCL` Signature: `static toHCL(arg0: list[float]) -> list[float]` Converts sRGB color (as in SBColor) to HCL (cylindrical representation of CIE L*u*v* a.k.a. CIE LCh_uv) **Parameters** - **color** (*a list**of**3**or**4 floats**(**rgb**or**rgba**)*) – A color in sRGB color space. The 4th element may represent the alpha-channel and is not modified but copied in the resulting list. **Returns** - A color in HCL color space (hcl or hcl with alpha-channel, corresponding to the size of the input list). If the input list had a 4th float then the 4th element is copied without changes. **Return type** - list of 3 or 4 floats ###### Examples ```pycon >>> color_in_sRGB = [1.0, 0.0, 0.0] # red color in sRGB color space >>> color_in_HCL = SBColor.toHCL(color_in_sRGB) >>> print("[" + ", ".join(f"{x:.5g}" for x in color_in_HCL) + "]") # print only 5 digits [12.174, 179.04, 53.241] ``` ##### Method `samson.SBColor.toHSV` Signature: `static toHSV(arg0: list[float]) -> list[float]` Converts sRGB color (as in SBColor) to HSV (Hue Saturation Value) ##### Method `samson.SBColor.toHex` Signature: `toHex(self: samson.SBColor, includeAlpha: bool = False) -> str` Returns the hex representation of the color. ##### Method `samson.SBColor.toList` Signature: `toList(self: samson.SBColor) -> list[float]` Returns the four color components as a list of floats. ##### Property `samson.SBColor.a` Signature: `property a` The alpha component, the value is in the [0.0, 1.0] interval. ##### Property `samson.SBColor.b` Signature: `property b` The blue component, the value is in the [0.0, 1.0] interval. ##### Attribute `samson.SBColor.black` Signature: `black = SBColor(0.000000, 0.000000, 0.000000, 1.000000)` ##### Attribute `samson.SBColor.blue` Signature: `blue = SBColor(0.000000, 0.000000, 1.000000, 1.000000)` ##### Attribute `samson.SBColor.cyan` Signature: `cyan = SBColor(0.000000, 1.000000, 1.000000, 1.000000)` ##### Attribute `samson.SBColor.defaultKeyframeColor` Signature: `defaultKeyframeColor = SBColor(0.800000, 0.898039, 1.000000, 1.000000)` ##### Property `samson.SBColor.g` Signature: `property g` The green component, the value is in the [0.0, 1.0] interval. ##### Attribute `samson.SBColor.globalXAxis` Signature: `globalXAxis = SBColor(0.878431, 0.380392, 0.227451, 1.000000)` ##### Attribute `samson.SBColor.globalYAxis` Signature: `globalYAxis = SBColor(0.309804, 0.741176, 0.396078, 1.000000)` ##### Attribute `samson.SBColor.globalZAxis` Signature: `globalZAxis = SBColor(0.290196, 0.556863, 0.929412, 1.000000)` ##### Attribute `samson.SBColor.green` Signature: `green = SBColor(0.000000, 1.000000, 0.000000, 1.000000)` ##### Property `samson.SBColor.ia` Signature: `property ia` The alpha component, the integer value is in the [0, 255] interval. ##### Property `samson.SBColor.ib` Signature: `property ib` The blue component, the integer value is in the [0, 255] interval. ##### Attribute `samson.SBColor.ice` Signature: `ice = SBColor(0.000000, 0.098039, 0.196078, 1.000000)` ##### Property `samson.SBColor.ig` Signature: `property ig` The green component, the integer value is in the [0, 255] interval. ##### Property `samson.SBColor.ir` Signature: `property ir` The red component, the integer value is in the [0, 255] interval. ##### Property `samson.SBColor.isSerializable` Signature: `property isSerializable` Returns *True* when the class is serializable ##### Attribute `samson.SBColor.localXAxis` Signature: `localXAxis = SBColor(0.949020, 0.976471, 1.000000, 1.000000)` ##### Attribute `samson.SBColor.localYAxis` Signature: `localYAxis = SBColor(0.800000, 0.898039, 1.000000, 1.000000)` ##### Attribute `samson.SBColor.localZAxis` Signature: `localZAxis = SBColor(0.650980, 0.823529, 1.000000, 1.000000)` ##### Attribute `samson.SBColor.magenta` Signature: `magenta = SBColor(1.000000, 0.000000, 1.000000, 1.000000)` ##### Attribute `samson.SBColor.orange` Signature: `orange = SBColor(1.000000, 0.588235, 0.172549, 1.000000)` ##### Property `samson.SBColor.r` Signature: `property r` The red component, the value is in the [0.0, 1.0] interval. ##### Attribute `samson.SBColor.red` Signature: `red = SBColor(1.000000, 0.000000, 0.000000, 1.000000)` ##### Attribute `samson.SBColor.white` Signature: `white = SBColor(1.000000, 1.000000, 1.000000, 1.000000)` ##### Attribute `samson.SBColor.yellow` Signature: `yellow = SBColor(1.000000, 1.000000, 0.000000, 1.000000)` --- # SBDateTime Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBDateTime.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBDateTime.md This class implements a date time type. !!! note "See also" SAMSON SDK: [SBDTypeDateTime](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypeDateTime/#) ## API Reference #### Class `samson.SBDateTime` Signature: `class samson.SBDateTime(*args, **kwargs)` Bases: `pybind11_object` This class implements a date time type. SAMSON API: [SBDTypeDateTime](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypeDateTime/#) Overloaded function. 1. __init__(self: samson.SBDateTime) -> None Constructs a date-time object initialized to Unix epoch (0 milliseconds). 2. __init__(self: samson.SBDateTime, millisecondsSinceEpoch: int) -> None Constructs a date-time object from milliseconds elapsed since Unix epoch. **Parameters** - **millisecondsSinceEpoch** (*int*) – Number of milliseconds since Unix epoch (`1970-01-01 00:00:00 UTC`). 3. __init__(self: samson.SBDateTime, dateTime: samson.SBDateTime) -> None Copy constructor. **Parameters** - **dateTime** ([*samson.SBDateTime*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBDateTime.md#samson.SBDateTime)) – Source date-time instance. ##### Method `samson.SBDateTime.currentDateTimeUTC` Signature: `static currentDateTimeUTC() -> samson.SBDateTime` Returns the current date-time in UTC. **Returns** - A date-time snapshot in UTC. **Return type** - [samson.SBDateTime](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBDateTime.md#samson.SBDateTime) ##### Property `samson.SBDateTime.millisecondsSinceEpoch` Signature: `property millisecondsSinceEpoch` The number of milliseconds since Unix epoch (`1970-01-01 00:00:00 UTC`). --- # SBRandom Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBRandom.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBRandom.md This class implements the Mersenne Twister generator from the paper: M. Matsumoto and T. Nishimura, “Mersenne Twister: A 623-dimensionally equidistributed uniform pseudorandom number generator”, ACM Trans. on Modeling and Computer Simulation Vol. 8, No. 1, January pp.3-30 (1998). ```python rand = SBRandom() # Generates a random number on [0,1]-real-interval rand.randDouble1() ``` Note that the default constructor of `SBRandom` has a fixed seed. This is useful when debugging code, since it allows for reproducible results. For a “production run”, though, a `SBRandom` object should be seeded with a random number, for example using [`SAMSON.getTime()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.getTime) ```python rand = SBRandom(SAMSON.getTime() % 2147483647) # create a random UUID rand.randUUID() ``` !!! note "See also" SAMSON SDK: [SBDTypeRandom](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypeRandom/#) ## API Reference #### Class `samson.SBRandom` Signature: `class samson.SBRandom(*args, **kwargs)` Bases: `pybind11_object` This class implements a random number generator. SAMSON API: [SBDTypeRandom](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypeRandom/#) Overloaded function. 1. __init__(self: samson.SBRandom) -> None Constructs a random generator with SAMSON default seed. 2. __init__(self: samson.SBRandom, seed: int) -> None Constructs a random generator with a custom seed. **Parameters** - **seed** (*int*) – Seed value used to initialize the pseudo-random sequence. ##### Method `samson.SBRandom.randDouble1` Signature: `randDouble1(self: samson.SBRandom) -> float` Generates a random number on [0,1]-real-interval ##### Method `samson.SBRandom.randDouble2` Signature: `randDouble2(self: samson.SBRandom) -> float` Generates a random number on [0,1)-real-interval ##### Method `samson.SBRandom.randDouble3` Signature: `randDouble3(self: samson.SBRandom) -> float` Generates a random number on (0,1)-real-interval ##### Method `samson.SBRandom.randLong` Signature: `randLong(self: samson.SBRandom) -> int` Generates a random number on [0,0x7fffffff]-interval ##### Method `samson.SBRandom.randRes53` Signature: `randRes53(self: samson.SBRandom) -> float` Generates a random number on [0,1) with 53-bit resolution ##### Method `samson.SBRandom.randUUID` Signature: `randUUID(self: samson.SBRandom) -> samson.SBUUID` Generates a random UUID string and returns it as an *SBUUID*. **Returns** - Randomly generated UUID. **Return type** - [samson.SBUUID](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID) ##### Method `samson.SBRandom.randUnitSphere3` Signature: `randUnitSphere3(self: samson.SBRandom) -> samson.SBPhysicalVector3` Generates a point on the unit 3D sphere with uniform spherical distribution ##### Method `samson.SBRandom.randUnsignedLong` Signature: `randUnsignedLong(self: samson.SBRandom) -> int` Generates a random number on [0,0xffffffff]-interval ##### Method `samson.SBRandom.seed` Signature: `seed(self: samson.SBRandom, iseed: int) -> None` Reseeds the random generator. **Parameters** - **iseed** (*int*) – New seed value. --- # SBPhysicalVector3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalVector3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalVector3.md This class represents a three-dimensional physical vector. ```python SBPhysicalVector3() # a dimensionless zero vector SBPhysicalVector3(1, 2, 3) # a dimensionless vector SBPhysicalVector3([1, 2, 3]) # a dimensionless vector SBPhysicalVector3(SBQuantity.position(1)) # a vector with the same components SBPhysicalVector3(SBQuantity.squareTime(1)) SBPhysicalVector3(SBQuantity.nm(1.14), SBQuantity.nm(3.14), SBQuantity.nm(2.7)) ``` There are multiple convenience constructors available for the commonly used physical vectors: - [SBAcceleration3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/acceleration3.md) - [`SBAcceleration3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/acceleration3.md#samson.SBAcceleration3) - [SBAngularAcceleration3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/angularAcceleration3.md) - [`SBAngularAcceleration3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/angularAcceleration3.md#samson.SBAngularAcceleration3) - [SBAngularVelocity3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/angularVelocity3.md) - [`SBAngularVelocity3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/angularVelocity3.md#samson.SBAngularVelocity3) - [SBVector3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md) - [`SBVector3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md#samson.SBVector3) - [SBEnergy3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/energy3.md) - [`SBEnergy3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/energy3.md#samson.SBEnergy3) - [SBForce3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/force3.md) - [`SBForce3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/force3.md#samson.SBForce3) - [SBInverseLength3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/inverseLength3.md) - [`SBInverseLength3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/inverseLength3.md#samson.SBInverseLength3) - [SBInverseMomentum3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/inverseMomentum3.md) - [`SBInverseMomentum3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/inverseMomentum3.md#samson.SBInverseMomentum3) - [SBLength3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/length3.md) - [`SBLength3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/length3.md#samson.SBLength3) - [SBMomentum3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/momentum3.md) - [`SBMomentum3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/momentum3.md#samson.SBMomentum3) - [SBPicometerPerSecond3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/picometerPerSecond3.md) - [`SBPicometerPerSecond3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/picometerPerSecond3.md#samson.SBPicometerPerSecond3) - [SBPosition3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md) - [`SBPosition3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3) - [SBRadian3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/radian3.md) - [`SBRadian3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/radian3.md#samson.SBRadian3) - [SBRadianPerSecond3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/radianPerSecond3.md) - [`SBRadianPerSecond3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/radianPerSecond3.md#samson.SBRadianPerSecond3) - [SBSquareLength3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/squareLength3.md) - [`SBSquareLength3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/squareLength3.md#samson.SBSquareLength3) - [SBTorque3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/torque3.md) - [`SBTorque3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/torque3.md#samson.SBTorque3) - [SBVelocity3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/velocity3.md) - [`SBVelocity3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/velocity3.md#samson.SBVelocity3) These convenience constructors internally call `SBPhysicalVector3 samson.SBPhysicalVector3` with proper [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) and can be used as follows, without specifying the [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) unit: ```python SBVector3(1.0) # a vector in dimensionless units SBForce3(0.0) # a vector in force units SBPosition3(0.0, 1.0, 2.0) # a vector in length units ``` ```python SBVector3(1, 2, 3) == SBPhysicalVector3(1, 2, 3) # True SBPosition3(0.0, 1.0, 2.0) == SBPhysicalVector3( SBQuantity.position(0.0), SBQuantity.position(1.0), SBQuantity.position(2.0)) # True ``` The code below shows various examples of accessing vector attributes, applying mathematical operations, etc: ```python # create a position vector in length units pos = SBPosition3(0.0, 1.0, 2.0) # this is the same as #pos = SBPhysicalVector3(SBQuantity.position(0.0), SBQuantity.position(1.0), SBQuantity.position(2.0)) # arithmetic operations with numbers, units, and vectors pos /= 2.0 pos * 1.5 # accessing components pos.x # x-component of the vector pos.y # y-component of the vector pos.z # z-component of the vector pos[0] # x-component of the vector pos.value # components of the vector (read-only) # operations with vectors pos.norm() # returns norm of a vector pos.norm2() # returns squared norm of a vector pos.swap(1, 2) # swaps 2 components pos.setZero() # sets all components to zero # get normalized version of the vector pos_norm = pos.normalizedVersion() # get normalized version of the vector with units pos_norm_u = pos.normalizedVersionWithUnits() pos += SBPhysicalVector3(SBQuantity.angstrom(1)) time = SBQuantity.femtosecond(1) # this will create a velocity vector in proper length/time units velocity = pos / time pos2 = SBPhysicalVector3( SBQuantity.angstrom(1.14), SBQuantity.angstrom(3.14), SBQuantity.angstrom(2.7)) pos | pos2 # returns the dot product of vectors pos ^ pos2 # returns the cross product of vectors pos + pos2 # returns the sum of vectors pos == pos2 # lexicographic comparison pos < pos2 # lexicographic comparison # In case of an operation with vectors of different units (e.g. nanometers and angstrom) # the units of the first vector in the operation will be used for the resulting vector pos_nm = SBPhysicalVector3( SBQuantity.nanometer(1.1), SBQuantity.nanometer(2.2), SBQuantity.nanometer(3.3)) pos_a = SBPhysicalVector3( SBQuantity.angstrom(1.14), SBQuantity.angstrom(3.14), SBQuantity.angstrom(2.72)) pos_a + pos_nm # the result is in angstroms pos_nm - pos_a # the result is in nanometers ``` !!! note "See also" SAMSON SDK: [SBDTypePhysicalVector3](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypePhysicalVector3/#) ## API Reference #### Class `samson.SBPhysicalVector3` Signature: `class samson.SBPhysicalVector3(*args, **kwargs)` Bases: `pybind11_object` This class represents physical vectors. SAMSON API: [SBDTypePhysicalVector3](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypePhysicalVector3/#) Overloaded function. 1. __init__(self: samson.SBPhysicalVector3) -> None Constructs the zero physical vector [ 0 0 0 ]. 2. __init__(self: samson.SBPhysicalVector3, x: samson.SBQuantity.unitsSI) -> None Constructs the physical vector [ x x x ]. 3. __init__(self: samson.SBPhysicalVector3, x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> None Constructs the physical vector [ x y z ]. 4. __init__(self: samson.SBPhysicalVector3, u: list[samson.SBQuantity.unitsSI]) -> None Constructs the physical vector [ u[0] u[1] u[2] ]. 5. __init__(self: samson.SBPhysicalVector3, x: float) -> None Constructs the dimensionless physical vector [ x x x ]. 6. __init__(self: samson.SBPhysicalVector3, x: float, y: float, z: float) -> None Constructs the dimensionless physical vector [ x y z ]. 7. __init__(self: samson.SBPhysicalVector3, vec3: list[float]) -> None Constructs the dimensionless physical vector [ vec3[0] vec3[1] vec3[2] ]. ##### Method `samson.SBPhysicalVector3.__add__` Signature: `__add__(*args, **kwargs)` Overloaded function. 1. __add__(self: samson.SBPhysicalVector3, arg0: float) -> samson.SBPhysicalVector3 2. __add__(self: samson.SBPhysicalVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 3. __add__(self: samson.SBPhysicalVector3, arg0: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3 ##### Method `samson.SBPhysicalVector3.__eq__` Signature: `__eq__(self: samson.SBPhysicalVector3, arg0: samson.SBPhysicalVector3) -> bool` ##### Method `samson.SBPhysicalVector3.__ge__` Signature: `__ge__(self: samson.SBPhysicalVector3, arg0: samson.SBPhysicalVector3) -> bool` ##### Method `samson.SBPhysicalVector3.__gt__` Signature: `__gt__(self: samson.SBPhysicalVector3, arg0: samson.SBPhysicalVector3) -> bool` ##### Method `samson.SBPhysicalVector3.__iadd__` Signature: `__iadd__(self: samson.SBPhysicalVector3, arg0: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` ##### Method `samson.SBPhysicalVector3.__imul__` Signature: `__imul__(*args, **kwargs)` Overloaded function. 1. __imul__(self: samson.SBPhysicalVector3, arg0: float) -> samson.SBPhysicalVector3 2. __imul__(self: samson.SBPhysicalVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 ##### Method `samson.SBPhysicalVector3.__isub__` Signature: `__isub__(self: samson.SBPhysicalVector3, arg0: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` ##### Method `samson.SBPhysicalVector3.__itruediv__` Signature: `__itruediv__(*args, **kwargs)` Overloaded function. 1. __itruediv__(self: samson.SBPhysicalVector3, arg0: float) -> samson.SBPhysicalVector3 2. __itruediv__(self: samson.SBPhysicalVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 ##### Method `samson.SBPhysicalVector3.__le__` Signature: `__le__(self: samson.SBPhysicalVector3, arg0: samson.SBPhysicalVector3) -> bool` ##### Method `samson.SBPhysicalVector3.__lt__` Signature: `__lt__(self: samson.SBPhysicalVector3, arg0: samson.SBPhysicalVector3) -> bool` ##### Method `samson.SBPhysicalVector3.__mul__` Signature: `__mul__(*args, **kwargs)` Overloaded function. 1. __mul__(self: samson.SBPhysicalVector3, arg0: float) -> samson.SBPhysicalVector3 2. __mul__(self: samson.SBPhysicalVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 3. __mul__(self: samson.SBPhysicalVector3, arg0: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3 ##### Method `samson.SBPhysicalVector3.__ne__` Signature: `__ne__(self: samson.SBPhysicalVector3, arg0: samson.SBPhysicalVector3) -> bool` ##### Method `samson.SBPhysicalVector3.__neg__` Signature: `__neg__(self: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` ##### Method `samson.SBPhysicalVector3.__radd__` Signature: `__radd__(*args, **kwargs)` Overloaded function. 1. __radd__(self: samson.SBPhysicalVector3, arg0: float) -> samson.SBPhysicalVector3 2. __radd__(self: samson.SBPhysicalVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 ##### Method `samson.SBPhysicalVector3.__rmul__` Signature: `__rmul__(*args, **kwargs)` Overloaded function. 1. __rmul__(self: samson.SBPhysicalVector3, arg0: float) -> samson.SBPhysicalVector3 2. __rmul__(self: samson.SBPhysicalVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 ##### Method `samson.SBPhysicalVector3.__rsub__` Signature: `__rsub__(*args, **kwargs)` Overloaded function. 1. __rsub__(self: samson.SBPhysicalVector3, arg0: float) -> samson.SBPhysicalVector3 2. __rsub__(self: samson.SBPhysicalVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 ##### Method `samson.SBPhysicalVector3.__sub__` Signature: `__sub__(*args, **kwargs)` Overloaded function. 1. __sub__(self: samson.SBPhysicalVector3, arg0: float) -> samson.SBPhysicalVector3 2. __sub__(self: samson.SBPhysicalVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 3. __sub__(self: samson.SBPhysicalVector3, arg0: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3 ##### Method `samson.SBPhysicalVector3.__truediv__` Signature: `__truediv__(*args, **kwargs)` Overloaded function. 1. __truediv__(self: samson.SBPhysicalVector3, arg0: float) -> samson.SBPhysicalVector3 2. __truediv__(self: samson.SBPhysicalVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 3. __truediv__(self: samson.SBPhysicalVector3, arg0: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3 ##### Method `samson.SBPhysicalVector3.computeAngle` Signature: `static computeAngle(a: samson.SBPhysicalVector3, b: samson.SBPhysicalVector3) -> samson.SBQuantity.unitsSI` Computes the angle in radians between the vector *a* and the vector *b* ##### Method `samson.SBPhysicalVector3.computeDihedralAngle` Signature: `static computeDihedralAngle(a: samson.SBPhysicalVector3, b: samson.SBPhysicalVector3, c: samson.SBPhysicalVector3, d: samson.SBPhysicalVector3) -> samson.SBQuantity.unitsSI` Computes the dihedral angle in radians based on the four given positions *a*, *b*, *c*, *d*, where positions *b* and *c* form the main axis ##### Method `samson.SBPhysicalVector3.norm` Signature: `norm(self: samson.SBPhysicalVector3) -> samson.SBQuantity.unitsSI` Returns the norm of this physical vector. ##### Method `samson.SBPhysicalVector3.norm2` Signature: `norm2(self: samson.SBPhysicalVector3) -> samson.SBQuantity.unitsSI` Returns the squared norm of this physical vector. ##### Method `samson.SBPhysicalVector3.normalize` Signature: `normalize(self: samson.SBPhysicalVector3) -> None` Normalizes this dimensionless physical vector. ##### Method `samson.SBPhysicalVector3.normalizeWithUnits` Signature: `normalizeWithUnits(self: samson.SBPhysicalVector3) -> None` Normalizes this physical vector while preserving units. ##### Method `samson.SBPhysicalVector3.normalizedVersion` Signature: `normalizedVersion(self: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` Returns the dimensionless normalized version of this physical vector. ##### Method `samson.SBPhysicalVector3.normalizedVersionWithUnits` Signature: `normalizedVersionWithUnits(self: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` Returns the normalized version of this physical vector, but with preserved units. ##### Method `samson.SBPhysicalVector3.sampledUnitSphere3` Signature: `static sampledUnitSphere3(numberOfPoints: int) -> list[samson.SBPhysicalVector3]` Returns a list with evenly distributed *numberOfPoints* points on a unit 3D sphere. The points on a unit 3D sphere are generated using the golden section spiral algorithm. **Parameters** - **numberOfPoints** (*integer*) – The number of points on a unit 3D sphere. **Returns** - A list of points on a unit 3D sphere. **Return type** - list ##### Method `samson.SBPhysicalVector3.setOne` Signature: `setOne(self: samson.SBPhysicalVector3) -> None` Sets all components to one. ##### Method `samson.SBPhysicalVector3.setZero` Signature: `setZero(self: samson.SBPhysicalVector3) -> None` Sets all components to zero. ##### Method `samson.SBPhysicalVector3.str` Signature: `str(self: samson.SBPhysicalVector3, fullName: bool = False) -> str` Converts the physical vector to a string with a full unit name when *fullName* is *True*. ##### Method `samson.SBPhysicalVector3.swap` Signature: `swap(self: samson.SBPhysicalVector3, i: int, j: int) -> None` Swaps components *i* and *j* of this physical vector. ##### Property `samson.SBPhysicalVector3.isDimensionless` Signature: `property isDimensionless` Returns *True* if the physical vector is dimensionless ##### Property `samson.SBPhysicalVector3.value` Signature: `property value` Returns vector components as a Python list. ##### Property `samson.SBPhysicalVector3.x` Signature: `property x` The x component. ##### Property `samson.SBPhysicalVector3.y` Signature: `property y` The y component. ##### Property `samson.SBPhysicalVector3.z` Signature: `property z` The z component. --- # SBAcceleration3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/acceleration3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/acceleration3.md ## API Reference #### Class `samson.SBAcceleration3` Signature: `class samson.SBAcceleration3(*args, **kwargs)` Bases: Overloaded function. 1. SBAcceleration3() -> samson.SBPhysicalVector3 Three-dimensional acceleration physical vector 2. SBAcceleration3(value: float) -> samson.SBPhysicalVector3 Three-dimensional acceleration physical vector 3. SBAcceleration3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional acceleration physical vector 4. SBAcceleration3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional acceleration physical vector 5. SBAcceleration3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional acceleration physical vector 6. SBAcceleration3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional acceleration physical vector 7. SBAcceleration3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional acceleration physical vector --- # SBAngularAcceleration3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/angularAcceleration3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/angularAcceleration3.md ## API Reference #### Class `samson.SBAngularAcceleration3` Signature: `class samson.SBAngularAcceleration3(*args, **kwargs)` Bases: Overloaded function. 1. SBAngularAcceleration3() -> samson.SBPhysicalVector3 Three-dimensional angular acceleration (inverse square time) physical vector 2. SBAngularAcceleration3(value: float) -> samson.SBPhysicalVector3 Three-dimensional angular acceleration (inverse square time) physical vector 3. SBAngularAcceleration3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional angular acceleration (inverse square time) physical vector 4. SBAngularAcceleration3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional angular acceleration (inverse square time) physical vector 5. SBAngularAcceleration3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional angular acceleration (inverse square time) physical vector 6. SBAngularAcceleration3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional angular acceleration (inverse square time) physical vector 7. SBAngularAcceleration3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional angular acceleration (inverse square time) physical vector --- # SBAngularVelocity3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/angularVelocity3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/angularVelocity3.md ## API Reference #### Class `samson.SBAngularVelocity3` Signature: `class samson.SBAngularVelocity3(*args, **kwargs)` Bases: Overloaded function. 1. SBAngularVelocity3() -> samson.SBPhysicalVector3 Three-dimensional angular velocity (inverse time) physical vector 2. SBAngularVelocity3(value: float) -> samson.SBPhysicalVector3 Three-dimensional angular velocity (inverse time) physical vector 3. SBAngularVelocity3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional angular velocity (inverse time) physical vector 4. SBAngularVelocity3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional angular velocity (inverse time) physical vector 5. SBAngularVelocity3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional angular velocity (inverse time) physical vector 6. SBAngularVelocity3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional angular velocity (inverse time) physical vector 7. SBAngularVelocity3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional angular velocity (inverse time) physical vector --- # SBVector3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md ## API Reference #### Class `samson.SBVector3` Signature: `class samson.SBVector3(*args, **kwargs)` Bases: Overloaded function. 1. SBVector3() -> samson.SBPhysicalVector3 Three-dimensional dimensionless physical vector 2. SBVector3(value: float) -> samson.SBPhysicalVector3 Three-dimensional dimensionless physical vector 3. SBVector3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional dimensionless physical vector 4. SBVector3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional dimensionless physical vector 5. SBVector3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional dimensionless physical vector 6. SBVector3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional dimensionless physical vector 7. SBVector3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional dimensionless physical vector --- # SBEnergy3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/energy3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/energy3.md ## API Reference #### Class `samson.SBEnergy3` Signature: `class samson.SBEnergy3(*args, **kwargs)` Bases: Overloaded function. 1. SBEnergy3() -> samson.SBPhysicalVector3 Three-dimensional energy physical vector 2. SBEnergy3(value: float) -> samson.SBPhysicalVector3 Three-dimensional energy physical vector 3. SBEnergy3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional energy physical vector 4. SBEnergy3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional energy physical vector 5. SBEnergy3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional energy physical vector 6. SBEnergy3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional energy physical vector 7. SBEnergy3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional energy physical vector --- # SBForce3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/force3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/force3.md ## API Reference #### Class `samson.SBForce3` Signature: `class samson.SBForce3(*args, **kwargs)` Bases: Overloaded function. 1. SBForce3() -> samson.SBPhysicalVector3 Three-dimensional force physical vector 2. SBForce3(value: float) -> samson.SBPhysicalVector3 Three-dimensional force physical vector 3. SBForce3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional force physical vector 4. SBForce3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional force physical vector 5. SBForce3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional force physical vector 6. SBForce3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional force physical vector 7. SBForce3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional force physical vector --- # SBInverseLength3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/inverseLength3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/inverseLength3.md ## API Reference #### Class `samson.SBInverseLength3` Signature: `class samson.SBInverseLength3(*args, **kwargs)` Bases: Overloaded function. 1. SBInverseLength3() -> samson.SBPhysicalVector3 Three-dimensional inverse length physical vector 2. SBInverseLength3(value: float) -> samson.SBPhysicalVector3 Three-dimensional inverse length physical vector 3. SBInverseLength3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional inverse length physical vector 4. SBInverseLength3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional inverse length physical vector 5. SBInverseLength3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional inverse length physical vector 6. SBInverseLength3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional inverse length physical vector 7. SBInverseLength3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional inverse length physical vector --- # SBInverseMomentum3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/inverseMomentum3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/inverseMomentum3.md ## API Reference #### Class `samson.SBInverseMomentum3` Signature: `class samson.SBInverseMomentum3(*args, **kwargs)` Bases: Overloaded function. 1. SBInverseMomentum3() -> samson.SBPhysicalVector3 Three-dimensional inverse momentum physical vector 2. SBInverseMomentum3(value: float) -> samson.SBPhysicalVector3 Three-dimensional inverse momentum physical vector 3. SBInverseMomentum3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional inverse momentum physical vector 4. SBInverseMomentum3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional inverse momentum physical vector 5. SBInverseMomentum3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional inverse momentum physical vector 6. SBInverseMomentum3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional inverse momentum physical vector 7. SBInverseMomentum3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional inverse momentum physical vector --- # SBLength3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/length3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/length3.md ## API Reference #### Class `samson.SBLength3` Signature: `class samson.SBLength3(*args, **kwargs)` Bases: Overloaded function. 1. SBLength3() -> samson.SBPhysicalVector3 Three-dimensional length physical vector 2. SBLength3(value: float) -> samson.SBPhysicalVector3 Three-dimensional length physical vector 3. SBLength3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional length physical vector 4. SBLength3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional length physical vector 5. SBLength3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional length physical vector 6. SBLength3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional length physical vector 7. SBLength3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional length physical vector --- # SBMomentum3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/momentum3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/momentum3.md ## API Reference #### Class `samson.SBMomentum3` Signature: `class samson.SBMomentum3(*args, **kwargs)` Bases: Overloaded function. 1. SBMomentum3() -> samson.SBPhysicalVector3 Three-dimensional momentum physical vector 2. SBMomentum3(value: float) -> samson.SBPhysicalVector3 Three-dimensional momentum physical vector 3. SBMomentum3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional momentum physical vector 4. SBMomentum3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional momentum physical vector 5. SBMomentum3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional momentum physical vector 6. SBMomentum3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional momentum physical vector 7. SBMomentum3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional momentum physical vector --- # SBPicometerPerSecond3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/picometerPerSecond3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/picometerPerSecond3.md ## API Reference #### Class `samson.SBPicometerPerSecond3` Signature: `class samson.SBPicometerPerSecond3(*args, **kwargs)` Bases: Overloaded function. 1. SBPicometerPerSecond3() -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector 2. SBPicometerPerSecond3(value: float) -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector 3. SBPicometerPerSecond3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector 4. SBPicometerPerSecond3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector 5. SBPicometerPerSecond3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector 6. SBPicometerPerSecond3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector 7. SBPicometerPerSecond3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector --- # SBPosition3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md ## API Reference #### Class `samson.SBPosition3` Signature: `class samson.SBPosition3(*args, **kwargs)` Bases: Overloaded function. 1. SBPosition3() -> samson.SBPhysicalVector3 Three-dimensional position physical vector 2. SBPosition3(value: float) -> samson.SBPhysicalVector3 Three-dimensional position physical vector 3. SBPosition3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional position physical vector 4. SBPosition3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional position physical vector 5. SBPosition3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional position physical vector 6. SBPosition3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional position physical vector 7. SBPosition3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional position physical vector --- # SBRadian3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/radian3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/radian3.md ## API Reference #### Class `samson.SBRadian3` Signature: `class samson.SBRadian3(*args, **kwargs)` Bases: Overloaded function. 1. SBRadian3() -> samson.SBPhysicalVector3 Three-dimensional Angular physical vector 2. SBRadian3(value: float) -> samson.SBPhysicalVector3 Three-dimensional Angular physical vector 3. SBRadian3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional Angular physical vector 4. SBRadian3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional Angular physical vector 5. SBRadian3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional Angular physical vector 6. SBRadian3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional Angular physical vector 7. SBRadian3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional Angular physical vector --- # SBRadianPerSecond3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/radianPerSecond3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/radianPerSecond3.md ## API Reference #### Class `samson.SBRadianPerSecond3` Signature: `class samson.SBRadianPerSecond3(*args, **kwargs)` Bases: Overloaded function. 1. SBRadianPerSecond3() -> samson.SBPhysicalVector3 Three-dimensional angular velocity physical vector 2. SBRadianPerSecond3(value: float) -> samson.SBPhysicalVector3 Three-dimensional angular velocity physical vector 3. SBRadianPerSecond3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional angular velocity physical vector 4. SBRadianPerSecond3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional angular velocity physical vector 5. SBRadianPerSecond3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional angular velocity physical vector 6. SBRadianPerSecond3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional angular velocity physical vector 7. SBRadianPerSecond3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional angular velocity physical vector --- # SBSquareLength3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/squareLength3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/squareLength3.md ## API Reference #### Class `samson.SBSquareLength3` Signature: `class samson.SBSquareLength3(*args, **kwargs)` Bases: Overloaded function. 1. SBSquareLength3() -> samson.SBPhysicalVector3 Three-dimensional square length physical vector 2. SBSquareLength3(value: float) -> samson.SBPhysicalVector3 Three-dimensional square length physical vector 3. SBSquareLength3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional square length physical vector 4. SBSquareLength3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional square length physical vector 5. SBSquareLength3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional square length physical vector 6. SBSquareLength3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional square length physical vector 7. SBSquareLength3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional square length physical vector --- # SBTorque3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/torque3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/torque3.md ## API Reference #### Class `samson.SBTorque3` Signature: `class samson.SBTorque3(*args, **kwargs)` Bases: Overloaded function. 1. SBTorque3() -> samson.SBPhysicalVector3 Three-dimensional torque physical vector 2. SBTorque3(value: float) -> samson.SBPhysicalVector3 Three-dimensional torque physical vector 3. SBTorque3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional torque physical vector 4. SBTorque3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional torque physical vector 5. SBTorque3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional torque physical vector 6. SBTorque3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional torque physical vector 7. SBTorque3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional torque physical vector --- # SBVelocity3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/velocity3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/velocity3.md ## API Reference #### Class `samson.SBVelocity3` Signature: `class samson.SBVelocity3(*args, **kwargs)` Bases: Overloaded function. 1. SBVelocity3() -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector 2. SBVelocity3(value: float) -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector 3. SBVelocity3(x: float, y: float, z: float) -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector 4. SBVelocity3(vector3: list[float]) -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector 5. SBVelocity3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector 6. SBVelocity3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector 7. SBVelocity3(vector3: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector3 Three-dimensional velocity physical vector --- # SBPhysicalVector6 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalVector6.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalVector6.md This class represents a physical spatial vector, a six-dimensional vector used to describe rigid-body dynamics and articulated-body dynamics. It has an angular part and a linear part, which may have different units, therefore, it is defined by two units ([`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity)): - 1st quantity type of the angular part - 2nd quantity type of the linear part ```python SBPhysicalVector6() # a dimensionless spatial zero vector SBPhysicalVector6(1, 2) # a dimensionless spatial vector SBPhysicalVector6(1, 2, 3, 4, 5, 6) # a dimensionless spatial vector SBPhysicalVector6([1, 2, 3], [4, 5, 6]) # a dimensionless spatial vector ``` There are multiple convenience constructors available for the commonly used spatial vectors: - [SBAcceleration6](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/acceleration6.md) - [`SBAcceleration6`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/acceleration6.md#samson.SBAcceleration6) - [SBVector6](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/dimensionless6.md) - [`SBVector6`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/dimensionless6.md#samson.SBVector6) - [SBForce6](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/force6.md) - [`SBForce6`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/force6.md#samson.SBForce6) - [SBVelocity6](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/velocity6.md) - [`SBVelocity6`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/velocity6.md#samson.SBVelocity6) These convenience constructors internally call `SBPhysicalVector6` with proper [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) and can be used as follows, without specifying the [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) unit: ```python SBVector6(1.0, 2.0) # a spatial vector in dimensionless units SBForce6(0.0, 1.0) # a spatial vector in energy and force units SBVelocity6([1, 2, 1],[2, 3, 2]) # a spatial vector in inverseTime and velocity units ``` ```python SBVector6(1, 2) == SBPhysicalVector6(1, 2) # True SBVelocity6(0, 1) == SBPhysicalVector6(SBQuantity.inverseTime(0), SBQuantity.velocity(1)) # True SBAcceleration6(0, 1) == SBPhysicalVector6(SBQuantity.inverseSquareTime(0), SBQuantity.acceleration(1)) # True SBForce6(0, 1) == SBPhysicalVector6(SBQuantity.energy(0), SBQuantity.force(1)) # True ``` !!! note "See also" SAMSON SDK: [SBDTypePhysicalVector6](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypePhysicalVector6/#) ## API Reference #### Class `samson.SBPhysicalVector6` Signature: `class samson.SBPhysicalVector6(*args, **kwargs)` Bases: `pybind11_object` This class represents spatial vectors. SAMSON API: [SBDTypePhysicalVector6](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypePhysicalVector6/#) Overloaded function. 1. __init__(self: samson.SBPhysicalVector6) -> None Constructs the zero spatial vector [ 0 0 0 0 0 0 ]. 2. __init__(self: samson.SBPhysicalVector6, a: samson.SBPhysicalVector3, l: samson.SBPhysicalVector3) -> None Constructs the spatial vector [ a[0] a[1] a[2] l[0] l[1] l[2] ]. 3. __init__(self: samson.SBPhysicalVector6, a: samson.SBQuantity.unitsSI, l: samson.SBQuantity.unitsSI) -> None Constructs the spatial vector [ a a a l l l ]. 4. __init__(self: samson.SBPhysicalVector6, ax: samson.SBQuantity.unitsSI, ay: samson.SBQuantity.unitsSI, az: samson.SBQuantity.unitsSI, lx: samson.SBQuantity.unitsSI, ly: samson.SBQuantity.unitsSI, lz: samson.SBQuantity.unitsSI) -> None Constructs the spatial vector [ ax ay az lx ly lz ] 5. __init__(self: samson.SBPhysicalVector6, a: list[samson.SBQuantity.unitsSI], l: list[samson.SBQuantity.unitsSI]) -> None Constructs the spatial vector [ a[0] a[1] a[2] l[0] l[1] l[2] ]. 6. __init__(self: samson.SBPhysicalVector6, a: float, l: float) -> None Constructs the dimensionless spatial vector [ a a a l l l ]. 7. __init__(self: samson.SBPhysicalVector6, ax: float, ay: float, az: float, lx: float, ly: float, lz: float) -> None Constructs the dimensionless spatial vector [ ax ay az lx ly lz ]. 8. __init__(self: samson.SBPhysicalVector6, a: list[float], l: list[float]) -> None Constructs the spatial vector [ a[0] a[1] a[2] l[0] l[1] l[2] ]. ##### Method `samson.SBPhysicalVector6.__add__` Signature: `__add__(self: samson.SBPhysicalVector6, arg0: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6` ##### Method `samson.SBPhysicalVector6.__eq__` Signature: `__eq__(self: samson.SBPhysicalVector6, arg0: samson.SBPhysicalVector6) -> bool` ##### Method `samson.SBPhysicalVector6.__ge__` Signature: `__ge__(self: samson.SBPhysicalVector6, arg0: samson.SBPhysicalVector6) -> bool` ##### Method `samson.SBPhysicalVector6.__gt__` Signature: `__gt__(self: samson.SBPhysicalVector6, arg0: samson.SBPhysicalVector6) -> bool` ##### Method `samson.SBPhysicalVector6.__iadd__` Signature: `__iadd__(self: samson.SBPhysicalVector6, arg0: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6` ##### Method `samson.SBPhysicalVector6.__imul__` Signature: `__imul__(*args, **kwargs)` Overloaded function. 1. __imul__(self: samson.SBPhysicalVector6, arg0: float) -> samson.SBPhysicalVector6 2. __imul__(self: samson.SBPhysicalVector6, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 ##### Method `samson.SBPhysicalVector6.__isub__` Signature: `__isub__(self: samson.SBPhysicalVector6, arg0: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6` ##### Method `samson.SBPhysicalVector6.__itruediv__` Signature: `__itruediv__(*args, **kwargs)` Overloaded function. 1. __itruediv__(self: samson.SBPhysicalVector6, arg0: float) -> samson.SBPhysicalVector6 2. __itruediv__(self: samson.SBPhysicalVector6, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 ##### Method `samson.SBPhysicalVector6.__le__` Signature: `__le__(self: samson.SBPhysicalVector6, arg0: samson.SBPhysicalVector6) -> bool` ##### Method `samson.SBPhysicalVector6.__lt__` Signature: `__lt__(self: samson.SBPhysicalVector6, arg0: samson.SBPhysicalVector6) -> bool` ##### Method `samson.SBPhysicalVector6.__mul__` Signature: `__mul__(*args, **kwargs)` Overloaded function. 1. __mul__(self: samson.SBPhysicalVector6, arg0: float) -> samson.SBPhysicalVector6 2. __mul__(self: samson.SBPhysicalVector6, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 3. __mul__(self: samson.SBPhysicalVector6, arg0: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6 ##### Method `samson.SBPhysicalVector6.__ne__` Signature: `__ne__(self: samson.SBPhysicalVector6, arg0: samson.SBPhysicalVector6) -> bool` ##### Method `samson.SBPhysicalVector6.__neg__` Signature: `__neg__(self: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6` ##### Method `samson.SBPhysicalVector6.__rmul__` Signature: `__rmul__(*args, **kwargs)` Overloaded function. 1. __rmul__(self: samson.SBPhysicalVector6, arg0: float) -> samson.SBPhysicalVector6 2. __rmul__(self: samson.SBPhysicalVector6, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 ##### Method `samson.SBPhysicalVector6.__sub__` Signature: `__sub__(self: samson.SBPhysicalVector6, arg0: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6` ##### Method `samson.SBPhysicalVector6.__truediv__` Signature: `__truediv__(*args, **kwargs)` Overloaded function. 1. __truediv__(self: samson.SBPhysicalVector6, arg0: float) -> samson.SBPhysicalVector6 2. __truediv__(self: samson.SBPhysicalVector6, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 ##### Method `samson.SBPhysicalVector6.motionCrossForce` Signature: `motionCrossForce(self: samson.SBPhysicalVector6, force: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6` Returns the cross product of this spatial vector with spatial vector *force*. ##### Method `samson.SBPhysicalVector6.setZero` Signature: `setZero(self: samson.SBPhysicalVector6) -> None` Sets the components of the spatial vector to zero. ##### Method `samson.SBPhysicalVector6.str` Signature: `str(self: samson.SBPhysicalVector6, fullName: bool = False) -> str` Converts the spatial vector to a string with a full unit name when *fullName* is *True*. ##### Property `samson.SBPhysicalVector6.ax` Signature: `property ax` The ax component. ##### Property `samson.SBPhysicalVector6.ay` Signature: `property ay` The ay component. ##### Property `samson.SBPhysicalVector6.az` Signature: `property az` The az component. ##### Property `samson.SBPhysicalVector6.isDimensionless` Signature: `property isDimensionless` Returns *True* if the spatial vector is dimensionless ##### Property `samson.SBPhysicalVector6.lx` Signature: `property lx` The lx component. ##### Property `samson.SBPhysicalVector6.ly` Signature: `property ly` The ly component. ##### Property `samson.SBPhysicalVector6.lz` Signature: `property lz` The lz component. ##### Property `samson.SBPhysicalVector6.value` Signature: `property value` Returns vector components as a Python list. --- # SBAcceleration6 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/acceleration6.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/acceleration6.md ## API Reference #### Class `samson.SBAcceleration6` Signature: `class samson.SBAcceleration6(*args, **kwargs)` Bases: Overloaded function. 1. SBAcceleration6() -> samson.SBPhysicalVector6 Spatial acceleration 2. SBAcceleration6(a: float, l: float) -> samson.SBPhysicalVector6 Spatial acceleration 3. SBAcceleration6(ax: float, ay: float, az: float, lx: float, ly: float, lz: float) -> samson.SBPhysicalVector6 Spatial acceleration 4. SBAcceleration6(a: list[float], l: list[float]) -> samson.SBPhysicalVector6 Spatial acceleration 5. SBAcceleration6(a: samson.SBQuantity.unitsSI, l: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 Spatial acceleration 6. SBAcceleration6(a: samson.SBPhysicalVector3, l: samson.SBPhysicalVector3) -> samson.SBPhysicalVector6 Spatial acceleration 7. SBAcceleration6(ax: samson.SBQuantity.unitsSI, ay: samson.SBQuantity.unitsSI, az: samson.SBQuantity.unitsSI, lx: samson.SBQuantity.unitsSI, ly: samson.SBQuantity.unitsSI, lz: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 Spatial acceleration 8. SBAcceleration6(a: list[samson.SBQuantity.unitsSI], l: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector6 Spatial acceleration --- # SBVector6 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/dimensionless6.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/dimensionless6.md ## API Reference #### Class `samson.SBVector6` Signature: `class samson.SBVector6(*args, **kwargs)` Bases: Overloaded function. 1. SBVector6() -> samson.SBPhysicalVector6 Dimensionless spatial vector 2. SBVector6(a: float, l: float) -> samson.SBPhysicalVector6 Dimensionless spatial vector 3. SBVector6(ax: float, ay: float, az: float, lx: float, ly: float, lz: float) -> samson.SBPhysicalVector6 Dimensionless spatial vector 4. SBVector6(a: list[float], l: list[float]) -> samson.SBPhysicalVector6 Dimensionless spatial vector 5. SBVector6(a: samson.SBQuantity.unitsSI, l: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 Dimensionless spatial vector 6. SBVector6(a: samson.SBPhysicalVector3, l: samson.SBPhysicalVector3) -> samson.SBPhysicalVector6 Dimensionless spatial vector 7. SBVector6(ax: samson.SBQuantity.unitsSI, ay: samson.SBQuantity.unitsSI, az: samson.SBQuantity.unitsSI, lx: samson.SBQuantity.unitsSI, ly: samson.SBQuantity.unitsSI, lz: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 Dimensionless spatial vector 8. SBVector6(a: list[samson.SBQuantity.unitsSI], l: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector6 Dimensionless spatial vector --- # SBForce6 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/force6.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/force6.md ## API Reference #### Class `samson.SBForce6` Signature: `class samson.SBForce6(*args, **kwargs)` Bases: Overloaded function. 1. SBForce6() -> samson.SBPhysicalVector6 Spatial force 2. SBForce6(a: float, l: float) -> samson.SBPhysicalVector6 Spatial force 3. SBForce6(ax: float, ay: float, az: float, lx: float, ly: float, lz: float) -> samson.SBPhysicalVector6 Spatial force 4. SBForce6(a: list[float], l: list[float]) -> samson.SBPhysicalVector6 Spatial force 5. SBForce6(a: samson.SBQuantity.unitsSI, l: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 Spatial force 6. SBForce6(a: samson.SBPhysicalVector3, l: samson.SBPhysicalVector3) -> samson.SBPhysicalVector6 Spatial force 7. SBForce6(ax: samson.SBQuantity.unitsSI, ay: samson.SBQuantity.unitsSI, az: samson.SBQuantity.unitsSI, lx: samson.SBQuantity.unitsSI, ly: samson.SBQuantity.unitsSI, lz: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 Spatial force 8. SBForce6(a: list[samson.SBQuantity.unitsSI], l: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector6 Spatial force --- # SBVelocity6 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/velocity6.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector6ConvenienceConstructors/velocity6.md ## API Reference #### Class `samson.SBVelocity6` Signature: `class samson.SBVelocity6(*args, **kwargs)` Bases: Overloaded function. 1. SBVelocity6() -> samson.SBPhysicalVector6 Spatial velocity 2. SBVelocity6(a: float, l: float) -> samson.SBPhysicalVector6 Spatial velocity 3. SBVelocity6(ax: float, ay: float, az: float, lx: float, ly: float, lz: float) -> samson.SBPhysicalVector6 Spatial velocity 4. SBVelocity6(a: list[float], l: list[float]) -> samson.SBPhysicalVector6 Spatial velocity 5. SBVelocity6(a: samson.SBQuantity.unitsSI, l: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 Spatial velocity 6. SBVelocity6(a: samson.SBPhysicalVector3, l: samson.SBPhysicalVector3) -> samson.SBPhysicalVector6 Spatial velocity 7. SBVelocity6(ax: samson.SBQuantity.unitsSI, ay: samson.SBQuantity.unitsSI, az: samson.SBQuantity.unitsSI, lx: samson.SBQuantity.unitsSI, ly: samson.SBQuantity.unitsSI, lz: samson.SBQuantity.unitsSI) -> samson.SBPhysicalVector6 Spatial velocity 8. SBVelocity6(a: list[samson.SBQuantity.unitsSI], l: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalVector6 Spatial velocity --- # SBPhysicalInterval Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalInterval.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalInterval.md This class represents a physical interval. ```python SBPhysicalInterval() # a dimensionless zero interval [0, 0] SBPhysicalInterval(1, 2) # a dimensionless interval [1, 2] SBPhysicalInterval([1, 2]) # a dimensionless interval [1, 2] ``` There are multiple convenience constructors available for the commonly used physical intervals: - [SBAccelerationInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/accelerationInterval.md) - [`SBAccelerationInterval`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/accelerationInterval.md#samson.SBAccelerationInterval) - [SBInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/dimensionlessInterval.md) - [`SBInterval`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/dimensionlessInterval.md#samson.SBInterval) - [SBEnergyInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/energyInterval.md) - [`SBEnergyInterval`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/energyInterval.md#samson.SBEnergyInterval) - [SBForceInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/forceInterval.md) - [`SBForceInterval`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/forceInterval.md#samson.SBForceInterval) - [SBLengthInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/lengthInterval.md) - [`SBLengthInterval`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/lengthInterval.md#samson.SBLengthInterval) - [SBMomentumInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/momentumInterval.md) - [`SBMomentumInterval`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/momentumInterval.md#samson.SBMomentumInterval) - [SBPositionInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/positionInterval.md) - [`SBPositionInterval`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/positionInterval.md#samson.SBPositionInterval) - [SBSquareLengthInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/squareLengthInterval.md) - [`SBSquareLengthInterval`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/squareLengthInterval.md#samson.SBSquareLengthInterval) - [SBVelocityInterval](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/velocityInterval.md) - [`SBVelocityInterval`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/velocityInterval.md#samson.SBVelocityInterval) These convenience constructors internally call `SBPhysicalInterval` with proper [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) and can be used as follows, without specifying the [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) unit: ```python SBInterval(1, 2) # an interval in dimensionless units SBLengthInterval(0, 10) # an interval in length units SBForceInterval(1, 2) # an interval in force units ``` ```python SBInterval(1, 2) == SBPhysicalInterval(1, 2) # True SBLengthInterval(0, 1) == SBPhysicalInterval(SBQuantity.length(0), SBQuantity.length(1)) # True ``` !!! note "See also" SAMSON SDK: [SBDTypePhysicalInterval](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypePhysicalInterval/#) ## API Reference #### Class `samson.SBPhysicalInterval` Signature: `class samson.SBPhysicalInterval(*args, **kwargs)` Bases: `pybind11_object` This class represents physical intervals. SAMSON API: [SBDTypePhysicalInterval](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypePhysicalInterval/#) Overloaded function. 1. __init__(self: samson.SBPhysicalInterval) -> None The default constructor, initializes all components to zero. 2. __init__(self: samson.SBPhysicalInterval, x: samson.SBQuantity.unitsSI) -> None Constructs a physical interval [*x*, *x*]. 3. __init__(self: samson.SBPhysicalInterval, x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI) -> None Constructs a physical interval [*x*, *y*]. 4. __init__(self: samson.SBPhysicalInterval, uvec2: list[samson.SBQuantity.unitsSI]) -> None Constructs a physical interval [uvec2[0], uvec2[1]]. 5. __init__(self: samson.SBPhysicalInterval, x: float) -> None Constructs a dimensionless physical interval [*x*, *x*]. 6. __init__(self: samson.SBPhysicalInterval, x: float, y: float) -> None Constructs a dimensionless physical interval [*x*, *y*]. 7. __init__(self: samson.SBPhysicalInterval, vec2: list[float]) -> None Constructs a dimensionless physical interval [vec2[0], vec2[1]]. ##### Method `samson.SBPhysicalInterval.__add__` Signature: `__add__(self: samson.SBPhysicalInterval, arg0: samson.SBPhysicalInterval) -> samson.SBPhysicalInterval` ##### Method `samson.SBPhysicalInterval.__contains__` Signature: `__contains__(*args, **kwargs)` Overloaded function. 1. __contains__(self: samson.SBPhysicalInterval, v: samson.SBQuantity.unitsSI) -> bool Returns *True* when this physical interval contains value *v*. **Parameters** - **v** (*samson.SBQuantity*) – A quantity **Return type** - bool ###### Examples ```pycon >>> interval = SBLengthInterval(SBQuantity.nm(1), SBQuantity.nm(2)) >>> print(SBQuantity.nm(1.5) in interval) True ``` 2. __contains__(self: samson.SBPhysicalInterval, v: float) -> bool Returns *True* when this dimensionless physical interval contains value *v*. **Parameters** - **v** (*float*) – A value **Return type** - bool ###### Examples ```pycon >>> interval = SBInterval(1, 2) >>> print(1.5 in interval) True ``` 3. __contains__(self: samson.SBPhysicalInterval, j: samson.SBPhysicalInterval) -> bool Returns *True* when this physical interval contains value the physical interval *j*. **Parameters** - **j** ([*samson.SBPhysicalInterval*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalInterval.md#samson.SBPhysicalInterval)) – A physical interval **Return type** - bool ###### Examples ```pycon >>> interval = SBLengthInterval(SBQuantity.nm(1), SBQuantity.nm(2)) >>> print(SBLengthInterval(SBQuantity.nm(1.2), SBQuantity.nm(1.8)) in interval) True ``` ##### Method `samson.SBPhysicalInterval.__eq__` Signature: `__eq__(self: samson.SBPhysicalInterval, arg0: samson.SBPhysicalInterval) -> bool` ##### Method `samson.SBPhysicalInterval.__iadd__` Signature: `__iadd__(self: samson.SBPhysicalInterval, arg0: samson.SBPhysicalInterval) -> samson.SBPhysicalInterval` ##### Method `samson.SBPhysicalInterval.__imul__` Signature: `__imul__(*args, **kwargs)` Overloaded function. 1. __imul__(self: samson.SBPhysicalInterval, arg0: float) -> samson.SBPhysicalInterval 2. __imul__(self: samson.SBPhysicalInterval, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval 3. __imul__(self: samson.SBPhysicalInterval, arg0: samson.SBPhysicalInterval) -> samson.SBPhysicalInterval ##### Method `samson.SBPhysicalInterval.__isub__` Signature: `__isub__(self: samson.SBPhysicalInterval, arg0: samson.SBPhysicalInterval) -> samson.SBPhysicalInterval` ##### Method `samson.SBPhysicalInterval.__itruediv__` Signature: `__itruediv__(*args, **kwargs)` Overloaded function. 1. __itruediv__(self: samson.SBPhysicalInterval, arg0: float) -> samson.SBPhysicalInterval 2. __itruediv__(self: samson.SBPhysicalInterval, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval 3. __itruediv__(self: samson.SBPhysicalInterval, arg0: samson.SBPhysicalInterval) -> samson.SBPhysicalInterval ##### Method `samson.SBPhysicalInterval.__mul__` Signature: `__mul__(*args, **kwargs)` Overloaded function. 1. __mul__(self: samson.SBPhysicalInterval, arg0: float) -> samson.SBPhysicalInterval 2. __mul__(self: samson.SBPhysicalInterval, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval 3. __mul__(self: samson.SBPhysicalInterval, arg0: samson.SBPhysicalInterval) -> samson.SBPhysicalInterval ##### Method `samson.SBPhysicalInterval.__ne__` Signature: `__ne__(self: samson.SBPhysicalInterval, arg0: samson.SBPhysicalInterval) -> bool` ##### Method `samson.SBPhysicalInterval.__neg__` Signature: `__neg__(self: samson.SBPhysicalInterval) -> samson.SBPhysicalInterval` ##### Method `samson.SBPhysicalInterval.__rmul__` Signature: `__rmul__(*args, **kwargs)` Overloaded function. 1. __rmul__(self: samson.SBPhysicalInterval, arg0: float) -> samson.SBPhysicalInterval 2. __rmul__(self: samson.SBPhysicalInterval, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval ##### Method `samson.SBPhysicalInterval.__sub__` Signature: `__sub__(self: samson.SBPhysicalInterval, arg0: samson.SBPhysicalInterval) -> samson.SBPhysicalInterval` ##### Method `samson.SBPhysicalInterval.__truediv__` Signature: `__truediv__(*args, **kwargs)` Overloaded function. 1. __truediv__(self: samson.SBPhysicalInterval, arg0: float) -> samson.SBPhysicalInterval 2. __truediv__(self: samson.SBPhysicalInterval, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval ##### Method `samson.SBPhysicalInterval.bound` Signature: `bound(*args, **kwargs)` Overloaded function. 1. bound(self: samson.SBPhysicalInterval, v: samson.SBQuantity.unitsSI) -> None Enlarges this physical interval to contain value *v*. **Parameters** - **v** (*samson.SBQuantity*) – A quantity ###### Examples ```pycon >>> interval = SBLengthInterval(SBQuantity.nm(1), SBQuantity.nm(2)) >>> interval.bound(SBQuantity.nm(3)) >>> print(interval) [1 nm, 3 nm] ``` 2. bound(self: samson.SBPhysicalInterval, v: float) -> None Enlarges this dimensionless physical interval to contain value *v*. **Parameters** - **v** (*float*) – A value ###### Examples ```pycon >>> interval = SBInterval(1, 2) >>> interval.bound(3) >>> print(interval) [1 (dimensionless), 3 (dimensionless)] ``` 3. bound(self: samson.SBPhysicalInterval, j: samson.SBPhysicalInterval) -> None Enlarges this physical interval to contain the physical interval *j*. **Parameters** - **j** ([*samson.SBPhysicalInterval*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalInterval.md#samson.SBPhysicalInterval)) – A physical interval ###### Examples ```pycon >>> interval = SBLengthInterval(SBQuantity.nm(1), SBQuantity.nm(2)) >>> interval.bound(SBLengthInterval(SBQuantity.nm(1.5), SBQuantity.nm(3))) >>> print(interval) [1 nm, 3 nm] ``` ##### Method `samson.SBPhysicalInterval.center` Signature: `center(self: samson.SBPhysicalInterval) -> samson.SBQuantity.unitsSI` Returns the center, 0.5*(i[0]+i[1]), of the physical interval. ##### Method `samson.SBPhysicalInterval.contains` Signature: `contains(*args, **kwargs)` Overloaded function. 1. contains(self: samson.SBPhysicalInterval, v: samson.SBQuantity.unitsSI) -> bool Returns *True* when this physical interval contains value *v*. **Parameters** - **v** (*samson.SBQuantity*) – A quantity **Return type** - bool ###### Examples ```pycon >>> interval = SBLengthInterval(SBQuantity.nm(1), SBQuantity.nm(2)) >>> print(interval.contains(SBQuantity.nm(1.5))) True ``` 2. contains(self: samson.SBPhysicalInterval, v: float) -> bool Returns *True* when this dimensionless physical interval contains value *v*. **Parameters** - **v** (*float*) – A value **Return type** - bool ###### Examples ```pycon >>> interval = SBInterval(1, 2) >>> print(interval.contains(1.5)) True ``` 3. contains(self: samson.SBPhysicalInterval, j: samson.SBPhysicalInterval) -> bool Returns *True* when this physical interval contains value the physical interval *j*. **Parameters** - **j** ([*samson.SBPhysicalInterval*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalInterval.md#samson.SBPhysicalInterval)) – A physical interval **Return type** - bool ###### Examples ```pycon >>> interval = SBLengthInterval(SBQuantity.nm(1), SBQuantity.nm(2)) >>> print(interval.contains(SBLengthInterval(SBQuantity.nm(1.2), SBQuantity.nm(1.8)))) True ``` ##### Method `samson.SBPhysicalInterval.diameter` Signature: `diameter(self: samson.SBPhysicalInterval) -> samson.SBQuantity.unitsSI` Returns the diameter, i[1]-i[0], of the physical interval. ##### Method `samson.SBPhysicalInterval.expand` Signature: `expand(*args, **kwargs)` Overloaded function. 1. expand(self: samson.SBPhysicalInterval, r: samson.SBQuantity.unitsSI) -> None Expands this physical interval by offset *r*. This function expands this physical interval by offset *r*: [a, b] becomes [a-r, b+r]. **Parameters** - **r** (*samson.SBQuantity*) – The offset. ###### Examples ```pycon >>> interval = SBLengthInterval(SBQuantity.nm(1), SBQuantity.nm(2)) >>> interval.expand(SBQuantity.nm(1)) >>> print(interval) [0 nm, 3 nm] ``` 2. expand(self: samson.SBPhysicalInterval, r: float) -> None Expands this dimensionless physical interval by offset *r*. This function expands this dimensionless physical interval by offset *r*: [a, b] becomes [a-r, b+r]. **Parameters** - **r** (*samson.SBQuantity*) – The offset. ###### Examples ```pycon >>> interval = SBInterval(1, 2) >>> interval.expand(1) >>> print(interval) [0 (dimensionless), 3 (dimensionless)] ``` ##### Method `samson.SBPhysicalInterval.getAbsLower` Signature: `getAbsLower(self: samson.SBPhysicalInterval) -> samson.SBQuantity.unitsSI` Returns the lower bound of the absolute value of this physical interval. ##### Method `samson.SBPhysicalInterval.getAbsUpper` Signature: `getAbsUpper(self: samson.SBPhysicalInterval) -> samson.SBQuantity.unitsSI` Returns the upper bound of the absolute value of this physical interval. ##### Method `samson.SBPhysicalInterval.isEmpty` Signature: `isEmpty(*args, **kwargs)` Overloaded function. 1. isEmpty(self: samson.SBPhysicalInterval, u: samson.SBPhysicalInterval) -> bool Determines whether the intersection between this physical interval and the physical interval *u* is empty. 2. isEmpty(self: samson.SBPhysicalInterval, l: samson.SBQuantity.unitsSI, r: samson.SBQuantity.unitsSI) -> bool Determines whether the intersection between this physical interval and the physical interval [*l*, *r*] is empty. ##### Method `samson.SBPhysicalInterval.setZero` Signature: `setZero(self: samson.SBPhysicalInterval) -> None` Sets the physical interval to [0, 0]. ##### Method `samson.SBPhysicalInterval.shrink` Signature: `shrink(*args, **kwargs)` Overloaded function. 1. shrink(self: samson.SBPhysicalInterval, r: samson.SBQuantity.unitsSI) -> None Shrinks this physical interval by offset *r*. This function shrinks this physical interval by offset *r*: [a, b] becomes [a+r, b-r]. When the offset *r* is larger than the half-size of the physical interval, the interval becomes [m, m], where m is the center of the interval. **Parameters** - **r** (*samson.SBQuantity*) – The offset. ###### Examples ```pycon >>> interval = SBLengthInterval(SBQuantity.nm(-2), SBQuantity.nm(2)) >>> interval.shrink(SBQuantity.nm(1)) >>> print(interval) [-1 nm, 1 nm] ``` 2. shrink(self: samson.SBPhysicalInterval, r: float) -> None Shrinks this dimensionless physical interval by offset *r*. This function shrinks this dimensionless physical interval by offset *r*: [a, b] becomes [a+r, b-r]. When the offset *r* is larger than the half-size of the physical interval, the interval becomes [m, m], where m is the center of the interval. **Parameters** - **r** (*samson.SBQuantity*) – The offset. ###### Examples ```pycon >>> interval = SBInterval(-2, 2) >>> interval.shrink(1) >>> print(interval) [-1 (dimensionless), 1 (dimensionless)] ``` ##### Method `samson.SBPhysicalInterval.str` Signature: `str(self: samson.SBPhysicalInterval, fullName: bool = False) -> str` Converts the physical interval to a string with a full unit name when *fullName* is *True*. ##### Property `samson.SBPhysicalInterval.isDimensionless` Signature: `property isDimensionless` Returns *True* if the physical interval is dimensionless ##### Property `samson.SBPhysicalInterval.value` Signature: `property value` Returns interval bounds as a two-element list. --- # SBAccelerationInterval Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/accelerationInterval.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/accelerationInterval.md ## API Reference #### Class `samson.SBAccelerationInterval` Signature: `class samson.SBAccelerationInterval(*args, **kwargs)` Bases: Overloaded function. 1. SBAccelerationInterval() -> samson.SBPhysicalInterval Acceleration interval 2. SBAccelerationInterval(value: float) -> samson.SBPhysicalInterval Acceleration interval 3. SBAccelerationInterval(begin: float, end: float) -> samson.SBPhysicalInterval Acceleration interval 4. SBAccelerationInterval(interval: list[float]) -> samson.SBPhysicalInterval Acceleration interval 5. SBAccelerationInterval(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Acceleration interval 6. SBAccelerationInterval(begin: samson.SBQuantity.unitsSI, end: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Acceleration interval 7. SBAccelerationInterval(interval: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalInterval Acceleration interval --- # SBInterval Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/dimensionlessInterval.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/dimensionlessInterval.md ## API Reference #### Class `samson.SBInterval` Signature: `class samson.SBInterval(*args, **kwargs)` Bases: Overloaded function. 1. SBInterval() -> samson.SBPhysicalInterval Dimensionless interval 2. SBInterval(value: float) -> samson.SBPhysicalInterval Dimensionless interval 3. SBInterval(begin: float, end: float) -> samson.SBPhysicalInterval Dimensionless interval 4. SBInterval(interval: list[float]) -> samson.SBPhysicalInterval Dimensionless interval 5. SBInterval(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Dimensionless interval 6. SBInterval(begin: samson.SBQuantity.unitsSI, end: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Dimensionless interval 7. SBInterval(interval: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalInterval Dimensionless interval --- # SBEnergyInterval Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/energyInterval.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/energyInterval.md ## API Reference #### Class `samson.SBEnergyInterval` Signature: `class samson.SBEnergyInterval(*args, **kwargs)` Bases: Overloaded function. 1. SBEnergyInterval() -> samson.SBPhysicalInterval Energy interval 2. SBEnergyInterval(value: float) -> samson.SBPhysicalInterval Energy interval 3. SBEnergyInterval(begin: float, end: float) -> samson.SBPhysicalInterval Energy interval 4. SBEnergyInterval(interval: list[float]) -> samson.SBPhysicalInterval Energy interval 5. SBEnergyInterval(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Energy interval 6. SBEnergyInterval(begin: samson.SBQuantity.unitsSI, end: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Energy interval 7. SBEnergyInterval(interval: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalInterval Energy interval --- # SBForceInterval Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/forceInterval.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/forceInterval.md ## API Reference #### Class `samson.SBForceInterval` Signature: `class samson.SBForceInterval(*args, **kwargs)` Bases: Overloaded function. 1. SBForceInterval() -> samson.SBPhysicalInterval Force interval 2. SBForceInterval(value: float) -> samson.SBPhysicalInterval Force interval 3. SBForceInterval(begin: float, end: float) -> samson.SBPhysicalInterval Force interval 4. SBForceInterval(interval: list[float]) -> samson.SBPhysicalInterval Force interval 5. SBForceInterval(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Force interval 6. SBForceInterval(begin: samson.SBQuantity.unitsSI, end: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Force interval 7. SBForceInterval(interval: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalInterval Force interval --- # SBLengthInterval Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/lengthInterval.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/lengthInterval.md ## API Reference #### Class `samson.SBLengthInterval` Signature: `class samson.SBLengthInterval(*args, **kwargs)` Bases: Overloaded function. 1. SBLengthInterval() -> samson.SBPhysicalInterval Length interval 2. SBLengthInterval(value: float) -> samson.SBPhysicalInterval Length interval 3. SBLengthInterval(begin: float, end: float) -> samson.SBPhysicalInterval Length interval 4. SBLengthInterval(interval: list[float]) -> samson.SBPhysicalInterval Length interval 5. SBLengthInterval(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Length interval 6. SBLengthInterval(begin: samson.SBQuantity.unitsSI, end: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Length interval 7. SBLengthInterval(interval: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalInterval Length interval --- # SBMomentumInterval Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/momentumInterval.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/momentumInterval.md ## API Reference #### Class `samson.SBMomentumInterval` Signature: `class samson.SBMomentumInterval(*args, **kwargs)` Bases: Overloaded function. 1. SBMomentumInterval() -> samson.SBPhysicalInterval Momentum interval 2. SBMomentumInterval(value: float) -> samson.SBPhysicalInterval Momentum interval 3. SBMomentumInterval(begin: float, end: float) -> samson.SBPhysicalInterval Momentum interval 4. SBMomentumInterval(interval: list[float]) -> samson.SBPhysicalInterval Momentum interval 5. SBMomentumInterval(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Momentum interval 6. SBMomentumInterval(begin: samson.SBQuantity.unitsSI, end: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Momentum interval 7. SBMomentumInterval(interval: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalInterval Momentum interval --- # SBPositionInterval Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/positionInterval.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/positionInterval.md ## API Reference #### Class `samson.SBPositionInterval` Signature: `class samson.SBPositionInterval(*args, **kwargs)` Bases: Overloaded function. 1. SBPositionInterval() -> samson.SBPhysicalInterval Position interval 2. SBPositionInterval(value: float) -> samson.SBPhysicalInterval Position interval 3. SBPositionInterval(begin: float, end: float) -> samson.SBPhysicalInterval Position interval 4. SBPositionInterval(interval: list[float]) -> samson.SBPhysicalInterval Position interval 5. SBPositionInterval(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Position interval 6. SBPositionInterval(begin: samson.SBQuantity.unitsSI, end: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Position interval 7. SBPositionInterval(interval: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalInterval Position interval --- # SBSquareLengthInterval Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/squareLengthInterval.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/squareLengthInterval.md ## API Reference #### Class `samson.SBSquareLengthInterval` Signature: `class samson.SBSquareLengthInterval(*args, **kwargs)` Bases: Overloaded function. 1. SBSquareLengthInterval() -> samson.SBPhysicalInterval Square length interval 2. SBSquareLengthInterval(value: float) -> samson.SBPhysicalInterval Square length interval 3. SBSquareLengthInterval(begin: float, end: float) -> samson.SBPhysicalInterval Square length interval 4. SBSquareLengthInterval(interval: list[float]) -> samson.SBPhysicalInterval Square length interval 5. SBSquareLengthInterval(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Square length interval 6. SBSquareLengthInterval(begin: samson.SBQuantity.unitsSI, end: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Square length interval 7. SBSquareLengthInterval(interval: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalInterval Square length interval --- # SBVelocityInterval Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/velocityInterval.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIntervalConvenienceConstructors/velocityInterval.md ## API Reference #### Class `samson.SBVelocityInterval` Signature: `class samson.SBVelocityInterval(*args, **kwargs)` Bases: Overloaded function. 1. SBVelocityInterval() -> samson.SBPhysicalInterval Velocity interval 2. SBVelocityInterval(value: float) -> samson.SBPhysicalInterval Velocity interval 3. SBVelocityInterval(begin: float, end: float) -> samson.SBPhysicalInterval Velocity interval 4. SBVelocityInterval(interval: list[float]) -> samson.SBPhysicalInterval Velocity interval 5. SBVelocityInterval(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Velocity interval 6. SBVelocityInterval(begin: samson.SBQuantity.unitsSI, end: samson.SBQuantity.unitsSI) -> samson.SBPhysicalInterval Velocity interval 7. SBVelocityInterval(interval: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalInterval Velocity interval --- # SBPhysicalIAVector3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalIAVector3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalIAVector3.md This class represents a three-dimensional physical interval vector. ```python SBPhysicalIAVector3() # a dimensionless zero interval vector SBPhysicalIAVector3(1, 2, 3) # a dimensionless interval vector [ [1, 1] [2, 2] [3, 4] ] SBPhysicalIAVector3([[1, 2], [3, 4], [5, 6]]) # a dimensionless interval vector [ [1, 2] [3, 4] [5, 6] ] SBPhysicalIAVector3(1, 2, 3, 4, 5, 6) # a dimensionless interval vector [ [1, 2] [3, 4] [5, 6] ] ``` There are multiple convenience constructors available for the commonly used physical interval vectors: - [SBIAAcceleration3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/accelerationInterval3.md) - [`SBIAAcceleration3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/accelerationInterval3.md#samson.SBIAAcceleration3) - [SBIAVector3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/dimensionlessInterval3.md) - [`SBIAVector3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/dimensionlessInterval3.md#samson.SBIAVector3) - [SBIAForce3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/forceInterval3.md) - [`SBIAForce3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/forceInterval3.md#samson.SBIAForce3) - [SBIALength3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/lengthInterval3.md) - [`SBIALength3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/lengthInterval3.md#samson.SBIALength3) - [SBIAMomentum3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/momentumInterval3.md) - [`SBIAMomentum3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/momentumInterval3.md#samson.SBIAMomentum3) - [SBIAPosition3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/positionInterval3.md) - [`SBIAPosition3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/positionInterval3.md#samson.SBIAPosition3) - [SBIARadian3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/radianInterval3.md) - [`SBIARadian3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/radianInterval3.md#samson.SBIARadian3) - [SBIARadianPerSecond3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/radianPerSecondInterval3.md) - [`SBIARadianPerSecond3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/radianPerSecondInterval3.md#samson.SBIARadianPerSecond3) - [SBIAVelocity3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/velocityInterval3.md) - [`SBIAVelocity3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/velocityInterval3.md#samson.SBIAVelocity3) These convenience constructors internally call `SBPhysicalIAVector3` with proper [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) and can be used as follows, without specifying the [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) unit: ```python SBIAVector3(1, 2, 3) # an interval vector in dimensionless units SBIALength3(0, 10, 0, 20, 0, 30) # an interval vector in length units SBIAForce3(1e0, 1e3, 1e0, 1e3, 1e0, 1e3) # an interval vector in force units ``` ```python SBIAVector3(1, 2, 3) == SBPhysicalIAVector3(1, 2, 3) # True ``` !!! note "See also" SAMSON SDK: [SBDTypePhysicalIAVector3](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypePhysicalIAVector3/#) ## API Reference #### Class `samson.SBPhysicalIAVector3` Signature: `class samson.SBPhysicalIAVector3(*args, **kwargs)` Bases: `pybind11_object` This class represents three-dimensional physical interval vectors. SAMSON API: [SBDTypePhysicalIAVector3](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypePhysicalIAVector3/#) Overloaded function. 1. __init__(self: samson.SBPhysicalIAVector3) -> None Constructs a physical interval vector with all components set to [0, 0] 2. __init__(self: samson.SBPhysicalIAVector3, x: samson.SBPhysicalInterval) -> None Constructs the physical interval vector [ x, x, x ] from interval *x*. 3. __init__(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalVector3) -> None Constructs the physical interval vector [ [u[0], u[0]], [u[1], u[1]], [u[2], u[2]] ] 4. __init__(self: samson.SBPhysicalIAVector3, v: list[samson.SBPhysicalInterval]) -> None Constructs the physical interval vector [ v[0], v[1], v[2] ] 5. __init__(self: samson.SBPhysicalIAVector3, x: samson.SBQuantity.unitsSI) -> None Constructs a physical interval vector with all components set to [x, x] 6. __init__(self: samson.SBPhysicalIAVector3, x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> None Constructs the physical interval vector [ [x, x], [y, y], [z, z] ] 7. __init__(self: samson.SBPhysicalIAVector3, x: list[samson.SBQuantity.unitsSI], y: list[samson.SBQuantity.unitsSI], z: list[samson.SBQuantity.unitsSI]) -> None Constructs the physical interval vector [ [x[0], x[1]], [y[0], y[1]], [z[0], z[1]] ] 8. __init__(self: samson.SBPhysicalIAVector3, v: list[list[samson.SBQuantity.unitsSI]]) -> None Constructs the physical interval vector [ [v[0][0], v[0][1]] [v[1][0], v[1][1]] [v[2][0], v[2][1]] ] 9. __init__(self: samson.SBPhysicalIAVector3, xl: samson.SBQuantity.unitsSI, xu: samson.SBQuantity.unitsSI, yl: samson.SBQuantity.unitsSI, yu: samson.SBQuantity.unitsSI, zl: samson.SBQuantity.unitsSI, zu: samson.SBQuantity.unitsSI) -> None Constructs the physical interval vector [ [xl, xu], [yl, yu], [zl, zu] ] 10. __init__(self: samson.SBPhysicalIAVector3, x: samson.SBPhysicalInterval, y: samson.SBPhysicalInterval, z: samson.SBPhysicalInterval) -> None Constructs the physical interval vector [ [x, x], [y, y], [z, z] ] 11. __init__(self: samson.SBPhysicalIAVector3, x: float) -> None Constructs the dimensionless physical interval vector with all components set to [x, x] 12. __init__(self: samson.SBPhysicalIAVector3, x: float, y: float, z: float) -> None Constructs the dimensionless physical interval vector [ [x, x], [y, y], [z, z] ] 13. __init__(self: samson.SBPhysicalIAVector3, x: list[float], y: list[float], z: list[float]) -> None Constructs the dimensionless physical interval vector [ [x[0], x[1]], [y[0], y[1]], [z[0], z[1]] ] 14. __init__(self: samson.SBPhysicalIAVector3, v: list[list[float]]) -> None Constructs the dimensionless physical interval vector [ [v[0][0], v[0][1]], [v[1][0], v[1][1]], [v[2][0], v[2][1]] ] 15. __init__(self: samson.SBPhysicalIAVector3, xl: float, xu: float, yl: float, yu: float, zl: float, zu: float) -> None Constructs the dimensionless physical interval vector [ [xl, xu], [yl, yu], [zl, zu] ] ##### Method `samson.SBPhysicalIAVector3.__add__` Signature: `__add__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalIAVector3) -> samson.SBPhysicalIAVector3` ##### Method `samson.SBPhysicalIAVector3.__contains__` Signature: `__contains__(*args, **kwargs)` Overloaded function. 1. __contains__(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalVector3) -> bool Returns *True* when this physical interval vector contains the physical vector *u* 2. __contains__(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalIAVector3) -> bool Returns *True* when this physical interval vector contains in physical interval vector *u* ##### Method `samson.SBPhysicalIAVector3.__eq__` Signature: `__eq__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalIAVector3) -> bool` ##### Method `samson.SBPhysicalIAVector3.__iadd__` Signature: `__iadd__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalIAVector3) -> samson.SBPhysicalIAVector3` ##### Method `samson.SBPhysicalIAVector3.__imul__` Signature: `__imul__(*args, **kwargs)` Overloaded function. 1. __imul__(self: samson.SBPhysicalIAVector3, arg0: float) -> samson.SBPhysicalIAVector3 2. __imul__(self: samson.SBPhysicalIAVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 3. __imul__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 4. __imul__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalIAVector3) -> samson.SBPhysicalIAVector3 ##### Method `samson.SBPhysicalIAVector3.__isub__` Signature: `__isub__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalIAVector3) -> samson.SBPhysicalIAVector3` ##### Method `samson.SBPhysicalIAVector3.__itruediv__` Signature: `__itruediv__(*args, **kwargs)` Overloaded function. 1. __itruediv__(self: samson.SBPhysicalIAVector3, arg0: float) -> samson.SBPhysicalIAVector3 2. __itruediv__(self: samson.SBPhysicalIAVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 3. __itruediv__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 4. __itruediv__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalIAVector3) -> samson.SBPhysicalIAVector3 ##### Method `samson.SBPhysicalIAVector3.__mul__` Signature: `__mul__(*args, **kwargs)` Overloaded function. 1. __mul__(self: samson.SBPhysicalIAVector3, arg0: float) -> samson.SBPhysicalIAVector3 2. __mul__(self: samson.SBPhysicalIAVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 3. __mul__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 4. __mul__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalIAVector3) -> samson.SBPhysicalIAVector3 ##### Method `samson.SBPhysicalIAVector3.__ne__` Signature: `__ne__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalIAVector3) -> bool` ##### Method `samson.SBPhysicalIAVector3.__neg__` Signature: `__neg__(self: samson.SBPhysicalIAVector3) -> samson.SBPhysicalIAVector3` ##### Method `samson.SBPhysicalIAVector3.__rmul__` Signature: `__rmul__(*args, **kwargs)` Overloaded function. 1. __rmul__(self: samson.SBPhysicalIAVector3, arg0: float) -> samson.SBPhysicalIAVector3 2. __rmul__(self: samson.SBPhysicalIAVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 3. __rmul__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 ##### Method `samson.SBPhysicalIAVector3.__sub__` Signature: `__sub__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalIAVector3) -> samson.SBPhysicalIAVector3` ##### Method `samson.SBPhysicalIAVector3.__truediv__` Signature: `__truediv__(*args, **kwargs)` Overloaded function. 1. __truediv__(self: samson.SBPhysicalIAVector3, arg0: float) -> samson.SBPhysicalIAVector3 2. __truediv__(self: samson.SBPhysicalIAVector3, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 3. __truediv__(self: samson.SBPhysicalIAVector3, arg0: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 ##### Method `samson.SBPhysicalIAVector3.area` Signature: `area(self: samson.SBPhysicalIAVector3) -> samson.SBQuantity.unitsSI` Returns the area 2.0*((i[0].i[1]-i[0].i[0])*(i[0].i[1]-i[0].i[0])+(i[1].i[1]-i[1].i[0])*(i[1].i[1]-i[1].i[0])+(i[2].i[1]-i[2].i[0])*(i[2].i[1]-i[2].i[0])) of the physical interval vector ##### Method `samson.SBPhysicalIAVector3.bound` Signature: `bound(*args, **kwargs)` Overloaded function. 1. bound(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalVector3) -> None Enlarges the physical interval vector to contain the physical vector *u*. 2. bound(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalIAVector3) -> None Enlarges the physical interval vector to contain the physical interval vector *u*. ##### Method `samson.SBPhysicalIAVector3.center` Signature: `center(self: samson.SBPhysicalIAVector3) -> samson.SBPhysicalVector3` Returns the center [ 0.5*(i[0].i[0]+i[0].i[1]) 0.5*(i[1].i[0]+i[1].i[1]) 0.5*(i[2].i[0]+i[2].i[1]) ] of the physical interval vector ##### Method `samson.SBPhysicalIAVector3.collapseToLowerBound` Signature: `collapseToLowerBound(self: samson.SBPhysicalIAVector3) -> None` Sets the lower bounds of the intervals equal to the upper bounds. ##### Method `samson.SBPhysicalIAVector3.collapseToUpperBound` Signature: `collapseToUpperBound(self: samson.SBPhysicalIAVector3) -> None` Sets the upper bounds of the intervals equal to the lower bounds. ##### Method `samson.SBPhysicalIAVector3.contains` Signature: `contains(*args, **kwargs)` Overloaded function. 1. contains(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalVector3) -> bool Returns *True* when this physical interval vector contains the physical vector *u* 2. contains(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalIAVector3) -> bool Returns *True* when this physical interval vector contains in physical interval vector *u* ##### Method `samson.SBPhysicalIAVector3.diameter` Signature: `diameter(self: samson.SBPhysicalIAVector3) -> samson.SBPhysicalVector3` Returns the diameter [ (i[0].i[1]-i[0].i[0]) (i[1].i[1]-i[1].i[0]) (i[2].i[1]-i[2].i[0]) ] of the physical interval vector ##### Method `samson.SBPhysicalIAVector3.distance2ToPoint` Signature: `distance2ToPoint(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalVector3) -> samson.SBQuantity.unitsSI` Returns the squared Euclidean distance between this physical interval vector and physical vector *u* ##### Method `samson.SBPhysicalIAVector3.expand` Signature: `expand(*args, **kwargs)` Overloaded function. 1. expand(self: samson.SBPhysicalIAVector3, r: samson.SBQuantity.unitsSI) -> None Expands all components of this physical interval vector by offset *r*. 2. expand(self: samson.SBPhysicalIAVector3, r: float) -> None Expands all components of this physical interval vector by offset *r*. ##### Method `samson.SBPhysicalIAVector3.fit` Signature: `fit(self: samson.SBPhysicalIAVector3, a: samson.SBPhysicalIAVector3, b: samson.SBPhysicalIAVector3) -> None` Sets the components of the physical interval vector to exactly bound both physical interval vectors *a* and *b*. ##### Method `samson.SBPhysicalIAVector3.isContainedIn` Signature: `isContainedIn(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalIAVector3) -> bool` Returns *True* when this physical interval vector is contained in physical interval vector *u* ##### Method `samson.SBPhysicalIAVector3.lengthsSum` Signature: `lengthsSum(self: samson.SBPhysicalIAVector3) -> samson.SBQuantity.unitsSI` Returns the sum i[0].diameter()+i[1].diameter()+i[2].diameter() of the components diameters of the physical interval vector. ##### Method `samson.SBPhysicalIAVector3.lowerBound` Signature: `lowerBound(self: samson.SBPhysicalIAVector3) -> samson.SBPhysicalVector3` Returns the lower bound [ i[0].i[0] i[1].i[0] i[2].i[0] ] of the physical interval vector. ##### Method `samson.SBPhysicalIAVector3.overlaps` Signature: `overlaps(*args, **kwargs)` Overloaded function. 1. overlaps(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalIAVector3) -> bool Returns *True* when this physical interval vector overlaps physical interval vector *u* 2. overlaps(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalIAVector3, cutoffDistance: samson.SBQuantity.unitsSI) -> bool Returns *True* when this interval vector and *u* overlap or are within *cutoffDistance* along all axes (Linf distance) ##### Method `samson.SBPhysicalIAVector3.overlapsAdvanced` Signature: `overlapsAdvanced(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalIAVector3, cutoff: samson.SBQuantity.unitsSI, cutoff2: samson.SBQuantity.unitsSI) -> str` Returns the overlap type (as a string) between this physical interval vector and physical interval vector *u* ##### Method `samson.SBPhysicalIAVector3.reset` Signature: `reset(self: samson.SBPhysicalIAVector3, u: samson.SBPhysicalVector3) -> None` Sets the physical interval vector to [ [u[0], u[0]], [u[1], u[1]], [u[2], u[2]] ]. ##### Method `samson.SBPhysicalIAVector3.setZero` Signature: `setZero(self: samson.SBPhysicalIAVector3) -> None` Sets the components of the physical interval vector to [0, 0]. ##### Method `samson.SBPhysicalIAVector3.shrink` Signature: `shrink(*args, **kwargs)` Overloaded function. 1. shrink(self: samson.SBPhysicalIAVector3, r: samson.SBQuantity.unitsSI) -> None Shrinks all components of this physical interval vector by offset *r*. 2. shrink(self: samson.SBPhysicalIAVector3, r: float) -> None Shrinks all components of this physical interval vector by offset *r*. ##### Method `samson.SBPhysicalIAVector3.split` Signature: `split(self: samson.SBPhysicalIAVector3) -> list[samson.SBPhysicalIAVector3]` Splits the physical interval vector along the longest axis into physical interval vectors. ##### Method `samson.SBPhysicalIAVector3.str` Signature: `str(self: samson.SBPhysicalIAVector3, fullName: bool = False) -> str` Converts the physical interval vector to a string with a full unit name when *fullName* is *True*. ##### Method `samson.SBPhysicalIAVector3.upperBound` Signature: `upperBound(self: samson.SBPhysicalIAVector3) -> samson.SBPhysicalVector3` Returns the upper bound [ i[0].i[1] i[1].i[1] i[2].i[1] ] of the physical interval vector. ##### Method `samson.SBPhysicalIAVector3.volume` Signature: `volume(self: samson.SBPhysicalIAVector3) -> samson.SBQuantity.unitsSI` Returns the volume (i[0].i[1]-i[0].i[0])*(i[1].i[1]-i[1].i[0])*(i[2].i[1]-i[2].i[0]) of the physical interval vector ##### Property `samson.SBPhysicalIAVector3.isDimensionless` Signature: `property isDimensionless` Returns *True* if the physical interval vector is dimensionless ##### Property `samson.SBPhysicalIAVector3.value` Signature: `property value` Returns interval bounds as a nested Python list. ##### Property `samson.SBPhysicalIAVector3.x` Signature: `property x` The x interval. ##### Property `samson.SBPhysicalIAVector3.y` Signature: `property y` The y interval. ##### Property `samson.SBPhysicalIAVector3.z` Signature: `property z` The z interval. --- # SBIAAcceleration3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/accelerationInterval3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/accelerationInterval3.md ## API Reference #### Class `samson.SBIAAcceleration3` Signature: `class samson.SBIAAcceleration3(*args, **kwargs)` Bases: Overloaded function. 1. SBIAAcceleration3() -> samson.SBPhysicalIAVector3 Acceleration interval vector 2. SBIAAcceleration3(value: float) -> samson.SBPhysicalIAVector3 Acceleration interval vector 3. SBIAAcceleration3(x: float, y: float, z: float) -> samson.SBPhysicalIAVector3 Acceleration interval vector 4. SBIAAcceleration3(xl: float, xu: float, yl: float, yu: float, zl: float, zu: float) -> samson.SBPhysicalIAVector3 Acceleration interval vector 5. SBIAAcceleration3(x: list[float], y: list[float], z: list[float]) -> samson.SBPhysicalIAVector3 Acceleration interval vector 6. SBIAAcceleration3(vec: list[list[float]]) -> samson.SBPhysicalIAVector3 Acceleration interval vector 7. SBIAAcceleration3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Acceleration interval vector 8. SBIAAcceleration3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Acceleration interval vector 9. SBIAAcceleration3(xl: samson.SBQuantity.unitsSI, xu: samson.SBQuantity.unitsSI, yl: samson.SBQuantity.unitsSI, yu: samson.SBQuantity.unitsSI, zl: samson.SBQuantity.unitsSI, zu: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Acceleration interval vector 10. SBIAAcceleration3(x: list[samson.SBQuantity.unitsSI], y: list[samson.SBQuantity.unitsSI], z: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalIAVector3 Acceleration interval vector 11. SBIAAcceleration3(vector3x2: list[list[samson.SBQuantity.unitsSI]]) -> samson.SBPhysicalIAVector3 Acceleration interval vector 12. SBIAAcceleration3(v: samson.SBPhysicalVector3) -> samson.SBPhysicalIAVector3 Acceleration interval vector 13. SBIAAcceleration3(x: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Acceleration interval vector 14. SBIAAcceleration3(x: samson.SBPhysicalInterval, y: samson.SBPhysicalInterval, z: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Acceleration interval vector --- # SBIAVector3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/dimensionlessInterval3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/dimensionlessInterval3.md ## API Reference #### Class `samson.SBIAVector3` Signature: `class samson.SBIAVector3(*args, **kwargs)` Bases: Overloaded function. 1. SBIAVector3() -> samson.SBPhysicalIAVector3 Dimensionless interval vector 2. SBIAVector3(value: float) -> samson.SBPhysicalIAVector3 Dimensionless interval vector 3. SBIAVector3(x: float, y: float, z: float) -> samson.SBPhysicalIAVector3 Dimensionless interval vector 4. SBIAVector3(xl: float, xu: float, yl: float, yu: float, zl: float, zu: float) -> samson.SBPhysicalIAVector3 Dimensionless interval vector 5. SBIAVector3(x: list[float], y: list[float], z: list[float]) -> samson.SBPhysicalIAVector3 Dimensionless interval vector 6. SBIAVector3(vec: list[list[float]]) -> samson.SBPhysicalIAVector3 Dimensionless interval vector 7. SBIAVector3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Dimensionless interval vector 8. SBIAVector3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Dimensionless interval vector 9. SBIAVector3(xl: samson.SBQuantity.unitsSI, xu: samson.SBQuantity.unitsSI, yl: samson.SBQuantity.unitsSI, yu: samson.SBQuantity.unitsSI, zl: samson.SBQuantity.unitsSI, zu: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Dimensionless interval vector 10. SBIAVector3(x: list[samson.SBQuantity.unitsSI], y: list[samson.SBQuantity.unitsSI], z: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalIAVector3 Dimensionless interval vector 11. SBIAVector3(vector3x2: list[list[samson.SBQuantity.unitsSI]]) -> samson.SBPhysicalIAVector3 Dimensionless interval vector 12. SBIAVector3(v: samson.SBPhysicalVector3) -> samson.SBPhysicalIAVector3 Dimensionless interval vector 13. SBIAVector3(x: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Dimensionless interval vector 14. SBIAVector3(x: samson.SBPhysicalInterval, y: samson.SBPhysicalInterval, z: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Dimensionless interval vector --- # SBIAForce3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/forceInterval3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/forceInterval3.md ## API Reference #### Class `samson.SBIAForce3` Signature: `class samson.SBIAForce3(*args, **kwargs)` Bases: Overloaded function. 1. SBIAForce3() -> samson.SBPhysicalIAVector3 Force interval vector 2. SBIAForce3(value: float) -> samson.SBPhysicalIAVector3 Force interval vector 3. SBIAForce3(x: float, y: float, z: float) -> samson.SBPhysicalIAVector3 Force interval vector 4. SBIAForce3(xl: float, xu: float, yl: float, yu: float, zl: float, zu: float) -> samson.SBPhysicalIAVector3 Force interval vector 5. SBIAForce3(x: list[float], y: list[float], z: list[float]) -> samson.SBPhysicalIAVector3 Force interval vector 6. SBIAForce3(vec: list[list[float]]) -> samson.SBPhysicalIAVector3 Force interval vector 7. SBIAForce3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Force interval vector 8. SBIAForce3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Force interval vector 9. SBIAForce3(xl: samson.SBQuantity.unitsSI, xu: samson.SBQuantity.unitsSI, yl: samson.SBQuantity.unitsSI, yu: samson.SBQuantity.unitsSI, zl: samson.SBQuantity.unitsSI, zu: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Force interval vector 10. SBIAForce3(x: list[samson.SBQuantity.unitsSI], y: list[samson.SBQuantity.unitsSI], z: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalIAVector3 Force interval vector 11. SBIAForce3(vector3x2: list[list[samson.SBQuantity.unitsSI]]) -> samson.SBPhysicalIAVector3 Force interval vector 12. SBIAForce3(v: samson.SBPhysicalVector3) -> samson.SBPhysicalIAVector3 Force interval vector 13. SBIAForce3(x: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Force interval vector 14. SBIAForce3(x: samson.SBPhysicalInterval, y: samson.SBPhysicalInterval, z: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Force interval vector --- # SBIALength3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/lengthInterval3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/lengthInterval3.md ## API Reference #### Class `samson.SBIALength3` Signature: `class samson.SBIALength3(*args, **kwargs)` Bases: Overloaded function. 1. SBIALength3() -> samson.SBPhysicalIAVector3 Length interval vector 2. SBIALength3(value: float) -> samson.SBPhysicalIAVector3 Length interval vector 3. SBIALength3(x: float, y: float, z: float) -> samson.SBPhysicalIAVector3 Length interval vector 4. SBIALength3(xl: float, xu: float, yl: float, yu: float, zl: float, zu: float) -> samson.SBPhysicalIAVector3 Length interval vector 5. SBIALength3(x: list[float], y: list[float], z: list[float]) -> samson.SBPhysicalIAVector3 Length interval vector 6. SBIALength3(vec: list[list[float]]) -> samson.SBPhysicalIAVector3 Length interval vector 7. SBIALength3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Length interval vector 8. SBIALength3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Length interval vector 9. SBIALength3(xl: samson.SBQuantity.unitsSI, xu: samson.SBQuantity.unitsSI, yl: samson.SBQuantity.unitsSI, yu: samson.SBQuantity.unitsSI, zl: samson.SBQuantity.unitsSI, zu: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Length interval vector 10. SBIALength3(x: list[samson.SBQuantity.unitsSI], y: list[samson.SBQuantity.unitsSI], z: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalIAVector3 Length interval vector 11. SBIALength3(vector3x2: list[list[samson.SBQuantity.unitsSI]]) -> samson.SBPhysicalIAVector3 Length interval vector 12. SBIALength3(v: samson.SBPhysicalVector3) -> samson.SBPhysicalIAVector3 Length interval vector 13. SBIALength3(x: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Length interval vector 14. SBIALength3(x: samson.SBPhysicalInterval, y: samson.SBPhysicalInterval, z: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Length interval vector --- # SBIAMomentum3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/momentumInterval3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/momentumInterval3.md ## API Reference #### Class `samson.SBIAMomentum3` Signature: `class samson.SBIAMomentum3(*args, **kwargs)` Bases: Overloaded function. 1. SBIAMomentum3() -> samson.SBPhysicalIAVector3 Momentum interval vector 2. SBIAMomentum3(value: float) -> samson.SBPhysicalIAVector3 Momentum interval vector 3. SBIAMomentum3(x: float, y: float, z: float) -> samson.SBPhysicalIAVector3 Momentum interval vector 4. SBIAMomentum3(xl: float, xu: float, yl: float, yu: float, zl: float, zu: float) -> samson.SBPhysicalIAVector3 Momentum interval vector 5. SBIAMomentum3(x: list[float], y: list[float], z: list[float]) -> samson.SBPhysicalIAVector3 Momentum interval vector 6. SBIAMomentum3(vec: list[list[float]]) -> samson.SBPhysicalIAVector3 Momentum interval vector 7. SBIAMomentum3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Momentum interval vector 8. SBIAMomentum3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Momentum interval vector 9. SBIAMomentum3(xl: samson.SBQuantity.unitsSI, xu: samson.SBQuantity.unitsSI, yl: samson.SBQuantity.unitsSI, yu: samson.SBQuantity.unitsSI, zl: samson.SBQuantity.unitsSI, zu: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Momentum interval vector 10. SBIAMomentum3(x: list[samson.SBQuantity.unitsSI], y: list[samson.SBQuantity.unitsSI], z: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalIAVector3 Momentum interval vector 11. SBIAMomentum3(vector3x2: list[list[samson.SBQuantity.unitsSI]]) -> samson.SBPhysicalIAVector3 Momentum interval vector 12. SBIAMomentum3(v: samson.SBPhysicalVector3) -> samson.SBPhysicalIAVector3 Momentum interval vector 13. SBIAMomentum3(x: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Momentum interval vector 14. SBIAMomentum3(x: samson.SBPhysicalInterval, y: samson.SBPhysicalInterval, z: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Momentum interval vector --- # SBIAPosition3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/positionInterval3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/positionInterval3.md ## API Reference #### Class `samson.SBIAPosition3` Signature: `class samson.SBIAPosition3(*args, **kwargs)` Bases: Overloaded function. 1. SBIAPosition3() -> samson.SBPhysicalIAVector3 Position interval vector 2. SBIAPosition3(value: float) -> samson.SBPhysicalIAVector3 Position interval vector 3. SBIAPosition3(x: float, y: float, z: float) -> samson.SBPhysicalIAVector3 Position interval vector 4. SBIAPosition3(xl: float, xu: float, yl: float, yu: float, zl: float, zu: float) -> samson.SBPhysicalIAVector3 Position interval vector 5. SBIAPosition3(x: list[float], y: list[float], z: list[float]) -> samson.SBPhysicalIAVector3 Position interval vector 6. SBIAPosition3(vec: list[list[float]]) -> samson.SBPhysicalIAVector3 Position interval vector 7. SBIAPosition3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Position interval vector 8. SBIAPosition3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Position interval vector 9. SBIAPosition3(xl: samson.SBQuantity.unitsSI, xu: samson.SBQuantity.unitsSI, yl: samson.SBQuantity.unitsSI, yu: samson.SBQuantity.unitsSI, zl: samson.SBQuantity.unitsSI, zu: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Position interval vector 10. SBIAPosition3(x: list[samson.SBQuantity.unitsSI], y: list[samson.SBQuantity.unitsSI], z: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalIAVector3 Position interval vector 11. SBIAPosition3(vector3x2: list[list[samson.SBQuantity.unitsSI]]) -> samson.SBPhysicalIAVector3 Position interval vector 12. SBIAPosition3(v: samson.SBPhysicalVector3) -> samson.SBPhysicalIAVector3 Position interval vector 13. SBIAPosition3(x: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Position interval vector 14. SBIAPosition3(x: samson.SBPhysicalInterval, y: samson.SBPhysicalInterval, z: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Position interval vector --- # SBIARadian3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/radianInterval3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/radianInterval3.md ## API Reference #### Class `samson.SBIARadian3` Signature: `class samson.SBIARadian3(*args, **kwargs)` Bases: Overloaded function. 1. SBIARadian3() -> samson.SBPhysicalIAVector3 Angular interval vector 2. SBIARadian3(value: float) -> samson.SBPhysicalIAVector3 Angular interval vector 3. SBIARadian3(x: float, y: float, z: float) -> samson.SBPhysicalIAVector3 Angular interval vector 4. SBIARadian3(xl: float, xu: float, yl: float, yu: float, zl: float, zu: float) -> samson.SBPhysicalIAVector3 Angular interval vector 5. SBIARadian3(x: list[float], y: list[float], z: list[float]) -> samson.SBPhysicalIAVector3 Angular interval vector 6. SBIARadian3(vec: list[list[float]]) -> samson.SBPhysicalIAVector3 Angular interval vector 7. SBIARadian3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Angular interval vector 8. SBIARadian3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Angular interval vector 9. SBIARadian3(xl: samson.SBQuantity.unitsSI, xu: samson.SBQuantity.unitsSI, yl: samson.SBQuantity.unitsSI, yu: samson.SBQuantity.unitsSI, zl: samson.SBQuantity.unitsSI, zu: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Angular interval vector 10. SBIARadian3(x: list[samson.SBQuantity.unitsSI], y: list[samson.SBQuantity.unitsSI], z: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalIAVector3 Angular interval vector 11. SBIARadian3(vector3x2: list[list[samson.SBQuantity.unitsSI]]) -> samson.SBPhysicalIAVector3 Angular interval vector 12. SBIARadian3(v: samson.SBPhysicalVector3) -> samson.SBPhysicalIAVector3 Angular interval vector 13. SBIARadian3(x: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Angular interval vector 14. SBIARadian3(x: samson.SBPhysicalInterval, y: samson.SBPhysicalInterval, z: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Angular interval vector --- # SBIARadianPerSecond3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/radianPerSecondInterval3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/radianPerSecondInterval3.md ## API Reference #### Class `samson.SBIARadianPerSecond3` Signature: `class samson.SBIARadianPerSecond3(*args, **kwargs)` Bases: Overloaded function. 1. SBIARadianPerSecond3() -> samson.SBPhysicalIAVector3 Angular velocity interval vector 2. SBIARadianPerSecond3(value: float) -> samson.SBPhysicalIAVector3 Angular velocity interval vector 3. SBIARadianPerSecond3(x: float, y: float, z: float) -> samson.SBPhysicalIAVector3 Angular velocity interval vector 4. SBIARadianPerSecond3(xl: float, xu: float, yl: float, yu: float, zl: float, zu: float) -> samson.SBPhysicalIAVector3 Angular velocity interval vector 5. SBIARadianPerSecond3(x: list[float], y: list[float], z: list[float]) -> samson.SBPhysicalIAVector3 Angular velocity interval vector 6. SBIARadianPerSecond3(vec: list[list[float]]) -> samson.SBPhysicalIAVector3 Angular velocity interval vector 7. SBIARadianPerSecond3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Angular velocity interval vector 8. SBIARadianPerSecond3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Angular velocity interval vector 9. SBIARadianPerSecond3(xl: samson.SBQuantity.unitsSI, xu: samson.SBQuantity.unitsSI, yl: samson.SBQuantity.unitsSI, yu: samson.SBQuantity.unitsSI, zl: samson.SBQuantity.unitsSI, zu: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Angular velocity interval vector 10. SBIARadianPerSecond3(x: list[samson.SBQuantity.unitsSI], y: list[samson.SBQuantity.unitsSI], z: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalIAVector3 Angular velocity interval vector 11. SBIARadianPerSecond3(vector3x2: list[list[samson.SBQuantity.unitsSI]]) -> samson.SBPhysicalIAVector3 Angular velocity interval vector 12. SBIARadianPerSecond3(v: samson.SBPhysicalVector3) -> samson.SBPhysicalIAVector3 Angular velocity interval vector 13. SBIARadianPerSecond3(x: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Angular velocity interval vector 14. SBIARadianPerSecond3(x: samson.SBPhysicalInterval, y: samson.SBPhysicalInterval, z: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Angular velocity interval vector --- # SBIAVelocity3 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/velocityInterval3.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalIAVector3ConvenienceConstructors/velocityInterval3.md ## API Reference #### Class `samson.SBIAVelocity3` Signature: `class samson.SBIAVelocity3(*args, **kwargs)` Bases: Overloaded function. 1. SBIAVelocity3() -> samson.SBPhysicalIAVector3 Velocity interval vector 2. SBIAVelocity3(value: float) -> samson.SBPhysicalIAVector3 Velocity interval vector 3. SBIAVelocity3(x: float, y: float, z: float) -> samson.SBPhysicalIAVector3 Velocity interval vector 4. SBIAVelocity3(xl: float, xu: float, yl: float, yu: float, zl: float, zu: float) -> samson.SBPhysicalIAVector3 Velocity interval vector 5. SBIAVelocity3(x: list[float], y: list[float], z: list[float]) -> samson.SBPhysicalIAVector3 Velocity interval vector 6. SBIAVelocity3(vec: list[list[float]]) -> samson.SBPhysicalIAVector3 Velocity interval vector 7. SBIAVelocity3(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Velocity interval vector 8. SBIAVelocity3(x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Velocity interval vector 9. SBIAVelocity3(xl: samson.SBQuantity.unitsSI, xu: samson.SBQuantity.unitsSI, yl: samson.SBQuantity.unitsSI, yu: samson.SBQuantity.unitsSI, zl: samson.SBQuantity.unitsSI, zu: samson.SBQuantity.unitsSI) -> samson.SBPhysicalIAVector3 Velocity interval vector 10. SBIAVelocity3(x: list[samson.SBQuantity.unitsSI], y: list[samson.SBQuantity.unitsSI], z: list[samson.SBQuantity.unitsSI]) -> samson.SBPhysicalIAVector3 Velocity interval vector 11. SBIAVelocity3(vector3x2: list[list[samson.SBQuantity.unitsSI]]) -> samson.SBPhysicalIAVector3 Velocity interval vector 12. SBIAVelocity3(v: samson.SBPhysicalVector3) -> samson.SBPhysicalIAVector3 Velocity interval vector 13. SBIAVelocity3(x: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Velocity interval vector 14. SBIAVelocity3(x: samson.SBPhysicalInterval, y: samson.SBPhysicalInterval, z: samson.SBPhysicalInterval) -> samson.SBPhysicalIAVector3 Velocity interval vector --- # SBPhysicalMatrix33 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalMatrix33.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalMatrix33.md This class represents a 3x3 physical matrix. In a physical matrix (e.g., an inertia tensor), all components have the same unit ([`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity)), so that physical matrices are defined by only one unit. ```python SBPhysicalMatrix33() # a dimensionless 3x3 matrix ``` There are multiple convenience constructors available for the commonly used physical vectors: - [SBMatrix33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md) - [`SBMatrix33`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33) - [SBInverseMass33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/inverseMass33.md) - [`SBInverseMass33`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/inverseMass33.md#samson.SBInverseMass33) - [SBInverseInertiaTensor33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/inverseMomentOfInertia33.md) - [`SBInverseInertiaTensor33`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/inverseMomentOfInertia33.md#samson.SBInverseInertiaTensor33) - [SBMass33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/mass33.md) - [`SBMass33`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/mass33.md#samson.SBMass33) - [SBInertiaTensor33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/momentOfInertia33.md) - [`SBInertiaTensor33`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/momentOfInertia33.md#samson.SBInertiaTensor33) These convenience constructors internally call `SBPhysicalMatrix33` with proper [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) and can be used as follows, without specifying the [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) unit: ```python SBMatrix33(1.0) # a dimensionless 3x3 matrix with all components equal to 1 ``` Dimensionless 3x3 matrices (`SBMatrix33`) are especially useful since they are used to represent 3D reference frames, rotation matrices, rigid-body transforms, etc ```python SBMatrix33(1) == SBPhysicalMatrix33(1) # True ``` !!! note "See also" SAMSON SDK: [SBDTypePhysicalMatrix33](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypePhysicalMatrix33/#) ## API Reference #### Class `samson.SBPhysicalMatrix33` Signature: `class samson.SBPhysicalMatrix33(*args, **kwargs)` Bases: `pybind11_object` This class represents 3x3 physical matrices. SAMSON API: [SBDTypePhysicalMatrix33](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypePhysicalMatrix33/#) Overloaded function. 1. __init__(self: samson.SBPhysicalMatrix33) -> None Constructs a physical matrix with all components set to zero. 2. __init__(self: samson.SBPhysicalMatrix33, d: samson.SBPhysicalVector3) -> None Constructs the diagonal physical matrix with diagonal [ d.v[0] d.v[1] d.v[2] ]. 3. __init__(self: samson.SBPhysicalMatrix33, c0: samson.SBPhysicalVector3, c1: samson.SBPhysicalVector3, c2: samson.SBPhysicalVector3) -> None Constructs the physical matrix with columns *c0*, *c1*, and *c2*. 4. __init__(self: samson.SBPhysicalMatrix33, mat: list[list[samson.SBQuantity.unitsSI]]) -> None Constructs the physical matrix from the quantity 2D array *mat*. 5. __init__(self: samson.SBPhysicalMatrix33, v: samson.SBQuantity.unitsSI) -> None Constructs the physical matrix with all components set to *v*. 6. __init__(self: samson.SBPhysicalMatrix33, m00: samson.SBQuantity.unitsSI, m01: samson.SBQuantity.unitsSI, m02: samson.SBQuantity.unitsSI, m10: samson.SBQuantity.unitsSI, m11: samson.SBQuantity.unitsSI, m12: samson.SBQuantity.unitsSI, m20: samson.SBQuantity.unitsSI, m21: samson.SBQuantity.unitsSI, m22: samson.SBQuantity.unitsSI) -> None Constructs the physical matrix from components m00, m01, m02, m10, m11, m12, m20, m21, and m22. 7. __init__(self: samson.SBPhysicalMatrix33, d: float) -> None Constructs the dimensionless physical matrix with all components set to *d*. 8. __init__(self: samson.SBPhysicalMatrix33, mat: list[list[float]]) -> None Constructs the dimensionless physical matrix from double 2D array *mat*. 9. __init__(self: samson.SBPhysicalMatrix33, m00: float, m01: float, m02: float, m10: float, m11: float, m12: float, m20: float, m21: float, m22: float) -> None Constructs the dimensionless physical matrix from components m00, m01, m02, m10, m11, m12, m20, m21, and m22. ##### Method `samson.SBPhysicalMatrix33.__add__` Signature: `__add__(self: samson.SBPhysicalMatrix33, arg0: samson.SBPhysicalMatrix33) -> samson.SBPhysicalMatrix33` ##### Method `samson.SBPhysicalMatrix33.__eq__` Signature: `__eq__(self: samson.SBPhysicalMatrix33, arg0: samson.SBPhysicalMatrix33) -> bool` ##### Method `samson.SBPhysicalMatrix33.__iadd__` Signature: `__iadd__(self: samson.SBPhysicalMatrix33, arg0: samson.SBPhysicalMatrix33) -> samson.SBPhysicalMatrix33` ##### Method `samson.SBPhysicalMatrix33.__imul__` Signature: `__imul__(*args, **kwargs)` Overloaded function. 1. __imul__(self: samson.SBPhysicalMatrix33, arg0: float) -> samson.SBPhysicalMatrix33 2. __imul__(self: samson.SBPhysicalMatrix33, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33 ##### Method `samson.SBPhysicalMatrix33.__isub__` Signature: `__isub__(self: samson.SBPhysicalMatrix33, arg0: samson.SBPhysicalMatrix33) -> samson.SBPhysicalMatrix33` ##### Method `samson.SBPhysicalMatrix33.__itruediv__` Signature: `__itruediv__(*args, **kwargs)` Overloaded function. 1. __itruediv__(self: samson.SBPhysicalMatrix33, arg0: float) -> samson.SBPhysicalMatrix33 2. __itruediv__(self: samson.SBPhysicalMatrix33, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33 ##### Method `samson.SBPhysicalMatrix33.__mul__` Signature: `__mul__(*args, **kwargs)` Overloaded function. 1. __mul__(self: samson.SBPhysicalMatrix33, arg0: float) -> samson.SBPhysicalMatrix33 2. __mul__(self: samson.SBPhysicalMatrix33, arg0: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3 3. __mul__(self: samson.SBPhysicalMatrix33, arg0: samson.SBPhysicalMatrix33) -> samson.SBPhysicalMatrix33 ##### Method `samson.SBPhysicalMatrix33.__ne__` Signature: `__ne__(self: samson.SBPhysicalMatrix33, arg0: samson.SBPhysicalMatrix33) -> bool` ##### Method `samson.SBPhysicalMatrix33.__neg__` Signature: `__neg__(self: samson.SBPhysicalMatrix33) -> samson.SBPhysicalMatrix33` ##### Method `samson.SBPhysicalMatrix33.__rmul__` Signature: `__rmul__(self: samson.SBPhysicalMatrix33, arg0: float) -> samson.SBPhysicalMatrix33` ##### Method `samson.SBPhysicalMatrix33.__sub__` Signature: `__sub__(self: samson.SBPhysicalMatrix33, arg0: samson.SBPhysicalMatrix33) -> samson.SBPhysicalMatrix33` ##### Method `samson.SBPhysicalMatrix33.__truediv__` Signature: `__truediv__(self: samson.SBPhysicalMatrix33, arg0: float) -> samson.SBPhysicalMatrix33` ##### Method `samson.SBPhysicalMatrix33.computeEulerDecompositionZYZ` Signature: `computeEulerDecompositionZYZ(self: samson.SBPhysicalMatrix33) -> list[samson.SBQuantity.unitsSI]` Computes a ZYZ Euler decomposition of this physical matrix. **Returns** - **phi** (*samson.SBQuantity*) – The first Z rotation angle.**theta** (*samson.SBQuantity*) – The Y rotation angle.**psi** (*samson.SBQuantity*) – The second Z rotation angle. ##### Method `samson.SBPhysicalMatrix33.cosphi` Signature: `cosphi(self: samson.SBPhysicalMatrix33) -> samson.SBQuantity.unitsSI` Returns the cosine of the rotation angle of this rotation matrix. This function assumes this physical matrix is a rotation matrix, and returns the cosine of the corresponding rotation angle. ##### Method `samson.SBPhysicalMatrix33.det` Signature: `det(self: samson.SBPhysicalMatrix33) -> samson.SBQuantity.unitsSI` Returns the determinant of this physical matrix. ##### Method `samson.SBPhysicalMatrix33.diagonalize` Signature: `diagonalize(self: samson.SBPhysicalMatrix33) -> object` Computes the eigenvalues *ev* and the eigenvectors *p* of this physical matrix. **Returns** - The tuple of eigenvalues and eigenvectors. **Return type** - Tuple([samson.SBVector3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md#samson.SBVector3), [samson.SBMatrix33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) ##### Method `samson.SBPhysicalMatrix33.fromAlignment` Signature: `static fromAlignment(vectorFrom: samson.SBPhysicalVector3, vectorTo: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33` Returns the dimensionless physical matrix that transforms vector *vectorFrom* into vector *vectorTo*. Precisely, left-multiplying vector *vectorFrom* by the resulting matrix produces vector *vectorTo*. ##### Method `samson.SBPhysicalMatrix33.fromAxisAngle` Signature: `static fromAxisAngle(axis: samson.SBPhysicalVector3, angle: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33` Returns the dimensionless physical matrix corresponding to rotation axis and rotation angle (in radians). ##### Method `samson.SBPhysicalMatrix33.fromAxisAnglePi` Signature: `static fromAxisAnglePi(axis: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33` Returns the dimensionless physical matrix corresponding to rotation axis axis and a rotation angle equal to Pi. ##### Method `samson.SBPhysicalMatrix33.fromQuaternion` Signature: `static fromQuaternion(w: samson.SBQuantity.unitsSI, x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33` Returns the dimensionless physical matrix corresponding to quaternion [ w x y z ] ##### Method `samson.SBPhysicalMatrix33.getColumn` Signature: `getColumn(self: samson.SBPhysicalMatrix33, i: int) -> samson.SBPhysicalVector3` Returns the i-th column of this physical matrix ##### Method `samson.SBPhysicalMatrix33.getE1` Signature: `getE1(self: samson.SBPhysicalMatrix33) -> samson.SBPhysicalVector3` Returns the first column of this physical matrix ##### Method `samson.SBPhysicalMatrix33.getE2` Signature: `getE2(self: samson.SBPhysicalMatrix33) -> samson.SBPhysicalVector3` Returns the second column of this physical matrix ##### Method `samson.SBPhysicalMatrix33.getE3` Signature: `getE3(self: samson.SBPhysicalMatrix33) -> samson.SBPhysicalVector3` Returns the third column of this physical matrix ##### Method `samson.SBPhysicalMatrix33.getRow` Signature: `getRow(self: samson.SBPhysicalMatrix33, i: int) -> samson.SBPhysicalVector3` Returns the i-th row of this physical matrix ##### Method `samson.SBPhysicalMatrix33.identity` Signature: `static identity() -> samson.SBPhysicalMatrix33` Returns an identity physical matrix ##### Method `samson.SBPhysicalMatrix33.inverse` Signature: `inverse(self: samson.SBPhysicalMatrix33) -> samson.SBPhysicalMatrix33` Returns the inverse of this physical matrix. This function assumes the physical matrix is invertible and returns its inverse. ##### Method `samson.SBPhysicalMatrix33.makeEulerRotationZYZ` Signature: `makeEulerRotationZYZ(self: samson.SBPhysicalMatrix33, phi: samson.SBQuantity.unitsSI, theta: samson.SBQuantity.unitsSI, psi: samson.SBQuantity.unitsSI) -> None` This function sets this physical matrix from ZYZ Euler angles *phi*, *theta*, and *psi*. **Parameters** - **phi** (*samson.SBQuantity*) – The first Z rotation angle. - **theta** (*samson.SBQuantity*) – The Y rotation angle. - **psi** (*samson.SBQuantity*) – The second Z rotation angle. ##### Method `samson.SBPhysicalMatrix33.norm` Signature: `norm(self: samson.SBPhysicalMatrix33) -> samson.SBQuantity.unitsSI` Returns the 2-norm of this physical matrix. ##### Method `samson.SBPhysicalMatrix33.orthonormalize` Signature: `orthonormalize(self: samson.SBPhysicalMatrix33) -> None` Orthonormalizes this dimensionless physical matrix ##### Method `samson.SBPhysicalMatrix33.quasiStaticUpdate` Signature: `quasiStaticUpdate(self: samson.SBPhysicalMatrix33, wx: samson.SBQuantity.unitsSI, wy: samson.SBQuantity.unitsSI, wz: samson.SBQuantity.unitsSI) -> object` Performs a quasi-static update of this dimensionless physical matrix using the rotation vector [ wx wy wz ]. **Parameters** - **wx** (*samson.SBQuantity*) – The first component of the rotation vector. - **wy** (*samson.SBQuantity*) – The second component of the rotation vector. - **wz** (*samson.SBQuantity*) – The third component of the rotation vector. **Returns** - rotAngle - the rotation angle, rotAxis - the rotation axis, rotA - the rotation axis, rotB - the rotation axis, rotC - the rotation axis. **Return type** - Tuple(samson.SBQuantity, [samson.SBVector3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md#samson.SBVector3), [samson.SBMatrix33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33), [samson.SBMatrix33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33), [samson.SBMatrix33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) ##### Method `samson.SBPhysicalMatrix33.revoluteJointZAxisMatrix` Signature: `revoluteJointZAxisMatrix(self: samson.SBPhysicalMatrix33, axis: samson.SBPhysicalVector3) -> None` Sets this physical matrix to an orthonormal matrix whose third column is axis ##### Method `samson.SBPhysicalMatrix33.setE1` Signature: `setE1(self: samson.SBPhysicalMatrix33, v: samson.SBPhysicalVector3) -> None` Sets the first column of this physical matrix ##### Method `samson.SBPhysicalMatrix33.setE2` Signature: `setE2(self: samson.SBPhysicalMatrix33, v: samson.SBPhysicalVector3) -> None` Sets the second column of this physical matrix ##### Method `samson.SBPhysicalMatrix33.setE3` Signature: `setE3(self: samson.SBPhysicalMatrix33, v: samson.SBPhysicalVector3) -> None` Sets the third column of this physical matrix ##### Method `samson.SBPhysicalMatrix33.setIdentity` Signature: `setIdentity(self: samson.SBPhysicalMatrix33) -> None` Sets this physical matrix to the identity matrix. ##### Method `samson.SBPhysicalMatrix33.setZero` Signature: `setZero(self: samson.SBPhysicalMatrix33) -> None` Sets this physical matrix to zero. ##### Method `samson.SBPhysicalMatrix33.str` Signature: `str(self: samson.SBPhysicalMatrix33, fullName: bool = False) -> str` Converts the matrix to a string with a full unit name when *fullName* is *True*. ##### Method `samson.SBPhysicalMatrix33.swapColumns` Signature: `swapColumns(self: samson.SBPhysicalMatrix33, i: int, j: int) -> None` Swaps columns *i* and *j*. ##### Method `samson.SBPhysicalMatrix33.swapRows` Signature: `swapRows(self: samson.SBPhysicalMatrix33, i: int, j: int) -> None` Swaps rows *i* and *j*. ##### Method `samson.SBPhysicalMatrix33.toQuaternion` Signature: `toQuaternion(self: samson.SBPhysicalMatrix33) -> list[samson.SBQuantity.unitsSI]` Computes the quaternion [ w x y z ] corresponding to this physical matrix ##### Method `samson.SBPhysicalMatrix33.toRotationVector` Signature: `toRotationVector(self: samson.SBPhysicalMatrix33) -> samson.SBPhysicalVector3` Computes the rotation vector corresponding to this dimensionless physical matrix ##### Method `samson.SBPhysicalMatrix33.trace` Signature: `trace(self: samson.SBPhysicalMatrix33) -> samson.SBQuantity.unitsSI` Returns the trace m[0][0] + m[1][1] + m[2][2] of this physical matrix. ##### Method `samson.SBPhysicalMatrix33.transpose` Signature: `transpose(self: samson.SBPhysicalMatrix33) -> samson.SBPhysicalMatrix33` Returns the transpose of this physical matrix. ##### Property `samson.SBPhysicalMatrix33.isDimensionless` Signature: `property isDimensionless` Returns *True* if the matrix is dimensionless ##### Property `samson.SBPhysicalMatrix33.value` Signature: `property value` Returns matrix coefficients as a nested Python list. --- # SBMatrix33 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md ## API Reference #### Class `samson.SBMatrix33` Signature: `class samson.SBMatrix33(*args, **kwargs)` Bases: Overloaded function. 1. SBMatrix33() -> samson.SBPhysicalMatrix33 Dimensionless 3x3 matrix 2. SBMatrix33(value: float) -> samson.SBPhysicalMatrix33 Dimensionless 3x3 matrix 3. SBMatrix33(m00: float, m01: float, m02: float, m10: float, m11: float, m12: float, m20: float, m21: float, m22: float) -> samson.SBPhysicalMatrix33 Dimensionless 3x3 matrix 4. SBMatrix33(matrix3x3: list[list[float]]) -> samson.SBPhysicalMatrix33 Dimensionless 3x3 matrix 5. SBMatrix33(vector: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33 Dimensionless 3x3 matrix 6. SBMatrix33(c0: samson.SBPhysicalVector3, c1: samson.SBPhysicalVector3, c2: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33 Dimensionless 3x3 matrix 7. SBMatrix33(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33 Dimensionless 3x3 matrix 8. SBMatrix33(m00: samson.SBQuantity.unitsSI, m01: samson.SBQuantity.unitsSI, m02: samson.SBQuantity.unitsSI, m10: samson.SBQuantity.unitsSI, m11: samson.SBQuantity.unitsSI, m12: samson.SBQuantity.unitsSI, m20: samson.SBQuantity.unitsSI, m21: samson.SBQuantity.unitsSI, m22: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33 Dimensionless 3x3 matrix --- # SBInverseMass33 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/inverseMass33.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/inverseMass33.md ## API Reference #### Class `samson.SBInverseMass33` Signature: `class samson.SBInverseMass33(*args, **kwargs)` Bases: Overloaded function. 1. SBInverseMass33() -> samson.SBPhysicalMatrix33 Inverse mass 3x3 matrix 2. SBInverseMass33(value: float) -> samson.SBPhysicalMatrix33 Inverse mass 3x3 matrix 3. SBInverseMass33(m00: float, m01: float, m02: float, m10: float, m11: float, m12: float, m20: float, m21: float, m22: float) -> samson.SBPhysicalMatrix33 Inverse mass 3x3 matrix 4. SBInverseMass33(matrix3x3: list[list[float]]) -> samson.SBPhysicalMatrix33 Inverse mass 3x3 matrix 5. SBInverseMass33(vector: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33 Inverse mass 3x3 matrix 6. SBInverseMass33(c0: samson.SBPhysicalVector3, c1: samson.SBPhysicalVector3, c2: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33 Inverse mass 3x3 matrix 7. SBInverseMass33(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33 Inverse mass 3x3 matrix 8. SBInverseMass33(m00: samson.SBQuantity.unitsSI, m01: samson.SBQuantity.unitsSI, m02: samson.SBQuantity.unitsSI, m10: samson.SBQuantity.unitsSI, m11: samson.SBQuantity.unitsSI, m12: samson.SBQuantity.unitsSI, m20: samson.SBQuantity.unitsSI, m21: samson.SBQuantity.unitsSI, m22: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33 Inverse mass 3x3 matrix --- # SBInverseInertiaTensor33 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/inverseMomentOfInertia33.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/inverseMomentOfInertia33.md ## API Reference #### Class `samson.SBInverseInertiaTensor33` Signature: `class samson.SBInverseInertiaTensor33(*args, **kwargs)` Bases: Overloaded function. 1. SBInverseInertiaTensor33() -> samson.SBPhysicalMatrix33 Inverse inertia 3x3 tensor 2. SBInverseInertiaTensor33(value: float) -> samson.SBPhysicalMatrix33 Inverse inertia 3x3 tensor 3. SBInverseInertiaTensor33(m00: float, m01: float, m02: float, m10: float, m11: float, m12: float, m20: float, m21: float, m22: float) -> samson.SBPhysicalMatrix33 Inverse inertia 3x3 tensor 4. SBInverseInertiaTensor33(matrix3x3: list[list[float]]) -> samson.SBPhysicalMatrix33 Inverse inertia 3x3 tensor 5. SBInverseInertiaTensor33(vector: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33 Inverse inertia 3x3 tensor 6. SBInverseInertiaTensor33(c0: samson.SBPhysicalVector3, c1: samson.SBPhysicalVector3, c2: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33 Inverse inertia 3x3 tensor 7. SBInverseInertiaTensor33(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33 Inverse inertia 3x3 tensor 8. SBInverseInertiaTensor33(m00: samson.SBQuantity.unitsSI, m01: samson.SBQuantity.unitsSI, m02: samson.SBQuantity.unitsSI, m10: samson.SBQuantity.unitsSI, m11: samson.SBQuantity.unitsSI, m12: samson.SBQuantity.unitsSI, m20: samson.SBQuantity.unitsSI, m21: samson.SBQuantity.unitsSI, m22: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33 Inverse inertia 3x3 tensor --- # SBMass33 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/mass33.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/mass33.md ## API Reference #### Class `samson.SBMass33` Signature: `class samson.SBMass33(*args, **kwargs)` Bases: Overloaded function. 1. SBMass33() -> samson.SBPhysicalMatrix33 Mass 3x3 matrix 2. SBMass33(value: float) -> samson.SBPhysicalMatrix33 Mass 3x3 matrix 3. SBMass33(m00: float, m01: float, m02: float, m10: float, m11: float, m12: float, m20: float, m21: float, m22: float) -> samson.SBPhysicalMatrix33 Mass 3x3 matrix 4. SBMass33(matrix3x3: list[list[float]]) -> samson.SBPhysicalMatrix33 Mass 3x3 matrix 5. SBMass33(vector: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33 Mass 3x3 matrix 6. SBMass33(c0: samson.SBPhysicalVector3, c1: samson.SBPhysicalVector3, c2: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33 Mass 3x3 matrix 7. SBMass33(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33 Mass 3x3 matrix 8. SBMass33(m00: samson.SBQuantity.unitsSI, m01: samson.SBQuantity.unitsSI, m02: samson.SBQuantity.unitsSI, m10: samson.SBQuantity.unitsSI, m11: samson.SBQuantity.unitsSI, m12: samson.SBQuantity.unitsSI, m20: samson.SBQuantity.unitsSI, m21: samson.SBQuantity.unitsSI, m22: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33 Mass 3x3 matrix --- # SBInertiaTensor33 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/momentOfInertia33.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/momentOfInertia33.md ## API Reference #### Class `samson.SBInertiaTensor33` Signature: `class samson.SBInertiaTensor33(*args, **kwargs)` Bases: Overloaded function. 1. SBInertiaTensor33() -> samson.SBPhysicalMatrix33 Inertia 3x3 tensor 2. SBInertiaTensor33(value: float) -> samson.SBPhysicalMatrix33 Inertia 3x3 tensor 3. SBInertiaTensor33(m00: float, m01: float, m02: float, m10: float, m11: float, m12: float, m20: float, m21: float, m22: float) -> samson.SBPhysicalMatrix33 Inertia 3x3 tensor 4. SBInertiaTensor33(matrix3x3: list[list[float]]) -> samson.SBPhysicalMatrix33 Inertia 3x3 tensor 5. SBInertiaTensor33(vector: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33 Inertia 3x3 tensor 6. SBInertiaTensor33(c0: samson.SBPhysicalVector3, c1: samson.SBPhysicalVector3, c2: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33 Inertia 3x3 tensor 7. SBInertiaTensor33(value: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33 Inertia 3x3 tensor 8. SBInertiaTensor33(m00: samson.SBQuantity.unitsSI, m01: samson.SBQuantity.unitsSI, m02: samson.SBQuantity.unitsSI, m10: samson.SBQuantity.unitsSI, m11: samson.SBQuantity.unitsSI, m12: samson.SBQuantity.unitsSI, m20: samson.SBQuantity.unitsSI, m21: samson.SBQuantity.unitsSI, m22: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix33 Inertia 3x3 tensor --- # SBPhysicalMatrix66 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalMatrix66.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBPhysicalMatrix66.md This class represents a spatial matrix, a 6x6 matrix typically used to describe rigid or articulated inertias and inverse inertias. In a spatial matrix (e.g., an inertia matrix), the 3x3 blocks may have different units, so that spatial matrices are defined by four units, and the SBDTypePhysicalMatrix66 template class is parameterized by four unit types ([`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity)). ```python SBPhysicalMatrix66() # a dimensionless 6x6 matrix SBPhysicalMatrix66(SBMatrix33(), SBMass33(), SBMatrix33(), SBMass33()) ``` - [SBMatrix66](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/dimensionless66.md) - [`SBMatrix66`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/dimensionless66.md#samson.SBMatrix66) - [SBInertia66](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/inertia66.md) - [`SBInertia66`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/inertia66.md#samson.SBInertia66) - [SBInverseInertia66](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/inverseInertia66.md) - [`SBInverseInertia66`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/inverseInertia66.md#samson.SBInverseInertia66) These convenience constructors internally call `SBPhysicalMatrix66` with proper [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) and can be used as follows, without specifying the [`SBQuantity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md#module-samson.SBQuantity) unit: ```python SBMatrix66() # a dimensionless 6x6 matrix with zeros as components ``` !!! note "See also" SAMSON SDK: [SBDTypePhysicalMatrix66](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypePhysicalMatrix66/#) ## API Reference #### Class `samson.SBPhysicalMatrix66` Signature: `class samson.SBPhysicalMatrix66(*args, **kwargs)` Bases: `pybind11_object` This class represents spatial matrices. SAMSON API: [SBDTypePhysicalMatrix66](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypePhysicalMatrix66/#) Overloaded function. 1. __init__(self: samson.SBPhysicalMatrix66) -> None The default constructor initializes all components to zero. 2. __init__(self: samson.SBPhysicalMatrix66, mat00: samson.SBPhysicalMatrix33, mat01: samson.SBPhysicalMatrix33, mat10: samson.SBPhysicalMatrix33, mat11: samson.SBPhysicalMatrix33) -> None Constructs a spatial matrix from four 3x3 matrices. **Parameters** - **mat00** ([*samson.SBMatrix33*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) – The top left 3x3 block. - **mat01** ([*samson.SBMatrix33*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) – The top right 3x3 block. - **mat10** ([*samson.SBMatrix33*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) – The bottom left 3x3 block. - **mat11** ([*samson.SBMatrix33*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) – The bottom right 3x3 block. ##### Method `samson.SBPhysicalMatrix66.__add__` Signature: `__add__(self: samson.SBPhysicalMatrix66, arg0: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` ##### Method `samson.SBPhysicalMatrix66.__eq__` Signature: `__eq__(self: samson.SBPhysicalMatrix66, arg0: samson.SBPhysicalMatrix66) -> bool` ##### Method `samson.SBPhysicalMatrix66.__iadd__` Signature: `__iadd__(self: samson.SBPhysicalMatrix66, arg0: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` ##### Method `samson.SBPhysicalMatrix66.__imul__` Signature: `__imul__(*args, **kwargs)` Overloaded function. 1. __imul__(self: samson.SBPhysicalMatrix66, arg0: float) -> samson.SBPhysicalMatrix66 2. __imul__(self: samson.SBPhysicalMatrix66, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix66 ##### Method `samson.SBPhysicalMatrix66.__isub__` Signature: `__isub__(self: samson.SBPhysicalMatrix66, arg0: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` ##### Method `samson.SBPhysicalMatrix66.__itruediv__` Signature: `__itruediv__(*args, **kwargs)` Overloaded function. 1. __itruediv__(self: samson.SBPhysicalMatrix66, arg0: float) -> samson.SBPhysicalMatrix66 2. __itruediv__(self: samson.SBPhysicalMatrix66, arg0: samson.SBQuantity.unitsSI) -> samson.SBPhysicalMatrix66 ##### Method `samson.SBPhysicalMatrix66.__mul__` Signature: `__mul__(*args, **kwargs)` Overloaded function. 1. __mul__(self: samson.SBPhysicalMatrix66, arg0: float) -> samson.SBPhysicalMatrix66 2. __mul__(self: samson.SBPhysicalMatrix66, arg0: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6 ##### Method `samson.SBPhysicalMatrix66.__ne__` Signature: `__ne__(self: samson.SBPhysicalMatrix66, arg0: samson.SBPhysicalMatrix66) -> bool` ##### Method `samson.SBPhysicalMatrix66.__neg__` Signature: `__neg__(self: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` ##### Method `samson.SBPhysicalMatrix66.__rmul__` Signature: `__rmul__(self: samson.SBPhysicalMatrix66, arg0: float) -> samson.SBPhysicalMatrix66` ##### Method `samson.SBPhysicalMatrix66.__sub__` Signature: `__sub__(self: samson.SBPhysicalMatrix66, arg0: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` ##### Method `samson.SBPhysicalMatrix66.__truediv__` Signature: `__truediv__(self: samson.SBPhysicalMatrix66, arg0: float) -> samson.SBPhysicalMatrix66` ##### Method `samson.SBPhysicalMatrix66.doubleSymmetricPart` Signature: `doubleSymmetricPart(self: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` Returns twice the symmetric part of the matrix ##### Method `samson.SBPhysicalMatrix66.getColumn` Signature: `getColumn(self: samson.SBPhysicalMatrix66, i: int) -> samson.SBPhysicalVector6` Returns the i-th column of this spatial matrix ##### Method `samson.SBPhysicalMatrix66.getE1` Signature: `getE1(self: samson.SBPhysicalMatrix66) -> samson.SBPhysicalVector6` Returns the first column of the spatial matrix ##### Method `samson.SBPhysicalMatrix66.getE2` Signature: `getE2(self: samson.SBPhysicalMatrix66) -> samson.SBPhysicalVector6` Returns the second column of the spatial matrix ##### Method `samson.SBPhysicalMatrix66.getE3` Signature: `getE3(self: samson.SBPhysicalMatrix66) -> samson.SBPhysicalVector6` Returns the third column of the spatial matrix ##### Method `samson.SBPhysicalMatrix66.getE4` Signature: `getE4(self: samson.SBPhysicalMatrix66) -> samson.SBPhysicalVector6` Returns the fourth column of the spatial matrix ##### Method `samson.SBPhysicalMatrix66.getE5` Signature: `getE5(self: samson.SBPhysicalMatrix66) -> samson.SBPhysicalVector6` Returns the fifth column of the spatial matrix ##### Method `samson.SBPhysicalMatrix66.getE6` Signature: `getE6(self: samson.SBPhysicalMatrix66) -> samson.SBPhysicalVector6` Returns the sixth column of the spatial matrix ##### Method `samson.SBPhysicalMatrix66.getRow` Signature: `getRow(self: samson.SBPhysicalMatrix66, i: int) -> samson.SBPhysicalVector6` Returns the i-th row of this spatial matrix ##### Method `samson.SBPhysicalMatrix66.setIdentity` Signature: `setIdentity(self: samson.SBPhysicalMatrix66) -> None` Sets the spatial matrix to the identity matrix ##### Method `samson.SBPhysicalMatrix66.setZero` Signature: `setZero(self: samson.SBPhysicalMatrix66) -> None` Sets the spatial matrix to zero ##### Method `samson.SBPhysicalMatrix66.str` Signature: `str(self: samson.SBPhysicalMatrix66, fullName: bool = False) -> str` Converts the spatial matrix to a string (with a full unit name when *fullName* is *True*.) ##### Method `samson.SBPhysicalMatrix66.symmetrize` Signature: `symmetrize(self: samson.SBPhysicalMatrix66) -> None` Makes the matrix symmetric ##### Method `samson.SBPhysicalMatrix66.transpose` Signature: `transpose(self: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` Returns the transpose of this spatial matrix ##### Property `samson.SBPhysicalMatrix66.isDimensionless` Signature: `property isDimensionless` Returns *True* if the spatial matrix is dimensionless ##### Property `samson.SBPhysicalMatrix66.value` Signature: `property value` Returns matrix coefficients as a nested Python list. --- # SBMatrix66 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/dimensionless66.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/dimensionless66.md ## API Reference #### Class `samson.SBMatrix66` Signature: `class samson.SBMatrix66(*args, **kwargs)` Bases: Overloaded function. 1. SBMatrix66() -> samson.SBPhysicalMatrix66 Dimensionless spatial matrix 2. SBMatrix66(mat00: samson.SBPhysicalMatrix33, mat01: samson.SBPhysicalMatrix33, mat10: samson.SBPhysicalMatrix33, mat11: samson.SBPhysicalMatrix33) -> samson.SBPhysicalMatrix66 Dimensionless spatial matrix --- # SBInertia66 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/inertia66.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/inertia66.md ## API Reference #### Class `samson.SBInertia66` Signature: `class samson.SBInertia66(*args, **kwargs)` Bases: Overloaded function. 1. SBInertia66() -> samson.SBPhysicalMatrix66 Spatial inertia 2. SBInertia66(mat00: samson.SBPhysicalMatrix33, mat01: samson.SBPhysicalMatrix33, mat10: samson.SBPhysicalMatrix33, mat11: samson.SBPhysicalMatrix33) -> samson.SBPhysicalMatrix66 Spatial inertia --- # SBInverseInertia66 Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/inverseInertia66.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix66ConvenienceConstructors/inverseInertia66.md ## API Reference #### Class `samson.SBInverseInertia66` Signature: `class samson.SBInverseInertia66(*args, **kwargs)` Bases: Overloaded function. 1. SBInverseInertia66() -> samson.SBPhysicalMatrix66 Spatial inverse inertia 2. SBInverseInertia66(mat00: samson.SBPhysicalMatrix33, mat01: samson.SBPhysicalMatrix33, mat10: samson.SBPhysicalMatrix33, mat11: samson.SBPhysicalMatrix33) -> samson.SBPhysicalMatrix66 Spatial inverse inertia --- # SBSpatialDomain Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialDomain.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialDomain.md This class describes a spatial domain. ```python # Constructs an identity domain SBSpatialDomain() # Constructs a domain from a identity spatial transform and a half size SBSpatialDomain(SBSpatialTransform.identity(), SBPosition3(1, 2, 3)) ``` !!! note "See also" SAMSON SDK: [SBDTypeSpatialDomain](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypeSpatialDomain/#) ## API Reference #### Class `samson.SBSpatialDomain` Signature: `class samson.SBSpatialDomain(*args, **kwargs)` Bases: `pybind11_object` This class describes spatial domains. SAMSON API: [SBDTypeSpatialDomain](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypeSpatialDomain/#) Overloaded function. 1. __init__(self: samson.SBSpatialDomain) -> None Constructs an identity domain. 2. __init__(self: samson.SBSpatialDomain, transform: samson.SBSpatialTransform, halfSize: samson.SBPhysicalVector3) -> None “Constructs a domain from a spatial transform and a half size. **Parameters** - **transform** ([*samson.SBSpatialTransform*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialTransform.md#samson.SBSpatialTransform)) – A spatial transform. - **halfSize** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – A half size. ##### Method `samson.SBSpatialDomain.__eq__` Signature: `__eq__(self: samson.SBSpatialDomain, arg0: samson.SBSpatialDomain) -> bool` ##### Method `samson.SBSpatialDomain.__ne__` Signature: `__ne__(self: samson.SBSpatialDomain, arg0: samson.SBSpatialDomain) -> bool` ##### Method `samson.SBSpatialDomain.setEmpty` Signature: `setEmpty(self: samson.SBSpatialDomain) -> None` Sets this domain to the empty domain. ##### Method `samson.SBSpatialDomain.str` Signature: `str(self: samson.SBSpatialDomain, fullName: bool = False) -> str` Converts the spatial domain to a string (with a full unit name when *fullName* is *True*.) ##### Property `samson.SBSpatialDomain.halfSize` Signature: `property halfSize` The half-size vector of the domain. ##### Property `samson.SBSpatialDomain.transform` Signature: `property transform` The spatial transform of the domain. --- # SBSpatialTransform Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialTransform.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialTransform.md This class represents a spatial transform. ```python # Constructs an identity transform SBSpatialTransform() # Constructs a transform from an orientation matrix, a position vector and a scale SBSpatialTransform(SBMatrix33(1), SBPosition3(1,2,3), SBVector3(2)) ``` !!! note "See also" SAMSON SDK: [SBDTypeSpatialTransform](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypeSpatialTransform/#) ## API Reference #### Class `samson.SBSpatialTransform` Signature: `class samson.SBSpatialTransform(*args, **kwargs)` Bases: `pybind11_object` This class represents spatial transforms. SAMSON API: [SBDTypeSpatialTransform](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypeSpatialTransform/#) Overloaded function. 1. __init__(self: samson.SBSpatialTransform) -> None Constructs an identity transform. 2. __init__(self: samson.SBSpatialTransform, orientation: samson.SBPhysicalMatrix33, position: samson.SBPhysicalVector3) -> None “Constructs a transform from an orientation matrix and a position vector. **Parameters** - **orientationMatrix** ([*samson.SBMatrix33*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) – The orientation matrix. - **positionVector** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – The position vector. 3. __init__(self: samson.SBSpatialTransform, orientation: samson.SBPhysicalMatrix33, position: samson.SBPhysicalVector3, scale: samson.SBPhysicalVector3) -> None “Constructs a transform from an orientation matrix, a position vector, and a scale vector. **Parameters** - **orientationMatrix** ([*samson.SBMatrix33*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) – The orientation matrix. - **positionVector** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – The position vector. - **scaleVector** ([*samson.SBVector3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md#samson.SBVector3)) – The scale vector. ##### Method `samson.SBSpatialTransform.__eq__` Signature: `__eq__(self: samson.SBSpatialTransform, arg0: samson.SBSpatialTransform) -> bool` ##### Method `samson.SBSpatialTransform.__mul__` Signature: `__mul__(*args, **kwargs)` Overloaded function. 1. __mul__(self: samson.SBSpatialTransform, arg0: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3 2. __mul__(self: samson.SBSpatialTransform, arg0: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6 3. __mul__(self: samson.SBSpatialTransform, arg0: samson.SBSpatialTransform) -> samson.SBSpatialTransform ##### Method `samson.SBSpatialTransform.__ne__` Signature: `__ne__(self: samson.SBSpatialTransform, arg0: samson.SBSpatialTransform) -> bool` ##### Method `samson.SBSpatialTransform.getE1` Signature: `getE1(self: samson.SBSpatialTransform) -> samson.SBPhysicalVector3` Returns the first column of the orientation matrix ##### Method `samson.SBSpatialTransform.getE2` Signature: `getE2(self: samson.SBSpatialTransform) -> samson.SBPhysicalVector3` Returns the second column of the orientation matrix ##### Method `samson.SBSpatialTransform.getE3` Signature: `getE3(self: samson.SBSpatialTransform) -> samson.SBPhysicalVector3` Returns the third column of the orientation matrix ##### Method `samson.SBSpatialTransform.getE4` Signature: `getE4(self: samson.SBSpatialTransform) -> samson.SBPhysicalVector3` Returns the position vector ##### Method `samson.SBSpatialTransform.getE5` Signature: `getE5(self: samson.SBSpatialTransform) -> samson.SBPhysicalVector3` Returns the scale vector ##### Method `samson.SBSpatialTransform.getOrientation` Signature: `getOrientation(self: samson.SBSpatialTransform) -> samson.SBPhysicalMatrix33` Returns the orientation of the spatial transform ##### Method `samson.SBSpatialTransform.getPosition` Signature: `getPosition(self: samson.SBSpatialTransform) -> samson.SBPhysicalVector3` Returns the position of the spatial transform ##### Method `samson.SBSpatialTransform.getScale` Signature: `getScale(self: samson.SBSpatialTransform) -> samson.SBPhysicalVector3` Returns the scale of the spatial transform ##### Method `samson.SBSpatialTransform.identity` Signature: `static identity() -> samson.SBSpatialTransform` Returns the identity spatial transform. ##### Method `samson.SBSpatialTransform.inverse` Signature: `inverse(self: samson.SBSpatialTransform) -> samson.SBSpatialTransform` Returns the inverse of this transform. ##### Method `samson.SBSpatialTransform.inverseTransformAcceleration` Signature: `inverseTransformAcceleration(self: samson.SBSpatialTransform, sv: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6` Returns the result of the transformation of the spatial velocity *sv* by applying the inverse of this transform ##### Method `samson.SBSpatialTransform.inverseTransformVelocity` Signature: `inverseTransformVelocity(self: samson.SBSpatialTransform, sa: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6` Returns the result of the transformation of the spatial acceleration *sa* by applying the inverse of this transform ##### Method `samson.SBSpatialTransform.rightMultiply3D` Signature: `rightMultiply3D(self: samson.SBSpatialTransform, leftMember: samson.SBSpatialTransform) -> samson.SBSpatialTransform` Returns the product of *leftMember* and this transform. ##### Method `samson.SBSpatialTransform.rightMultiplyInverse3D` Signature: `rightMultiplyInverse3D(self: samson.SBSpatialTransform, leftMember: samson.SBSpatialTransform) -> samson.SBSpatialTransform` Returns the product of *leftMember* and the inverse of this transform. ##### Method `samson.SBSpatialTransform.setE1` Signature: `setE1(self: samson.SBSpatialTransform, vec: samson.SBPhysicalVector3) -> None` Sets the first column of the orientation matrix ##### Method `samson.SBSpatialTransform.setE2` Signature: `setE2(self: samson.SBSpatialTransform, vec: samson.SBPhysicalVector3) -> None` Sets the second column of the orientation matrix ##### Method `samson.SBSpatialTransform.setE3` Signature: `setE3(self: samson.SBSpatialTransform, vec: samson.SBPhysicalVector3) -> None` Sets the third column of the orientation matrix ##### Method `samson.SBSpatialTransform.setE4` Signature: `setE4(self: samson.SBSpatialTransform, vec: samson.SBPhysicalVector3) -> None` Sets the position vector ##### Method `samson.SBSpatialTransform.setE5` Signature: `setE5(self: samson.SBSpatialTransform, vec: samson.SBPhysicalVector3) -> None` Sets the scale vector ##### Method `samson.SBSpatialTransform.setIdentity` Signature: `setIdentity(self: samson.SBSpatialTransform) -> None` Sets this transform to identity. ##### Method `samson.SBSpatialTransform.setOrientation` Signature: `setOrientation(self: samson.SBSpatialTransform, orientationMatrix: samson.SBPhysicalMatrix33) -> None` Sets the orientation of the spatial transform ##### Method `samson.SBSpatialTransform.setPosition` Signature: `setPosition(self: samson.SBSpatialTransform, positionVector: samson.SBPhysicalVector3) -> None` Sets the position of the spatial transform ##### Method `samson.SBSpatialTransform.setScale` Signature: `setScale(self: samson.SBSpatialTransform, scaleVector: samson.SBPhysicalVector3) -> None` Sets the scale of the spatial transform ##### Method `samson.SBSpatialTransform.str` Signature: `str(self: samson.SBSpatialTransform, fullName: bool = False) -> str` Converts the spatial transform to a string with a full unit name when *fullName* is *True*. ##### Method `samson.SBSpatialTransform.transformAcceleration` Signature: `transformAcceleration(self: samson.SBSpatialTransform, sa: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6` Returns the result of the transformation of the spatial acceleration *sa* ##### Method `samson.SBSpatialTransform.transformForce` Signature: `transformForce(self: samson.SBSpatialTransform, sf: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6` Returns the result of the transformation of the spatial force *sf* ##### Method `samson.SBSpatialTransform.transformInertia` Signature: `transformInertia(self: samson.SBSpatialTransform, I: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` Returns the result of the transformation of the inertia *I* ##### Method `samson.SBSpatialTransform.transformInertiaLeft` Signature: `transformInertiaLeft(self: samson.SBSpatialTransform, I: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` Left-multiplies the inertia *I* by this spatial transform and returns the result ##### Method `samson.SBSpatialTransform.transformInertiaRight` Signature: `transformInertiaRight(self: samson.SBSpatialTransform, I: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` Right-multiplies the inertia *I* by this spatial transform and returns the result ##### Method `samson.SBSpatialTransform.transformInverseInertia` Signature: `transformInverseInertia(self: samson.SBSpatialTransform, phi: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` Returns the result of the transformation of the inverse inertia phi ##### Method `samson.SBSpatialTransform.transformInverseInertiaLeft` Signature: `transformInverseInertiaLeft(self: samson.SBSpatialTransform, phi: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` Left-multiplies the inverse inertia *phi* by this spatial transform and returns the result ##### Method `samson.SBSpatialTransform.transformInverseInertiaRight` Signature: `transformInverseInertiaRight(self: samson.SBSpatialTransform, phi: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` Right-multiplies the inverse inertia *phi* by this spatial transform and returns the result ##### Method `samson.SBSpatialTransform.transformInverseInertiaTransposeRight` Signature: `transformInverseInertiaTransposeRight(self: samson.SBSpatialTransform, phi: samson.SBPhysicalMatrix66) -> samson.SBPhysicalMatrix66` Right-multiplies the transpose of the inverse inertia *phi* by this spatial transform and returns the result ##### Method `samson.SBSpatialTransform.transformPoint` Signature: `transformPoint(self: samson.SBSpatialTransform, p: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` Returns the result of the transformation of the point *p* ##### Method `samson.SBSpatialTransform.transformVelocity` Signature: `transformVelocity(self: samson.SBSpatialTransform, sv: samson.SBPhysicalVector6) -> samson.SBPhysicalVector6` Returns the result of the transformation of the spatial velocity *sv* ##### Method `samson.SBSpatialTransform.zero` Signature: `static zero() -> samson.SBSpatialTransform` Returns the zero spatial transform. --- # SBUnitCell Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBUnitCell.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBUnitCell.md This class represent a unit cell. !!! note "See also" SAMSON SDK: [SBDTypeUnitCell](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypeUnitCell/#) ## API Reference #### Class `samson.SBUnitCell` Signature: `class samson.SBUnitCell(*args, **kwargs)` Bases: `pybind11_object` This class is used to represent a unit cell. SAMSON API: [SBDTypeUnitCell](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDTypeUnitCell/#) Overloaded function. 1. __init__(self: samson.SBUnitCell) -> None Constructs a unit cell with lengths and angles set to zero. 2. __init__(self: samson.SBUnitCell, length: samson.SBQuantity.unitsSI, shapeType: samson.SBUnitCell.ShapeType = ) -> None Constructs a cubic, rhombic dodecahedral, or truncated octahedral box with the box length *length*. **Parameters** - **length** ([*samson.SBQuantity.unitsSI*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI)) – The side length - **shapeType** ([*samson.SBUnitCell.ShapeType*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBUnitCell.md#samson.SBUnitCell.ShapeType)*,**default=SBUnitCell.ShapeType.Cubic*) – The unit-cell shape type (Cubic, RhombicDodecahedron, or TruncatedOctahedron). 3. __init__(self: samson.SBUnitCell, lengths: samson.SBPhysicalVector3) -> None Constructs an orthorhombic unit cell with the box size *lengths*. **Parameters** - **lengths** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – The lengths vector 4. __init__(self: samson.SBUnitCell, lengths: samson.SBPhysicalVector3, angles: samson.SBPhysicalVector3) -> None Constructs a triclinic unit cell with the box size *length* and angles *angles* (in degrees). **Parameters** - **lengths** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – The lengths vector - **angles** ([*samson.SBVector3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md#samson.SBVector3)) – The angles vector 5. __init__(self: samson.SBUnitCell, a: samson.SBQuantity.unitsSI, b: samson.SBQuantity.unitsSI, c: samson.SBQuantity.unitsSI, alpha: samson.SBQuantity.unitsSI, beta: samson.SBQuantity.unitsSI, gamma: samson.SBQuantity.unitsSI) -> None Constructs a triclinic unit cell with the box size and angles (in degrees). **Parameters** - **a** ([*samson.SBQuantity.unitsSI*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI)) – The length *a* - **b** ([*samson.SBQuantity.unitsSI*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI)) – The length *b* - **c** ([*samson.SBQuantity.unitsSI*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI)) – The length *c* - **alpha** ([*samson.SBQuantity.unitsSI*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI)) – The angle *alpha* - **beta** ([*samson.SBQuantity.unitsSI*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI)) – The angle *beta* - **gamma** ([*samson.SBQuantity.unitsSI*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI)) – The angle *gamma* 6. __init__(self: samson.SBUnitCell, vectorA: samson.SBPhysicalVector3, vectorB: samson.SBPhysicalVector3, vectorC: samson.SBPhysicalVector3) -> None Constructs a unit cell based on 3 vectors *vectorA*, *vectorB*, *vectorC*. **Parameters** - **vectorA** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – The first length vector - **vectorB** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – The second length vector - **vectorC** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – The third length vector 7. __init__(self: samson.SBUnitCell, matrix: samson.SBPhysicalMatrix33) -> None Constructs a unit cell based on the matrix *matrix* (triclinic vectors). **Parameters** - **matrix** ([*samson.SBMatrix33*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) – The unit cell matrix ##### Class `samson.SBUnitCell.Periodicity` Signature: `class Periodicity(self: samson.SBUnitCell.Periodicity, value: int)` Bases: `pybind11_object` **Members** - `NoPeriodicity`: No periodic axis - `X`: Periodic along the a / x axis - `Y`: Periodic along the b / y axis - `Z`: Periodic along the c / z axis - `XY`: Periodic along the a / x and b / y axes - `XZ`: Periodic along the a / x and c / z axes - `YZ`: Periodic along the b / y and c / z axes - `XYZ`: Periodic along the three axes ##### Class `samson.SBUnitCell.ShapeType` Signature: `class ShapeType(self: samson.SBUnitCell.ShapeType, value: int)` Bases: `pybind11_object` **Members** - `Undefined`: Undefined or infinite unit cell - `Infinite`: Undefined or infinite unit cell - `Cubic`: A cubic unit cell - `Orthorhombic`: An orthorhombic unit cell - `Triclinic`: A triclinic unit cell - `Dodecahedron`: A rhombic dodecahedron unit cell - `RhombicDodecahedron`: A rhombic dodecahedron unit cell - `Octahedron`: A truncated octahedron unit cell - `TruncatedOctahedron`: A truncated octahedron unit cell ##### Method `samson.SBUnitCell.canUseMinimumImageConvention` Signature: `canUseMinimumImageConvention(self: samson.SBUnitCell, cutoff: samson.SBQuantity.unitsSI) -> bool` Returns whether minimum-image convention is valid for a cutoff. **Parameters** - **cutoff** ([*samson.SBQuantity.unitsSI*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI)) – Cutoff distance used in pair interactions. **Returns** - *True* when minimum-image convention can be safely applied. **Return type** - bool ##### Method `samson.SBUnitCell.checkTriclinicConditions` Signature: `checkTriclinicConditions(self: samson.SBUnitCell) -> tuple` Returns *True* if the box described by the unit cell satisfies a set of triclinic box conditions. **Returns** - A tuple with a boolean result and an error string, in case there is an error **Return type** - Tuple(bool, str) ##### Method `samson.SBUnitCell.checkTriclinicConditionsForMatrix` Signature: `static checkTriclinicConditionsForMatrix(matrix: samson.SBPhysicalMatrix33) -> tuple` Returns *True* if the box described by the matrix *matrix* satisfies a set of triclinic box conditions. **Parameters** - **matrix** ([*samson.SBMatrix33*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) – The matrix **Returns** - A tuple with a boolean result and an error string, in case there is an error **Return type** - Tuple(bool, str) ##### Method `samson.SBUnitCell.contains` Signature: `contains(self: samson.SBUnitCell, position: samson.SBPhysicalVector3) -> bool` Returns *True* if and only if *position* belongs to the primary unit cell ##### Method `samson.SBUnitCell.createMatrix` Signature: `static createMatrix(lengths: samson.SBPhysicalVector3, angles: samson.SBPhysicalVector3) -> samson.SBPhysicalMatrix33` Returns box matrix based on lengths *lengths* and angles *angles*. **Parameters** - **lengths** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – The lengths - **angles** ([*samson.SBVector3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md#samson.SBVector3)) – The angles ##### Method `samson.SBUnitCell.getAngles` Signature: `getAngles(self: samson.SBUnitCell) -> samson.SBPhysicalVector3` Returns the angles of the unit cell ##### Method `samson.SBUnitCell.getAnglesFromMatrix` Signature: `static getAnglesFromMatrix(matrix: samson.SBPhysicalMatrix33) -> samson.SBPhysicalVector3` Returns box angles based on the matrix *matrix*. **Parameters** - **matrix** ([*samson.SBMatrix33*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) – The matrix ##### Method `samson.SBUnitCell.getCartesianCoordinates` Signature: `getCartesianCoordinates(self: samson.SBUnitCell, fractionalCoordinates: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` Returns Cartesian coordinates associated with fractional coordinates. **Parameters** - **fractionalCoordinates** ([*samson.SBVector3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md#samson.SBVector3)) – Fractional coordinates in the unit-cell basis. **Returns** - Cartesian position in length units. **Return type** - [samson.SBPosition3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3) ##### Method `samson.SBUnitCell.getCenter` Signature: `getCenter(self: samson.SBUnitCell) -> samson.SBPhysicalVector3` Returns the center of the primary unit cell. **Returns** - The center of the primary unit cell **Return type** - [samson.SBPosition3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3) ##### Method `samson.SBUnitCell.getCenterOfTriclinicCell` Signature: `getCenterOfTriclinicCell(self: samson.SBUnitCell) -> samson.SBPhysicalVector3` Returns the center of the triclinic unit cell. **Returns** - The center of the triclinic unit cell **Return type** - [samson.SBPosition3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3) ##### Method `samson.SBUnitCell.getFractionalCoordinates` Signature: `getFractionalCoordinates(self: samson.SBUnitCell, position: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` Returns fractional coordinates associated with a Cartesian position. **Parameters** - **position** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – Position in Cartesian length units. **Returns** - Fractional coordinates in the unit-cell basis. **Return type** - [samson.SBVector3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md#samson.SBVector3) ##### Method `samson.SBUnitCell.getInverseLengths` Signature: `getInverseLengths(self: samson.SBUnitCell) -> samson.SBPhysicalVector3` Returns the inverse lengths of the unit cell ##### Method `samson.SBUnitCell.getInverseMatrix` Signature: `getInverseMatrix(self: samson.SBUnitCell) -> samson.SBPhysicalMatrix33` Returns the inverse matrix of the unit cell ##### Method `samson.SBUnitCell.getLengths` Signature: `getLengths(self: samson.SBUnitCell) -> samson.SBPhysicalVector3` Returns the lengths of the unit cell ##### Method `samson.SBUnitCell.getLengthsFromMatrix` Signature: `static getLengthsFromMatrix(matrix: samson.SBPhysicalMatrix33) -> samson.SBPhysicalVector3` Returns box length based on the matrix *matrix*. **Parameters** - **matrix** ([*samson.SBMatrix33*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) – The matrix ##### Method `samson.SBUnitCell.getMatrix` Signature: `getMatrix(self: samson.SBUnitCell) -> samson.SBPhysicalMatrix33` Returns the matrix of the unit cell ##### Method `samson.SBUnitCell.getMinimumImageDisplacement` Signature: `getMinimumImageDisplacement(self: samson.SBUnitCell, position1: samson.SBPhysicalVector3, position2: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` Returns minimum-image displacement from *position1* to *position2*. **Parameters** - **position1** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – Start Cartesian position. - **position2** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – End Cartesian position. **Returns** - Minimum-image displacement vector. **Return type** - [samson.SBLength3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/length3.md#samson.SBLength3) ##### Method `samson.SBUnitCell.getMinimumImageDistance` Signature: `getMinimumImageDistance(self: samson.SBUnitCell, position1: samson.SBPhysicalVector3, position2: samson.SBPhysicalVector3) -> samson.SBQuantity.unitsSI` Returns minimum-image distance between two Cartesian positions. **Parameters** - **position1** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – First position. - **position2** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – Second position. **Returns** - Minimum-image distance. **Return type** - [samson.SBQuantity.unitsSI](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI) ##### Method `samson.SBUnitCell.getMinimumImageSquaredDistance` Signature: `getMinimumImageSquaredDistance(self: samson.SBUnitCell, position1: samson.SBPhysicalVector3, position2: samson.SBPhysicalVector3) -> samson.SBQuantity.unitsSI` Returns minimum-image squared distance between two Cartesian positions. **Parameters** - **position1** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – First position. - **position2** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – Second position. **Returns** - Squared minimum-image distance. **Return type** - [samson.SBQuantity.unitsSI](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI) ##### Method `samson.SBUnitCell.getNearestPeriodicImage` Signature: `getNearestPeriodicImage(self: samson.SBUnitCell, position: samson.SBPhysicalVector3, referencePosition: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` Returns the periodic image of *position* nearest to *referencePosition*. **Parameters** - **position** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – Position to image. - **referencePosition** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – Reference Cartesian position. **Returns** - Nearest periodic image of *position*. **Return type** - [samson.SBPosition3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3) ##### Method `samson.SBUnitCell.getOrigin` Signature: `getOrigin(self: samson.SBUnitCell) -> samson.SBPhysicalVector3` Returns the origin of the unit cell ##### Method `samson.SBUnitCell.getReciprocalMatrix` Signature: `getReciprocalMatrix(self: samson.SBUnitCell, include2Pi: bool = False) -> samson.SBPhysicalMatrix33` Returns the reciprocal lattice matrix. **Parameters** - **include2Pi** (*bool**,**default=False*) – If *True*, includes the factor *2*pi* in reciprocal vectors. **Returns** - Reciprocal matrix in inverse length units. **Return type** - [samson.SBMatrix33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33) ##### Method `samson.SBUnitCell.getShapeType` Signature: `static getShapeType(matrix: samson.SBPhysicalMatrix33) -> samson.SBUnitCell.ShapeType` Returns the unit cell’s shape type based on the box matrix *matrix*. **Parameters** - **matrix** ([*samson.SBMatrix33*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) – The matrix ##### Method `samson.SBUnitCell.getShapeTypeString` Signature: `static getShapeTypeString(shapeType: samson.SBUnitCell.ShapeType) -> str` Returns the name of the unit cell’s shape type *shapeType* **Parameters** - **shapeType** ([*samson.SBUnitCell.ShapeType*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBUnitCell.md#samson.SBUnitCell.ShapeType)) – The shape type ##### Method `samson.SBUnitCell.getVectorA` Signature: `getVectorA(self: samson.SBUnitCell) -> samson.SBPhysicalVector3` Returns the first lattice vector ##### Method `samson.SBUnitCell.getVectorB` Signature: `getVectorB(self: samson.SBUnitCell) -> samson.SBPhysicalVector3` Returns the second lattice vector ##### Method `samson.SBUnitCell.getVectorC` Signature: `getVectorC(self: samson.SBUnitCell) -> samson.SBPhysicalVector3` Returns the third lattice vector ##### Method `samson.SBUnitCell.getVolume` Signature: `getVolume(self: samson.SBUnitCell) -> samson.SBQuantity.unitsSI` Returns the volume of the unit cell **Returns** - The volume of the unit cell **Return type** - samson.SBQuantity.unitSI ##### Method `samson.SBUnitCell.getWrappedFractionalCoordinates` Signature: `getWrappedFractionalCoordinates(self: samson.SBUnitCell, fractionalCoordinates: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` Wraps fractional coordinates along periodic axes. **Parameters** - **fractionalCoordinates** ([*samson.SBVector3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md#samson.SBVector3)) – Input fractional coordinates. **Returns** - Wrapped fractional coordinates. **Return type** - [samson.SBVector3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md#samson.SBVector3) ##### Method `samson.SBUnitCell.getWrappedPosition` Signature: `getWrappedPosition(self: samson.SBUnitCell, position: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` Returns the wrapped Cartesian position for periodic axes. **Parameters** - **position** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – Input Cartesian position. **Returns** - Wrapped position in Cartesian coordinates. **Return type** - [samson.SBPosition3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3) ##### Method `samson.SBUnitCell.isFinite` Signature: `isFinite(self: samson.SBUnitCell) -> bool` Returns *True* if and only if the unit cell is finite ##### Method `samson.SBUnitCell.isPeriodic` Signature: `isPeriodic(self: samson.SBUnitCell) -> bool` Returns *True* if and only if the unit cell is periodic along at least one axis ##### Method `samson.SBUnitCell.isPeriodicX` Signature: `isPeriodicX(self: samson.SBUnitCell) -> bool` Returns *True* if and only if the unit cell is periodic along the a / x axis ##### Method `samson.SBUnitCell.isPeriodicY` Signature: `isPeriodicY(self: samson.SBUnitCell) -> bool` Returns *True* if and only if the unit cell is periodic along the b / y axis ##### Method `samson.SBUnitCell.isPeriodicZ` Signature: `isPeriodicZ(self: samson.SBUnitCell) -> bool` Returns *True* if and only if the unit cell is periodic along the c / z axis ##### Method `samson.SBUnitCell.setOrigin` Signature: `setOrigin(self: samson.SBUnitCell, origin: samson.SBPhysicalVector3) -> None` Sets the origin of the unit cell **Parameters** - **origin** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – The length vector ##### Method `samson.SBUnitCell.toPythonCode` Signature: `toPythonCode(self: samson.SBUnitCell) -> str` Returns the string representation that can reconstruct this object in Python ##### Attribute `samson.SBUnitCell.Cubic` Signature: `Cubic = ` ##### Attribute `samson.SBUnitCell.Dodecahedron` Signature: `Dodecahedron = ` ##### Attribute `samson.SBUnitCell.Infinite` Signature: `Infinite = ` ##### Attribute `samson.SBUnitCell.NoPeriodicity` Signature: `NoPeriodicity = ` ##### Attribute `samson.SBUnitCell.Octahedron` Signature: `Octahedron = ` ##### Attribute `samson.SBUnitCell.Orthorhombic` Signature: `Orthorhombic = ` ##### Attribute `samson.SBUnitCell.RhombicDodecahedron` Signature: `RhombicDodecahedron = ` ##### Attribute `samson.SBUnitCell.Triclinic` Signature: `Triclinic = ` ##### Attribute `samson.SBUnitCell.TruncatedOctahedron` Signature: `TruncatedOctahedron = ` ##### Attribute `samson.SBUnitCell.Undefined` Signature: `Undefined = ` ##### Attribute `samson.SBUnitCell.X` Signature: `X = ` ##### Attribute `samson.SBUnitCell.XY` Signature: `XY = ` ##### Attribute `samson.SBUnitCell.XYZ` Signature: `XYZ = ` ##### Attribute `samson.SBUnitCell.XZ` Signature: `XZ = ` ##### Attribute `samson.SBUnitCell.Y` Signature: `Y = ` ##### Attribute `samson.SBUnitCell.YZ` Signature: `YZ = ` ##### Attribute `samson.SBUnitCell.Z` Signature: `Z = ` ##### Property `samson.SBUnitCell.periodicity` Signature: `property periodicity` The periodicity mask of the unit cell ##### Property `samson.SBUnitCell.shapeType` Signature: `property shapeType` The unit cell’s shape type ##### Property `samson.SBUnitCell.shapeTypeString` Signature: `property shapeTypeString` Returns the name of the unit cell’s shape type --- # Colorizing nodes Source: https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md In SAMSON, you can colorize [`visual models`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel), [`meshes`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelMesh.md#samson.SBMesh), [`labels`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentLabel.md#samson.SBLabel), and structural nodes (atoms, residues, molecules, structural models, etc.) using various color schemes (see [Color Scheme](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme.md#ps-color-scheme)). Python Scripting provides a straightforward way to customize the colorization of data-graph nodes. When a color scheme is applied to a node, all the node’s descendants are affected if they do not have their own color schemes. You can apply different color schemes to different nodes. Color schemes are stored as part of the material ([`SBNodeMaterial`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterial.md#samson.SBNodeMaterial)) property of a node. !!! note [Materials](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterial.md#ps-sbnodematerial) (and, hence, color schemes that are part of materials) take precedence based on hierarchy: if the node has a material applied directly to it, then it will be colorized based on this material’s color scheme, else it will be colorized based on a color scheme of its parent node’s material. If none of the node’s parents has a material with a color scheme then a default colorization will be applied, e.g. CPK colors for atoms. To remove materials from a node and its descendants call the [`SBNode.removeMaterialsFromDescendants()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.removeMaterialsFromDescendants) function on the node. See the [List of color schemes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-color-scheme-list) page for the list of all the available color schemes. !!! note "See also" [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) - the base class that describes a color scheme in SAMSON. User Guide: [Colorizing](https://documentation.samson-connect.net/users/11.0.0/colorizing/#) SAMSON SDK: [The SBDColorScheme Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/DataModel/ColorScheme/#) ### List of color schemes Below is a list of the color schemes available by default: - **Constant**: [`SBColorSchemeConstant`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeConstant.md#samson.SBColorSchemeConstant) - the same color is uniformly applied. - **Constant illustrative**: [`SBColorSchemeConstantIllustrate`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeConstantIllustrate.md#samson.SBColorSchemeConstantIllustrate) - applies a constant color (illustrative). It helps to depict molecules in a style similar to [David S. Goodsell](http://ccsb.scripps.edu/goodsell/)’s artwork. - **CPK**: [`SBColorSchemeCPK`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPK.md#samson.SBColorSchemeCPK) - the classic Corey-Pauling-Koltun (CPK) color scheme. - **Per attribute**: the color is determined based on an atom attribute (e.g. temperature factor, residue, etc.): - [`SBColorSchemePerChainID`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerChainID.md#samson.SBColorSchemePerChainID) - colorizes each chain in a different color. - [`SBColorSchemePerChainIllustrate`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerChainIllustrate.md#samson.SBColorSchemePerChainIllustrate) - colorizes each chain in a different color (illustrative). It uses a style similar to [David S. Goodsell](http://ccsb.scripps.edu/goodsell/)’s artwork. - [`SBColorSchemePerFormalCharge`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerFormalCharge.md#samson.SBColorSchemePerFormalCharge) - colorizes atoms based on their formal charge. - [`SBColorSchemePerOccupancy`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerOccupancy.md#samson.SBColorSchemePerOccupancy) - colorizes atoms based on their occupancy values. - [`SBColorSchemePerPartialCharge`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerPartialCharge.md#samson.SBColorSchemePerPartialCharge) - colorizes atoms based on their partial charge. - [`SBColorSchemePerResidueHydrophobicity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueHydrophobicity.md#samson.SBColorSchemePerResidueHydrophobicity) - colorizes residues based on their hydrophobicity. Several scales are available via the [Inspector](https://documentation.samson-connect.net/users/11.0.0/inspecting/#) or via [`SBResidue`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeResidue.md#samson.SBResidue) functionality. - [`SBColorSchemePerResidueSequenceNumber`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueSequenceNumber.md#samson.SBColorSchemePerResidueSequenceNumber) - colorizes residues based on their sequence number. - [`SBColorSchemePerResidueType`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueType.md#samson.SBColorSchemePerResidueType) - colorizes residues based on their type (types of amino and nucleic acids). - [`SBColorSchemePerSecondaryStructureType`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerSecondaryStructureType.md#samson.SBColorSchemePerSecondaryStructureType) - colorizes residues based on their secondary structure (helices, sheets, loops). - [`SBColorSchemePerSideChainCharge`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerSideChainCharge.md#samson.SBColorSchemePerSideChainCharge) - colorizes residues based on their side chain charge. - [`SBColorSchemePerSideChainPolarity`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerSideChainPolarity.md#samson.SBColorSchemePerSideChainPolarity) - colorizes residues based on their side chain polarity. - [`SBColorSchemePerStructuralModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerStructuralModel.md#samson.SBColorSchemePerStructuralModel) - colorizes each structural model in a different color. - [`SBColorSchemePerStructuralModelIllustrate`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerStructuralModelIllustrate.md#samson.SBColorSchemePerStructuralModelIllustrate) - colorizes each structural model in a different color (illustrative). - [`SBColorSchemePerTemperatureFactor`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerTemperatureFactor.md#samson.SBColorSchemePerTemperatureFactor) - colorizes atoms based on their temperature factor. - **Mixed: CPK and per attribute**: - [`SBColorSchemeCPKConstantCarbons`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPKConstantCarbons.md#samson.SBColorSchemeCPKConstantCarbons) - the color scheme that sets a specified color for carbons and CPK colors for other atom element types. - [`SBColorSchemeCPKPerChainCarbons`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPKPerChainCarbons.md#samson.SBColorSchemeCPKPerChainCarbons) - the color scheme that sets colors for carbons based on their chain ID and CPK colors for other atom element types. - [`SBColorSchemeCPKPerStructuralModelCarbons`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPKPerStructuralModelCarbons.md#samson.SBColorSchemeCPKPerStructuralModelCarbons) - the color scheme that sets colors for carbons based on their structural model and CPK colors for other atom element types. ### Apply color To colorize a node with a constant color ([`SBColor`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)), you need to create the color you want and apply it to the node: Caption: Apply color to a node ```python # create an RGB color orange = SBColor(255, 128, 0) # apply color to a node node.setColor(orange) # or the same in one line: node.setColor(SBColor(255, 128, 0)) ``` !!! note Internally, the [`SBNode.setColor()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.setColor) function creates a material with the constant color scheme ([`SBColorSchemeConstant`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeConstant.md#samson.SBColorSchemeConstant)) based on the given color and applies it to the node. If you would like to make this operation [undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo), then you need to call it from within the context manager [`SAMSON.holding`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.holding) (or wrap it in [`SAMSON.beginHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.beginHolding) and [`SAMSON.endHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.endHolding)): Caption: Apply color to a node (undoable) ```python # make the operation undoable with SAMSON.holding("Colorize node"): # apply a color to the node node.setColor(SBColor(255, 128, 0)) ``` Example: colorize atoms based on their x-coordinate. Caption: Colorize atoms based on their X coordinate ```python # get all atoms atomIndexer = SAMSON.getNodes('node.type atom') if len(atomIndexer): # set initial min and max values min_x = max_x = atomIndexer[0].getX().value # get min and max x-coordinates for atom in atomIndexer: x = atom.getX().value if x > max_x: max_x = x elif x < min_x: min_x = x # make the operation undoable with SAMSON.holding("Colorize atoms"): # colorize each atom according to its coordinate for atom in atomIndexer: # get RGB color for a node based on HSV color # here we go through the hue parameter in the HSV color space to change the color h = (atom.getX().value - min_x) / (max_x - min_x) color = SBColor.fromHSV(239.5 / 360.0 * h, 205.0/255.0, 1.0) # set the color of the node atom.setColor(color) ``` #### Get color from user You can also get a color from the user: Caption: Get color from user ```python # this function returns a tuple: (state, SBColor) # where state is True if OK was clicked, else False res, color = SAMSON.getColorFromUser('Choose a color') if res: print(color) ``` ### Apply color from color palette Color palettes ([`SBPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)) provide a way to generate colors along a trajectory in a color space, for example going from red to blue through white. You can get an RGB color from a palette along the [0, 1] range using the [`SBPalette.getColor()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette.getColor) function. Color palettes are available in the following color spaces: - **HSV (Hue-Saturation-Value)** color space. [`SBPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette), by default, implements an HSV color palette: Caption: Create the default HSV color palette ```python # create the default HSV color palette palette = SBPalette() # get color along the [0, 1] range color = palette.getColor(0.5) ``` - **HCL (Hue-Chroma-Luminance)** color space. SAMSON provides a set of pre-defined HCL color palettes in the [`SBPaletteDefaultPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDefaultPalette.md#samson.SBPaletteDefaultPalette). The following color palette types are available in SAMSON by default: - **Qualitative** color palettes - for coding categorical information, i.e., where no particular ordering of categories is available and every color should receive the same perceptual weight. See [`SBPaletteQualitative`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteQualitative.md#samson.SBPaletteQualitative), [`SBPaletteQualitativeHCL`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteQualitativeHCL.md#samson.SBPaletteQualitativeHCL). - **Sequential** color palettes - for coding ordered/numeric information, i.e., going from high to low (or vice versa). See [`SBPaletteSequential`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteSequential.md#samson.SBPaletteSequential), [`SBPaletteSequentialHCL`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteSequentialHCL.md#samson.SBPaletteSequentialHCL). - **Diverging** color palettes - for coding ordered/numeric information around a central neutral value, i.e., where colors diverge from neutral to two extremes. See [`SBPaletteDiverging`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDiverging.md#samson.SBPaletteDiverging), [`SBPaletteDivergingHCL`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDivergingHCL.md#samson.SBPaletteDivergingHCL). - **Flexible diverging** color palettes - for coding ordered/numeric information around a central neutral value, i.e., where colors diverge from neutral to two extremes. See [`SBPaletteFlexibleDivergingHCL`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteFlexibleDivergingHCL.md#samson.SBPaletteFlexibleDivergingHCL). Caption: Use default HCL color palettes ```python # get color from 'qualitativeHCLRed2Blue' color palette along the [0, 1] range color = SBPaletteDefaultPalette.qualitativeHCLRed2Blue.getColor(0.2) ``` Using the default HSV color palette, the example where we colorize nodes based on the HSV color can also be done as follows: Caption: Colorize atoms based on their X coordinate using a color palette ```python # get all atoms in the active document atomIndexer = SAMSON.getNodes('node.type atom') if len(atomIndexer): # set initial min and max values min_x = max_x = atomIndexer[0].getX().value # get min and max x-coordinates for atom in atomIndexer: x = atom.getX().value if x > max_x: max_x = x elif x < min_x: min_x = x # create the default HSV color palette palette = SBPalette() # make the operation undoable with SAMSON.holding("Colorize atoms"): # colorize each atom according to its coordinate for atom in atomIndexer: # get the color 'intensity' value, which should be in the [0, 1] range h = 1 - (atom.getX().value - min_x) / (max_x - min_x) # get RGB color from the palette color = palette.getColor(h) # set the color of the node atom.setColor(color) ``` !!! note "See also" [Apply a color scheme with a color palette](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-color-scheme-color-palette) #### Get color palette from user You can also get a color palette from the user: Caption: Get color palette from user ```python # this function returns a tuple: (state, SBPalette) # where state is True if OK was clicked, else False res, palette = SAMSON.getPaletteFromUser('Choose a color palette') if res and palette != None: print(palette.type) ``` ### Apply color scheme There is a number of various color schemes ([`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme)) available by default in SAMSON, see [List of color schemes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-color-scheme-list). A data graph node ([`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode)) has the [`SBNode.setColorScheme()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.setColorScheme) function which allows you to directly apply a color scheme to this node. !!! note Nodes in SAMSON are colorized by applying to them a material ([`SBNodeMaterial`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterial.md#samson.SBNodeMaterial)) with a color scheme. When you call the [`SBNode.setColor()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.setColor) function, it internally creates a material (if the node didn’t already have a material) with the constant color scheme ([`SBColorSchemeConstant`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeConstant.md#samson.SBColorSchemeConstant)) based on the given color and applies it to the node. When you call the [`SBNode.setColorScheme()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.setColorScheme) function, it also applies a material with this color scheme if the node didn’t already have a material, else it changes the color scheme of the existing material. Most of the color schemes receive a [`node indexer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) upon their construction to determine a range of color scheme specific values (depending on the color scheme). The usual steps to apply a color scheme are as follows: 1. Get an [`indexer of nodes`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) to which you would like to apply a color scheme. 2. Create a color scheme based on this node indexer such that the color scheme could compute the range of values/colors (if applicable to the color scheme). 3. Apply the color scheme to each node of the node indexer. Example: colorize all molecules in the active document with a color scheme based on the residue sequence number. For that we will use the [`SBColorSchemePerResidueSequenceNumber`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueSequenceNumber.md#samson.SBColorSchemePerResidueSequenceNumber) color scheme. Caption: Colorize based on residue sequence number ```python # get all structural models (top structural nodes in the document hierarchy) nodeIndexer = SAMSON.getNodes('node.type structuralModel') # create a color scheme per residue sequence number # we need to provide a node indexer of residues to the color scheme constructor # for it to determine a range of residue sequence numbers colorScheme = SBColorSchemePerResidueSequenceNumber(nodeIndexer) # Hold - Make the operation undoable with SAMSON.holding("Colorize nodes"): # apply the color scheme to nodes for node in nodeIndexer: # [optional] remove materials from all the descendants if they have any materials node.removeMaterialsFromDescendants() # set the color scheme node.setColorScheme(colorScheme) ``` Example: colorize all molecules in the active document with a color scheme based on the temperature factor of atoms. For that we will use the [`SBColorSchemePerTemperatureFactor`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerTemperatureFactor.md#samson.SBColorSchemePerTemperatureFactor) color scheme. Caption: Colorize based on temperature factor ```python # get all structural models # 'n.t sm' is short for 'node.type structuralModel' nodeIndexer = SAMSON.getNodes('n.t sm') # create a color scheme per temperature factor # we need to provide a node indexer of structural models to the color scheme constructor # for it to determine a range temperature factors in the system colorScheme = SBColorSchemePerTemperatureFactor(nodeIndexer) # Hold - Make the operation undoable with SAMSON.holding("Colorize nodes"): # apply the color scheme to nodes for node in nodeIndexer: # [optional] remove materials from all the descendants if they have any materials node.removeMaterialsFromDescendants() # set the color scheme node.setColorScheme(colorScheme) ``` ### Apply a color scheme with a color palette Color schemes have their own default color palettes ([`SBPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)) based on which they create colorization. If you want, you can also specify a color palette for a color scheme: Caption: Colorize with a special color palette ```python # get all structural models nodeIndexer = SAMSON.getNodes('node.type sm') # create a color scheme per residue sequence number with the given color palette colorScheme = SBColorSchemePerResidueSequenceNumber(nodeIndexer, SBPaletteDefaultPalette.sequentialHCLViridis) # Hold - Make the operation undoable with SAMSON.holding("Colorize nodes"): # apply the color scheme to nodes for node in nodeIndexer: # [optional] remove materials from all the descendants if they have any materials node.removeMaterialsFromDescendants() # set the color scheme node.setColorScheme(colorScheme) ``` --- # Visualizing Source: https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.md SAMSON provides a number of visual models ([`SBVisualModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel)) by default to help you visualize molecular systems. Here is the list of the main visual models available by default in SAMSON: - Atomistic visual models: - *Ball and stick* - *Licorice* - *Lines* - *Van der Waals* - Surfaces: - *Gaussian surface* - *Solvent accessible surface* - *Solvent excluded surface* - Secondary structure visual models: - *Cartoon* - *Ribbons* - *Tubes* - *Glycans* - 3D-SNFG for depicting glycans You can add more visual models from the [SAMSON Connect - Marketplace](https://www.samson-connect.net/extensions). !!! note "See also" [`samson.SBVisualModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel) [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) ### Applying visual models There are several ways to apply visual models using the Python API. #### Apply visual models via commands You can apply a [`visual model`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel) to nodes in the active [`document`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument) via actions using [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand) first by selecting nodes and then invoking commands associated to visual models by their name (if nothing is selected, then a visual model will be applied to the whole document). !!! note When using the [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand) function to add a visual model, it will be applied to the current selection or to the whole active [`document`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument) if nothing is selected. In the example below, we apply the Ribbons visual model to receptors and the Licorice visual model to ligands and hide their default structural representation Caption: Apply visual models via commands ```python # run the command named 'Receptors' that selects proteins SAMSON.runCommand('Receptors') # apply visual models only if something was found (selected) if SAMSON.getActiveDocument().hasSelectedNodes(): # apply the Ribbons visual model via the command named 'Ribbons' SAMSON.runCommand('Ribbons') # hide the current selection SAMSON.runCommand('Hide selection') # clear the current selection in the active document SAMSON.runCommand('Deselect all') # run the command named 'Ligands' that selects ligands SAMSON.runCommand('Ligands') # apply visual models only if something was found (selected) if SAMSON.getActiveDocument().hasSelectedNodes(): # apply the Licorice visual model via the command named 'Licorice' SAMSON.runCommand('Licorice') # hide the current selection SAMSON.runCommand('Hide selection') # clear the current selection in the active document SAMSON.runCommand('Deselect all') ``` In this case, a [`visual model`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel) is added automatically in the active document and the action is made [undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo) automatically. !!! note "See also" [Running actions](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md#ps-run-command) You can get an indexer of visual models in the active document as follows: Caption: Get an indexer of visual models in the active document ```python # the short version of the NSL expression: 'n.t vm' visualModelIndexer = SAMSON.getActiveDocument().getNodes("node.type visualModel") print(f"Number of visual models: {len(visualModelIndexer)}") ``` #### Apply visual models via proxies A [`visual model`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel) can also be created using the [`SAMSON.makeVisualModel()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.makeVisualModel) function. This function requires a [`node indexer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) and either a public name of the visual model or its [`proxy`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy) information (the class name and the extension [`UUID`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)). !!! note For the list of available visual models and their public names see: [List of visual models](https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.md#ps-visual-model-list). !!! note "See also" [Getting nodes](https://documentation.samson-connect.net/scripting/latest/docs/GettingNodes.md#ps-get-nodes) Caption: Apply a visual model to a node indexer ```python # get a node indexer, e.g. residues # the short version of the NSL expression: 'n.t r' nodeIndexer = SAMSON.getNodes("node.type residue") # create an instance of the Ribbons visual model applied to the nodeIndexer visualModel = SAMSON.makeVisualModel(nodeIndexer, "Ribbons") if visualModel: # make the operation undoable with SAMSON.holding("Add visual model"): # hold the node to make it creation undoable SAMSON.hold(visualModel) # create the node visualModel.create() # add the visual model to the active document SAMSON.getActiveDocument().addChild(visualModel) ``` #### List of visual models The following public names of visual models are available, by default in SAMSON: - *‘Ball and stick’* - *‘Cartoon’* - *‘Gaussian surface’* - *‘Glycans’* - *‘Licorice’* - *‘Lines’* - *‘Ribbons’* - *‘Solvent accessible surface’* - *‘Solvent excluded surface’* - *‘Tubes’* - *‘Van der Waals’* This is not a full list. There might be more visual models available in your SAMSON depending on the extensions you have. And you can add more visual models from the [SAMSON Connect - Marketplace](https://www.samson-connect.net/extensions). For example, here are some other visual models: - *‘Pathline of the center of mass’* - *‘Polyhedra’* You can **get the list of available visual models** with their proxy informations as follows: Caption: Get the list of available visual models ```python visual_model_proxies = SAMSON.getProxyIndexer(SBClass.VisualModel) for proxy in visual_model_proxies: print(proxy) # this should also print the public name ``` You can get the public name from a proxy via [`proxy.publicName`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy.publicName). Or you can get a dictionary of available public names of visual models and their proxies (not all visual models have public names): Caption: Get a dictionary of available public names of visual models and their proxies ```python visual_model_proxy_map = SAMSON.getVisualModelProxyMap() for public_name, proxy in visual_model_proxy_map.items(): # print the public name print(public_name) # print the proxy information #print(f"Name: {public_name}\tClass name: {proxy.name},\tExtension UUID: {proxy.elementUUID}") ``` You can also find a list of the exposed visual model classes available in SAMSON using the **Exposed functionality viewer** extension. Simply search for *VisualModel* in it. ### Applying visual presets Visual presets ([`SBVisualPresetStep`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPresetStep.md#samson.SBVisualPresetStep)) provide an efficient way to apply visual representations and color schemes simultaneously to complex molecular systems. Visual presets can be combined into visual presets ([`SBVisualPreset`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPreset.md#samson.SBVisualPreset)) to apply multiple visual representations at once. !!! note "See also" User Guide: [Visual presets](https://documentation.samson-connect.net/users/11.0.0/visual-presets/#) [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON provides a set of default visual presets that you can access using the [`SBVisualPreset.getDefaultVisualPresets()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPreset.md#samson.SBVisualPreset.getDefaultVisualPresets) function. Below we print all available default visual presets Caption: Print all available visual presets ```python # get all default visual presets defaultVisualPresets = SBVisualPreset.getDefaultVisualPresets() # print names of default visual presets for defaultVisualPreset in defaultVisualPresets: print(defaultVisualPreset.name) ``` You can use default visual presets simply by accessing them and calling the [`SBVisualPreset.apply()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPreset.md#samson.SBVisualPreset.apply) function: Caption: Apply a default visual preset ```python # get an indexer of all structural models # the short version of the NSL expression: 'n.t sm' structuralModelIndexer = SAMSON.getNodes("node.type structuralModel") # get all default visual presets defaultVisualPresets = SBVisualPreset.getDefaultVisualPresets() if len(defaultVisualPresets): # apply the first default visual preset defaultVisualPresets[0].apply(structuralModelIndexer) ``` !!! note [Materials](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterial.md#ps-sbnodematerial) (and, hence, color schemes that are part of materials) take precedence based on hierarchy: if the node has a material applied directly to it, then it will be colorized based on this material’s color scheme, else it will be colorized based on a color scheme of its parent node’s material. If none of the node’s parents has a material with a color scheme then a default colorization will be applied, e.g. CPK colors for atoms. To remove materials from a node and its descendants call the [`SBNode.removeMaterialsFromDescendants()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.removeMaterialsFromDescendants) function on the node. You can create you own visual presets - a [`visual preset step`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPresetStep.md#samson.SBVisualPresetStep) gets several arguments (some of them are optional): - A selection: a [Node Specification Language (NSL)](https://documentation.samson-connect.net/users/11.0.0/nsl/#) expression and an arbitrary name for the selection which will be used for naming the visual model if one should be created. - Visual model information: a name of the visual model or a name of the visual model class and its extension’s [`UUID`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID). - Color scheme information: a name of the color scheme or a name of the color scheme class and its extension’s [`UUID`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID). - A color ([`SBColor`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) for a constant color scheme or a color palette ([`SBPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)) for a per-attribute color scheme. - A boolean flag indicating whether structural nodes corresponding to the selection should be hidden or shown. Caption: Create and apply a visual preset ```python # get an indexer of all structural models structuralModelIndexer = SAMSON.getNodes("n.t sm") # create a visual preset visualPresetStep = SBVisualPresetStep( # selection selectionFilterString = "n.c receptor", selectionFilterName = "Receptor", # visual model: Ribbons visualModelName = "Ribbons", # hiding structural nodes hideStructureFlag = False) # apply the visual preset visualPresetStep.apply(structuralModelIndexer) ``` You can combine visual presets in a visual preset to create more complex visualizations. Caption: Create and apply a visual preset ```python # get an indexer of all structural models structuralModelIndexer = SAMSON.getNodes("n.t sm") # create a visual preset visualPresetGroup = SBVisualPreset("Receptor-ligand interaction", [ SBVisualPresetStep( selectionFilterString = "n.c receptor", selectionFilterName = "Receptor", visualModelName = "Ribbons", colorSchemeName = "Constant", color = SBColor.white), SBVisualPresetStep( selectionFilterString = "n.c ligand", selectionFilterName = "Ligand", visualModelName = "Licorice"), SBVisualPresetStep( selectionFilterString = "a.s C in (n.t r within 5A of n.c ligand)", selectionFilterName = "Carbons in residues with at least one atom within 5A of ligands", visualModelName = "", colorSchemeName = "Constant", color = SBColor.white), SBVisualPresetStep( selectionFilterString = "n.c heavyAtomsWithLinkingBonds in (n.t r within 5A of n.c ligand)", selectionFilterName = "Residues (heavy atoms) with at least one atom within 5A of ligands", visualModelName = "Licorice"), SBVisualPresetStep( selectionFilterString = "n.c water", selectionFilterName = "Water", hideStructureFlag = True), SBVisualPresetStep( selectionFilterString = "a.s O in n.c water", selectionFilterName = "Water oxygen", visualModelName = "Licorice"), SBVisualPresetStep( selectionFilterString = "n.c monatomicIon", selectionFilterName = "Monatomic ions", visualModelName = "Van der Waals") ] ) # apply the visual preset visualPresetGroup.apply(structuralModelIndexer) ``` --- # Building Source: https://documentation.samson-connect.net/scripting/latest/docs/Building.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/Building.md SAMSON [`documents`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument) have a hierarchical structure: each [`node`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) has one and only one parent node (with the exception of documents, which have no parent), and possibly some children or references to other nodes. You can create hierarchies of nodes and add them to a document using Python Scripting in SAMSON. !!! note "See also" User Guide: [Node types](https://documentation.samson-connect.net/users/11.0.0/node-types/#) User Guide: [Building molecules](https://documentation.samson-connect.net/users/11.0.0/building-molecules/#) User Guide: [Documents](https://documentation.samson-connect.net/users/11.0.0/documents/#) User Guide: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#) ### Creating a structural model A structural model ([`SBStructuralModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md#samson.SBStructuralModel)) is the top structural parent node of all structural nodes. So, if you want to add other structural nodes (e.g., molecules, residues, atoms) into a document, they should be added to a structural model or to one of its children depending on the hierarchy. !!! note Not every node type can be added to every other node; there are hierarchical constraints. For example, a backbone and a side chain can only be added to a residue, and a molecule can be added only to a structural model. Please see User Guide: [Node types](https://documentation.samson-connect.net/users/11.0.0/node-types/#) for more information on node hierarchies. The code below shows how to create a [`structural model`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md#samson.SBStructuralModel) and add it in the active [`documents`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument) in an [undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo) way: Caption: Create and add a structural model node in the active document ```python # create an instance of a structural model structuralModel = SBStructuralModel() # set the structural model's name structuralModel.name = 'Structural model' # make the operation undoable with SAMSON.holding("Add structural model"): # hold the node to make it creation undoable SAMSON.hold(structuralModel) # create the node structuralModel.create() # add the structural model to the active document SAMSON.getActiveDocument().addChild(structuralModel) ``` When creating nodes that will be added to a document, it is necessary to make their creation [undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo). For the sake of the [undo mechanism](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo) we distinguish a construction of a node from its creation - a node can be constructed and used for computation without being created - the creation is needed if you want to add a node into a data graph/document. To make this operation undoable, it is necessary to use the context manager [`SAMSON.holding`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.holding) (or the wrappers [`SAMSON.beginHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.beginHolding) and [`SAMSON.endHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.endHolding)) and hold the node before creating it using [`SAMSON.hold()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.hold) (see the code above). !!! note If you construct a temporary node just for an internal use without adding it to a document then there is no need to create ([`SBNode.create()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.create)) it and no need to make it undoable. ### Creating an atom The code below shows how to construct an atom ([`SBAtom`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)) according to its element symbol and position and add it in a parent node. Caption: Create an atom ```python # create two position vectors position1 = SBPosition3(SBQuantity.nm(1.0), SBQuantity.nm(2.0), SBQuantity.nm(0.0)) position2 = SBPosition3(SBQuantity.nm(1.0), SBQuantity.nm(2.1), SBQuantity.nm(0.0)) # get an elementType from element symbol (C is for Carbon) elementType = SAMSON.getElementTypeBySymbol('C') # or you can use the element type directly # elementType = SBElement.Carbon # construct an atom with the given element type and position atom1 = SBAtom(elementType, position1) atom2 = SBAtom(elementType, position2) # make the operation undoable with SAMSON.holding("Add atoms"): # hold the node for undo/redo SAMSON.hold(atom1) SAMSON.hold(atom2) # create an atom in SAMSON atom1.create() atom2.create() # add an atom to the structural model structuralModel.addChild(atom1) structuralModel.addChild(atom2) # center the active camera on the system SAMSON.getActiveCamera().center() ``` !!! note If you create multiple nodes, you can wrap the whole code in a single [`SAMSON.holding`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.holding) block, or use one matching pair of [`SAMSON.beginHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.beginHolding) and [`SAMSON.endHolding()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.endHolding) calls. This way, the whole change appears as a single operation in the history. If you add nodes (e.g., atoms) to a parent node (e.g., a structural model) that will be created later, then you do not need to hold ([`SAMSON.hold()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.hold)) and create ([`SBNode.create()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.create)) each child separately. It is enough to hold and create the top node, which will handle its children for you. ### Creating covalent bonds You can create bonds ([`SBBond`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeBond.md#samson.SBBond)) between atoms as follows: Caption: Create a bond ```python # create a double bond between atoms atom1 and atom2 bond = SBBond(atom1, atom2, 2.0) # make the operation undoable with SAMSON.holding("Add bond"): # hold the node for undo/redo SAMSON.hold(bond) # create the bond in SAMSON bond.create() structuralModel.addChild(bond) # add the bond to a parent of one of the atoms if atom1.getParent(): atom1.getParent().addChild(bond) ``` Or you can use SAMSON to create covalent bonds between atoms in a structural model based on the distances: Caption: Create covalent bonds using SAMSON ```python # make the operation undoable with SAMSON.holding("Create covalent bonds"): structuralModel.createCovalentBonds() ``` The [`SBStructuralModel.createCovalentBonds()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md#samson.SBStructuralModel.createCovalentBonds) creates covalent bonds between atoms based on [`residue`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeResidue.md#samson.SBResidue) types, chemical component dictionary, and inter-atomic distances (it also accepts and additional margin for inter-atomic distances). Or based on the [`residue`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeResidue.md#samson.SBResidue) types as well: Caption: Create covalent bonds by residue type using SAMSON ```python # make the operation undoable with SAMSON.holding("Create covalent bonds"): # Create covalent bonds for the atoms belonging to the structural model # according to the residue types, regardless of inter-atomic distances. # If the bonds are already present, it sets the order of covalent bonds for the atoms # belonging to the structural model according to the residue types. structuralModel.createCovalentBondsByResidueType() ``` ### Adding hydrogens You can use SAMSON to add hydrogens to [`atoms`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom). The code below shows how to add hydrogens to all atoms in the document. Caption: Add hydrogens to atoms using SAMSON ```python # get an indexer of all atoms in the active document atomIndexer = SAMSON.getNodes('node.type atom') # make the operation undoable with SAMSON.holding("Add hydrogens"): for atom in atomIndexer: atom.addHydrogens() ``` !!! note The addition of hydrogens is based on valences and requires covalent bonds to be already created. You can also remove hydrogens from [`atoms`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom): Caption: Remove hydrogens ```python # make the operation undoable with SAMSON.holding("Remove hydrogens"): atom.removeHydrogens() ``` ### Minimizing systems You can run interactive minimization using SAMSON commands (see the [Running actions](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md#ps-run-command) section): Caption: Minimize a molecular system in the active document ```python SAMSON.runCommand('Minimize') ``` This will launch the minimization in SAMSON - you can see the process in the **Viewport**. Call this command once more to stop the interactive minimization. !!! note The minimization is applied either to the whole active document or to the selection in the active document depending on the minimization settings set in the **Preferences > Minimize**. You can also see other minimization settings there. ### Examples [Building a decane molecule](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_BuildingDecaneMolecule.md#ps-example-building-decane-molecule) [Creation of a carbon nanotube fabric: replication, modification of positions](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_CreateCNTFabric.md#ps-example-cnt-fabric) --- # Presenting and animating Source: https://documentation.samson-connect.net/scripting/latest/docs/Animating.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/Animating.md SAMSON provides a powerful and accessible way to create presentations, animations, and movies. Animation capabilities in SAMSON include but are not limited to: - **animations of molecules**: dock structures, assemble structures, create custom paths, play simulation trajectories; - **camera animations**: orbit around structures, add standard paths, create custom paths; - various **animation effects**: entrance, exit, highlight, etc. A **presentation** ([`SBPresentation`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentPresentation.md#samson.SBPresentation)) is a node that combines **animation nodes** ([`SBAnimation`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentAnimation.md#samson.SBAnimation)) helping you to form a story and show presentations or export them as movies or sets of images. Presentation and animation nodes are part of [`documents`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument) and are visible in the **Document view**. A document might contain multiple presentations, each one of them containing multiple different animations. Presentation and animation nodes are saved with a document, which means that you can easily save, load, and share your presentations and animations. See: [List of available animations](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#ps-list-of-animations). !!! note "See also" User Guide: [Presenting and animating](https://documentation.samson-connect.net/users/11.0.0/presenting/#) ### List of available animations Below is a list of the animations available by default in SAMSON, together with their class names in parentheses. They are available via the **Default Animations** extension (UUID: “1B8AC667-CCBF-9C80-8E28-A60565955273”). #### Animations of molecules | Public name | Class name | User Guide | | --- | --- | --- | | *Assemble* | SEAssemble | [Assemble](https://documentation.samson-connect.net/users/11.0.0/animations/assemble/#) | | *Disassemble* | SEDisassemble | [Disassemble](https://documentation.samson-connect.net/users/11.0.0/animations/disassemble/#) | | *Dock* | SEDock | [Dock](https://documentation.samson-connect.net/users/11.0.0/animations/dock/#) | | *Undock* | SEUndock | [Undock](https://documentation.samson-connect.net/users/11.0.0/animations/undock/#) | | *Hold atoms* | SEHoldAtoms | [Hold atoms](https://documentation.samson-connect.net/users/11.0.0/animations/hold-atoms/#) | | *Move atoms* | SEMoveAtoms | [Move atoms](https://documentation.samson-connect.net/users/11.0.0/animations/move-atoms/#) | | *Play path* | SEPlayPath | [Play path](https://documentation.samson-connect.net/users/11.0.0/animations/play-path/#) | | *Play reverse path* | SEPlayReversePath | [Play reverse path](https://documentation.samson-connect.net/users/11.0.0/animations/play-reverse-path/#) | | *Rock* | SERock | [Rock](https://documentation.samson-connect.net/users/11.0.0/animations/rock/#) | | *Rotate* | SERotate | [Rotate](https://documentation.samson-connect.net/users/11.0.0/animations/rotate/#) | #### Camera animations | Public name | Class name | User Guide | | --- | --- | --- | | *Dolly camera* | SEDollyCamera | [Dolly camera](https://documentation.samson-connect.net/users/11.0.0/animations/dolly-camera/#) | | *Follow atoms* | SEFollowAtoms | [Follow atoms](https://documentation.samson-connect.net/users/11.0.0/animations/follow-atoms/#) | | *Hold camera* | SEHoldCamera | [Hold camera](https://documentation.samson-connect.net/users/11.0.0/animations/hold-camera/#) | | *Look at atoms* | SELookAtAtoms | [Look at atoms](https://documentation.samson-connect.net/users/11.0.0/animations/look-at-atoms/#) | | *Move camera* | SEMoveCamera | [Move camera](https://documentation.samson-connect.net/users/11.0.0/animations/move-camera/#) | | *Orbit camera* | SEOrbitCamera | [Orbit camera](https://documentation.samson-connect.net/users/11.0.0/animations/orbit-camera/#) | | *Pedestal camera* | SEPedestalCamera | [Pedestal camera](https://documentation.samson-connect.net/users/11.0.0/animations/pedestal-camera/#) | | *Truck camera* | SETruckCamera | [Truck camera](https://documentation.samson-connect.net/users/11.0.0/animations/truck-camera/#) | | *Zoom camera* | SEZoomCamera | [Zoom camera](https://documentation.samson-connect.net/users/11.0.0/animations/zoom-camera/#) | #### Animation effects | Public name | Class name | User Guide | | --- | --- | --- | | *Appear* | SEAppear | [Appear](https://documentation.samson-connect.net/users/11.0.0/animations/appear/#) | | *Disappear* | SEDisappear | [Disappear](https://documentation.samson-connect.net/users/11.0.0/animations/disappear/#) | | *Conceal atoms* | SEConcealAtoms | [Conceal atoms](https://documentation.samson-connect.net/users/11.0.0/animations/conceal-atoms/#) | | *Reveal atoms* | SERevealAtoms | [Reveal atoms](https://documentation.samson-connect.net/users/11.0.0/animations/reveal-atoms/#) | | *Flash* | SEFlash | [Flash](https://documentation.samson-connect.net/users/11.0.0/animations/flash/#) | | *Pulse* | SEPulse | [Pulse](https://documentation.samson-connect.net/users/11.0.0/animations/pulse/#) | | *Hidden* | SEHidden | [Hidden](https://documentation.samson-connect.net/users/11.0.0/animations/hidden/#) | | *Shown* | SEShown | [Shown](https://documentation.samson-connect.net/users/11.0.0/animations/shown/#) | | *Hide* | SEHide | [Hide](https://documentation.samson-connect.net/users/11.0.0/animations/hide/#) | | *Show* | SEShow | [Show](https://documentation.samson-connect.net/users/11.0.0/animations/show/#) | | *Pause* | SEPausePresentation | [Pause](https://documentation.samson-connect.net/users/11.0.0/animations/pause/#) | | *Stop* | SEStopPresentation | [Stop](https://documentation.samson-connect.net/users/11.0.0/animations/stop/#) | | *Set background* | SESetBackground | [Set background](https://documentation.samson-connect.net/users/11.0.0/animations/set-background/#) | You can get a dictionary of available public names of animations and their proxies: Caption: Get a dictionary of available public names of animations and their proxies ```python animation_proxy_map = SAMSON.getAnimationProxyMap() for public_name, proxy in animation_proxy_map.items(): # print the proxy information print(f"Name: {public_name}\tClass name: {proxy.name},\tExtension UUID: {proxy.elementUUID}") ``` You can also get the public name from a proxy via [`proxy.publicName`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy.publicName). ### How to create a presentation A presentation ([`SBPresentation`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentPresentation.md#samson.SBPresentation)) is a node and can be added in a [`document`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument) or in a [`folder`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md#samson.SBFolder): Caption: Create a new presentation and add it in the active document. ```python # make the operation undoable with SAMSON.holding("Add presentation"): # construct an instance of a presentation presentation = SBPresentation('Presentation') # hold the node for undo/redo SAMSON.hold(presentation) # create the node presentation.create() # add the presentation in the active document SAMSON.getActiveDocument().addChild(presentation) ``` This should add a presentation in the active document and make it in an [undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo) way. ### How to create an animation Once you have a presentation, you can add various animations into it. See: [List of available animations](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#ps-list-of-animations). There are two main ways to create animations: using commands and using proxies. #### Create an animation using commands You can use [SAMSON commands](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md#ps-run-command) to select nodes to which you would like to apply animations and then to invoke those animations. For example, let’s assume that there is a single path in the active document and we want to apply the “Play path” animation. Then we select it and we simply invoke the “Play path” command that will create the “Play path” animation and add it into the active presentation. Caption: Add a path animation into a presentation using commands ```python # select paths in the active document # we assume that there is only one path in the active document # if there is no path in the document, download a pdb with multiple models/conformations, e.g. 2N47 # SAMSON.fetch('2N47', 'pdb') # and make sure to check "Create paths from multiple models" SAMSON.runCommand('nsl: node.type path') # invoke the 'Play path' SAMSON.runCommand('Play path') ``` Now the “Play path” animation should have been added to the document and we can move its keyframes. !!! note Not all animation can be created in this way. Please see the section below for the general way. #### Create an animation using proxies The general way to create an [`animation`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentAnimation.md#samson.SBAnimation) is by using the [`SAMSON.makeAnimation()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.makeAnimation) function. This function requires a [`node indexer`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) (to which the animation should be applied) and either a public name of the animation or its [`proxy`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy) information (the class name and the extension [`UUID`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)). In the example below, we create a presentation and add the *Play path* animation to it for the last path/trajectory in the active document. First, open a trajectory in SAMSON or fetch one from RCSB PDB, e.g. `SAMSON.fetch('1d3z', 'pdb')`. Caption: Create a presentation with the Play path animation ```python import os from math import log10 class HaltException(Exception): pass # get the path from the user ret, movie_filepath = SAMSON.getPathFromUser(dialogTitle = 'Choose folder to save movie') if ret: # a temporary path to images random_uuid = SBRandom(SAMSON.getTime() % 2147483647).randUUID() path_to_image_files = movie_filepath + '/tmp/' + str(random_uuid) + '/' # try to create a temporary folder try: os.makedirs(path_to_image_files) except: HaltException('Could not create a folder') camera = SAMSON.getActiveCamera() # get the active camera #camera.frontView() # set the view of the camera SAMSON.processEvents() # process events: updates viewport # get an indexer of paths from the active document path_indexer = SAMSON.getNodes('node.type path') if len(path_indexer): # get the first path from the indexer path = path_indexer[0] ext = '.png' # extension of files path.forwardFlag = True # set a change in positions in a forward direction path.animationFlag = True # set the animation flag path.animationType = SBPath.AnimationType.Loop # set Loop type of an animation # show a progress bar to inform user about the progress SAMSON.showProgressBar('steps', 0, path.numberOfSteps) # store the current step current_step = path.currentStep path.currentStep = 0 # go through the trajectory frames for i in range(path.numberOfSteps): # update the state - change positions to the next step path.updateState() SAMSON.processEvents() i_str = str(i).zfill(int(log10(path.numberOfSteps)) + 1) filename = path_to_image_files + i_str + ext # save a capture of the viewport in a file with 800x600 resolution SAMSON.captureViewportToFile(filename, 800, 600) SAMSON.setProgressBarValue(i) # update the progress bar if SAMSON.isProgressBarStopped(): break # break if the rotation is finished # restore the current step path.currentStep = current_step # change directory to the directory with images os.chdir(path_to_image_files) # get the list of created images img_files = sorted((fn for fn in os.listdir('.') if fn.endswith('.png'))) # create a gif and mp4 files using imageio create_movie_using_imageio(movie_path = movie_filepath, image_filenames = img_files, duration = 0.1) # create a gif and mp4 files using moviepy #create_movie_using_moviepy(movie_path = movie_filepath, # image_filenames = img_files, fps = 16) SAMSON.hideProgressBar() ``` !!! note You can find the animation class names in [List of available animations](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#ps-list-of-animations). Currently, all the default animations available in SAMSON are provided via the **Default Animations** extension (UUID: “1B8AC667-CCBF-9C80-8E28-A60565955273”). !!! note "See also" [Presentation: play path](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_PresentationPlayPath.md#ps-presentation-play-path) ### Exporting a movie You can export a presentation from SAMSON into a movie using the [`SAMSON.exportToFile()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.exportToFile) function: Caption: Export a presentation as a movie ```python # get an indexer of presentations in the active document presentationIndexer = SAMSON.getNodes('node.type presentation') # export with the default parameters for exporting into a movie SAMSON.exportToFile(presentationIndexer, "/path/to/movie.mp4") ``` !!! note You can modify the presentation export settings in the **Preferences**. --- # Rendering Source: https://documentation.samson-connect.net/scripting/latest/docs/Rendering.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/Rendering.md SAMSON provides a range of **rendering effects** and integrates **Cycles Renderer**, the path-tracing renderer from [Blender](https://www.blender.org/). ### Rendering effects SAMSON provides various rendering options (styles, special effects, etc) to help you create beautiful [visualizations](https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.md#ps-visualizing) and [animations](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#ps-animating): - Ambient occlusion - Anti-aliasing - Background - Bloom - Depth of field rendering - Fog - Lighting - Pinhole - Shadows - Silhouettes You can change these rendering options using [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand) (see [Running actions](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md#ps-run-command)): Caption: Change background to white ```python SAMSON.runCommand('Background > White') ``` !!! note "See also" User Guide: [Rendering effects](https://documentation.samson-connect.net/users/11.0.0/rendering-effects/#) [Visualizing](https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.md#ps-visualizing) [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) [Presenting and animating](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#ps-animating) ### Render presets SAMSON provides [`SBRenderPreset`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentRenderPreset.md#samson.SBRenderPreset), a class that stores rendering preferences. You can add multiple render preset nodes to a document, copy them, and apply them to restore global rendering settings. Please refer to [SBRenderPreset](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentRenderPreset.md#ps-sbrenderpreset) for more information. Caption: Create and add a render preset ```python # create it based on the current rendering settings renderPreset = SAMSON.createRenderPreset() # or construct a render preset node with default settings #renderPreset = SBRenderPreset("Render preset") # change the render preset properties # make the operation undoable with SAMSON.holding("Add render preset"): SAMSON.hold(renderPreset) # create a render preset node renderPreset.create() # add it to the active document SAMSON.getActiveDocument().addChild(renderPreset) ``` You can then simply apply the render preset to change the rendering settings. Caption: Apply a render preset ```python # make the operation undoable with SAMSON.holding("Apply render preset"): # apply a render preset renderPreset.apply() ``` !!! note "See also" [SBRenderPreset](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentRenderPreset.md#ps-sbrenderpreset) ### Rendering using Cycles SAMSON integrates **Cycles Renderer**, a path-tracing renderer from [Blender](https://www.blender.org/). Cycles provides **interactive photorealistic rendering** so you can create studio-quality images and animations directly inside SAMSON. !!! note "See also" User Guide: [Rendering using Cycles](https://documentation.samson-connect.net/users/11.0.0/rendering/#) You can activate and deactivate the path tracing using [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand): Caption: Toggle path tracing ```python SAMSON.runCommand('Trace') ``` You can change material appearances that affect the rendering with path tracing. For that, you can either modify specific attributes of the node’s material or set an appearance preset using the [`SBNode.setMaterialAppearance()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.setMaterialAppearance) function. Caption: Set material appearances to the last visual model ```python # get the indexer of visual models in the active document visualModelIndexer = SAMSON.getNodes('node.type visualModel') if len(visualModelIndexer): # get the last visual model visualModel = visualModelIndexer[-1] # make the operation undoable with SAMSON.holding('Add material'): # set a material appearance to the visual model visualModel.setMaterialAppearance('Transparent: Glass') # start path-tracing SAMSON.runCommand('Trace') ``` Caption: Set material appearances to visual models based on their type ```python # get the indexer of visual models in the active document visualModelIndexer = SAMSON.getNodes('n.t vm') if len(visualModelIndexer): # make the operation undoable with SAMSON.holding('Add material'): for visualModel in visualModelIndexer: # set material appearances to the visual models based on their types if visualModel.isLicorice(): visualModel.setMaterialAppearance('Emissive: Glowing (10)') elif visualModel.isVanDerWaals(): visualModel.setMaterialAppearance('Transparent: Water') elif visualModel.isRibbon(): visualModel.setMaterialAppearance('Smooth: Shiny plastic') # start path-tracing SAMSON.runCommand('Trace') ``` You can export a rendered image from SAMSON using the [`SAMSON.captureViewportToFile()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.captureViewportToFile) function by setting its `usePathTracing` parameter to `True`: Caption: Render the viewport into an image ```python SAMSON.captureViewportToFile(filename = "/path/to/image.png", width = 1000, height = 800, usePathTracing = True) ``` --- # Introspection: using extensions Source: https://documentation.samson-connect.net/scripting/latest/docs/Introspection.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md SAMSON has an open architecture that allows you to extend and adapt it to your needs by installing [SAMSON Extensions](https://documentation.samson-connect.net/users/latest/extending-samson/) from the [SAMSON Connect website](https://www.samson-connect.net/?utm_source=UserGuide). !!! note "See also" User Guide: [Extending SAMSON](https://documentation.samson-connect.net/users/11.0.0/extending-samson/#) SAMSON extensions can expose their functionality through the [Introspection](https://documentation.samson-connect.net/developers/11.0.0/introspection/#) mechanism. Once exposed, you can access that functionality from both C++ and Python via proxies ([`SBProxy`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy)). !!! tip If you develop a SAMSON extension in C++ and want to use its functionality in Python scripts, then expose it via the [Introspection](https://documentation.samson-connect.net/developers/11.0.0/introspection/#) mechanism on the C++ side. !!! note "See also" SAMSON SDK: [Introspection](https://documentation.samson-connect.net/developers/11.0.0/introspection/#) You can use the [Exposed Functionality Viewer](https://www.samson-connect.net/extensions/92c88bef-d33d-3eab-2380-1d4b1788ac1b) directly available in SAMSON (**Home > Apps > Developer > Exposed functionality viewer**) to see classes and functions exposed per extension. You can simply choose the extension, class, and function you are interested in and copy the generated sample code from the **Python usage** tab - you will only need to provide function arguments, if required. ![Exposed functionality viewer](https://documentation.samson-connect.net/scripting/latest/docs/docs/images/ExposedFunctionalityViewer.png) ### Getting proxies Exposed functionality is called through a class proxy ([`SBProxy`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy)). To get the proxy, you need to know at least the class name. If several SAMSON extensions may provide a class with the same name, specify the UUID of the extension as well. Caption: Get a class proxy ```python proxy = SAMSON.getProxy( className = "SERDKitWrapperApp", extensionUUID = SBUUID("AA09650A-C071-4E84-1F6A-B8706937D5C1")) ``` ### Calling functions Proxies can expose various types of functions: | Function type | How to call | | --- | --- | | static | [`SBProxy.staticCall()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy.staticCall) | | non-static | [`SBProxy.call()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy.call) | | non-static const | [`SBProxy.constCall()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy.constCall) | #### Calling static functions Caption: Call a static function ```python # get the class proxy proxy = SAMSON.getProxy( className = "SERDKitWrapperApp", extensionUUID = SBUUID("AA09650A-C071-4E84-1F6A-B8706937D5C1")) # check if the proxy has the exposed function `isValidSMARTS` that accepts a string if proxy.hasFunction("isValidSMARTS", SBValue("")): # call the static function for a given SMARTS # the call will return a resulting value encapsulated into `SBValue` object result = proxy.staticCall( # function name "isValidSMARTS", # function arguments SBValue("CCO")) # check if the returned `SBValue` is valid if result.isValid(): # get the value from the `SBValue` object print("result: ", result.getValue()) ``` #### Calling non-static functions To call a non-static function, you need to create the corresponding class instance. The class instance is created from its proxy via [`SBProxy.createInstance()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy.createInstance) which returns the newly created instance as [`SBValue`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValue.md#samson.SBValue). !!! note The ownership of the class instance object is taken and managed by Python. The code below shows how to call a non-static function using a created instance of the corresponding class on an example of the **Fetcher** extension that exposes the functionality to fetch/download PDB files. Caption: Call a non-static function ```python import os # get the class proxy proxy = SAMSON.getProxy( className = "PDBDownload", extensionUUID = SBUUID("6F5D45C5-E76E-CDC8-52D5-D2821C128BE8")) ## create the class instance from its proxy instance = proxy.createInstance() # check if the instance has been successfully created if instance.isValid(): # check if the class proxy has the desired function if proxy.hasFunction("downloadOnly", SBValue(""), SBValue(""), SBValue("")): # call a non-static function for the class instance # this function will download and save the PDB file in the default directory proxy.call( # class instance instance, # function name "downloadOnly", # function arguments SBValue("1YRF"), SBValue("pdb"), SBValue("")) # the default path to the destination file downloaded_file_path = SAMSON.getUserDataPath() + "/Downloads/PDB/1YRF.pdb" # check if the file has been downloaded if os.path.exists(downloaded_file_path): print("Downloaded successfully") else: print("Could not download a file") ``` In the same way you can call non-static const functions. --- # Examples Source: https://documentation.samson-connect.net/scripting/latest/docs/Examples.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/Examples.md This section collects practical examples of using the SAMSON Python API. The examples are grouped by task so you can quickly find a workflow that is close to what you want to script. If you would like your examples to be featured here, please contact us. ### Animations - [Presentation: play path](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_PresentationPlayPath.md) - [Create animations and movies without presentations](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_SimpleAnimations.md) ### Building systems - [Building a decane molecule](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_BuildingDecaneMolecule.md) - [Create atoms on a sphere](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_CreateAtomsOnSphere.md) - [Creation of a carbon nanotube fabric: replication, modification of positions](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_CreateCNTFabric.md) ### Colorization and visualization - [Colorize atoms by position](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ColorizeAtomsByPosition.md) - [Colorize atoms by velocity along path](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ColorizeAtomsByVelocityAlongPath.md) - [Visualize coarse-grained systems](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_VisualizeCoarseGrainedSystems.md) - [Colorize connected components by molecular weight](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ColorizeConnectedComponentByMW.md) ### Exporting - [Export trajectory frames](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ExportTrajectoryFrames.md) ### Processing - [Compute RMSD between two molecules](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ComputeRMSD.md) - [Compute bond lengths along paths](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ComputeBondLengthAlongPath.md) - [Compute interatomic distances along path](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ComputeInteratomicDistancesAlongPath.md) ### Selections - [Select atoms and bonds by location](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_SelectAtomsAndBondsByLocation.md) - [Select connected components by molecular weight](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_SelectConnectedComponentByMW.md) ### Simulation - [Examples of usage of ASE package](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ASE.md) ### Apps and GUIs - [Embedded app: a simple GUI with buttons](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_EmbeddedApp.md) - [Select connected components by molecular weight](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_Dialog_SelectConnectedComponentByMW.md) --- # Presentation: play path Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_PresentationPlayPath.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_PresentationPlayPath.md This example combines what is written in the [Presenting and animating](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#ps-animating) section and demonstrates how to create a presentation with the *Play path* animation. Open a a trajectory in SAMSON or fetch it as shown in the example below, e.g. `SAMSON.fetch('1yrf', 'pdb')`. Caption: Create a presentation with the Play path animation ```python import os from math import log10 class HaltException(Exception): pass # get the path from the user ret, movie_filepath = SAMSON.getPathFromUser(dialogTitle = 'Choose folder to save movie') if ret: # a temporary path to images random_uuid = SBRandom(SAMSON.getTime() % 2147483647).randUUID() path_to_image_files = movie_filepath + '/tmp/' + str(random_uuid) + '/' # try to create a temporary folder try: os.makedirs(path_to_image_files) except: HaltException('Could not create a folder') camera = SAMSON.getActiveCamera() # get the active camera #camera.frontView() # set the view of the camera SAMSON.processEvents() # process events: updates viewport # get an indexer of paths from the active document path_indexer = SAMSON.getNodes('node.type path') if len(path_indexer): # get the first path from the indexer path = path_indexer[0] ext = '.png' # extension of files path.forwardFlag = True # set a change in positions in a forward direction path.animationFlag = True # set the animation flag path.animationType = SBPath.AnimationType.Loop # set Loop type of an animation # show a progress bar to inform user about the progress SAMSON.showProgressBar('steps', 0, path.numberOfSteps) # store the current step current_step = path.currentStep path.currentStep = 0 # go through the trajectory frames for i in range(path.numberOfSteps): # update the state - change positions to the next step path.updateState() SAMSON.processEvents() i_str = str(i).zfill(int(log10(path.numberOfSteps)) + 1) filename = path_to_image_files + i_str + ext # save a capture of the viewport in a file with 800x600 resolution SAMSON.captureViewportToFile(filename, 800, 600) SAMSON.setProgressBarValue(i) # update the progress bar if SAMSON.isProgressBarStopped(): break # break if the rotation is finished # restore the current step path.currentStep = current_step # change directory to the directory with images os.chdir(path_to_image_files) # get the list of created images img_files = sorted((fn for fn in os.listdir('.') if fn.endswith('.png'))) # create a gif and mp4 files using imageio create_movie_using_imageio(movie_path = movie_filepath, image_filenames = img_files, duration = 0.1) # create a gif and mp4 files using moviepy #create_movie_using_moviepy(movie_path = movie_filepath, # image_filenames = img_files, fps = 16) SAMSON.hideProgressBar() ``` ### Creating movies from images The code above can make use of the following functions below to create movies from images. **Prerequisites** For this example, you will need to install one of the packages (see: [Installing Python packages](https://documentation.samson-connect.net/scripting/latest/docs/GettingStarted.md#ps-install-python-package)): - `imageio` [recommended] - `moviepy` Caption: Create a movie from images using imageio ```python import datetime import imageio def create_movie_using_imageio(movie_path, image_filenames, duration): ''' Creates gif and mp4 files from images using to imageio package ''' images = [] for filename in image_filenames: images.append(imageio.imread(filename)) # generate a name from the current date and time current_time = datetime.datetime.now().strftime('%Y-%m-%d-%H-%M-%S') # a name for the gif-file output_gif_file = movie_path + '/moviepy-%s.gif' % current_time # a name for the mp4-file output_mp4_file = movie_path + '/moviepy-%s.mp4' % current_time # save clip to the gif-file imageio.mimsave(output_gif_file, images, duration=duration) # save clip to the mp4-file imageio.mimsave(output_mp4_file, images) ``` Caption: Create a movie from images using moviepy ```python import datetime import moviepy.editor as mpy def create_movie_using_moviepy(movie_path, image_filenames, fps = 16): ''' Creates gif and mp4 movies from images using the moviepy package ''' # generate a name from the current date and time current_time = datetime.datetime.now().strftime('%Y-%m-%d-%H-%M-%S') # a name for the gif-file output_gif_file = movie_path + '/moviepy-%s.gif' % current_time # a name for the mp4-file output_mp4_file = movie_path + '/moviepy-%s.mp4' % current_time # create a clip clip = mpy.ImageSequenceClip(image_filenames, fps = fps) # save clip to the gif-file clip.write_gif(output_gif_file) # save clip to the mp4-file clip.write_videofile(output_mp4_file) ``` --- # Create animations and movies without presentations Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_SimpleAnimations.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_SimpleAnimations.md While you can create sophisticated animations and export them in movies using [presentations and animations in SAMSON](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#ps-animating), you can also create animations by simply modifying systems and orienting cameras, and then capturing the viewport and combining the resulting images into movies. !!! note "See also" [Presenting and animating](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#ps-animating) [Presentation: play path](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_PresentationPlayPath.md#ps-presentation-play-path) Below, you can find two examples that produce *gif* and *mp4* movies of: - path (trajectory) animation - camera orbiting a molecule ### Creating movies from images First, let’s see how can we create movies from images. **Prerequisites** For this example, you will need to install one of the packages (see: [Installing Python packages](https://documentation.samson-connect.net/scripting/latest/docs/GettingStarted.md#ps-install-python-package)): - `imageio` [recommended] - `moviepy` Caption: Create a movie from images using imageio ```python import datetime import imageio def create_movie_using_imageio(movie_path, image_filenames, duration): ''' Creates gif and mp4 files from images using to imageio package ''' images = [] for filename in image_filenames: images.append(imageio.imread(filename)) # generate a name from the current date and time current_time = datetime.datetime.now().strftime('%Y-%m-%d-%H-%M-%S') # a name for the gif-file output_gif_file = movie_path + '/moviepy-%s.gif' % current_time # a name for the mp4-file output_mp4_file = movie_path + '/moviepy-%s.mp4' % current_time # save clip to the gif-file imageio.mimsave(output_gif_file, images, duration=duration) # save clip to the mp4-file imageio.mimsave(output_mp4_file, images) ``` Caption: Create a movie from images using moviepy ```python import datetime import moviepy.editor as mpy def create_movie_using_moviepy(movie_path, image_filenames, fps = 16): ''' Creates gif and mp4 movies from images using the moviepy package ''' # generate a name from the current date and time current_time = datetime.datetime.now().strftime('%Y-%m-%d-%H-%M-%S') # a name for the gif-file output_gif_file = movie_path + '/moviepy-%s.gif' % current_time # a name for the mp4-file output_mp4_file = movie_path + '/moviepy-%s.mp4' % current_time # create a clip clip = mpy.ImageSequenceClip(image_filenames, fps = fps) # save clip to the gif-file clip.write_gif(output_gif_file) # save clip to the mp4-file clip.write_videofile(output_mp4_file) ``` ### Trajectory animation This example demonstrates how to make an animation of a path in SAMSON by capturing screenshots and creating a movie from them. First, open a trajectory in SAMSON or fetch one from RCSB PDB, e.g. `SAMSON.fetch('1d3z', 'pdb')`. Caption: Trajectory animation ```python import os from math import log10 class HaltException(Exception): pass # get the path from the user ret, movie_filepath = SAMSON.getPathFromUser(dialogTitle = 'Choose folder to save movie') if ret: # a temporary path to images random_uuid = SBRandom(SAMSON.getTime() % 2147483647).randUUID() path_to_image_files = movie_filepath + '/tmp/' + str(random_uuid) + '/' # try to create a temporary folder try: os.makedirs(path_to_image_files) except: HaltException('Could not create a folder') camera = SAMSON.getActiveCamera() # get the active camera #camera.frontView() # set the view of the camera SAMSON.processEvents() # process events: updates viewport # get an indexer of paths from the active document path_indexer = SAMSON.getNodes('node.type path') if len(path_indexer): # get the first path from the indexer path = path_indexer[0] ext = '.png' # extension of files path.forwardFlag = True # set a change in positions in a forward direction path.animationFlag = True # set the animation flag path.animationType = SBPath.AnimationType.Loop # set Loop type of an animation # show a progress bar to inform user about the progress SAMSON.showProgressBar('steps', 0, path.numberOfSteps) # store the current step current_step = path.currentStep path.currentStep = 0 # go through the trajectory frames for i in range(path.numberOfSteps): # update the state - change positions to the next step path.updateState() SAMSON.processEvents() i_str = str(i).zfill(int(log10(path.numberOfSteps)) + 1) filename = path_to_image_files + i_str + ext # save a capture of the viewport in a file with 800x600 resolution SAMSON.captureViewportToFile(filename, 800, 600) SAMSON.setProgressBarValue(i) # update the progress bar if SAMSON.isProgressBarStopped(): break # break if the rotation is finished # restore the current step path.currentStep = current_step # change directory to the directory with images os.chdir(path_to_image_files) # get the list of created images img_files = sorted((fn for fn in os.listdir('.') if fn.endswith('.png'))) # create a gif and mp4 files using imageio create_movie_using_imageio(movie_path = movie_filepath, image_filenames = img_files, duration = 0.1) # create a gif and mp4 files using moviepy #create_movie_using_moviepy(movie_path = movie_filepath, # image_filenames = img_files, fps = 16) SAMSON.hideProgressBar() ``` ### Camera orbiting animation This example demonstrates how to create an animation by rotating a camera, capturing screenshots, and creating a movie from them. First, open a molecule in SAMSON or fetch one from RCSB PDB, e.g. `SAMSON.fetch('1yrf', 'pdb')`. Caption: Camera orbiting animation ```python import os from math import pi, log10 class HaltException(Exception): pass def rotate_camera(camera, velocity, center): ''' Rotates the camera with the given velocity around the given center and updates the viewport ''' camera.rotate(velocity, center) SAMSON.requestViewportUpdate() SAMSON.processEvents() # get the path from the user ret, movie_filepath = SAMSON.getPathFromUser(dialogTitle = 'Choose folder to save movie') if ret: # a temporary path to images random_uuid = SBRandom(SAMSON.getTime() % 2147483647).randUUID() path_to_image_files = movie_filepath + '/tmp/' + str(random_uuid) + '/' # try to create a temporary folder try: os.makedirs(path_to_image_files) except: HaltException('Could not create a folder') # get an indexer of all atoms in the active document atom_indexer = SAMSON.getNodes('node.type atom') if len(atom_indexer): camera = SAMSON.getActiveCamera() # get the active camera camera.center() # centers the camera #camera.frontView() # set the view of the camera SAMSON.processEvents() # process events: updates viewport # compute the geometrical center of the molecule center = SBStructuralModel.getCentroid(atom_indexer) velocity = pi * 1.0/180.0 # rotation velocity # rotation is only in y-direction velocity3 = SBRadianPerSecond3( SBQuantity.radPerS(0), SBQuantity.radPerS(velocity), SBQuantity.radPerS(0)) ext = '.png' # extension of files numberOfRorations = 36 # rotate 36 times # show a progress bar to inform user about the progress SAMSON.showProgressBar('Orbiting and capturing', 0, numberOfRorations) for i in range(numberOfRorations): # rotate the camera around the center point with the given velocity rotate_camera(camera, velocity3, center) i_str = str(i).zfill(int(log10(numberOfRorations)) + 1) filename = path_to_image_files + i_str + ext # save a capture of the viewport in a file with 800x800 resolution SAMSON.captureViewportToFile(filename, 800, 800) SAMSON.setProgressBarValue(i) # update the progress bar if SAMSON.isProgressBarStopped(): break # break if the rotation is finished # change directory to the directory with images os.chdir(path_to_image_files) # get the list of created images img_files = sorted((fn for fn in os.listdir('.') if fn.endswith('.png'))) # create a gif and mp4 files using imageio create_movie_using_imageio(movie_path = movie_filepath, image_filenames = img_files, duration = 0.1) # create a gif and mp4 files using moviepy #create_movie_using_moviepy(movie_path = movie_filepath, # image_filenames = img_files, fps = 16) SAMSON.hideProgressBar() ``` --- # Building a decane molecule Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_BuildingDecaneMolecule.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_BuildingDecaneMolecule.md ![Decane molecule](https://documentation.samson-connect.net/scripting/latest/docs/examples/docs/examples/images/decane.png) This example combines what is written in the [Building](https://documentation.samson-connect.net/scripting/latest/docs/Building.md#ps-building) section and demonstrates how to create a structural model populated with atoms on an example of a decane molecule. Caption: Example: building a decane molecule ```python # make the operation undoable SAMSON.beginHolding("Add nodes") # create an instance of a structural model structuralModel = SBStructuralModel() # set the structural model's name structuralModel.name = 'Structural model' # hold the node to make it creation undoable SAMSON.hold(structuralModel) # create the node structuralModel.create() # add the visual model to the active document SAMSON.getActiveDocument().addChild(structuralModel) atomIndexer = SBNodeIndexer() for i in range(10): # generate a position position = SBPosition3( i * SBQuantity.angstrom(1.1), (i % 2) * SBQuantity.angstrom(0.9), SBQuantity.angstrom(0)) # instantiate a Carbon atom at the given position atom = SBAtom(SBElement.Carbon, position) # hold the node to make it creation undoable SAMSON.hold(atom) # create the node atom.create() # add the atom to the structuralModel structuralModel.addChild(atom) atomIndexer.addNode(atom) # create covalent bonds structuralModel.createCovalentBonds() # add hydrogens to atoms based on their valence for atom in atomIndexer: atom.addHydrogens() # stop holding the undoable operation SAMSON.endHolding() # center the active camera on the system SAMSON.getActiveCamera().center() ``` --- # Create atoms on a sphere Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_CreateAtomsOnSphere.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_CreateAtomsOnSphere.md ![Atoms on a sphere](https://documentation.samson-connect.net/scripting/latest/docs/examples/docs/examples/images/atom_on_sphere.png) This example combines what is written in the [Building](https://documentation.samson-connect.net/scripting/latest/docs/Building.md#ps-building) section and demonstrates how to create a structural model populated with Carbon atoms placed on a sphere. Caption: Example: create atoms on a sphere ```python import math n = 100 # number of atoms radius = SBQuantity.angstrom(4.2) # radius of the sphere # generate positions on a sphere golden_ratio = (1 + math.sqrt(5)) / 2 theta = 2 * math.pi * golden_ratio increment = 2 / n points = [] for i in range(n): y = ((i * increment) - 1) + (increment / 2) r = math.sqrt(1 - pow(y, 2)) phi = (i % n) * theta x = math.cos(phi) * r z = math.sin(phi) * r position = SBPosition3(radius * x, radius * y, radius * z) points.append(position) # create a structural model and add atoms to it # instantiate a structural model structuralModel = SBStructuralModel() for i in range(n): atom = SBAtom(SBElement.Carbon) atom.setPosition(points[i]) structuralModel.addChild(atom) # create covalent bonds structuralModel.createCovalentBonds() # make the operation undoable with SAMSON.holding('Add atoms'): # hold the structural model for undo/redo SAMSON.hold(structuralModel) # create the structural model structuralModel.create() # add the structural model to the active document SAMSON.getActiveDocument().addChild(structuralModel) ``` --- # Creation of a carbon nanotube fabric: replication, modification of positions Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_CreateCNTFabric.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_CreateCNTFabric.md ![CNT fabric](https://documentation.samson-connect.net/scripting/latest/docs/examples/docs/examples/images/CNT-fabric.png) In this tutorial, we will weave a carbon nanotube (CNT) fabric, numerically, of course. To do so, we need to perform the following steps: - create one nanotube using the Nanotube Creator Editor; - replicate this nanotube in two directions to create a grid of nanotubes; - apply sine function to these nanotubes in the third direction to weave them with each other. To create a nanotube, we will use the [Nanotube Creator Editor](https://samson-connect.net/app/main?key=element&uuid=1ebd1e1c-2f89-62bd-02c2-08216dcbd60b). !!! note "See also" [Getting nodes](https://documentation.samson-connect.net/scripting/latest/docs/GettingNodes.md#ps-get-nodes) [Building](https://documentation.samson-connect.net/scripting/latest/docs/Building.md#ps-building) For the sake of simplicity, we will create a nanotube in the X-direction with the size of 400 Å. To create a nanotube with specific parameters, double-click on the [Nanotube Creator Editor](https://samson-connect.net/app/main?key=element&uuid=1ebd1e1c-2f89-62bd-02c2-08216dcbd60b)’s icon and set parameters as on the image below. ![Nanotube Creator Editor dialog](https://documentation.samson-connect.net/scripting/latest/docs/examples/docs/examples/images/CNT-fabric-creation-of-nanotube-dialog.png) To generate a nanotube with the given parameters, press the **Build** button. ![CNT fabric](https://documentation.samson-connect.net/scripting/latest/docs/examples/docs/examples/images/CNT-fabric-creation-of-nanotube-generate.png) The rest will be done using Python. Now, let’s open the **Python Scripting** app. The nanotube created with the [Nanotube Creator Editor](https://samson-connect.net/app/main?key=element&uuid=1ebd1e1c-2f89-62bd-02c2-08216dcbd60b) is stored in a structural model in the data graph. For the simplicity, let’s assume that we have only one nanotube created in the active document. Then, to get this nanotube object in Python, we need to get the first structural model in the active document: ```python # get an indexer of all structural models in the active document indexerOfStructuralModels = SAMSON.getNodes('n.t sm') # get the first structural model from the indexer nanotube = indexerOfStructuralModels[0] ``` Let us now create a nanotube fabric by replicating the created nanotube in XY-plane and modifying Z-coordinate of atoms in nanotubes to weave these nanotubes with each other. Before setting up parameters for the fabric, we need to find a bounding box of the created nanotube: ```python # get an indexer of all atoms in the nanotube indexerOfAtoms = nanotube.getNodes('n.t a') a = indexerOfAtoms[0] minX = maxX = a.getX() minY = maxY = a.getY() # go through all atoms in the indexer for a in indexerOfAtoms: x = a.getX() y = a.getY() minX = min(minX, x) maxX = max(maxX, x) minY = min(minY, y) maxY = max(maxY, y) ``` Let’s now set up parameters for the creation of nanotube fabric. We will set the number of replicas in one direction (the number of replicas in the perpendicular direction will be the same), and based on it we will compute the distance between replicas. You can do it differently by specifying the distance between nanotubes and then computing the number of replicas. We will be using the sine function for modifying nanotubes with its half-period set equal to the distance between nanotubes and an amplitude equal to 1.5 of the nanotube’s radius. ```python length = (maxX - minX) # the nanotube's length diameter = (maxY - minY) # the nanotube's diameter numReplicasX = 10 # the number of replicas in one direction distance = length / numReplicasX # set еру distance between nanotubes based on the number of replicas A = 0.75 * diameter # set an amplitude for sine function ``` Now, let’s replicate the nanotube in the Y-direction by copying it and shifting the copies in the Y-direction. The replicas will be added to the active document. ```python # get the active document document = SAMSON.getActiveDocument() # start holding to allow for undo/redo with SAMSON.holding("Replicate nanotubes"): for r in range(numReplicasX-1): # create a replica replica = nanotube.clone() # clone the original nanotube SAMSON.hold(replica) # hold the replica node for undo/redo replica.create() # create the replica document.addChild(replica) # add the replica to the document # shift the replica in Y-direction dy = (r + 1) * distance # get an indexer of all atoms in the replicated nanotube indexerOfAtoms = replica.getNodes('n.t a') # loop over all atoms in the replicated nanotube for a in indexerOfAtoms: # shift atoms in the Y-direction a.setY(a.getY() + dy) ``` After doing that, we will get a set of nanotubes looking like this: ![CNTs replicated in Y-direction](https://documentation.samson-connect.net/scripting/latest/docs/examples/docs/examples/images/CNT-fabric-creation-Y-direction.png) Now, we will replicate these nanotubes in the X-direction by copying them and rotating the replicas by 90 degrees. These replicas will also be shifted from the boundaries to have a grid pattern. Then, we will apply the sine function in Z-direction to all nanotubes with changing its phase to have a weaved pattern. ```python # import the necessary functions and constants from math import sin, pi # get an indexer of all structural models in the active document indexerOfStructuralModels = SAMSON.getNodes('n.t sm') sign = 1 # used to change the phase of the sine function # start holding to allow for undo/redo SAMSON.beginHolding("Replicate nanotubes") # loop through all structural models (all nanotubes) for original in indexerOfStructuralModels: # create a replica replica = original.clone() # clone the original nanotube SAMSON.hold(replica) # hold the replica node for undo/redo replica.create() # create the replica document.addChild(replica) # add it to the document # for shifting nanotubes from the border shift = distance / 2.0 # get an indexer of all atoms in the replicated nanotube indexerOfAtomsInReplica = replica.getNodes('n.t a') # rotate the replica by 90 degrees by changing x and y coordinates of its atoms # and shift the replica from the borders to have '#' pattern for a in indexerOfAtomsInReplica: x = a.getX() y = a.getY() a.setY(x - shift) a.setX(y + shift) # apply sine function in Z-direction to original and replicated nanotubes # get an indexer of all atoms in the original nanotube indexerOfAtomsInOriginal = original.getNodes('n.t a') # loop over all atoms in the original nanotube for a in indexerOfAtomsInOriginal: w = a.getX() / distance # [dimensionless quantity] # apply sine function to the Z-coordinate of an atom a.setZ(a.getZ() + A * sign * sin(pi * w.value)) # loop over all atoms in the replicated nanotube for a in indexerOfAtomsInReplica: # [dimensionless quantity], take into account the shift we did previously w = (a.getY() - shift) / distance # apply sine function to the Z-coordinate of an atom a.setZ(a.getZ() + A * sign * sin(pi * w.value)) # change the phase to the opposite one sign = -1 * sign # end holding for undo/redo SAMSON.endHolding() ``` After that, we will get a grid of nanotubes, where nanotubes are woven with each other. ![CNT grid](https://documentation.samson-connect.net/scripting/latest/docs/examples/docs/examples/images/CNT-fabric-creation-grid.png) A close-up of the created system. For this picture, the default bond radius was set equal to the default atom radius in *Preferences → Rendering → Structural model*. ![CNT fabric](https://documentation.samson-connect.net/scripting/latest/docs/examples/docs/examples/images/CNT-fabric-in-SAMSON.png) Of course, the created nanotube fabric should be later minimized. --- # Colorize atoms by position Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ColorizeAtomsByPosition.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ColorizeAtomsByPosition.md ![Colorized graphene sheet](https://documentation.samson-connect.net/scripting/latest/docs/examples/docs/examples/images/rainbow_graphene.png) The example below demonstrates how to colorize atoms based on their position using [`SBColor`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor). Caption: Colorize atoms based on their X coordinate ```python # get all atoms atomIndexer = SAMSON.getNodes('node.type atom') if len(atomIndexer): # set initial min and max values min_x = max_x = atomIndexer[0].getX().value # get min and max x-coordinates for atom in atomIndexer: x = atom.getX().value if x > max_x: max_x = x elif x < min_x: min_x = x # make the operation undoable with SAMSON.holding("Colorize atoms"): # colorize each atom according to its coordinate for atom in atomIndexer: # get RGB color for a node based on HSV color # here we go through the hue parameter in the HSV color space to change the color h = (atom.getX().value - min_x) / (max_x - min_x) color = SBColor.fromHSV(239.5 / 360.0 * h, 205.0/255.0, 1.0) # set the color of the node atom.setColor(color) ``` The example below demonstrates how to colorize atoms based on their position using a [`color palette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette). Caption: Colorize atoms based on their X coordinate using a color palette ```python # get all atoms in the active document atomIndexer = SAMSON.getNodes('node.type atom') if len(atomIndexer): # set initial min and max values min_x = max_x = atomIndexer[0].getX().value # get min and max x-coordinates for atom in atomIndexer: x = atom.getX().value if x > max_x: max_x = x elif x < min_x: min_x = x # create the default HSV color palette palette = SBPalette() # make the operation undoable with SAMSON.holding("Colorize atoms"): # colorize each atom according to its coordinate for atom in atomIndexer: # get the color 'intensity' value, which should be in the [0, 1] range h = 1 - (atom.getX().value - min_x) / (max_x - min_x) # get RGB color from the palette color = palette.getColor(h) # set the color of the node atom.setColor(color) ``` !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) --- # Colorize atoms by velocity along path Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ColorizeAtomsByVelocityAlongPath.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ColorizeAtomsByVelocityAlongPath.md The example below demonstrates how to colorize atoms based on their velocity norm along a [`path (trajectory)`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelPath.md#samson.SBPath). After each step the viewport’s capture is saved into a file. This script uses a [`default color palette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDefaultPalette.md#samson.SBPaletteDefaultPalette) for colorization. !!! note To see how the default color palettes look like check User Guide: [Default color palettes](https://documentation.samson-connect.net/users/11.0.0/color-palettes/#) Caption: Colorize atoms based on their velocity norm along a path using a color palette ```python def get_range_of_velocities(path): """ Returns the range of velocity norm """ minV = maxV = SBVelocity3().norm() if path: if path.hasVelocityData(): velocityData = path.getVelocityData() if len(velocityData): if len(velocityData[0]): minV = maxV = velocityData[0][0].norm() # go through frames for velocities in velocityData: # go through velocities per frame for velocity in velocities: vn = velocity.norm() if vn > maxV: maxV = vn elif vn < minV: minV = vn return [minV, maxV] # get path pathIndexer = SAMSON.getNodes('node.type path') if len(pathIndexer): # get the path from the user ret, capture_filepath = SAMSON.getPathFromUser(dialogTitle = 'Choose folder to save captures...') else: ret = False if ret and len(pathIndexer): # get the 1st path path = pathIndexer[0] if path.hasVelocityData(): # get all atoms in the path atomIndexer = path.getAtomIndexer() minVelNorm, maxVelNorm = get_range_of_velocities(path) minVelNorm = SBVelocity3().norm() # set the min value to 0 # choose a default color palette palette = SBPaletteDefaultPalette.divergingHCLBlue2Red # make the operation undoable with SAMSON.holding("Colorize atoms"): for step in range(0, len(path)): path.currentStep = step # colorize each atom according to its coordinate for atom in atomIndexer: velocity = path.getVelocity(step, atom) velNorm = velocity.norm() # get the color 'intensity' value, which should be in the [0, 1] range h = ((velNorm - minVelNorm) / (maxVelNorm - minVelNorm)).value # get RGB color from the palette color = palette.getColor(h) # set the color of the node atom.setColor(color) SAMSON.captureViewportToFile( filename = f"{capture_filepath}/capture-{step}.png", width = 1200, height = 800, transparentBackground = False, usePathTracing = False, showProgressBar = False) ``` !!! note You can then create a movie from the saved capture images - see the [Presentation: play path](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_PresentationPlayPath.md#ps-presentation-play-path) example. !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) --- # Visualize coarse-grained systems Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_VisualizeCoarseGrainedSystems.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_VisualizeCoarseGrainedSystems.md On this page you can find various examples how to colorize and visualize a coarse-grained (CG) system in SAMSON. !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) ### Colorize by group names The example below demonstrates how to colorize groups based on their names using a [`color palette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette). Caption: Colorize by group names ```python names = ['DAPC', 'DAPS', 'DFPC', 'DFPS', 'DIPC', 'DIPS', 'DPPC', 'DPPS', 'DLPC', 'DLPS', 'DYPC', 'DYPS', 'DOPE'] # get all structural groups in the active document indexer = SAMSON.getNodes('node.type sg') # make the operation undoable with SAMSON.holding("Colorize nodes"): for node in indexer: if len(node.name): # get the first part of the name (name before the ID) name = node.name.split(' ')[0] if name in names: # colorize the node acording to its index in the list # get the index of the name in the list i = names.index(name) # get the color 'intensity' value, which should be in the [0, 1] range h = 1 - i / (len(names)) # get RGB color from the palette color = SBPaletteDefaultPalette.sequentialHCLViridis.getColor(h) # set the color of the node node.setColor(color) ``` You can get a list of all structural group names (without IDs) in the document using the following code: Caption: Get structural group names ```python def get_structural_group_names(): names = set() # get all structural groups in the active document indexer = SAMSON.getNodes('node.type sg') for node in indexer: if len(node.name): # get the first part of the name (name before the ID) names.add(node.name.split(' ')[0]) return names names = list(get_structural_group_names()) print(names) ``` ### Colorize coarse-grained atoms by name The example below demnonstrates how to colorize coarse-grained atoms by their name. Caption: Colorize coarse-grained atoms by name ```python atom_name_to_color = { 'NH3' : SBElement.getColorCPK(SBElement.Nitrogen), # the CPK color for Nitrogen 'NC3' : SBElement.getColorCPK(SBElement.N), # the CPK color for Nitrogen 'TAP' : SBElement.getColorCPK(SBElement.N), # the CPK color for Nitrogen 'PO4' : SBElement.getColorCPK(SBElement.P), # the CPK color for Phosphorus 'GL1' : SBColor.yellow, 'GL2' : SBColor.yellow, 'C1A' : SBColor.yellow, 'C2A' : SBColor.yellow, 'C3A' : SBColor.yellow, 'C4A' : SBColor.yellow, 'D1A' : SBColor.yellow, 'D2A' : SBColor.yellow, 'D3A' : SBColor.yellow, 'D4A' : SBColor.yellow, 'C1B' : SBColor.yellow, 'C2B' : SBColor.yellow, 'C3B' : SBColor.yellow, 'C4B' : SBColor.yellow, 'D1B' : SBColor.yellow, 'D2B' : SBColor.yellow, 'D3B' : SBColor.yellow, 'D4B' : SBColor.yellow, } atom_name_to_radius = { 'NH3' : SBQuantity.angstrom(1.5), 'NC3' : SBQuantity.angstrom(1.5), 'TAP' : SBQuantity.angstrom(1.5), 'PO4' : SBQuantity.angstrom(1.5) } # get all coarse-grained atoms in the active document indexer = SAMSON.getNodes('node.type atom and atom.symbol CG') # make the operation undoable with SAMSON.holding("Colorize nodes"): for node in indexer: if node.name in atom_name_to_color: # set the CG color for the atom node.setCoarseGrainedColor(atom_name_to_color[node.name]) if node.name in atom_name_to_radius: # set the CG radius for the atom node.setCoarseGrainedRadius(atom_name_to_radius[node.name]) ``` ### Colorize coarse-grained atoms by type The example below demnonstrates how to colorize coarse-grained atoms by their CG type using a [`color palette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette). Caption: Colorize coarse-grained atoms by type ```python def get_coarse_grained_types(atom_indexer): cg_types = set() for node in atom_indexer: if node.type == SBNode.Atom: cg_types.add(node.getCoarseGrainedType()) return cg_types # get all coarse-grained atoms in the active document indexer = SAMSON.getNodes('node.type atom and atom.symbol CG') cg_types = list(get_coarse_grained_types(atom_indexer = indexer)) print(f"Coarse-grained types in the document: {cg_types}") # make the operation undoable with SAMSON.holding("Colorize nodes"): for node in indexer: cg_type = node.getCoarseGrainedType() if cg_type in cg_types: # colorize the node acording to its index in the list # get the index of the CG type in the list i = cg_types.index(cg_type) # get the color 'intensity' value, which should be in the [0, 1] range h = 1 - i / (len(cg_types)) # get RGB color from the palette color = SBPaletteDefaultPalette.sequentialHCLViridis.getColor(h) # set the CG color of the atom node.setCoarseGrainedColor(color) ``` You can also set specific colors per CG type. For example, for Martini 2 types: Caption: Colorize coarse-grained atoms by Martini 2 type ```python # The beads types for Martini 2 and some arbitrary colors for them cg_types = { 'C1' : SBElement.getColorCPK(SBElement.C), 'C2' : SBElement.getColorCPK(SBElement.C), 'C3' : SBElement.getColorCPK(SBElement.C), 'C4' : SBElement.getColorCPK(SBElement.C), 'C5' : SBElement.getColorCPK(SBElement.C), 'Nda' : SBColor.magenta, 'Nd' : SBColor.magenta, 'Na' : SBColor.magenta, 'N0' : SBColor.magenta, 'P1' : SBColor.green, 'P2' : SBColor.green, 'P3' : SBColor.green, 'P4' : SBColor.green, 'P5' : SBColor.green, 'Qda+' : SBColor.blue, 'Qd+' : SBColor.blue, 'Qa+' : SBColor.blue, 'Q0+' : SBColor.blue, 'Qda-' : SBColor.red, 'Qd-' : SBColor.red, 'Qa-' : SBColor.red, 'Q0-' : SBColor.red, } # get all coarse-grained atoms in the active document indexer = SAMSON.getNodes('node.type atom and atom.symbol CG') # make the operation undoable with SAMSON.holding("Colorize nodes"): for node in indexer: cg_type = node.getCoarseGrainedType() # take the partial charge into account for Qda, Qa, Qd, Q0 types if cg_type.startswith('Q'): if node.partialCharge < 0: cg_type += '-' elif node.partialCharge > 0: cg_type += '+' if cg_type in cg_types: # set the CG color of the atom node.setCoarseGrainedColor(cg_types[cg_type]) ``` --- # Colorize connected components by molecular weight Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ColorizeConnectedComponentByMW.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ColorizeConnectedComponentByMW.md This example demonstrates how to colorize connected components based on their molecular weight (MW). Caption: Example: Colorize connected components by molecular weight ```python """ This script colorizes molecules based on connected components and their molecular weight (MW) """ import math def get_molecular_weight(atom_indexer): ''' Returns the molecular weight of atoms in the atom_indexer ''' mass = SBQuantity.mass(0.0) for atom in atom_indexer: mass += atom.molecularWeight return mass.Da def get_connected_components(): ''' Returns a list of indexers with connected components from the active document ''' connected_component_list = [] # get all atoms in the active document atom_indexer = SAMSON.getNodes('node.type atom') # go through atoms to get their connected components while len(atom_indexer): atom = atom_indexer[0] # get connected component for this atom connected_component = atom.getConnectedComponent() connected_component_list.append(connected_component) # remove atoms of this connected component from the atom indexer for a in connected_component: atom_indexer.removeNode(a) return connected_component_list connected_component_list = get_connected_components() masses = [] n_connected_components_per_MW = dict() for connected_component in connected_component_list: n_atoms = len(connected_component) # reduce significant digits in mass mw = get_molecular_weight(connected_component) mass_floor = math.floor(mw.value * 1e2) * 1e-2 mass_ceil = math.ceil(mw.value * 1e2) * 1e-2 mass = 0.5 * (mass_floor + mass_ceil) masses.append(mass) n_connected_components_per_MW[mass] = n_connected_components_per_MW.get(mass, 0) + 1 # sort in ascending order n_connected_components_per_MW = dict(sorted(n_connected_components_per_MW.items())) # print the number of molecules per number of atoms for key, value in n_connected_components_per_MW.items(): print(f"{value} molecules with MW {key} Da") # get min and max masses with only 2 significant digits min_mass = math.floor(min(masses) * 1e2) * 1e-2 max_mass = math.ceil(max(masses) * 1e2) * 1e-2 # make the operation undoable with SAMSON.holding("Colorize molecules by mass"): # colorize based on the number of atoms in a connected component for i, connected_component in enumerate(connected_component_list): mass = masses[i] # get the color 'intensity' value, which should be in the [0, 1] range h = (mass - min_mass) / (max_mass - min_mass) # get RGB color from the palette color = SBPaletteDefaultPalette.flexibleDivergingHCLSpectral.getColor(h) for atom in connected_component: atom.setColor(color) ``` !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) --- # Export trajectory frames Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ExportTrajectoryFrames.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ExportTrajectoryFrames.md This example demonstrates how to export structures for each frame along a trajectory ([`SBPath`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelPath.md#samson.SBPath)). Caption: Export trajectory frames ```python def export_trajectory(path, file_basename, file_format): ''' Exports trajectories from an SBPath node 'path' to files with a name starting with 'file_basename' and extension 'file_format' ''' # set the current step for the Path to 0 path.currentStep = 0 trajectory_files = [] # get a node indexer for all structural models indexer = SAMSON.getNodes('n.t sm') if len(indexer): # loop over steps in the Path for step in range(path.numberOfSteps): # increment the current step path.currentStep = step # a name of a file fn = file_basename + str(step) + '.' + file_format # export current trajectory into a file 'fn' with default export parameters if SAMSON.exportToFile(indexer, fn): # append list of trajectory files trajectory_files.append(fn) # return list of trajectory files return trajectory_files def export_to_PDB(path, file_basename): ''' Export trajectory from path into PDB format ''' return export_trajectory(path, file_basename, 'pdb') def export_to_XYZ(path, filename): ''' Export trajectory from path into XYZ format ''' return export_trajectory(path, file_basename, 'xyz') # get an indexer with all paths in the active document path_indexer = SAMSON.getNodes('node.type path') if len(path_indexer): # take the first path path = path_indexer[0] # export the path to a pdb file export_to_PDB(path, "/path/to/filename") ``` --- # Compute RMSD between two molecules Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ComputeRMSD.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ComputeRMSD.md Let us compute the root-mean-square deviation (RMSD) of atomic positions between the atoms of two superimposed molecules. ```python from math import sqrt def compute_rmsd(mol1_indexer, mol2_indexer): """Computes RMSD between two superimposed molecules and returns RMSD in angstrom""" # check if indexers are of the same size if len(mol1_indexer) != len(mol2_indexer): print('Molecules are not the same') return -1 sqrd_sum = SBQuantity.squareLength(0.0) # go through all atoms in the indexer for i in range(len(mol1_indexer)): if mol1_indexer[i].elementType != mol2_indexer[i].elementType: print('Atoms are not the same') return -1 # get positions of atoms from indexers pos1 = mol1_indexer[i].getPosition() pos2 = mol2_indexer[i].getPosition() # compute distance between atoms # and accumulate squared norm for distances sqrd_sum += (pos1 - pos2).norm2() # take a square root of the sum of squared distances divided by the number of atoms rmsd = SBQuantity.sqrt(sqrd_sum / len(mol1_indexer)) # return RMSD in angstrom return rmsd.angstrom.value def compute_rmsd_2mol(mol1, mol2): """Computes several RMSD between two superimposed molecules: 1) between all atoms, 2) between backbone atoms, 3) between alpha-Carbon atoms. """ # get indexers of all atoms mol1_all_indexer = mol1.getNodes('node.type atom') mol2_all_indexer = mol2.getNodes('n.t a') # get indexers of all atoms in the backbone mol1_backbone_indexer = mol1.getNodes('node.type atom in node.type backbone') mol2_backbone_indexer = mol2.getNodes('n.t a in n.t bb') # get indexers of all alpha Carbons in the backbone mol1_CA_indexer = mol1.getNodes('"CA" in node.type backbone') mol2_CA_indexer = mol2.getNodes('"CA" in n.t bb') rmsd_all = compute_rmsd(mol1_all_indexer, mol2_all_indexer); rmsd_backbone = compute_rmsd(mol1_backbone_indexer, mol2_backbone_indexer); rmsd_CA = compute_rmsd(mol1_CA_indexer, mol2_CA_indexer); if (rmsd_all != -1): print("RMSD (all atoms): %e Angstrom" % rmsd_all) if (rmsd_backbone != -1): print("RMSD (backbone) : %e Angstrom" % rmsd_backbone) if (rmsd_CA != -1): print("RMSD (C_alpha) : %e Angstrom" % rmsd_CA) # return a list of RMSDs return [rmsd_all, rmsd_backbone, rmsd_CA] # get all molecules in the active document indexer = SAMSON.getNodes('node.type molecule') if len(indexer) < 2: print("Less than two molecules are present in the data graph") else: # we assume here that we need to compute RMSD between the first two molecules in the indexer mol1 = indexer[0] # get the first molecule mol2 = indexer[1] # get the second molecule # compute RMSD between the two superimposed molecules rmsd = compute_rmsd_2mol(mol1, mol2) ``` --- # Compute bond lengths along paths Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ComputeBondLengthAlongPath.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ComputeBondLengthAlongPath.md This example demonstrates how to compute minimum interatomic distance for each frame in each path and plot the result. In this example we consider all the bonds, but you can choose some specific bonds using [NSL](https://documentation.samson-connect.net/users/11.0.0/nsl/#). First, open a trajectory in SAMSON or fetch one from RCSB PDB, e.g. `SAMSON.fetch('1d3z', 'pdb')`. ```python import numpy as np import matplotlib.pyplot as plt def compute_bond_length_stats(bond_indexer): ''' Compute min, max, and avg length of bonds Return results in angstrom units. ''' if len(bond_indexer) == 0: return [] min_bl = max_bl = bond_indexer[0].getLength() # initialize min and max avg_bl = SBQuantity.length(0.0) for b in bond_indexer: # loop over bonds in the bond indexer bl = b.getLength().angstrom # get the bond length in Angstroms avg_bl = avg_bl + bl if bl < min_bl : min_bl = bl if bl > max_bl : max_bl = bl avg_bl = avg_bl / len(bond_indexer) return [max_bl.angstrom.value, avg_bl.angstrom.value, min_bl.angstrom.value] def compute_bond_length_stats_per_path(path, bond_indexer): ''' Compute min, max, and avg length of bonds along the path ''' # store the current step current_step = path.currentStep path.currentStep = 0 bond_length_along_path = [] # loop over path frames for i in range(path.numberOfSteps): # set the current step of the path path.currentStep = i # compute bond length stats for the current step bond_length_along_path.append(compute_bond_length_stats(bond_indexer)) # If you want to see in the viewport how the path changes, force SAMSON to process events. # Else comment it for bigger systems, since it may slow down the computations SAMSON.processEvents() # restore the current step path.currentStep = current_step return bond_length_along_path # get an indexer of all paths in the active document path_indexer = SAMSON.getNodes('node.type path') # get an indexer of all bonds in the active document bond_indexer = SAMSON.getNodes('node.type bond') # Compute bond length stats for each path in the document bond_length_along_paths = [] # loop over paths in the path indexer for path in path_indexer: res = compute_bond_length_stats_per_path(path, bond_indexer) bond_length_along_paths.append( res ) # Plot results using matplotlib for i, path in enumerate(path_indexer): plt.figure(i) plt.plot(bond_length_along_paths[i]) plt.title(path.name) plt.legend(['max','mean','min']) plt.ylabel('bond length, Å') plt.xlabel('frame') plt.show() ``` --- # Compute interatomic distances along path Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ComputeInteratomicDistancesAlongPath.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ComputeInteratomicDistancesAlongPath.md This example demonstrates how to compute the minimum interatomic distance for each frame in each path and plot the result. In this example we consider all the atoms, but you can choose some specific atoms using [NSL](https://documentation.samson-connect.net/users/11.0.0/nsl/#). First, open a trajectory in SAMSON or fetch one from RCSB PDB, e.g. `SAMSON.fetch('1d3z', 'pdb')`. Make sure to check the option to create the path. ```python import numpy as np import matplotlib.pyplot as plt def compute_min_interatomic_distance(atom_indexer, neighbor_search, rcutoff = SBQuantity.angstrom(2)): ''' Compute the minimal interatomic distances between atoms in atom_indexer Return result in angstrom units. ''' neighbor_search.updateNeighborLists() # initialize the minimum distance to rcutoff min_distance = rcutoff # go through all the atoms for i, atom in enumerate(atom_indexer): neighbors = neighbor_search.getNeighborVector(i) for neighbor_atom in neighbors: distance = (atom.getPosition() - neighbor_atom.getPosition()).norm() if distance < min_distance: min_distance = distance return min_distance.angstrom.value def compute_min_interatomic_distance_per_path(path, atom_indexer, rcutoff = SBQuantity.angstrom(2.0)): ''' Compute interatomic distances between atoms in atom_indexer along the path ''' # Create a particle system from the atom indexer particle_system = SBParticleSystem(atom_indexer) # Create the neighbor search for this particle system neighbor_search = SBNeighborSearchParticleSystemGrid(particle_system, rcutoff) neighbor_search.initializeNeighborLists() # store the current step current_step = path.currentStep path.currentStep = 0 interatomic_length = [] # loop over path steps for i in range(path.numberOfSteps): # set the current step of the path path.currentStep = i interatomic_length.append( compute_min_interatomic_distance(atom_indexer, neighbor_search, rcutoff) ) # If you want to see in the viewport how the path changes, force SAMSON to process events # Comment it for bigger systems, since it may slow down the computations SAMSON.processEvents() # restore the current step path.currentStep = current_step return interatomic_length # get an indexer of all paths in the active document path_indexer = SAMSON.getNodes('node.type path') # get an indexer of all atoms in the active document atom_indexer = SAMSON.getNodes('node.type atom') # set the radius of cutoff rcutoff = SBQuantity.angstrom(2.0) # Compute min interatomic distance for each path in the document interatomic_length_per_path = [] # loop over paths in the path indexer for path in path_indexer: value = compute_min_interatomic_distance_per_path(path, atom_indexer, rcutoff) interatomic_length_per_path.append( value ) # Plot results using matplotlib legend = [] for i, path in enumerate(path_indexer): plt.plot(interatomic_length_per_path[i]) legend.append(path.name) plt.legend(legend) plt.ylabel('min interatomic distance, Å') plt.xlabel('frame') plt.tight_layout() plt.show() ``` --- # Select atoms and bonds by location Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_SelectAtomsAndBondsByLocation.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_SelectAtomsAndBondsByLocation.md This example combines what is written in the [Selecting nodes](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md#ps-selecting) section and demonstrates how to select atoms and bonds based on their location. Caption: Example: select atoms and bonds by location ```python # get an indexer of all atoms in the active document # here we use SAMSON Node Specification Language atom_indexer = SAMSON.getNodes('node.type atom') # two planes x_min = SBQuantity.angstrom(0.0) x_max = SBQuantity.angstrom(5.0) # an indexer in which we will be adding the desired nodes atom_selection_indexer = SBNodeIndexer() # a loop over an indexer for atom in atom_indexer: x_coord = atom.getX() # check whether the atom lies in between the desired planes if x_coord >= x_min and x_coord <= x_max: # add the atom to the indexer atom_selection_indexer.addNode(atom) # add bonds between the atoms to the selection bond_selection_indexer = SBNodeIndexer() for atom in atom_selection_indexer: # go through all the bonds of an atom for bond in atom.getBondList(): # skip bonds that are already in the indexer if bond in bond_selection_indexer: continue # check if the opposite atom should also be selected if bond.getOppositeAtom(atom) in atom_selection_indexer: bond_selection_indexer.addNode(bond) # make the operation undoable with SAMSON.holding('Select atoms'): # clear the current selection in the active document SAMSON.getActiveDocument().clearSelection() # select nodes by changing their selectionFlag for node in atom_selection_indexer: node.selectionFlag = True for node in bond_selection_indexer: node.selectionFlag = True ``` --- # Select connected components by molecular weight Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_SelectConnectedComponentByMW.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_SelectConnectedComponentByMW.md This example demonstrates how to select connected components based on their molecular weight (MW) via a dialog window. Caption: Example: Select connected components by molecular weight ```python """ This script provides the possibility to choose connected components based on their molecular weight (MW) """ import math def get_molecular_weight(atom_indexer): ''' Returns the molecular weight of atoms in the atom_indexer ''' mass = SBQuantity.mass(0.0) for atom in atom_indexer: mass += atom.molecularWeight return mass.Da def get_connected_components(): ''' Returns a list of indexers with connected components from the active document ''' connected_component_list = [] # get all atoms in the active document atom_indexer = SAMSON.getNodes('node.type atom') # go through atoms to get their connected components while len(atom_indexer): atom = atom_indexer[0] # get connected component for this atom connected_component = atom.getConnectedComponent() connected_component_list.append(connected_component) # remove atoms of this connected component from the atom indexer for a in connected_component: atom_indexer.removeNode(a) return connected_component_list connected_component_list = get_connected_components() masses = [] n_connected_components_per_MW = dict() for connected_component in connected_component_list: n_atoms = len(connected_component) # reduce significant digits in mass mw = get_molecular_weight(connected_component) mass_floor = math.floor(mw.value * 1e2) * 1e-2 mass_ceil = math.ceil(mw.value * 1e2) * 1e-2 mass = 0.5 * (mass_floor + mass_ceil) masses.append(mass) n_connected_components_per_MW[mass] = n_connected_components_per_MW.get(mass, 0) + 1 # sort in ascending order n_connected_components_per_MW = dict(sorted(n_connected_components_per_MW.items())) # print the number of molecules per number of atoms for key, value in n_connected_components_per_MW.items(): print(f"{value} molecules with MW {key} Da") # get min and max masses with only 2 significant digits min_mass = math.floor(min(masses) * 1e2) * 1e-2 max_mass = math.ceil(max(masses) * 1e2) * 1e-2 mass_interval = (min_mass, max_mass) label = f"Choose the mass interval from ({min_mass} Da, {max_mass} Da)" status, result_mass_interval = SAMSON.getDoubleIntervalFromUser('Select molecules by mass', (label, 'min mass', 'max mass'), mass_interval, mass_interval, mass_interval, (1, 1), '', ' Da') if status: # make the operation undoable with SAMSON.holding("Colorize molecules"): # clear the current selection SAMSON.getActiveDocument().clearSelection() counter = 0 for i, connected_component in enumerate(connected_component_list): mass = masses[i] if mass >= result_mass_interval[0] and mass <= result_mass_interval[1]: counter += 1 for atom in connected_component: atom.selectionFlag = True bond_indexer = atom.getBondList() for bond in bond_indexer: bond.selectionFlag = True print(f"{'-' * 40}\nSelected {counter} connected components with mass within ({result_mass_interval[0]} Da, {result_mass_interval[1]} Da)") else: # make the operation undoable with SAMSON.holding("Clear selection"): # clear the current selection SAMSON.getActiveDocument().clearSelection() print(f"{'-' * 40}\nCanceled - clearing the selection") ``` --- # Examples of usage of ASE package Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ASE.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_ASE.md Below you can find examples of how to perform automated simulations using the [Atomic Simulation Environment (ASE)](https://wiki.fysik.dtu.dk/ase/index.html) Python package together with SAMSON. *The Atomic Simulation Environment (ASE) is a set of tools and Python modules for setting up, manipulating, running, visualizing and analyzing atomistic simulations.* [[ASE docs](https://wiki.fysik.dtu.dk/ase/index.html)] **Requirements** First, you need to install the **ASE** package in the integrated Python in SAMSON. Please see [Installing Python packages](https://documentation.samson-connect.net/scripting/latest/docs/GettingStarted.md#ps-install-python-package) - type **ase** and click *Install*. ### Optimization of a water molecule using ASE In this example, we create a water molecule using the ASE package, copy it to SAMSON, optimize it using ASE (with BFGS), and update atoms positions in SAMSON accordingly. For the sake of this example, we will run the optimization for several steps and we will be updating atoms’ positions in SAMSON according to their change in ASE after each step. Caption: Optimize a water molecule using ASE ```python import numpy as np from ase import Atoms from ase.optimize import BFGS from ase.calculators.emt import EMT class ExampleASEOptimizationH20: molecule = None atom_indexer = None def __init__(self): """Initialize ASE and SAMSON""" self.initialize_system_ase() # initialize the system in ASE self.initialize_system_samson() # initialize the system in SAMSON def compute(self): """Do computations using ASE and update positions in SAMSON""" dyn = BFGS(self.molecule) # set up computations in ASE nsteps = 100 for i in range(nsteps): dyn.run(fmax = 0.005, steps = 20) # run the computations in ASE self.update_positions_in_samson() # update positions in SAMSON def initialize_system_ase(self): """Create an H2O molecule using ASE package; set a calculator""" # the H2O molecule parameters: distance and angle d = 0.9575 t = np.pi / 180.0 * 104.51 # create a molecule in ASE (positions in ASE are in Angstrom); set calculator self.molecule = Atoms('H2O', positions = [(d, 0, 0.1), (d * np.cos(t), d * np.sin(t), 0), (0, 0, 0)], calculator = EMT()) def initialize_system_samson(self): """Adds atoms created by ASE into the active document in SAMSON""" structural_model = SBStructuralModel() # a new structural model structural_model.name = 'H20 optimization example' # add atoms in the structural model self.add_atoms_in_samson(structural_model, self.molecule) # add covalent bonds structural_model.createCovalentBonds() # enable undo/redo for the creation of the structural model if SAMSON.isHolding(): SAMSON.hold(structural_model) # create this structural model in SAMSON structural_model.create() # add the structural model into the active document SAMSON.getActiveDocument().addChild(structural_model) # get an indexer of all atoms in the structural_model self.atom_indexer = structural_model.getNodes('n.t a') def add_atoms_in_samson(self, structural_model, molecule): """Add atoms in SAMSON according to their type and positions""" for a in molecule: # loop through a list of atoms created by ase # construct an atom in SAMSON with a given element type and position sa = SBAtom(SAMSON.getElementTypeBySymbol(a.symbol), SBQuantity.angstrom(a.position[0]), SBQuantity.angstrom(a.position[1]), SBQuantity.angstrom(a.position[2])) # add an atom to the root of the structural model structural_model.addChild( sa ) def update_positions_in_samson(self): """Update positions of atoms in SAMSON based on new positions of these atoms in ASE""" # get the new positions from ASE new_positions = self.molecule.get_positions() for i in range(len(self.atom_indexer)): atom = self.atom_indexer[i] atom.setX(SBQuantity.angstrom(new_positions[i, 0])) atom.setY(SBQuantity.angstrom(new_positions[i, 1])) atom.setZ(SBQuantity.angstrom(new_positions[i, 2])) # process all events in SAMSON (to update positions in the viewport) SAMSON.processEvents() def store_current_conformation(self, name): """Create a conformation in SAMSON based on the current state of the structural model and add it to the active document""" if len(self.atom_indexer): conformation = SBConformation(name, self.atom_indexer) if SAMSON.isHolding(): SAMSON.hold(conformation) conformation.create() SAMSON.getActiveDocument().addChild(conformation) # make the operation undoable SAMSON.beginHolding('Water optimization example') # Create an object of the ExampleASEOptimizationH20 class, which will initialize ASE and SAMSON. # After this step, you will see a water molecule in the Viewport and in the Document View. ase_h20_opt = ExampleASEOptimizationH20() # store the initial conformation in the active document ase_h20_opt.store_current_conformation('Initial conformation') # set a camera view in SAMSON SAMSON.getActiveCamera().topView() # process events: updates viewport SAMSON.processEvents() # run the computations ase_h20_opt.compute() # process events: updates viewport SAMSON.processEvents() # store the optimized conformation in the active document ase_h20_opt.store_current_conformation('Optimized conformation') # stop the undoable operation SAMSON.endHolding() ``` In the console output you may get something like this: ```default Step Time Energy fmax BFGS: 0 15:02:48 2.733104 8.4006 BFGS: 1 15:02:48 1.925778 1.5675 ... BFGS: 10 15:02:48 1.878888 0.0139 BFGS: 11 15:02:48 1.878884 0.0018 ``` The script also creates the initial and final [`conformations`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelConformation.md#samson.SBConformation) of the system - you can switch between them by double-clicking on them in the *Document view* or in Python via [`SBConformation.restore()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelConformation.md#samson.SBConformation.restore). ### Computing adsorption energy for Nitrogen on Copper system In this example, we create using ASE a system consisting of Nitrogen molecule and a slab of Copper atoms using ASE package, copy it to SAMSON, compute adsorption energy, simulate it in ASE using velocity Verlet, and update atoms positions in SAMSON accordingly. This example is based on the ASE tutorial: [Surface adsorption study using the ASE database](https://wiki.fysik.dtu.dk/ase/tutorials/db/db.html). Caption: Optimize a system using ASE ```python from ase import Atoms from ase.calculators.emt import EMT from ase.constraints import FixAtoms from ase.optimize import QuasiNewton from ase.build import fcc111, add_adsorbate from ase.md.verlet import VelocityVerlet from ase import units class ExampleASEOptimizationN2Cu: slab = None molecule = None atom_indexer = None def __init__(self): """Initialize ASE and SAMSON""" self.initialize_system_ase() # initialize the system in ASE self.initialize_system_samson() # initialize the system in SAMSON def compute_adsorption_energy(self): """Computations using ASE; update positions in SAMSON Optimize the structure of the N2 molecule adsorbed on the Cu surface""" # set up computations in ASE h = 1.85 add_adsorbate(self.slab, self.molecule, h, 'ontop') constraint = FixAtoms(mask = [a.symbol != 'N' for a in self.slab]) self.slab.set_constraint(constraint) dyn = QuasiNewton(self.slab # if you would like to save the trajectory, # uncomment and modify the line below #, trajectory = '/path/to/N2Cu.traj' ) dyn.run(fmax = 0.05) # update positions in SAMSON self.update_positions_in_samson() print('Adsorption energy:', self.e_slab + self.e_N2 - self.slab.get_potential_energy()) def simulate(self): """MD computations using ASE; update positions in SAMSON""" # set up computations in ASE dyn = VelocityVerlet(self.molecule, timestep = 1.0 * units.fs) nsteps = 100 for i in range(nsteps): pot = self.molecule.get_potential_energy() kin = self.molecule.get_kinetic_energy() print('%2d: Etotal = %.5f eV, Epot = %.5f eV, Ekin = %.5f eV' % (i, pot + kin, pot, kin)) dyn.run(steps = 20) # run the computations in ASE self.update_positions_in_samson() # update positions in SAMSON def initialize_system_ase(self): """Create molecules using ASE package; set a calculator""" # the slab parameters d = 1.10 # create atoms using ASE (positions in ASE are in Angstrom); set calculator self.slab = fcc111('Cu', size = (4, 4, 2), vacuum = 10.0) # build Cu crystal self.slab.set_calculator(EMT()) self.e_slab = self.slab.get_potential_energy() self.molecule = Atoms('2N', positions = [(0., 0., 0.), (0., 0., d)]) self.molecule.set_calculator(EMT()) self.e_N2 = self.molecule.get_potential_energy() def initialize_system_samson(self): """Adds atoms created by ASE into a new layer in SAMSON""" structural_model = SBStructuralModel() # a new structural model structural_model.name = 'ASE slab optimization' # add slab atoms in SAMSON self.add_atoms_in_samson(structural_model, self.slab) # add molecule atoms in SAMSON self.add_atoms_in_samson(structural_model, self.molecule) # enable undo/redo for the creation of the structural model if SAMSON.isHolding(): SAMSON.hold(structural_model) # create this structural model in SAMSON structural_model.create() # add the structural model into the active document SAMSON.getActiveDocument().addChild(structural_model) # get an indexer of all Nitrogen atoms in the structural_model self.atom_indexer = structural_model.getNodes('n.t a and N') def add_atoms_in_samson(self, structural_model, molecule): """Add atoms in SAMSON according to their type and positions""" for a in molecule: # loop through a list of atoms created by ase # construct an atom in SAMSON with a given element type and position sa = SBAtom(SAMSON.getElementTypeBySymbol(a.symbol), SBQuantity.angstrom(a.position[0]), SBQuantity.angstrom(a.position[1]), SBQuantity.angstrom(a.position[2])) # add an atom to the root of the structural model structural_model.addChild( sa ) def update_positions_in_samson(self): """Update positions of atoms in SAMSON based on new positions of these atoms in ASE""" # get the new positions from ASE new_positions = self.molecule.get_positions() for i in range(len(self.atom_indexer)): atom = self.atom_indexer[i] atom.setX(SBQuantity.angstrom(new_positions[i, 0])) atom.setY(SBQuantity.angstrom(new_positions[i, 1])) atom.setZ(SBQuantity.angstrom(new_positions[i, 2])) # process all events in SAMSON (to update positions in the viewport) SAMSON.processEvents() def store_current_conformation(self, name): """Create a conformation in SAMSON based on the current state of the structural model and add it to the active document""" if len(self.atom_indexer): conformation = SBConformation(name, self.atom_indexer) if SAMSON.isHolding(): SAMSON.hold(conformation) conformation.create() SAMSON.getActiveDocument().addChild(conformation) # make the operation undoable SAMSON.beginHolding('Water optimization example') # Create an object of the ExampleASEOptimizationN2Cu class, which will initialize ASE and SAMSON. # After this step, you will see Nitrogen and Copper slab in the Viewport and in the Document View. ase_N2Cu_opt = ExampleASEOptimizationN2Cu() # store the initial conformation in the active document ase_N2Cu_opt.store_current_conformation('Initial conformation') # set a camera view in SAMSON SAMSON.getActiveCamera().rightView() # process events: updates viewport SAMSON.processEvents() # compute the adsorption energy ase_N2Cu_opt.compute_adsorption_energy() # perform MD simulation ase_N2Cu_opt.simulate() # process events: updates viewport SAMSON.processEvents() # store the optimized conformation in the active document ase_N2Cu_opt.store_current_conformation('Optimized conformation') # stop the undoable operation SAMSON.endHolding() ``` In the console output you may get something like this: ```default Step[ FC] Time Energy fmax *Force-consistent energies used in optimization. BFGSLineSearch: 0[ 0] 15:01:59 11.689927* 1.0797 BFGSLineSearch: 1[ 2] 15:01:59 11.670814* 0.4090 BFGSLineSearch: 2[ 4] 15:01:59 11.625880* 0.0409 Adsorption energy: 0.32351942231800734 0: Etotal = 0.44034 eV, Epot = 0.44034 eV, Ekin = 0.00000 eV 1: Etotal = 0.43816 eV, Epot = 0.26289 eV, Ekin = 0.17527 eV ... 98: Etotal = 0.43999 eV, Epot = 0.40155 eV, Ekin = 0.03843 eV 99: Etotal = 0.43858 eV, Epot = 0.31076 eV, Ekin = 0.12782 eV ``` During this short simulation, you may see in the SAMSON’s viewport how these Nitrogen atoms move atop of the Copper slab. The script also creates the initial and final [`conformations`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelConformation.md#samson.SBConformation) of the system - you can switch between them by double-clicking on them in the *Document view* or in Python via [`SBConformation.restore()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelConformation.md#samson.SBConformation.restore). If you want to visualize the saved trajectory using ASE, you can save it in the `compute_adsorption_energy` function (uncomment the corresponding line) and then you can use the following code: Caption: Visualize saved trajectory using ASE ```python from ase.io import read from ase.visualize import view slab_mol = read('/path/to/N2Cu.traj') view(slab_mol) ``` ### Combining SAMSON simulation with ASE calculators This example demonstrates how you can combine a simulation in SAMSON with ASE calculators. We use an *interaction model* provided by SAMSON together with **ASE calculators** for minimization of a system. The interaction model will be used to compute forces in SAMSON and ASE will be used for minimization of the system by using FIRE. For that, we implement our own calculator in ASE (see [ASE calculators](https://wiki.fysik.dtu.dk/ase/development/calculators.html)). *ASE provides interfaces to different codes through Calculators which are used together with the central Atoms object and the many available algorithms in ASE.* [[ASE docs](https://wiki.fysik.dtu.dk/ase/index.html)] !!! note SAMSON also provides the [FIRE state update](https://www.samson-connect.net/extensions/8ec255b0-7326-0bed-366e-40be71c1d160). Open some hydrocarbon from the Samples folder (e.g. *cyclopropane.pdb*) or create one from assets. If you want, you can slightly move some atoms in the molecule using SAMSON editors, e.g., choose the *Displacer* move editor (shortcut: D) and move slightly some atoms. In the example below we apply to models in the active document a simulator with the *Interaction model* set to *“Brenner”* and the *State Updater* set to *“Interactive modeling”*. To interact between SAMSON interaction model and ASE calculator we create the `InteractionModelWrapper` class based on ASE calculator. Caption: Optimize a system using ASE ```python import os import numpy as np from ase import Atoms, Atom from ase.optimize import FIRE from ase.calculators.calculator import Calculator, all_changes class InteractionModelWrapper(Calculator): """Calculator for ASE, see: https://wiki.fysik.dtu.dk/ase/development/calculators.html""" # properties that calculator can handle implemented_properties = ['energy', 'forces'] interaction_model = None molecule = None atom_indexer = None def __init__(self, **kwargs): Calculator.__init__(self, **kwargs) #print("Setting Interaction Model wrapper...") if kwargs is not None: self.interaction_model = kwargs["interaction_model"] self.molecule = kwargs["molecule"] self.atom_indexer = kwargs["atom_indexer"] else: print("Error: input parameters are not provided") pass if self.interaction_model == None or self.molecule == None or self.atom_indexer == None: print("Error: improper input parameters") pass def calculate(self, atoms = None, properties = ['energy', 'forces'], system_changes = all_changes): """The main function for Calculator that does the calculations""" # update interactions in SAMSON self.interaction_model.updateInteractions() forces = np.zeros((len(self.molecule), 3)) # get forces from the SAMSON's interaction model for i in range(len(self.atom_indexer)): # get force in Newtons force = self.interaction_model.getForce(i) forces[i, 0] = force[0].N.value forces[i, 1] = force[1].N.value forces[i, 2] = force[2].N.value # set calculated properties for ASE # convert forces from N to atomic unit force, 1 atomic unit force = Eh / a0 force_convertion = 1. / (SBQuantity.Eh(1).J / SBQuantity.a0(1).m).value self.results['forces'] = forces * force_convertion # get energy from the SAMSON's interaction model self.results['energy'] = self.interaction_model.energy.eV.value # update positions of atoms in SAMSON self.update_positions_in_samson() def update_positions_in_samson(self): """Update positions of atoms in SAMSON based on new positions of these atoms in ASE""" # get the new positions from ASE new_positions = self.molecule.get_positions() for i in range(len(self.atom_indexer)): atom = self.atom_indexer[i] atom.setX(SBQuantity.angstrom(new_positions[i, 0])) atom.setY(SBQuantity.angstrom(new_positions[i, 1])) atom.setZ(SBQuantity.angstrom(new_positions[i, 2])) # process all events in SAMSON (to update positions in the viewport) SAMSON.processEvents() class ExampleASECalculator: """An example of the usage of a SAMSON's InteractionModelParticleSystem together with ASE. We assume, that the InteractionModelParticleSystem has already been created in SAMSON for the atoms in the SAMSON's data graph. """ molecule = None atom_indexer = None def __init__(self): # get an indexer of all atoms in SAMSON's active document self.atom_indexer = SAMSON.getNodes('node.type atom') # create atoms in ASE self.create_atoms_in_ase(self.atom_indexer) # get all interaction models from the active document in SAMSON imps_indexer = SAMSON.getNodes('n.t imps') # get the first interaction model interaction_model = imps_indexer[0].castToInteractionModelParticleSystem() # set an ASE calculator self.molecule.set_calculator( InteractionModelWrapper(interaction_model = interaction_model, molecule = self.molecule, atom_indexer = self.atom_indexer) ) def create_atoms_in_ase(self, atom_indexer): """Create atoms in ASE based on atoms in SAMSON""" # create an empty molecule in ASE self.molecule = Atoms() # add atoms from SAMSON to the molecule in ASE for a in atom_indexer: self.molecule.append( Atom(a.elementSymbol, (a.getX().angstrom.value, a.getY().angstrom.value, a.getZ().angstrom.value) ) ) def compute(self): # set up the computation dyn = FIRE(self.molecule) # run the computation dyn.run(fmax = 0.005, steps = 100) def store_current_conformation(self, name): """Create a conformation in SAMSON based on the current state of the structural model and add it to the active document""" if len(self.atom_indexer): conformation = SBConformation(name, self.atom_indexer) if SAMSON.isHolding(): SAMSON.hold(conformation) conformation.create() SAMSON.getActiveDocument().addChild(conformation) def samson_add_simulator(simulator): """Initialize and add simulator in the active document in SAMSON. To add a simulator in SAMSON we need to create and add a dynamical model, an interaction model, and a state updater. """ if simulator == None: return # get the dynamical model from the simulator dynamicalModel = simulator.getDynamicalModel() # get the interaction model from the simulator interactionModel = simulator.getInteractionModel() # get the state updater from the simulator stateUpdater = simulator.getStateUpdater() # make the operations in SAMSON undoable SAMSON.beginHolding('Add simulator') if SAMSON.isHolding(): # hold objects for undo/redo in SAMSON SAMSON.hold(dynamicalModel) SAMSON.hold(interactionModel) SAMSON.hold(simulator) # create nodes dynamicalModel.create() interactionModel.create() simulator.create() stateUpdater.create() # add nodes to the active document in SAMSON document = SAMSON.getActiveDocument() document.addChild(dynamicalModel) document.addChild(interactionModel) document.addChild(simulator) SAMSON.endHolding() # show a window with interaction model properties SAMSON.showProperties(interactionModel) # initialize interaction model interactionModel.initializeInteractions() # show a window with state updator properties SAMSON.showProperties(stateUpdater) # Apply a simulator # with Brenner interaction model and Interactive modeling state updater # to a molecule in the active document # get an indexer of all structural models in the active document indexer = SAMSON.getNodes('n.t sm') # make an instance of a simulator simulator = SAMSON.makeSimulator( nodeIndexer = indexer, # the name of the interaction model class interactionModelClassName = 'SMMBrennerInteractionModel', # the UUID of the Brenner SAMSON Extension interactionModelExtensionUUID = SBUUID('AD608CB6-6971-7CD4-6FCC-34531998E743'), # no parameters for the Brenner interaction model interactionModelParameterMap = SBValueMap(), # the name of the state updater class stateUpdaterClassName = 'SESInteractiveModelingUpdater', # the UUID of the State Updater pack SAMSON Extension stateUpdaterExtensionUUID = SBUUID('F912F119-7CBB-B5BD-972A-0A02DFCF683D') ) if simulator: # add the simulator in the active document in SAMSON samson_add_simulator(simulator) # make the operations in SAMSON undoable SAMSON.beginHolding('Simulate with ASE') # Run ASE calculations # Create an object of the ExampleASECalculator class, # which will initialize system in ASE and in SAMSON ase_calc = ExampleASECalculator() # store the initial conformation in the active document ase_calc.store_current_conformation('Initial conformation') # Run computations: force computation using SAMSON and minimization using ASE ase_calc.compute() # store the final conformation in the active document ase_calc.store_current_conformation('Final conformation') SAMSON.endHolding() ``` During these computations, you may see in the SAMSON’s viewport how atoms in the system are moving towards the minima. In the console output you may get something like this: ```default Step Time Energy fmax FIRE: 0 14:33:42 -35.994858 0.1356 FIRE: 1 14:33:42 -36.023361 0.1356 ... FIRE: 34 14:33:43 -36.881455 0.0077 FIRE: 35 14:33:43 -36.887776 0.0081 ``` The script also creates the initial and final [`conformations`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelConformation.md#samson.SBConformation) of the system - you can switch between them by double-clicking on them in the *Document view* or in Python via [`SBConformation.restore()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelConformation.md#samson.SBConformation.restore). --- # Embedded app: a simple GUI with buttons Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_EmbeddedApp.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_EmbeddedApp.md This example demonstrates how to create a simple embedded app in SAMSON that adds and removes bonds. !!! note SAMSON uses **Qt6** for GUI and the integrated Python environment installs **PySide6** (Qt6 bindings for Python) for you. So, to create GUI, please use **PySide6** or the **qtpy** wrapper which will automatically select the available Qt Python package. !!! note To learn more how to create GUIs with Qt, please refer to the [PySide6 documentation](https://doc.qt.io/qtforpython-6/index.html). You can also download it as a SAMSON document: [https://www.samson-connect.net/app/main?key=document&uuid=994515df-8015-4d44-baa6-1321249389bc](https://www.samson-connect.net/app/main?key=document&uuid=994515df-8015-4d44-baa6-1321249389bc) Caption: Example: An embedded app that adds and removes bonds ```python from qtpy.QtWidgets import QPushButton, QVBoxLayout, QDialog from qtpy.QtCore import Qt, Slot class App(QDialog): def __init__(self, parent=None): super(App, self).__init__(parent) # build interface layout = QVBoxLayout() buttonAddBonds = QPushButton("Add bonds") layout.addWidget(buttonAddBonds) buttonEraseBonds = QPushButton("Erase bonds") layout.addWidget(buttonEraseBonds) self.setLayout(layout) self.setMinimumWidth(250) # connect button signals to slots buttonAddBonds.clicked.connect(self.onAddBonds) buttonEraseBonds.clicked.connect(self.onEraseBonds) @Slot() def onAddBonds(self): # find all structural models structuralModelIndexer = SAMSON.getNodes("node.type structuralModel") # create bonds with SAMSON.holding("Add bonds"): # make it undoable for structuralModel in structuralModelIndexer: structuralModel.createCovalentBonds() @Slot() def onEraseBonds(self): # find all bonds bondIndexer = SAMSON.getNodes("node.type bond") # erase bonds with SAMSON.holding("Erase bonds"): # make it undoable for bond in bondIndexer: bond.erase() if __name__ == '__main__': app = App() app.show() ``` ![The app interface](https://documentation.samson-connect.net/scripting/latest/docs/examples/docs/examples/images/embedded_app_example.png) --- # Select connected components by molecular weight Source: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_Dialog_SelectConnectedComponentByMW.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_Dialog_SelectConnectedComponentByMW.md This example demonstrates how to choose connected components based on their molecular weight (MW) using a built-in dialog. Caption: Example: Select connected components by molecular weight ```python """ This script provides the possibility to choose connected components based on their molecular weight (MW) """ import math def get_molecular_weight(atom_indexer): ''' Returns the molecular weight of atoms in the atom_indexer ''' mass = SBQuantity.mass(0.0) for atom in atom_indexer: mass += atom.molecularWeight return mass.Da def get_connected_components(): ''' Returns a list of indexers with connected components from the active document ''' connected_component_list = [] # get all atoms in the active document atom_indexer = SAMSON.getNodes('node.type atom') # go through atoms to get their connected components while len(atom_indexer): atom = atom_indexer[0] # get connected component for this atom connected_component = atom.getConnectedComponent() connected_component_list.append(connected_component) # remove atoms of this connected component from the atom indexer for a in connected_component: atom_indexer.removeNode(a) return connected_component_list connected_component_list = get_connected_components() masses = [] n_connected_components_per_MW = dict() for connected_component in connected_component_list: n_atoms = len(connected_component) # reduce significant digits in mass mw = get_molecular_weight(connected_component) mass_floor = math.floor(mw.value * 1e2) * 1e-2 mass_ceil = math.ceil(mw.value * 1e2) * 1e-2 mass = 0.5 * (mass_floor + mass_ceil) masses.append(mass) n_connected_components_per_MW[mass] = n_connected_components_per_MW.get(mass, 0) + 1 # sort in ascending order n_connected_components_per_MW = dict(sorted(n_connected_components_per_MW.items())) # print the number of molecules per number of atoms for key, value in n_connected_components_per_MW.items(): print(f"{value} molecules with MW {key} Da") # get min and max masses with only 2 significant digits min_mass = math.floor(min(masses) * 1e2) * 1e-2 max_mass = math.ceil(max(masses) * 1e2) * 1e-2 mass_interval = (min_mass, max_mass) label = f"Choose the mass interval from ({min_mass} Da, {max_mass} Da)" status, result_mass_interval = SAMSON.getDoubleIntervalFromUser('Select molecules by mass', (label, 'min mass', 'max mass'), mass_interval, mass_interval, mass_interval, (1, 1), '', ' Da') if status: # make the operation undoable with SAMSON.holding("Colorize molecules"): # clear the current selection SAMSON.getActiveDocument().clearSelection() counter = 0 for i, connected_component in enumerate(connected_component_list): mass = masses[i] if mass >= result_mass_interval[0] and mass <= result_mass_interval[1]: counter += 1 for atom in connected_component: atom.selectionFlag = True bond_indexer = atom.getBondList() for bond in bond_indexer: bond.selectionFlag = True print(f"{'-' * 40}\nSelected {counter} connected components with mass within ({result_mass_interval[0]} Da, {result_mass_interval[1]} Da)") else: # make the operation undoable with SAMSON.holding("Clear selection"): # clear the current selection SAMSON.getActiveDocument().clearSelection() print(f"{'-' * 40}\nCanceled - clearing the selection") ``` ![Select connected components by molecular weight - dialog](https://documentation.samson-connect.net/scripting/latest/docs/examples/docs/examples/images/select_connected_components_by_MW.png) --- # Core Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core.md This group contains the foundational classes used throughout SAMSON, including reflection, generic containers, references, and metadata helpers. !!! note "See also" SAMSON SDK: [The Core Library Group](https://documentation.samson-connect.net/developers/11.0.0/sdk/Core/#) - [Class](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class.md) - [Container](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container.md) - [Meta](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta.md) - [Reference](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference.md) --- # Class Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class.md The classes below are bindings for SAMSON SDK classes that define fundamental mechanisms used for [class introspection](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md#ps-introspection) in SAMSON. In particular, all exposed classes in SAMSON derive from [`samson.SBClass`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClass.md#samson.SBClass), and each exposed class has an associated class proxy, derived from [`samson.SBProxy`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy), that contains a description of the class factory (its constructors) and the class interface (its functions). !!! note "See also" SAMSON SDK: [The SBCClass Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Core/Class/#) [Introspection: using extensions](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md#ps-introspection) - [SBClass](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClass.md) - [SBAttribute](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassAttribute.md) - [SBFunction](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassFunction.md) - [SBInterface](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassInterface.md) - [SBProxy](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md) --- # SBClass Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClass.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClass.md This class is the root class of numerous classes in SAMSON. In particular, all data graph node classes indirectly derive from *SBClass*, as well as many SAMSON Extensions classes. This class derives class *types* and class *categories*. The function `samson.SBClass.getClassTypeString()` may be used to retrieve the string description corresponding to a class type, and the function `samson.SBClass.getClassCategoryString()` may be used to retrieve the string description corresponding to a class category. !!! note "See also" SAMSON SDK: [SBCClass](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCClass/#) ## API Reference #### Class `samson.SBClass` Signature: `class samson.SBClass` Bases: `pybind11_object` This class is the main root class. SAMSON API: [SBCClass](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCClass/#) ##### Class `samson.SBClass.Category` Signature: `class Category(self: samson.SBClass.Category, value: int)` Bases: `pybind11_object` Members: Assembly Biology Chemistry Developer Education Electronics General Materials Medicine Metrology Modeling Optics Particles Pharmacy Photonics Physics Simulation Toxicology Visualization ###### Attribute `samson.SBClass.Category.Assembly` Signature: `Assembly = ` ###### Attribute `samson.SBClass.Category.Biology` Signature: `Biology = ` ###### Attribute `samson.SBClass.Category.Chemistry` Signature: `Chemistry = ` ###### Attribute `samson.SBClass.Category.Developer` Signature: `Developer = ` ###### Attribute `samson.SBClass.Category.Education` Signature: `Education = ` ###### Attribute `samson.SBClass.Category.Electronics` Signature: `Electronics = ` ###### Attribute `samson.SBClass.Category.General` Signature: `General = ` ###### Attribute `samson.SBClass.Category.Materials` Signature: `Materials = ` ###### Attribute `samson.SBClass.Category.Medicine` Signature: `Medicine = ` ###### Attribute `samson.SBClass.Category.Metrology` Signature: `Metrology = ` ###### Attribute `samson.SBClass.Category.Modeling` Signature: `Modeling = ` ###### Attribute `samson.SBClass.Category.Optics` Signature: `Optics = ` ###### Attribute `samson.SBClass.Category.Particles` Signature: `Particles = ` ###### Attribute `samson.SBClass.Category.Pharmacy` Signature: `Pharmacy = ` ###### Attribute `samson.SBClass.Category.Photonics` Signature: `Photonics = ` ###### Attribute `samson.SBClass.Category.Physics` Signature: `Physics = ` ###### Attribute `samson.SBClass.Category.Simulation` Signature: `Simulation = ` ###### Attribute `samson.SBClass.Category.Toxicology` Signature: `Toxicology = ` ###### Attribute `samson.SBClass.Category.Visualization` Signature: `Visualization = ` ###### Property `samson.SBClass.Category.name` Signature: `property name` ###### Property `samson.SBClass.Category.value` Signature: `property value` ##### Class `samson.SBClass.Type` Signature: `class Type(self: samson.SBClass.Type, value: int)` Bases: `pybind11_object` **Members** - `Base`: Classes defined in SAMSON’s code base - `App`: Apps - `Editor`: Editors - `Importer`: Importers - `Exporter`: Exporters - `Tutorial`: Tutorials - `VisualModel`: Visual models - `DynamicalModelArticulatedBodySystem`: Articulated-body dynamical models - `DynamicalModelParticleSystem`: Particle dynamical models - `DynamicalModelRigidBodySystem`: Rigid-body dynamical models - `InteractionModelArticulatedBodySystem`: Articulated-body interaction models - `InteractionModelParticleSystem`: Particle interaction models - `InteractionModelRigidBodySystem`: Rigid-body interaction models - `PropertyModel`: Property models - `PropertyModelFunction`: Function property models - `NeighborSearchArticulatedBodySystem`: Articulated-body neighbor search algorithms - `NeighborSearchParticleSystem`: Particle neighbor search algorithms - `NeighborSearchRigidBodySystem`: Rigid-body neighbor search algorithms - `StateUpdaterArticulatedBodySystem`: Articulated-body state updaters - `StateUpdaterParticleSystem`: Particle neighbor state updaters - `StateUpdaterRigidBodySystem`: Rigid-body neighbor state updaters - `RenderProgram`: Render programs - `Controller`: Controllers - `ControllerNode`: Controller nodes - `Label`: Labels - `NodeGUI`: Nodes GUIs - `Properties`: Property widgets - `Factory`: Factories - `StructuralModelFactory`: Structural model factory - `DynamicalModelParticleSystemFactory`: Particle dynamical model factory - `InteractionModelParticleSystemFactory`: Particle interaction model factory - `VisualModelFactory`: Visual model factory - `PropertyModelFactory`: property model factory - `ControllerFactory`: Controller factory - `LabelFactory`: Label factory Inspector InspectorFactory : Inspector factories AssetLibrary AnimationFactory : Animation factory EntranceAnimation : Entrance animation HighlightAnimation : Highlight animation MotionAnimation : Motion animation ExitAnimation : Exit animation CameraAnimation : Camera animation OtherAnimation : Other animation ColorScheme : Color schemes ColorPalette : Color palettes Selector : Selectors Assistant : Assistants Custom : Custom classes ###### Attribute `samson.SBClass.Type.AnimationFactory` Signature: `AnimationFactory = ` ###### Attribute `samson.SBClass.Type.AssetLibrary` Signature: `AssetLibrary = ` ###### Attribute `samson.SBClass.Type.Assistant` Signature: `Assistant = ` ###### Attribute `samson.SBClass.Type.CameraAnimation` Signature: `CameraAnimation = ` ###### Attribute `samson.SBClass.Type.ColorPalette` Signature: `ColorPalette = ` ###### Attribute `samson.SBClass.Type.ColorScheme` Signature: `ColorScheme = ` ###### Attribute `samson.SBClass.Type.Custom` Signature: `Custom = ` ###### Attribute `samson.SBClass.Type.EntranceAnimation` Signature: `EntranceAnimation = ` ###### Attribute `samson.SBClass.Type.ExitAnimation` Signature: `ExitAnimation = ` ###### Attribute `samson.SBClass.Type.HighlightAnimation` Signature: `HighlightAnimation = ` ###### Attribute `samson.SBClass.Type.Inspector` Signature: `Inspector = ` ###### Attribute `samson.SBClass.Type.InspectorFactory` Signature: `InspectorFactory = ` ###### Attribute `samson.SBClass.Type.MotionAnimation` Signature: `MotionAnimation = ` ###### Attribute `samson.SBClass.Type.OtherAnimation` Signature: `OtherAnimation = ` ###### Attribute `samson.SBClass.Type.Selector` Signature: `Selector = ` ##### Method `samson.SBClass.getClassCategoryString` Signature: `getClassCategoryString(self: SBCClass::Category) -> str` Returns a string describing the category of the class. ##### Method `samson.SBClass.getClassTypeString` Signature: `getClassTypeString(self: SBCClass::Type) -> str` Returns a string describing the type of the class. ##### Attribute `samson.SBClass.AnimationFactory` Signature: `AnimationFactory = ` ##### Attribute `samson.SBClass.App` Signature: `App = ` ##### Attribute `samson.SBClass.Assembly` Signature: `Assembly = ` ##### Attribute `samson.SBClass.AssetLibrary` Signature: `AssetLibrary = ` ##### Attribute `samson.SBClass.Assistant` Signature: `Assistant = ` ##### Attribute `samson.SBClass.Base` Signature: `Base = ` ##### Attribute `samson.SBClass.Biology` Signature: `Biology = ` ##### Attribute `samson.SBClass.CameraAnimation` Signature: `CameraAnimation = ` ##### Attribute `samson.SBClass.Chemistry` Signature: `Chemistry = ` ##### Attribute `samson.SBClass.ColorPalette` Signature: `ColorPalette = ` ##### Attribute `samson.SBClass.ColorScheme` Signature: `ColorScheme = ` ##### Attribute `samson.SBClass.Controller` Signature: `Controller = ` ##### Attribute `samson.SBClass.ControllerFactory` Signature: `ControllerFactory = ` ##### Attribute `samson.SBClass.ControllerNode` Signature: `ControllerNode = ` ##### Attribute `samson.SBClass.Custom` Signature: `Custom = ` ##### Attribute `samson.SBClass.Developer` Signature: `Developer = ` ##### Attribute `samson.SBClass.DynamicalModelArticulatedBodySystem` Signature: `DynamicalModelArticulatedBodySystem = ` ##### Attribute `samson.SBClass.DynamicalModelParticleSystem` Signature: `DynamicalModelParticleSystem = ` ##### Attribute `samson.SBClass.DynamicalModelParticleSystemFactory` Signature: `DynamicalModelParticleSystemFactory = ` ##### Attribute `samson.SBClass.DynamicalModelRigidBodySystem` Signature: `DynamicalModelRigidBodySystem = ` ##### Attribute `samson.SBClass.Editor` Signature: `Editor = ` ##### Attribute `samson.SBClass.Education` Signature: `Education = ` ##### Attribute `samson.SBClass.Electronics` Signature: `Electronics = ` ##### Attribute `samson.SBClass.EntranceAnimation` Signature: `EntranceAnimation = ` ##### Attribute `samson.SBClass.ExitAnimation` Signature: `ExitAnimation = ` ##### Attribute `samson.SBClass.Exporter` Signature: `Exporter = ` ##### Attribute `samson.SBClass.Factory` Signature: `Factory = ` ##### Attribute `samson.SBClass.General` Signature: `General = ` ##### Attribute `samson.SBClass.HighlightAnimation` Signature: `HighlightAnimation = ` ##### Attribute `samson.SBClass.Importer` Signature: `Importer = ` ##### Attribute `samson.SBClass.Inspector` Signature: `Inspector = ` ##### Attribute `samson.SBClass.InspectorFactory` Signature: `InspectorFactory = ` ##### Attribute `samson.SBClass.InteractionModelArticulatedBodySystem` Signature: `InteractionModelArticulatedBodySystem = ` ##### Attribute `samson.SBClass.InteractionModelParticleSystem` Signature: `InteractionModelParticleSystem = ` ##### Attribute `samson.SBClass.InteractionModelParticleSystemFactory` Signature: `InteractionModelParticleSystemFactory = ` ##### Attribute `samson.SBClass.InteractionModelRigidBodySystem` Signature: `InteractionModelRigidBodySystem = ` ##### Attribute `samson.SBClass.Label` Signature: `Label = ` ##### Attribute `samson.SBClass.LabelFactory` Signature: `LabelFactory = ` ##### Attribute `samson.SBClass.Materials` Signature: `Materials = ` ##### Attribute `samson.SBClass.Medicine` Signature: `Medicine = ` ##### Attribute `samson.SBClass.Metrology` Signature: `Metrology = ` ##### Attribute `samson.SBClass.Modeling` Signature: `Modeling = ` ##### Attribute `samson.SBClass.MotionAnimation` Signature: `MotionAnimation = ` ##### Attribute `samson.SBClass.NeighborSearchArticulatedBodySystem` Signature: `NeighborSearchArticulatedBodySystem = ` ##### Attribute `samson.SBClass.NeighborSearchParticleSystem` Signature: `NeighborSearchParticleSystem = ` ##### Attribute `samson.SBClass.NeighborSearchRigidBodySystem` Signature: `NeighborSearchRigidBodySystem = ` ##### Attribute `samson.SBClass.NodeGUI` Signature: `NodeGUI = ` ##### Attribute `samson.SBClass.Optics` Signature: `Optics = ` ##### Attribute `samson.SBClass.OtherAnimation` Signature: `OtherAnimation = ` ##### Attribute `samson.SBClass.Particles` Signature: `Particles = ` ##### Attribute `samson.SBClass.Pharmacy` Signature: `Pharmacy = ` ##### Attribute `samson.SBClass.Photonics` Signature: `Photonics = ` ##### Attribute `samson.SBClass.Physics` Signature: `Physics = ` ##### Attribute `samson.SBClass.Properties` Signature: `Properties = ` ##### Attribute `samson.SBClass.PropertyModel` Signature: `PropertyModel = ` ##### Attribute `samson.SBClass.PropertyModelFactory` Signature: `PropertyModelFactory = ` ##### Attribute `samson.SBClass.PropertyModelFunction` Signature: `PropertyModelFunction = ` ##### Attribute `samson.SBClass.RenderProgram` Signature: `RenderProgram = ` ##### Attribute `samson.SBClass.Selector` Signature: `Selector = ` ##### Attribute `samson.SBClass.Simulation` Signature: `Simulation = ` ##### Attribute `samson.SBClass.StateUpdaterArticulatedBodySystem` Signature: `StateUpdaterArticulatedBodySystem = ` ##### Attribute `samson.SBClass.StateUpdaterParticleSystem` Signature: `StateUpdaterParticleSystem = ` ##### Attribute `samson.SBClass.StateUpdaterRigidBodySystem` Signature: `StateUpdaterRigidBodySystem = ` ##### Attribute `samson.SBClass.StructuralModelFactory` Signature: `StructuralModelFactory = ` ##### Attribute `samson.SBClass.Toxicology` Signature: `Toxicology = ` ##### Attribute `samson.SBClass.Tutorial` Signature: `Tutorial = ` ##### Attribute `samson.SBClass.VisualModel` Signature: `VisualModel = ` ##### Attribute `samson.SBClass.VisualModelFactory` Signature: `VisualModelFactory = ` ##### Attribute `samson.SBClass.Visualization` Signature: `Visualization = ` --- # SBAttribute Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassAttribute.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassAttribute.md !!! note "See also" SAMSON SDK: [SBCClassAttribute](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCClassAttribute/#) ## API Reference #### Class `samson.SBAttribute` Signature: `class samson.SBAttribute` Bases: `pybind11_object` This class describes a class attribute in a class proxy. SAMSON API: [Introspection](https://documentation.samson-connect.net/developers/11.0.0/introspection/#), [SBCClassAttribute](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCClassAttribute/#) ##### Class `samson.SBAttribute.Access` Signature: `class Access(self: samson.SBAttribute.Access, value: int)` Bases: `pybind11_object` **Members** - `ReadOnly`: Read-only - `ReadWrite`: Read and write - `ReadWriteClear`: Read, write, and clear ##### Class `samson.SBAttribute.Type` Signature: `class Type(self: samson.SBAttribute.Type, value: int)` Bases: `pybind11_object` **Members** - `Scalar`: Scalar - `Array`: Array - `Range`: Range - `Slider`: Slider - `List`: List - `RichText`: Rich text - `PushButton`: Push button - `ImagePath`: Image path - `ImageBase64`: Image encoded in base64 ##### Attribute `samson.SBAttribute.Array` Signature: `Array = ` ##### Attribute `samson.SBAttribute.ImageBase64` Signature: `ImageBase64 = ` ##### Attribute `samson.SBAttribute.ImagePath` Signature: `ImagePath = ` ##### Attribute `samson.SBAttribute.List` Signature: `List = ` ##### Attribute `samson.SBAttribute.PushButton` Signature: `PushButton = ` ##### Attribute `samson.SBAttribute.Range` Signature: `Range = ` ##### Attribute `samson.SBAttribute.ReadOnly` Signature: `ReadOnly = ` ##### Attribute `samson.SBAttribute.ReadWrite` Signature: `ReadWrite = ` ##### Attribute `samson.SBAttribute.ReadWriteClear` Signature: `ReadWriteClear = ` ##### Attribute `samson.SBAttribute.RichText` Signature: `RichText = ` ##### Attribute `samson.SBAttribute.Scalar` Signature: `Scalar = ` ##### Attribute `samson.SBAttribute.Slider` Signature: `Slider = ` ##### Property `samson.SBAttribute.access` Signature: `property access` Returns the access type of the attribute. A read-only property. ##### Property `samson.SBAttribute.attributeType` Signature: `property attributeType` Returns the type of the attribute value. A read-only property. ##### Property `samson.SBAttribute.description` Signature: `property description` Returns the description of the attribute. A read-only property. ##### Property `samson.SBAttribute.group` Signature: `property group` Returns the group of the attribute. A read-only property. ##### Property `samson.SBAttribute.name` Signature: `property name` Returns the name of the attribute. A read-only property. ##### Property `samson.SBAttribute.static` Signature: `property static` Returns whether the attribute is static. A read-only property. ##### Property `samson.SBAttribute.type` Signature: `property type` Returns the type of the attribute. A read-only property. --- # SBFunction Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassFunction.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassFunction.md !!! note "See also" SAMSON SDK: [SBCClassFunction](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCClassFunction/#) ## API Reference #### Class `samson.SBFunction` Signature: `class samson.SBFunction` Bases: `pybind11_object` This class describes a class function in a class proxy. SAMSON API: [Introspection](https://documentation.samson-connect.net/developers/11.0.0/introspection/#), [SBCClassFunction](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCClassFunction/#) ##### Method `samson.SBFunction.call` Signature: `call(self: samson.SBFunction, object: samson.SBValue, *args) -> samson.SBValue` Calls the function for *object* with the given arguments. Set the *object* to *SBValue(None)* when calling a static function. You can supply up to 16 *SBValue* arguments. ##### Method `samson.SBFunction.canCall` Signature: `canCall(self: samson.SBFunction, *args) -> bool` Returns whether can call the function with the given arguments. You can supply up to 16 *SBValue* arguments. ##### Method `samson.SBFunction.getName` Signature: `getName(self: samson.SBFunction) -> str` Returns the name of the function ##### Method `samson.SBFunction.getNumberOfParameters` Signature: `getNumberOfParameters(self: samson.SBFunction) -> int` Returns the number of parameters of the function ##### Method `samson.SBFunction.getOutputType` Signature: `getOutputType(self: samson.SBFunction) -> str` Returns the output type of the function ##### Method `samson.SBFunction.getParameterType` Signature: `getParameterType(self: samson.SBFunction, i: int) -> samson.SBValue` Returns the parameter type of the function parameter *i* ##### Method `samson.SBFunction.getParameterTypeName` Signature: `getParameterTypeName(self: samson.SBFunction, i: int) -> str` Returns the parameter type name of the function parameter *i* ##### Method `samson.SBFunction.isConstFunction` Signature: `isConstFunction(self: samson.SBFunction) -> bool` Returns *True* if and only if the function is a const function ##### Method `samson.SBFunction.isStaticFunction` Signature: `isStaticFunction(self: samson.SBFunction) -> bool` Returns *True* if and only if the function is a static function ##### Method `samson.SBFunction.signature` Signature: `signature(self: samson.SBFunction, addArgumentNames: bool = False) -> str` Returns the signature of the function. **Parameters** - **addArgumentNames** (*bool*) – Whether to output argument names (if specified) as part of the function’s signature. **Returns** - Returns the function signature **Return type** - str --- # SBInterface Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassInterface.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassInterface.md !!! note "See also" SAMSON SDK: [SBCClassInterface](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCClassInterface/#) ## API Reference #### Class `samson.SBInterface` Signature: `class samson.SBInterface` Bases: `pybind11_object` This class describes a class interface in a class proxy. SAMSON API: [Introspection](https://documentation.samson-connect.net/developers/11.0.0/introspection/#), [SBCClassInterface](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCClassInterface/#) ##### Method `samson.SBInterface.getAttribute` Signature: `getAttribute(self: samson.SBInterface, attributeName: str) -> samson.SBAttribute` Returns the attribute with the name *attributeName*. ##### Method `samson.SBInterface.getAttributeNames` Signature: `getAttributeNames(self: samson.SBInterface) -> list[str]` Returns the names of registered attributes. ##### Method `samson.SBInterface.getConstFunction` Signature: `getConstFunction(self: samson.SBInterface, functionName: str, *args) -> samson.SBFunction` Returns the const function *functionName* that can accept the given arguments. You can provide up to 16 *SBValue* arguments. ##### Method `samson.SBInterface.getFunction` Signature: `getFunction(self: samson.SBInterface, functionName: str, *args) -> samson.SBFunction` Returns the non-const function *functionName* that can accept the given arguments. You can provide up to 16 *SBValue* arguments. ##### Method `samson.SBInterface.getFunctionNames` Signature: `getFunctionNames(self: samson.SBInterface) -> list[str]` Returns the names of registered functions. ##### Method `samson.SBInterface.getNumberOfAttributes` Signature: `getNumberOfAttributes(self: samson.SBInterface) -> int` Returns the number of registered attributes. ##### Method `samson.SBInterface.getNumberOfFunctions` Signature: `getNumberOfFunctions(self: samson.SBInterface) -> int` Returns the number of registered functions. --- # SBProxy Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md This class contains a description of the class factory (its constructors) and the class interface (its functions). It used primarily to call functionality exposed from SAMSON extensions thanks to the [introspection mechanism](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md#ps-introspection). !!! note "See also" SAMSON SDK: [SBCClassProxy](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCClassProxy/#) [Introspection: using extensions](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md#ps-introspection) ## API Reference #### Class `samson.SBProxy` Signature: `class samson.SBProxy` Bases: `pybind11_object` This class describes a class proxy. SAMSON API: [Introspection](https://documentation.samson-connect.net/developers/11.0.0/introspection/#), [SBCClassProxy](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCClassProxy/#) ##### Method `samson.SBProxy.call` Signature: `call(self: samson.SBProxy, object: samson.SBValue, functionName: str, *args) -> samson.SBValue` Calls the function *functionName* for *object* with the given arguments. You can supply up to 16 *SBValue* arguments. ##### Method `samson.SBProxy.constCall` Signature: `constCall(self: samson.SBProxy, object: samson.SBValue, functionName: str, *args) -> samson.SBValue` Calls the const function *functionName* for *object* with the given arguments. You can supply up to 16 *SBValue* arguments. ##### Method `samson.SBProxy.createInstance` Signature: `createInstance(self: samson.SBProxy, *args) -> samson.SBValue` Create an instance of the class via its proxy and supplies the given arguments *args* into its constructor. You can provide up to 16 *SBValue* arguments. ##### Method `samson.SBProxy.deleteInstance` Signature: `deleteInstance(self: samson.SBProxy, instance: samson.SBValue) -> bool` Deletes the proxied instance held by *instance*. On success sets *instance* to an empty value. ##### Method `samson.SBProxy.getConstFunction` Signature: `getConstFunction(self: samson.SBProxy, functionName: str, *args) -> samson.SBFunction` Returns from the *proxy* the const function *functionName* that can accept the given arguments. You can provide up to 16 *SBValue* arguments. ##### Method `samson.SBProxy.getFunction` Signature: `getFunction(self: samson.SBProxy, functionName: str, *args) -> samson.SBFunction` Returns from the *proxy* the non-const function *functionName* that can accept the given arguments. You can provide up to 16 *SBValue* arguments. ##### Method `samson.SBProxy.hasFunction` Signature: `hasFunction(self: samson.SBProxy, functionName: str, *args) -> bool` Returns whether the *proxy* has the function *functionName* that can accept the given arguments. You can provide up to 16 *SBValue* arguments. ##### Method `samson.SBProxy.staticCall` Signature: `staticCall(self: samson.SBProxy, functionName: str, *args) -> samson.SBValue` Calls the static function *functionName* with the given arguments. You can supply up to 16 *SBValue* arguments. ##### Property `samson.SBProxy.GUIShortcut` Signature: `property GUIShortcut` Returns the shortcut of the GUI of the class. A read-only property. ##### Property `samson.SBProxy.GUIUUID` Signature: `property GUIUUID` Returns the UUID of the GUI of the class. A read-only property. ##### Property `samson.SBProxy.SDKVersionNumber` Signature: `property SDKVersionNumber` Returns the version number of the SAMSON SDK used to compile the class. A read-only property. ##### Property `samson.SBProxy.UUID` Signature: `property UUID` Returns the UUID of the class. A read-only property. ##### Property `samson.SBProxy.description` Signature: `property description` Returns the description of the class. A read-only property. ##### Property `samson.SBProxy.element` Signature: `property element` Returns the SAMSON Extension containing the class. A read-only property. ##### Property `samson.SBProxy.elementUUID` Signature: `property elementUUID` Returns the UUID of the SAMSON Extension containing the class. A read-only property. ##### Property `samson.SBProxy.extension` Signature: `property extension` Returns the SAMSON Extension containing the class. A read-only property. ##### Property `samson.SBProxy.extensionUUID` Signature: `property extensionUUID` Returns the UUID of the SAMSON Extension containing the class. A read-only property. ##### Property `samson.SBProxy.iconFileName` Signature: `property iconFileName` Returns the file name of the class icon. A read-only property. ##### Property `samson.SBProxy.isDiscoverable` Signature: `property isDiscoverable` Returns *True* if can be discovered by the user. A read-only property. ##### Property `samson.SBProxy.minimumUserPlan` Signature: `property minimumUserPlan` Returns the minimum user plan required to use this class. A read-only property. ##### Property `samson.SBProxy.name` Signature: `property name` Returns the name of the class. A read-only property. ##### Property `samson.SBProxy.publicName` Signature: `property publicName` Returns the public name of the class. A read-only property. ##### Property `samson.SBProxy.shortcut` Signature: `property shortcut` Returns the shortcut of the class. A read-only property. ##### Property `samson.SBProxy.tooltip` Signature: `property tooltip` Returns the tooltip of the class. A read-only property. ##### Property `samson.SBProxy.type` Signature: `property type` Returns the type of the class. A read-only property. ##### Property `samson.SBProxy.versionNumber` Signature: `property versionNumber` Returns the version number of the class. A read-only property. --- # Container Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container.md The classes below expose several fundamental container types that are used in SAMSON. !!! note "See also" SAMSON SDK: [The SBCContainer Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Core/Container/#) - [SBUUID](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md) - [SBUserPlan](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUserPlan.md) - [SBVersionNumber](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCVersionNumber.md) --- # SBUUID Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md `samson.SBUUID` objects can hold Universally Unique IDs (UUIDs), which are used to identify classes and SAMSON Extensions. !!! note "See also" SAMSON SDK: [SBCContainerUUID](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCContainerUUID/#) ## API Reference #### Class `samson.SBUUID` Signature: `class samson.SBUUID(*args, **kwargs)` Bases: `pybind11_object` This class describes a universally unique identifier (UUID). This class objects can hold Universally Unique IDs (UUIDs), which are used to identify classes and SAMSON Extensions (Elements). Overloaded function. 1. __init__(self: samson.SBUUID, uuid: str) -> None Constructs a UUID from a string. **Parameters** - **uuid** (*str*) – A valid UUID string. ##### Examples Create a UUID object from a string: ```pycon >>> uuid = SBUUID('BE5DA3CC-70F7-4963-8B08-2B72BE5A6790') >>> print(uuid) BE5DA3CC-70F7-4963-8B08-2B72BE5A6790 ``` ##### Notes SAMSON provides the UUID Generator extension which you can use to generate new UUIDs. 2. __init__(self: samson.SBUUID, uuid: samson.SBUUID) -> None Copy constructor. **Parameters** - **uuid** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – UUID to copy. 3. __init__(self: samson.SBUUID) -> None Constructs an invalid UUID ##### Method `samson.SBUUID.__eq__` Signature: `__eq__(self: samson.SBUUID, arg0: samson.SBUUID) -> bool` Returns *True* when two UUIDs are equal. ##### Method `samson.SBUUID.__lt__` Signature: `__lt__(self: samson.SBUUID, arg0: samson.SBUUID) -> bool` Lexicographic comparison with another UUID. ##### Method `samson.SBUUID.__ne__` Signature: `__ne__(self: samson.SBUUID, arg0: samson.SBUUID) -> bool` Returns *True* when two UUIDs are different. ##### Method `samson.SBUUID.decrement` Signature: `decrement(self: samson.SBUUID) -> samson.SBUUID` Prefix decrement (lexicographic, in place). ##### Method `samson.SBUUID.increment` Signature: `increment(self: samson.SBUUID) -> samson.SBUUID` Prefix increment (lexicographic, in place). ##### Method `samson.SBUUID.postDecrement` Signature: `postDecrement(self: samson.SBUUID) -> samson.SBUUID` Postfix decrement (returns previous value). ##### Method `samson.SBUUID.postIncrement` Signature: `postIncrement(self: samson.SBUUID) -> samson.SBUUID` Postfix increment (returns previous value). ##### Attribute `samson.SBUUID.invalid` Signature: `invalid = SBUUID("00000000-0000-0000-0000-000000000000")` ##### Property `samson.SBUUID.isValid` Signature: `property isValid` Returns *True* if and only if the UUID is valid. .. rubric:: Examples Create a UUID object from a string: ```pycon >>> uuid = SBUUID('BE5DA3CC-70F7-4963-8B08-2B72BE5A6790') >>> print(uuid.isValid) True ``` --- # SBUserPlan Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUserPlan.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUserPlan.md `samson.SBUserPlan` objects holds the user plan. !!! note "See also" SAMSON SDK: [SBCContainerUserPlan](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCContainerUserPlan/#) ## API Reference #### Class `samson.SBUserPlan` Signature: `class samson.SBUserPlan(*args, **kwargs)` Bases: `pybind11_object` This class describes a SAMSON user plan. Overloaded function. 1. __init__(self: samson.SBUserPlan) -> None Constructs the NoPlan user plan 2. __init__(self: samson.SBUserPlan, userPlan: samson.SBUserPlan.Type) -> None Constructs a user plan from enum value. **Parameters** - **userPlan** ([*samson.SBUserPlan.Type*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUserPlan.md#samson.SBUserPlan.Type)) – User plan tier. 3. __init__(self: samson.SBUserPlan, typeString: str) -> None Constructs a user plan. **Parameters** - **typeString** (*str*) – A string representation of a user plan (*Starter*, *Professional*, *Expert*, *Enterprise*). Unknown values fallback to *NoPlan*. 4. __init__(self: samson.SBUserPlan, userPlan: samson.SBUserPlan) -> None Copy constructor. **Parameters** - **userPlan** ([*samson.SBUserPlan*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUserPlan.md#samson.SBUserPlan)) – Source user plan. ##### Class `samson.SBUserPlan.Type` Signature: `class Type(self: samson.SBUserPlan.Type, value: int)` Bases: `pybind11_object` **Members** - `NoPlan`: No plan - `Starter`: The Starter plan - `Professional`: The Professional plan - `Expert`: The Expert plan - `Enterprise`: The Enterprise plan ###### Method `samson.SBUserPlan.Type.__eq__` Signature: `__eq__(self: object, other: object) -> bool` ###### Method `samson.SBUserPlan.Type.__ne__` Signature: `__ne__(self: object, other: object) -> bool` ##### Method `samson.SBUserPlan.__eq__` Signature: `__eq__(self: samson.SBUserPlan, arg0: samson.SBUserPlan) -> bool` Returns *True* when both user plans are identical. ##### Method `samson.SBUserPlan.__lt__` Signature: `__lt__(self: samson.SBUserPlan, arg0: samson.SBUserPlan) -> bool` Tier-order comparison (*<*). ##### Method `samson.SBUserPlan.__ne__` Signature: `__ne__(self: samson.SBUserPlan, arg0: samson.SBUserPlan) -> bool` Returns *True* when user plans are different. ##### Attribute `samson.SBUserPlan.Enterprise` Signature: `Enterprise = ` ##### Attribute `samson.SBUserPlan.Expert` Signature: `Expert = ` ##### Attribute `samson.SBUserPlan.NoPlan` Signature: `NoPlan = ` ##### Attribute `samson.SBUserPlan.Professional` Signature: `Professional = ` ##### Attribute `samson.SBUserPlan.Starter` Signature: `Starter = ` ##### Property `samson.SBUserPlan.type` Signature: `property type` Returns the user plan type. A read-only property. --- # SBVersionNumber Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCVersionNumber.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCVersionNumber.md This class describes a version number in SAMSON, composed of three non-negative integers: - a major version number - a minor version number - a patch version number Because SAMSON Extensions depend on the version of the SDK with which they are developed, SAMSON has a strict versioning policy. Please refer to the section in the Developer Guide about [Versioning](https://documentation.samson-connect.net/developers/11.0.0/versioning/#) for more information. !!! note "See also" SAMSON SDK: [SBCContainerVersionNumber](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCContainerVersionNumber/#) ## API Reference #### Class `samson.SBVersionNumber` Signature: `class samson.SBVersionNumber(*args, **kwargs)` Bases: `pybind11_object` This class describes a version number in SAMSON, composed of three non-negative integers: - a major version number - a minor version number - a patch version number Because SAMSON Extensions depend on the version of the SDK with which they are developed, SAMSON has a strict versioning policy. For more information, please refer to the SAMSON API [Versioning](https://documentation.samson-connect.net/users/11.0.0/versioning/#). Overloaded function. 1. __init__(self: samson.SBVersionNumber) -> None Constructs the 0.0.0 version number. 2. __init__(self: samson.SBVersionNumber, major: int, minor: int, patch: int) -> None Constructs a version number major.minor.patch. **Parameters** - **major** (*int*) – The major version number. - **minor** (*int*) – The minor version number. - **patch** (*int*) – The patch version number. ##### Examples ```pycon >>> print(SBVersionNumber(1, 2, 8)) 1.2.8 ``` 3. __init__(self: samson.SBVersionNumber, stringVersionNumber: str) -> None Constructs a version number from a string that has the ‘MAJOR.MINOR.PATCH’ format. **Parameters** - **stringVersionNumber** (*str*) – A string representation of a version number. ##### Examples ```pycon >>> print(SBVersionNumber('1.2.0')) 1.2.0 ``` 4. __init__(self: samson.SBVersionNumber, versionNumber: samson.SBVersionNumber) -> None Copy constructor. **Parameters** - **versionNumber** ([*samson.SBVersionNumber*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCVersionNumber.md#samson.SBVersionNumber)) – Source version number. ##### Method `samson.SBVersionNumber.__eq__` Signature: `__eq__(self: samson.SBVersionNumber, arg0: samson.SBVersionNumber) -> bool` Returns *True* when both versions are identical. ##### Method `samson.SBVersionNumber.__ge__` Signature: `__ge__(self: samson.SBVersionNumber, arg0: samson.SBVersionNumber) -> bool` Semantic-version comparison (*>=*). ##### Method `samson.SBVersionNumber.__gt__` Signature: `__gt__(self: samson.SBVersionNumber, arg0: samson.SBVersionNumber) -> bool` Semantic-version comparison (*>*). ##### Method `samson.SBVersionNumber.__le__` Signature: `__le__(self: samson.SBVersionNumber, arg0: samson.SBVersionNumber) -> bool` Semantic-version comparison (*<=*). ##### Method `samson.SBVersionNumber.__lt__` Signature: `__lt__(self: samson.SBVersionNumber, arg0: samson.SBVersionNumber) -> bool` Semantic-version comparison (*<*). ##### Method `samson.SBVersionNumber.__ne__` Signature: `__ne__(self: samson.SBVersionNumber, arg0: samson.SBVersionNumber) -> bool` Returns *True* when versions are different. ##### Method `samson.SBVersionNumber.getCompatibilityStatus` Signature: `static getCompatibilityStatus(sdkVersionNumber: samson.SBVersionNumber, coreVersionNumber: samson.SBVersionNumber) -> bool` Returns whether *sdkVersionNumber* is compatible with *coreVersionNumber*. For major version 0 (beta semantic versioning), compatibility requires same minor and sdk patch <= core patch. For major version > 0, compatibility requires same major and sdk minor <= core minor. ##### Property `samson.SBVersionNumber.isValid` Signature: `property isValid` Returns *True* if at least one component is non-zero. ##### Property `samson.SBVersionNumber.major` Signature: `property major` The major version number. ##### Property `samson.SBVersionNumber.minor` Signature: `property minor` The minor version number. ##### Property `samson.SBVersionNumber.patch` Signature: `property patch` The patch version number. --- # Meta Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta.md Classes below are bindings for SAMSON SDK classes that define fundamental mechanisms used for passing values in the [introspection mechanism](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md#ps-introspection) in SAMSON. In particular, the SAMSON SDK *SBValue* class encapsulates values to send them in when using the [class introspection](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md#ps-introspection). !!! note "See also" SAMSON SDK: [The SBCMeta Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Core/Meta/#) [Introspection: using extensions](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md#ps-introspection) - [SBValue](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValue.md) - [SBValueMap](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md) --- # SBValue Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValue.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValue.md This class exposes bindings for the SAMSON SDK *SBValue* class that encapsulates values. It used primarily when calling functionality exposed from SAMSON extensions thanks to the [introspection mechanism](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md#ps-introspection). !!! note "See also" SAMSON SDK: [SBCMetaValue](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCMetaValue/#) [Introspection: using extensions](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md#ps-introspection) ## API Reference #### Class `samson.SBValue` Signature: `class samson.SBValue(*args, **kwargs)` Bases: `pybind11_object` This class encapsulates values to pass them in and out via the Introspection mechanism of SAMSON, i.e. via proxies and functions exposed via the Introspection mechanism. SAMSON API: [Introspection](https://documentation.samson-connect.net/developers/11.0.0/introspection/#), [SBCMetaValue](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCMetaValue/#) Overloaded function. 1. __init__(self: samson.SBValue) -> None Constructs an empty (invalid) value holder. 2. __init__(self: samson.SBValue, value: samson.SBValue) -> None Copy constructor. **Parameters** - **value** ([*samson.SBValue*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValue.md#samson.SBValue)) – Source value holder. 3. __init__(self: samson.SBValue, object: object, argType: samson.SBValue.ArgType = ) -> None Constructs an *SBValue* by converting a Python object. **Parameters** - **object** (*object*) – Python object to store in *SBValue*. - **argType** ([*samson.SBValue.ArgType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValue.md#samson.SBValue.ArgType)*,**default=SBValue.ArgType.Auto*) – Controls whether conversion uses value/reference/pointer semantics where available. ##### Class `samson.SBValue.ArgType` Signature: `class ArgType(self: samson.SBValue.ArgType, value: int)` Bases: `pybind11_object` Members: Auto Value Reference Pointer ConstReference ConstPointer ###### Attribute `samson.SBValue.ArgType.Auto` Signature: `Auto = ` ###### Attribute `samson.SBValue.ArgType.ConstPointer` Signature: `ConstPointer = ` ###### Attribute `samson.SBValue.ArgType.ConstReference` Signature: `ConstReference = ` ###### Attribute `samson.SBValue.ArgType.Pointer` Signature: `Pointer = ` ###### Attribute `samson.SBValue.ArgType.Reference` Signature: `Reference = ` ###### Attribute `samson.SBValue.ArgType.Value` Signature: `Value = ` ###### Property `samson.SBValue.ArgType.name` Signature: `property name` ###### Property `samson.SBValue.ArgType.value` Signature: `property value` ##### Method `samson.SBValue.canCast` Signature: `static canCast(object: object, argType: samson.SBValue.ArgType = ) -> bool` Returns whether a Python object can be converted to *SBValue*. **Parameters** - **object** (*object*) – Python object to test. - **argType** ([*samson.SBValue.ArgType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValue.md#samson.SBValue.ArgType)*,**default=SBValue.ArgType.Auto*) – Requested conversion mode (value/reference/pointer). **Returns** - *True* if conversion is supported. **Return type** - bool ##### Method `samson.SBValue.getBaseTypeName` Signature: `getBaseTypeName(self: samson.SBValue) -> str` Returns the name of the base type ##### Method `samson.SBValue.getParentTypeName` Signature: `getParentTypeName(self: samson.SBValue) -> str` Returns the name of the parent type ##### Method `samson.SBValue.getRootTypeName` Signature: `getRootTypeName(self: samson.SBValue) -> str` Returns the name of the root type ##### Method `samson.SBValue.getShortBaseTypeName` Signature: `getShortBaseTypeName(self: samson.SBValue) -> str` Returns the short base type name ##### Method `samson.SBValue.getShortParentTypeName` Signature: `getShortParentTypeName(self: samson.SBValue) -> str` Returns the short parent type name ##### Method `samson.SBValue.getShortRootTypeName` Signature: `getShortRootTypeName(self: samson.SBValue) -> str` Returns the short root type name ##### Method `samson.SBValue.getShortTypeName` Signature: `getShortTypeName(self: samson.SBValue) -> str` Returns the short type name ##### Method `samson.SBValue.getTypeName` Signature: `getTypeName(self: samson.SBValue) -> str` Returns the type name ##### Method `samson.SBValue.getTypeUUID` Signature: `getTypeUUID(self: samson.SBValue) -> samson.SBUUID` Returns the UUID identifying the stored C++ type. ##### Method `samson.SBValue.getValue` Signature: `getValue(self: samson.SBValue) -> object` Returns the stored object converted back to a Python object. **Returns** - Python representation of the stored value. **Return type** - object ##### Method `samson.SBValue.isValid` Signature: `isValid(self: samson.SBValue) -> bool` Returns whether the value is valid and can be obtained with *getValue* ##### Attribute `samson.SBValue.Auto` Signature: `Auto = ` ##### Attribute `samson.SBValue.ConstPointer` Signature: `ConstPointer = ` ##### Attribute `samson.SBValue.ConstReference` Signature: `ConstReference = ` ##### Attribute `samson.SBValue.Pointer` Signature: `Pointer = ` ##### Attribute `samson.SBValue.Reference` Signature: `Reference = ` ##### Attribute `samson.SBValue.Value` Signature: `Value = ` --- # SBValueMap Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md This class exposes bindings for the SAMSON SDK *SBValueMap* class that describes a value map. This is a convenience class that contains a map from string to [`samson.SBValue`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValue.md#samson.SBValue), and can be used, for example, to pass into a function a map of parameters, or another data. !!! note "See also" SAMSON SDK: [SBCMetaValueMap](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCMetaValueMap/#) [Introspection: using extensions](https://documentation.samson-connect.net/scripting/latest/docs/Introspection.md#ps-introspection) ## API Reference #### Class `samson.SBValueMap` Signature: `class samson.SBValueMap(*args, **kwargs)` Bases: `pybind11_object` This class describes a value map. This is a convenience class that contains a map from string to *SBValue*, and can be used, for example, to pass into a function a map of parameters, or another data. SAMSON API: [Introspection](https://documentation.samson-connect.net/developers/11.0.0/introspection/#), [SBCMetaValueMap](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCMetaValueMap/#), [SBCMetaValue](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCMetaValue/#) Overloaded function. 1. __init__(self: samson.SBValueMap) -> None Creates an empty map. 2. __init__(self: samson.SBValueMap, n: int) -> None Creates a map and preallocates storage. **Parameters** - **n** (*int*) – Expected number of entries. 3. __init__(self: samson.SBValueMap, valueMap: samson.SBValueMap) -> None Copy constructor. **Parameters** - **valueMap** ([*samson.SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – Source map. ##### Method `samson.SBValueMap.at` Signature: `at(self: samson.SBValueMap, key: str) -> samson.SBValue` Returns value for key; raises *KeyError* if key is missing. ##### Method `samson.SBValueMap.clear` Signature: `clear(self: samson.SBValueMap) -> None` Removes all entries from the map. ##### Method `samson.SBValueMap.contains` Signature: `contains(self: samson.SBValueMap, key: str) -> bool` Returns whether *key* exists in the map. ##### Method `samson.SBValueMap.erase` Signature: `erase(self: samson.SBValueMap, key: str) -> bool` Erases an entry by key and returns whether erasure succeeded. ##### Method `samson.SBValueMap.get` Signature: `get(*args, **kwargs)` Overloaded function. 1. get(self: samson.SBValueMap, key: str) -> samson.SBValue Returns value for key or empty *SBValue* if key is missing. **Parameters** - **key** (*str*) – Map key. **Returns** - Value associated with *key*, or empty value if not found. **Return type** - [samson.SBValue](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValue.md#samson.SBValue) 2. get(self: samson.SBValueMap, key: str, default: object) -> object Returns value for key or *default* if key is missing. **Parameters** - **key** (*str*) – Map key. - **default** (*object*) – Fallback value returned when *key* does not exist. **Returns** - Stored value converted to Python, or *default*. **Return type** - object ##### Method `samson.SBValueMap.insert` Signature: `insert(self: samson.SBValueMap, key: str, value: samson.SBValue) -> bool` Inserts *key* and *value* only if *key* is missing. **Returns** - *True* if a new entry was inserted, *False* if key already existed. **Return type** - bool ##### Method `samson.SBValueMap.items` Signature: `items(self: samson.SBValueMap) -> list[tuple[str, samson.SBValue]]` Returns a snapshot list of *(key, value)* pairs. ##### Method `samson.SBValueMap.keys` Signature: `keys(self: samson.SBValueMap) -> list[str]` Returns a snapshot list of keys. ##### Method `samson.SBValueMap.pop` Signature: `pop(self: samson.SBValueMap, key: str, default: object = None) -> object` Removes and returns value for *key*. If *key* is missing, returns *default*. ##### Method `samson.SBValueMap.set` Signature: `set(self: samson.SBValueMap, key: str, value: samson.SBValue) -> None` Sets *key* to *value*, replacing existing value if needed. **Parameters** - **key** (*str*) – Map key. - **value** ([*samson.SBValue*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValue.md#samson.SBValue)) – Value to store. ##### Method `samson.SBValueMap.swap` Signature: `swap(self: samson.SBValueMap, valueMap: samson.SBValueMap) -> None` Swaps maps in O(1) ##### Method `samson.SBValueMap.toDict` Signature: `toDict(self: samson.SBValueMap) -> dict[str, samson.SBValue]` Creates a Python dictionary snapshot from this value map. ##### Method `samson.SBValueMap.update` Signature: `update(self: samson.SBValueMap, dict: dict) -> None` Updates map from a Python dictionary (*str -> SBValue*). ##### Method `samson.SBValueMap.values` Signature: `values(self: samson.SBValueMap) -> list[samson.SBValue]` Returns a snapshot list of values. --- # Reference Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference.md The classes below expose key mechanisms for maintaining references to objects in SAMSON. !!! note "See also" SAMSON SDK: [The SBCReference Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Core/Reference/#) SAMSON SDK: [Referencing](https://documentation.samson-connect.net/developers/11.0.0/referencing/#) - [SBReferenceIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference/SBCReferenceIndexer.md) - [SBReferenceTarget](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference/SBCReferenceTarget.md) --- # SBReferenceIndexer Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference/SBCReferenceIndexer.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference/SBCReferenceIndexer.md !!! note "See also" SAMSON SDK: [SBCReferenceIndexer](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCReferenceIndexer/#) ## API Reference #### Class `samson.SBReferenceIndexer` Signature: `class samson.SBReferenceIndexer` Bases: `pybind11_object` This is a class used to efficiently index references. --- # SBReferenceTarget Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference/SBCReferenceTarget.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference/SBCReferenceTarget.md !!! note "See also" SAMSON SDK: [SBCReferenceTarget](https://documentation.samson-connect.net/developers/11.0.0/api/classSBCReferenceTarget/#) ## API Reference #### Class `samson.SBReferenceTarget` Signature: `class samson.SBReferenceTarget` Bases: `pybind11_object` This class is used to represent objects which may reference and be referenced by other objects. ##### Method `samson.SBReferenceTarget.getMemoryFootprint` Signature: `getMemoryFootprint(self: samson.SBReferenceTarget) -> int` Returns the memory footprint. --- # Data Model Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel.md This group contains classes for working with the data graph, documents, materials, colors, quantities, and the mathematical types used across the Python API. !!! note "See also" SAMSON SDK: [The DataModel Library Group](https://documentation.samson-connect.net/developers/11.0.0/sdk/DataModel/#) - [Asset](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Asset.md) - [Color Scheme](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme.md) - [Data Graph](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph.md) - [Document](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document.md) - [Palette](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette.md) - [SBQuantity](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity.md) - [Type](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type.md) - [Visualization](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization.md) --- # Asset Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Asset.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Asset.md This group contains classes related to assets. !!! note "See also" SAMSON SDK: [The SBDAsset Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/DataModel/Asset/#) - [SBAsset](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Asset/SBDAsset.md) --- # SBAsset Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Asset/SBDAsset.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Asset/SBDAsset.md !!! note "See also" SAMSON SDK: [SBDAsset](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDAsset/#) ## API Reference #### Class `samson.SBAsset` Signature: `class samson.SBAsset(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes an asset. SAMSON API: [SBDAsset](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDAsset/#) Overloaded function. 1. __init__(self: samson.SBAsset) -> None Constructs an empty asset. 2. __init__(self: samson.SBAsset, assetName: str, assetFileName: str, thumbnailFileName: str) -> None Constructs an asset with the given *assetName*, *assetFileName*, and *thumbnailFileName*. ##### Method `samson.SBAsset.getNextAsset` Signature: `getNextAsset(self: samson.SBAsset) -> samson.SBAsset` Returns the next asset. ##### Method `samson.SBAsset.getPreviousAsset` Signature: `getPreviousAsset(self: samson.SBAsset) -> samson.SBAsset` Returns the previous asset. ##### Method `samson.SBAsset.initializeAsset` Signature: `initializeAsset(self: samson.SBAsset) -> bool` Prepares the asset file and returns whether the operation succeeded. ##### Method `samson.SBAsset.initializeThumbnail` Signature: `initializeThumbnail(self: samson.SBAsset) -> bool` Prepares the asset thumbnail and returns whether the operation succeeded. ##### Property `samson.SBAsset.assetFileName` Signature: `property assetFileName` The name of the file associated to the asset. ##### Property `samson.SBAsset.isLocked` Signature: `property isLocked` Returns whether the asset is locked. A read-only property. ##### Property `samson.SBAsset.thumbnailFileName` Signature: `property thumbnailFileName` The name of the file associated to the asset thumbnail. --- # Color Scheme Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme.md This group contains classes related to color schemes, which define how structural nodes, visual models, and other renderable objects are colorized. Please refer to the [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) page for information on how to create, apply, and modify color schemes. !!! note "See also" [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) SAMSON SDK: [The SBDColorScheme Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/DataModel/ColorScheme/#) - [SBColorSchemeConstant](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeConstant.md) - [SBColorSchemeConstantIllustrate](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeConstantIllustrate.md) - [SBColorSchemeCPK](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPK.md) - [SBColorSchemeCPKConstantCarbons](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPKConstantCarbons.md) - [SBColorSchemeCPKPerChainCarbons](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPKPerChainCarbons.md) - [SBColorSchemeCPKPerStructuralModelCarbons](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPKPerStructuralModelCarbons.md) - [SBColorSchemePerChainID](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerChainID.md) - [SBColorSchemePerChainIllustrate](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerChainIllustrate.md) - [SBColorSchemePerFormalCharge](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerFormalCharge.md) - [SBColorSchemePerOccupancy](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerOccupancy.md) - [SBColorSchemePerPartialCharge](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerPartialCharge.md) - [SBColorSchemePerResidueHydrophobicity](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueHydrophobicity.md) - [SBColorSchemePerResidueSequenceNumber](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueSequenceNumber.md) - [SBColorSchemePerResidueType](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueType.md) - [SBColorSchemePerSecondaryStructureType](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerSecondaryStructureType.md) - [SBColorSchemePerSideChainCharge](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerSideChainCharge.md) - [SBColorSchemePerSideChainPolarity](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerSideChainPolarity.md) - [SBColorSchemePerStructuralModel](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerStructuralModel.md) - [SBColorSchemePerStructuralModelIllustrate](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerStructuralModelIllustrate.md) - [SBColorSchemePerTemperatureFactor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerTemperatureFactor.md) --- # SBColorSchemeConstant Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeConstant.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeConstant.md This class describes a constant color scheme. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemeConstant](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemeConstant/#) ## API Reference #### Class `samson.SBColorSchemeConstant` Signature: `class samson.SBColorSchemeConstant(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a constant color scheme. Overloaded function. 1. __init__(self: samson.SBColorSchemeConstant) -> None Constructs a constant color scheme with the white color (1.0, 1.0, 1.0, 1.0). ##### Examples ```pycon >>> constantColorScheme = SBColorSchemeConstant() >>> color = constantColorScheme.getColor() >>> print(color) [1.000000, 1.000000, 1.000000, 1.000000] ``` 2. __init__(self: samson.SBColorSchemeConstant, red: float, green: float, blue: float, alpha: float = 1.0) -> None Constructs a constant color scheme with the given color (red, green, blue, alpha). Arguments should be in the range [0.0, 1.0]. **Parameters** - **red** (*float*) – The red component of RGB-color. - **green** (*float*) – The green component of RGB-color. - **blue** (*float*) – The blue component of RGB-color. - **alpha** (*float**,**default=1.0*) – The alpha component (transparency). ##### Examples ```pycon >>> constantColorScheme = SBColorSchemeConstant(0.25, 0.5, 0.75, 1.0) >>> color = constantColorScheme.getColor() >>> print(color) [0.250000, 0.500000, 0.750000, 1.000000] ``` 3. __init__(self: samson.SBColorSchemeConstant, red: int, green: int, blue: int, alpha: int = 255) -> None Constructs a constant color scheme with the given color (red, green, blue, alpha). Arguments should be in the range [0, 255]. **Parameters** - **red** (*int*) – The red component of RGB-color. - **green** (*int*) – The green component of RGB-color. - **blue** (*int*) – The blue component of RGB-color. - **alpha** (*int**,**default=255*) – The alpha component (transparency). ##### Examples ```pycon >>> constantColorScheme = SBColorSchemeConstant(120, 160, 200, 255) >>> color = constantColorScheme.getColor() >>> print(color) [0.470588, 0.627451, 0.784314, 1.000000] ``` 4. __init__(self: samson.SBColorSchemeConstant, color: samson.SBColor) -> None Constructs a constant color scheme with the given *color*. **Parameters** - **color** ([*samson.SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) – A color --- # SBColorSchemeConstantIllustrate Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeConstantIllustrate.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeConstantIllustrate.md This class describes an illustrative constant color scheme. The colorization is done in the way that it resembles the “Molecule of the Month” style by [David S. Goodsell](http://ccsb.scripps.edu/goodsell/). Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemeConstantIllustrate](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemeConstantIllustrate/#) ## API Reference #### Class `samson.SBColorSchemeConstantIllustrate` Signature: `class samson.SBColorSchemeConstantIllustrate(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes an illustrative constant color scheme. The colorization is done in the way that it resembles the “Molecule of the Month” style by David S. Goodsell. Overloaded function. 1. __init__(self: samson.SBColorSchemeConstantIllustrate) -> None Constructs a constant color scheme with the white color (1.0, 1.0, 1.0, 1.0). 2. __init__(self: samson.SBColorSchemeConstantIllustrate, red: float, green: float, blue: float, alpha: float = 1.0) -> None Constructs a constant color scheme with the given color (red, green, blue, alpha). Arguments should be in the range [0.0, 1.0]. **Parameters** - **red** (*float*) – The red component of RGB-color. - **green** (*float*) – The green component of RGB-color. - **blue** (*float*) – The blue component of RGB-color. - **alpha** (*float**,**default=1.0*) – The alpha component (transparency). ##### Examples ```pycon >>> colorScheme = SBColorSchemeConstantIllustrate(0.25, 0.5, 0.75, 1.0) ``` 3. __init__(self: samson.SBColorSchemeConstantIllustrate, red: int, green: int, blue: int, alpha: int = 255) -> None Constructs a constant color scheme with the given color (red, green, blue, alpha). Arguments should be in the range [0, 255]. **Parameters** - **red** (*int*) – The red component of RGB-color. - **green** (*int*) – The green component of RGB-color. - **blue** (*int*) – The blue component of RGB-color. - **alpha** (*int**,**default=255*) – The alpha component (transparency). ##### Examples ```pycon >>> colorScheme = SBColorSchemeConstantIllustrate(120, 160, 200, 255) ``` 4. __init__(self: samson.SBColorSchemeConstantIllustrate, color: samson.SBColor) -> None Constructs a constant color scheme with the given *color*. **Parameters** - **color** ([*samson.SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) – A color --- # SBColorSchemeCPK Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPK.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPK.md This class describes the Corey-Pauling-Koltun (CPK) color scheme. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemeCPK](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemeCPK/#) ## API Reference #### Class `samson.SBColorSchemeCPK` Signature: `class samson.SBColorSchemeCPK(self: samson.SBColorSchemeCPK)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes the Corey-Pauling-Koltun (CPK) color scheme. This is the same as the default color scheme (when no material is present), but with additional appearance attributes used in Trace mode (transmission, specularity, etc.). Constructs the CPK color scheme. --- # SBColorSchemeCPKConstantCarbons Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPKConstantCarbons.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPKConstantCarbons.md This class describes a color scheme that sets a specified color for carbons and colors from the the Corey-Pauling-Koltun (CPK) color scheme for other atom element types. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemeCPKConstantCarbons](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemeCPKConstantCarbons/#) ## API Reference #### Class `samson.SBColorSchemeCPKConstantCarbons` Signature: `class samson.SBColorSchemeCPKConstantCarbons(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a color scheme that sets a specified color for carbons and CPK colors for other atom element types. Overloaded function. 1. __init__(self: samson.SBColorSchemeCPKConstantCarbons) -> None Constructs the color scheme with the white color (1.0, 1.0, 1.0, 1.0). 2. __init__(self: samson.SBColorSchemeCPKConstantCarbons, red: float, green: float, blue: float, alpha: float = 1.0) -> None Constructs the color scheme with the given color (red, green, blue, alpha). Arguments should be in the range [0.0, 1.0]. **Parameters** - **red** (*float*) – The red component of RGB-color. - **green** (*float*) – The green component of RGB-color. - **blue** (*float*) – The blue component of RGB-color. - **alpha** (*float**,**default=1.0*) – The alpha component (transparency). ##### Examples ```pycon >>> colorScheme = SBColorSchemeCPKConstantCarbons(0.25, 0.5, 0.75, 1.0) ``` 3. __init__(self: samson.SBColorSchemeCPKConstantCarbons, red: int, green: int, blue: int, alpha: int = 255) -> None Constructs the color scheme with the given color (red, green, blue, alpha). Arguments should be in the range [0, 255]. **Parameters** - **red** (*int*) – The red component of RGB-color. - **green** (*int*) – The green component of RGB-color. - **blue** (*int*) – The blue component of RGB-color. - **alpha** (*int**,**default=255*) – The alpha component (transparency). ##### Examples ```pycon >>> colorScheme = SBColorSchemeCPKConstantCarbons(120, 160, 200, 255) ``` 4. __init__(self: samson.SBColorSchemeCPKConstantCarbons, color: samson.SBColor) -> None Constructs the color scheme with the given *color*. **Parameters** - **color** ([*samson.SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) – A color --- # SBColorSchemeCPKPerChainCarbons Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPKPerChainCarbons.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPKPerChainCarbons.md This class describes a color scheme that sets colors for carbons based on their chain ID and colors from the the Corey-Pauling-Koltun (CPK) color scheme for other atom element types. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemeCPKPerChainCarbons](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemeCPKPerChainCarbons/#) ## API Reference #### Class `samson.SBColorSchemeCPKPerChainCarbons` Signature: `class samson.SBColorSchemeCPKPerChainCarbons(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a color scheme that sets colors for carbons based on their chain IDs and colors from the Corey-Pauling-Koltun (CPK) color scheme for other atom element types. Overloaded function. 1. __init__(self: samson.SBColorSchemeCPKPerChainCarbons) -> None Constructs a color scheme. 2. __init__(self: samson.SBColorSchemeCPKPerChainCarbons, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the range of chain IDs identified from the *nodeIndexer*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemeCPKPerChainCarbons.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemeCPKPerChainCarbons) -> int` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemeCPKPerChainCarbons.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemeCPKPerChainCarbons) -> int` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemeCPKPerChainCarbons.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemeCPKPerChainCarbons) -> int` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemeCPKPerChainCarbons.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemeCPKPerChainCarbons) -> int` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemeCPKPerChainCarbons.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemeCPKPerChainCarbons, arg0: int) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemeCPKPerChainCarbons.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemeCPKPerChainCarbons, arg0: int) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # SBColorSchemeCPKPerStructuralModelCarbons Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPKPerStructuralModelCarbons.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemeCPKPerStructuralModelCarbons.md This class describes a color scheme that sets colors for carbons based on their structural model and colors from the the Corey-Pauling-Koltun (CPK) color scheme for other atom element types. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemeCPKPerStructuralModelCarbons](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemeCPKPerStructuralModelCarbons/#) ## API Reference #### Class `samson.SBColorSchemeCPKPerStructuralModelCarbons` Signature: `class samson.SBColorSchemeCPKPerStructuralModelCarbons(*args, **kwargs)` Bases: [`SBColorSchemePerStructuralModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerStructuralModel.md#samson.SBColorSchemePerStructuralModel) This class describes a color scheme that sets colors for carbons based on their structural model and colors from the Corey-Pauling-Koltun (CPK) color scheme for other atom element types. Overloaded function. 1. __init__(self: samson.SBColorSchemeCPKPerStructuralModelCarbons) -> None Constructs a color scheme. 2. __init__(self: samson.SBColorSchemeCPKPerStructuralModelCarbons, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the range of structural models identified from the *nodeIndexer*, including parent structural models. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. --- # SBColorSchemePerChainID Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerChainID.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerChainID.md This class describes a color scheme based on the chain ID. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerChainID](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerChainID/#) ## API Reference #### Class `samson.SBColorSchemePerChainID` Signature: `class samson.SBColorSchemePerChainID(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a color scheme based on the chain ID. Overloaded function. 1. __init__(self: samson.SBColorSchemePerChainID) -> None Constructs a chain-ID based color scheme. 2. __init__(self: samson.SBColorSchemePerChainID, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the range of IDs of chains identified in the *nodeIndexer*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemePerChainID.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemePerChainID) -> int` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerChainID.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemePerChainID) -> int` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerChainID.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemePerChainID) -> int` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerChainID.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemePerChainID) -> int` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerChainID.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemePerChainID, arg0: int) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerChainID.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemePerChainID, arg0: int) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # SBColorSchemePerChainIllustrate Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerChainIllustrate.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerChainIllustrate.md This class describes an illustrative color scheme based on chain ID. The colorization is done in the way that it resembles the “Molecule of the Month” style by [David S. Goodsell](http://ccsb.scripps.edu/goodsell/). Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerChainIllustrate](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerChainIllustrate/#) ## API Reference #### Class `samson.SBColorSchemePerChainIllustrate` Signature: `class samson.SBColorSchemePerChainIllustrate(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes an illustrative color scheme based on chain ID. The colorization is done in the way that it resembles the “Molecule of the Month” style by David S. Goodsell. Overloaded function. 1. __init__(self: samson.SBColorSchemePerChainIllustrate) -> None Constructs a chain-illustration based color scheme. 2. __init__(self: samson.SBColorSchemePerChainIllustrate, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the range of IDs of chains identified in the *nodeIndexer*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemePerChainIllustrate.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemePerChainIllustrate) -> int` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerChainIllustrate.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemePerChainIllustrate) -> int` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerChainIllustrate.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemePerChainIllustrate) -> int` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerChainIllustrate.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemePerChainIllustrate) -> int` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerChainIllustrate.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemePerChainIllustrate, arg0: int) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerChainIllustrate.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemePerChainIllustrate, arg0: int) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # SBColorSchemePerFormalCharge Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerFormalCharge.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerFormalCharge.md This class describes a color scheme based on the formal charge of atoms. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerFormalCharge](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerFormalCharge/#) ## API Reference #### Class `samson.SBColorSchemePerFormalCharge` Signature: `class samson.SBColorSchemePerFormalCharge(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a color scheme based on the formal charge of atoms. Overloaded function. 1. __init__(self: samson.SBColorSchemePerFormalCharge) -> None Constructs a formal-charge based color scheme. 2. __init__(self: samson.SBColorSchemePerFormalCharge, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the range of formal charges of atoms identified in the *nodeIndexer*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemePerFormalCharge.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemePerFormalCharge) -> int` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerFormalCharge.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemePerFormalCharge) -> int` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerFormalCharge.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemePerFormalCharge) -> int` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerFormalCharge.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemePerFormalCharge) -> int` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerFormalCharge.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemePerFormalCharge, arg0: int) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerFormalCharge.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemePerFormalCharge, arg0: int) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # SBColorSchemePerOccupancy Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerOccupancy.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerOccupancy.md This class describes a color scheme based on atoms’ occupancy. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerOccupancy](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerOccupancy/#) ## API Reference #### Class `samson.SBColorSchemePerOccupancy` Signature: `class samson.SBColorSchemePerOccupancy(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a color scheme based on atoms’ occupancy. Overloaded function. 1. __init__(self: samson.SBColorSchemePerOccupancy) -> None Constructs an occupancy-based color scheme. 2. __init__(self: samson.SBColorSchemePerOccupancy, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemePerOccupancy.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemePerOccupancy) -> SBDQuantityType,double>` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerOccupancy.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemePerOccupancy) -> SBDQuantityType,double>` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerOccupancy.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemePerOccupancy) -> SBDQuantityType,double>` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerOccupancy.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemePerOccupancy) -> SBDQuantityType,double>` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerOccupancy.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemePerOccupancy, arg0: SBDQuantityType, double>) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerOccupancy.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemePerOccupancy, arg0: SBDQuantityType, double>) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # SBColorSchemePerPartialCharge Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerPartialCharge.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerPartialCharge.md This class describes a color scheme based on the partial charge of atoms. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerPartialCharge](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerPartialCharge/#) ## API Reference #### Class `samson.SBColorSchemePerPartialCharge` Signature: `class samson.SBColorSchemePerPartialCharge(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a color scheme based on the partial charge of atoms. Overloaded function. 1. __init__(self: samson.SBColorSchemePerPartialCharge) -> None Constructs a partial-charge based color scheme. 2. __init__(self: samson.SBColorSchemePerPartialCharge, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the range of partial charges of atoms identified in the *nodeIndexer*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemePerPartialCharge.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemePerPartialCharge) -> float` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerPartialCharge.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemePerPartialCharge) -> float` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerPartialCharge.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemePerPartialCharge) -> float` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerPartialCharge.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemePerPartialCharge) -> float` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerPartialCharge.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemePerPartialCharge, arg0: float) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerPartialCharge.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemePerPartialCharge, arg0: float) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # SBColorSchemePerResidueHydrophobicity Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueHydrophobicity.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueHydrophobicity.md This class describes a per residue hydrophobicity color scheme. Several scales are available via the [Inspector](https://documentation.samson-connect.net/users/11.0.0/inspecting/#) or via [`SBResidue`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeResidue.md#samson.SBResidue) functionality. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerResidueHydrophobicity](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerResidueHydrophobicity/#) ## API Reference #### Class `samson.SBColorSchemePerResidueHydrophobicity` Signature: `class samson.SBColorSchemePerResidueHydrophobicity(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a per residue hydrophobicity color scheme. Overloaded function. 1. __init__(self: samson.SBColorSchemePerResidueHydrophobicity) -> None Constructs a residue-hydrophobicity based color scheme. 2. __init__(self: samson.SBColorSchemePerResidueHydrophobicity, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the hydrophobicity scale set for residues identified in the *nodeIndexer*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemePerResidueHydrophobicity.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemePerResidueHydrophobicity) -> float` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerResidueHydrophobicity.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemePerResidueHydrophobicity) -> float` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerResidueHydrophobicity.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemePerResidueHydrophobicity) -> float` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerResidueHydrophobicity.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemePerResidueHydrophobicity) -> float` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerResidueHydrophobicity.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemePerResidueHydrophobicity, arg0: float) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerResidueHydrophobicity.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemePerResidueHydrophobicity, arg0: float) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # SBColorSchemePerResidueSequenceNumber Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueSequenceNumber.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueSequenceNumber.md This class describes a color scheme based on the residue sequence number. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerResidueSequenceNumber](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerResidueSequenceNumber/#) ## API Reference #### Class `samson.SBColorSchemePerResidueSequenceNumber` Signature: `class samson.SBColorSchemePerResidueSequenceNumber(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a color scheme based on the residue sequence number. Overloaded function. 1. __init__(self: samson.SBColorSchemePerResidueSequenceNumber) -> None Constructs a residue-sequence-number based color scheme. 2. __init__(self: samson.SBColorSchemePerResidueSequenceNumber, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the range of IDs of residues identified in the *nodeIndexer*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemePerResidueSequenceNumber.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemePerResidueSequenceNumber) -> int` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerResidueSequenceNumber.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemePerResidueSequenceNumber) -> int` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerResidueSequenceNumber.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemePerResidueSequenceNumber) -> int` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerResidueSequenceNumber.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemePerResidueSequenceNumber) -> int` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerResidueSequenceNumber.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemePerResidueSequenceNumber, arg0: int) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerResidueSequenceNumber.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemePerResidueSequenceNumber, arg0: int) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # SBColorSchemePerResidueType Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueType.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerResidueType.md This class describes a color scheme based on the residue type (ALA, GLY, HIS, etc.). Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerResidueType](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerResidueType/#) ## API Reference #### Class `samson.SBColorSchemePerResidueType` Signature: `class samson.SBColorSchemePerResidueType(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a color scheme based on the residue type (ALA, GLY, HIS, etc.). Overloaded function. 1. __init__(self: samson.SBColorSchemePerResidueType) -> None Constructs a residue-type based color scheme. 2. __init__(self: samson.SBColorSchemePerResidueType, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the range of standard residue types. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemePerResidueType.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemePerResidueType) -> samson.SBResidue.ResidueType` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerResidueType.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemePerResidueType) -> samson.SBResidue.ResidueType` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerResidueType.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemePerResidueType) -> samson.SBResidue.ResidueType` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerResidueType.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemePerResidueType) -> samson.SBResidue.ResidueType` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerResidueType.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemePerResidueType, arg0: samson.SBResidue.ResidueType) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerResidueType.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemePerResidueType, arg0: samson.SBResidue.ResidueType) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # SBColorSchemePerSecondaryStructureType Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerSecondaryStructureType.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerSecondaryStructureType.md This class describes a color scheme based on the secondary structure (alpha-helices, beta-sheets, and loops). Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerSecondaryStructureType](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerSecondaryStructureType/#) ## API Reference #### Class `samson.SBColorSchemePerSecondaryStructureType` Signature: `class samson.SBColorSchemePerSecondaryStructureType(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a color scheme based on the secondary structure (alpha-helices, beta-sheets, and loops). Overloaded function. 1. __init__(self: samson.SBColorSchemePerSecondaryStructureType) -> None Constructs a secondary-structure-type based color scheme. 2. __init__(self: samson.SBColorSchemePerSecondaryStructureType, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the standard elements of secondary structure: alpha-helix, beta-sheet, loop. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemePerSecondaryStructureType.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemePerSecondaryStructureType) -> samson.SBResidue.SecondaryStructureType` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerSecondaryStructureType.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemePerSecondaryStructureType) -> samson.SBResidue.SecondaryStructureType` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerSecondaryStructureType.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemePerSecondaryStructureType) -> samson.SBResidue.SecondaryStructureType` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerSecondaryStructureType.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemePerSecondaryStructureType) -> samson.SBResidue.SecondaryStructureType` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerSecondaryStructureType.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemePerSecondaryStructureType, arg0: samson.SBResidue.SecondaryStructureType) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerSecondaryStructureType.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemePerSecondaryStructureType, arg0: samson.SBResidue.SecondaryStructureType) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # SBColorSchemePerSideChainCharge Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerSideChainCharge.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerSideChainCharge.md This class describes a per side chain charge color scheme for amino acid residues. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerSideChainCharge](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerSideChainCharge/#) ## API Reference #### Class `samson.SBColorSchemePerSideChainCharge` Signature: `class samson.SBColorSchemePerSideChainCharge(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a per side chain charge color scheme for amino acid residues. Overloaded function. 1. __init__(self: samson.SBColorSchemePerSideChainCharge) -> None Constructs a side-chain-charge based color scheme. 2. __init__(self: samson.SBColorSchemePerSideChainCharge, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the standard side chain charges: negative, neutral, positive. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemePerSideChainCharge.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemePerSideChainCharge) -> samson.SBResidue.SideChainCharge` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerSideChainCharge.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemePerSideChainCharge) -> samson.SBResidue.SideChainCharge` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerSideChainCharge.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemePerSideChainCharge) -> samson.SBResidue.SideChainCharge` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerSideChainCharge.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemePerSideChainCharge) -> samson.SBResidue.SideChainCharge` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerSideChainCharge.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemePerSideChainCharge, arg0: samson.SBResidue.SideChainCharge) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerSideChainCharge.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemePerSideChainCharge, arg0: samson.SBResidue.SideChainCharge) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # SBColorSchemePerSideChainPolarity Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerSideChainPolarity.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerSideChainPolarity.md This class describes a per side chain polarity color scheme for amino acid residues. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerSideChainPolarity](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerSideChainPolarity/#) ## API Reference #### Class `samson.SBColorSchemePerSideChainPolarity` Signature: `class samson.SBColorSchemePerSideChainPolarity(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a per side chain polarity color scheme for amino acid residues. Overloaded function. 1. __init__(self: samson.SBColorSchemePerSideChainPolarity) -> None Constructs a side-chain-polarity based color scheme. 2. __init__(self: samson.SBColorSchemePerSideChainPolarity, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the standard side chain polarity: nonpolar, polar, acidic polar, basic polar. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemePerSideChainPolarity.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemePerSideChainPolarity) -> samson.SBResidue.SideChainPolarity` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerSideChainPolarity.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemePerSideChainPolarity) -> samson.SBResidue.SideChainPolarity` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerSideChainPolarity.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemePerSideChainPolarity) -> samson.SBResidue.SideChainPolarity` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerSideChainPolarity.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemePerSideChainPolarity) -> samson.SBResidue.SideChainPolarity` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerSideChainPolarity.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemePerSideChainPolarity, arg0: samson.SBResidue.SideChainPolarity) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerSideChainPolarity.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemePerSideChainPolarity, arg0: samson.SBResidue.SideChainPolarity) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # SBColorSchemePerStructuralModel Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerStructuralModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerStructuralModel.md This class describes a color scheme based on the structural model. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerStructuralModel](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerStructuralModel/#) ## API Reference #### Class `samson.SBColorSchemePerStructuralModel` Signature: `class samson.SBColorSchemePerStructuralModel(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a per structural model color scheme Overloaded function. 1. __init__(self: samson.SBColorSchemePerStructuralModel) -> None Constructs a per-structural-model color scheme. 2. __init__(self: samson.SBColorSchemePerStructuralModel, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the range of structural models identified from the *nodeIndexer*, including parent structural models. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. --- # SBColorSchemePerStructuralModelIllustrate Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerStructuralModelIllustrate.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerStructuralModelIllustrate.md This class describes an illustrative color scheme based on structural model. The colorization is done in the way that it resembles the “Molecule of the Month” style by [David S. Goodsell](http://ccsb.scripps.edu/goodsell/). Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerStructuralModelIllustrate](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerStructuralModelIllustrate/#) ## API Reference #### Class `samson.SBColorSchemePerStructuralModelIllustrate` Signature: `class samson.SBColorSchemePerStructuralModelIllustrate(*args, **kwargs)` Bases: [`SBColorSchemePerStructuralModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerStructuralModel.md#samson.SBColorSchemePerStructuralModel) This class describes an illustrative per structural model color scheme inspired by the “Molecule of the Month” style of the Protein Data Bank. Overloaded function. 1. __init__(self: samson.SBColorSchemePerStructuralModelIllustrate) -> None Constructs a per-structural-model illustrate color scheme. 2. __init__(self: samson.SBColorSchemePerStructuralModelIllustrate, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the range of structural models identified from the *nodeIndexer*, including parent structural models. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. --- # SBColorSchemePerTemperatureFactor Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerTemperatureFactor.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/ColorScheme/SBDColorSchemePerTemperatureFactor.md This class describes a color scheme based on the temperature factor of atoms. Please refer to [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme). !!! note "See also" SAMSON SDK: [SBDColorSchemePerTemperatureFactor](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDColorSchemePerTemperatureFactor/#) ## API Reference #### Class `samson.SBColorSchemePerTemperatureFactor` Signature: `class samson.SBColorSchemePerTemperatureFactor(*args, **kwargs)` Bases: [`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) This class describes a color scheme based on the temperature factor of atoms. Overloaded function. 1. __init__(self: samson.SBColorSchemePerTemperatureFactor) -> None Constructs a temperature-factor based color scheme. 2. __init__(self: samson.SBColorSchemePerTemperatureFactor, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette = None) -> None Constructs the color scheme for *nodeIndexer* with the given *colorPalette*. The colorization is based on the range of temperature factors of atoms identified in the *nodeIndexer*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A indexer of nodes to which the color scheme is applied - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette.If *None*, then the default color palette associated with this color scheme will be used. ##### Method `samson.SBColorSchemePerTemperatureFactor.getDefaultMaximumValue` Signature: `getDefaultMaximumValue(self: samson.SBColorSchemePerTemperatureFactor) -> float` Returns the default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerTemperatureFactor.getDefaultMinimumValue` Signature: `getDefaultMinimumValue(self: samson.SBColorSchemePerTemperatureFactor) -> float` Returns the default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer ##### Method `samson.SBColorSchemePerTemperatureFactor.getMaximumValue` Signature: `getMaximumValue(self: samson.SBColorSchemePerTemperatureFactor) -> float` Returns the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerTemperatureFactor.getMinimumValue` Signature: `getMinimumValue(self: samson.SBColorSchemePerTemperatureFactor) -> float` Returns the current minimum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerTemperatureFactor.setMaximumValue` Signature: `setMaximumValue(self: samson.SBColorSchemePerTemperatureFactor, arg0: float) -> None` Sets the current maximum value for the attribute bounds used for colorization ##### Method `samson.SBColorSchemePerTemperatureFactor.setMinimumValue` Signature: `setMinimumValue(self: samson.SBColorSchemePerTemperatureFactor, arg0: float) -> None` Sets the current minimum value for the attribute bounds used for colorization --- # Data Graph Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph.md This group contains the core data-graph classes used to organize nodes and their properties in SAMSON, including base nodes, indexers, selectors, and material-related classes. !!! note "See also" SAMSON SDK: [The SBDDataGraph Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/DataModel/DataGraph/#) - [SBNode](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md) - [SBNodeColorScheme](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md) - [SBNodeGroup](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeGroup.md) - [SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md) - [SBNodeMaterial](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterial.md) - [SBNodeMaterialAppearance](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterialAppearance.md) - [SBNodeSelector](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeSelector.md) --- # SBNode Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md The data graph contains everything directly or indirectly added by the user through SAMSON’s user interface, plugins, etc. A data graph node has basic pre-defined data and functionalities to manage the data (models, apps, etc.). All nodes in SAMSON’s data graph, e.g. atoms ([`samson.SBAtom`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)), bonds ([`samson.SBBond`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeBond.md#samson.SBBond)), visual models ([`samson.SBVisualModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel)), folders ([`samson.SBFolder`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md#samson.SBFolder)), files ([`samson.SBFile`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFile.md#samson.SBFile)), etc., derive from `samson.SBNode`. ### Topology SAMSON’s data graph is a directed graph, where each node has one and only one parent (with the exception of documents ([`samson.SBDocument`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument)), which have no parent), and possibly some children. The parent of a node can never be directly set, but can be retrieved using the `samson.SBNode.getParent()` function. Children are managed using the `samson.SBNode.addChild()` and `samson.SBNode.removeChild()` functions. ### Node lifecycle In SAMSON, a data graph node may go through four *lifecycle stages*: 1. C++ object creation (using the node’s constructor). 2. Node creation (using the `samson.SBNode.create()` function). 3. Node destruction (using the `samson.SBNode.erase()` function). 4. C++ object destruction (usually automatically, or forced; uses the node’s destructor). Node creation and destruction (stages 2 and 3) are necessary to more operations [undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo). ### Node identity Each node in the data graph has a *type*, which may be retrieved via `SBNode.type`. For example, the type returned by the [`SBAtom`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom) class, which derives from the `SBNode` class, is `Atom`, while the type returned by the [`SBStructuralModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md#samson.SBStructuralModel) class is `StructuralModel`. To obtain a type of a node as a string, you can use the `SBNode.typeString` attribute or the `SBNode.getTypeString()` function. Caption: Print node type ```python # get a data graph node's type print(node.type) # get a data graph node's type as a string print(node.typeString) # the same as before print(SBNode.getTypeString(node.type)) ``` You can also check for a particular type of a node e.g. whether it is a visual model, an interaction mode, a structural node, etc. using one of the functions like `samson.SBNode.isVisualModel()`. Let’s, for example, erase all visual models in the current selection: Caption: Erase selected visual models ```python # make the operation undoable with SAMSON.holding("Erase selected visual models"): # loop over all currently selected nodes in the active document for node in SAMSON.getActiveDocument().getSelectedNodes(): # check if this node is a visual model if node.isVisualModel(): # erase the node node.erase() ``` Each data graph node also has a unique index, that is managed internally by SAMSON. All indices are contiguous unsigned integers between `0` and `n-1`, where `n` is the number of data graph nodes. As a result, the node index is not permanent: when node `i` is deleted (and `i` is different from `n-1`), then node `n-1` becomes node `i`. Node indices are used for example when picking objects in a viewport, by writing integers into the framebuffer instead of colors. The unique node index can be retrieved using `samson.SBNode.nodeIndex`. ### Flags Each data graph node has four flags: - `samson.SBNode.isCreated` - indicates whether the node is created or not. - `samson.SBNode.isVisible` - indicates whether the renderer should display the node in the viewport. - `samson.SBNode.highlightingFlag` - whether the renderer should highlight the node in the viewport. - `samson.SBNode.selectionFlag` - indicates whether the node is “selected” or not. Changing these flags’ values is [undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo), except for the highlighting flag which has temporary purposes. The `samson.SBNode.getFlags()` function returns an `integer` that combines the highlighting and selection flags, as well as the “mobility flag” ([`samson.SBAtom.mobilityFlag`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom.mobilityFlag)) of atoms. ### Materials and colorization Each data graph node may have a material ([`samson.SBNodeMaterial`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterial.md#samson.SBNodeMaterial)), which may affect its rendering in the viewport. A material may be applied to a node with the `samson.SBNode.setMaterial()` function. When a material is added to a node, it affects the node itself and all its descendants (unless they have a material themselves, which then has priority). Precisely, the `samson.SBNode.getMaterial()` function returns the material directly applied to the node, or determines the deepest ancestor that has a material applied (by examining the node’s parent, then its parent’s parent, etc.). If no material is found, the `samson.SBNode.getMaterial()` function returns 0. Each material has a appearance properties used when rendering nodes using path tracing and a color scheme ([`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme)) which may be modified and used to associate a color to a node or a spatial position ([`samson.SBPosition3`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)). !!! note In Python Scripting you can directly apply a [`color`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) or a [`color scheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) to a node - it will internally create a material and apply it. !!! note "See also" [`samson.SBNodeMaterial`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterial.md#samson.SBNodeMaterial) [`samson.SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) ### Getting nodes You can get an indexer of child nodes using the `samson.SBNode.getNodes()` function and the [Node Specification Language](https://documentation.samson-connect.net/developers/11.0.0/node-specification-language/#). Let’s, for example, select all node’s children atoms: ```python # get all atoms in the node atomIndexer = node.getNodes('node.type atom') # or the same using short names atomIndexer = node.getNodes('n.t a') # you can check the size of the indexer print(len(atomIndexer)) ``` !!! note "See also" [Getting nodes](https://documentation.samson-connect.net/scripting/latest/docs/GettingNodes.md#ps-get-nodes) SAMSON SDK: [Node Specification Language](https://documentation.samson-connect.net/developers/11.0.0/node-specification-language/#) ### Printing info For many node types, you can print some information on them: ```python # get all atoms in the active document atomIndexer = SAMSON.getNodes('node.type atom') # print the first atom from the indexer if len(atomIndexer): atom = atomIndexer[0] print(atom) ``` !!! note "See also" SAMSON SDK: [SBDDataGraphNode](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDataGraphNode/#) ## API Reference ##### Class `samson.SBNode` Signature: `class samson.SBNode` Bases: [`SBReferenceTarget`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference/SBCReferenceTarget.md#samson.SBReferenceTarget) This class is the base class to describe a node in the data graph. ###### Class `samson.SBNode.Type` Signature: `class Type(self: samson.SBNode.Type, value: int)` Bases: `pybind11_object` **Members** - `Undefined`: The undefined type - `StructuralModel`: Structural model - `StructuralModelNode`: Structural node - `Conformation`: Structural conformation - `StructuralModelConformation`: Structural conformation - `Path`: Structural path - `StructuralModelPath`: Structural path - `StructuralGroup`: Structural group - `StructuralModelNodeGroup`: Structural group - `Root`: Structural root - `StructuralModelNodeRoot`: Structural root - `Atom`: Atom - `StructuralModelNodeAtom`: Atom - `Bond`: Bond - `StructuralModelNodeBond`: Bond - `HydrogenBond`: Hydrogen bond - `StructuralModelNodeHydrogenBond`: Hydrogen bond - `HydrogenBondGroup`: Hydrogen bond group - `StructuralModelNodeHydrogenBondGroup`: Hydrogen bond group - `Residue`: Residue - `StructuralModelNodeResidue`: Residue - `Segment`: Segment - `StructuralModelNodeSegment`: Segment - `Chain`: Chain - `StructuralModelNodeChain`: Chain - `Molecule`: Molecule - `StructuralModelNodeMolecule`: Molecule - `Backbone`: Residue backbone - `StructuralModelNodeBackbone`: Residue backbone - `SideChain`: Residue side chain - `StructuralModelNodeSideChain`: Residue side chain - `VisualModel`: Visual model - `Mesh`: Mesh - `VisualModelMesh`: Mesh - `DynamicalModel`: Dynamical model - `ParticleSystem`: Particle dynamical model - `DynamicalModelParticleSystem`: Particle dynamical model - `RigidBodySystem`: Rigid-body dynamical model - `DynamicalModelRigidBodySystem`: Rigid-body dynamical model - `ArticulatedBodySystem`: Articulated-body dynamical model - `DynamicalModelArticulatedBodySystem`: Articulated-body dynamical model - `DynamicalNode`: Dynamical node - `DynamicalModelNode`: Dynamical node - `DynamicalGroup`: Dynamical group - `DynamicalModelNodeGroup`: Dynamical group - `DynamicalRoot`: Dynamical root - `DynamicalModelNodeRoot`: Dynamical root - `Particle`: Particle - `DynamicalModelNodeParticle`: Particle - `RigidBody`: Rigid body - `DynamicalModelNodeRigidBody`: Rigid body - `ArticulatedBody`: Articulated body - `DynamicalModelNodeArticulatedBody`: Articulated body - `InteractionModel`: Interaction model - `InteractionModelParticleSystem`: Particle interaction model - `InteractionModelRigidBodySystem`: Rigid-body interaction model - `InteractionModelArticulatedBodySystem`: Articulated-body interaction model - `PropertyModel`: Property model - `PropertyModelFunction`: Scalar field - `Simulator`: Simulator - `SimulatorParticleSystem`: Particle simulator - `SimulatorRigidBodySystem`: Rigid-body simulator - `SimulatorArticulatedBodySystem`: Articulated-body simulator - `StateUpdater`: State updater - `StateUpdaterParticleSystem`: Particle state updater - `StateUpdaterRigidBodySystem`: Rigid-body state updater - `StateUpdaterArticulatedBodySystem`: Articulated-body state updater - `Animation`: Animation - `Camera`: Camera - `Document`: Document - `DocumentManager`: Document manager - `File`: File - `Folder`: Folder - `Label`: Label - `Light`: Light - `Note`: Note - `Presentation`: Presentation - `RenderPreset`: Render preset - `DataGraphNodeGroup`: Group - `NodeGroup`: Group - `Controller`: Controller - `ControllerNode`: Controller node - `Asset`: Asset ###### Method `samson.SBNode.addChild` Signature: `addChild(self: samson.SBNode, node: samson.SBNode, nextNode: samson.SBNode = None) -> bool` Adds a child to the node ###### Method `samson.SBNode.addMaterial` Signature: `addMaterial(self: samson.SBNode, material: SBDDataGraphNodeMaterial) -> bool` Adds the material to the node. If the node already has a material, then does not do anything and returns *False*. The node takes ownership of the material. **Parameters** - **material** ([*samson.SBNodeMaterial*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterial.md#samson.SBNodeMaterial)) – A material. **Returns** - Returns *True* if it could add the material to the node. **Return type** - bool ###### Method `samson.SBNode.canAddChild` Signature: `canAddChild(self: samson.SBNode, node: samson.SBNode, nextNode: samson.SBNode = None) -> bool` Returns whether this node can add node as a child ###### Method `samson.SBNode.canAddChildType` Signature: `canAddChildType(self: samson.SBNode, nodeType: samson.SBNode.Type) -> bool` Returns whether this node can add a node with type *nodeType* as a child ###### Method `samson.SBNode.canAddMaterial` Signature: `canAddMaterial(self: samson.SBNode) -> bool` Returns whether can add a material to the node based on its type ###### Method `samson.SBNode.canAddMaterialToNodeType` Signature: `static canAddMaterialToNodeType(nodeType: samson.SBNode.Type) -> bool` Returns whether can add a material to a node of type *nodeType* ###### Method `samson.SBNode.canHaveDescendantType` Signature: `canHaveDescendantType(self: samson.SBNode, nodeType: samson.SBNode.Type) -> bool` Returns whether this node can have a node with type *nodeType* as a descendant ###### Method `samson.SBNode.castToInteractionModelParticleSystem` Signature: `castToInteractionModelParticleSystem(self: samson.SBNode) -> SBMInteractionModelParticleSystem` Casts (if possible) from SBNode to SBInteractionModelParticleSystem ###### Method `samson.SBNode.castToLabel` Signature: `castToLabel(self: samson.SBNode) -> SBDDocumentLabel` Casts (if possible) from SBNode to SBLabel ###### Method `samson.SBNode.castToMesh` Signature: `castToMesh(self: samson.SBNode) -> SBMVisualModelMesh` Casts (if possible) from SBNode to SBMesh ###### Method `samson.SBNode.castToVisualModel` Signature: `castToVisualModel(self: samson.SBNode) -> SBMVisualModel` Casts (if possible) from SBNode to SBVisualModel ###### Method `samson.SBNode.clone` Signature: `clone(self: samson.SBNode) -> samson.SBNode` Returns a copy of the node and its descendants ###### Method `samson.SBNode.countNodes` Signature: `countNodes(*args, **kwargs)` Overloaded function. 1. countNodes(self: samson.SBNode, selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> int Counts nodes based on the provided selection filter *selectionString* and other parameters. This function traverses the node’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and stores counts the nodes for which the *selectionString* is true. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns true, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is true, the function also counts nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *selectionString* and *visitString*, they are counted if *includeDependencies* is true. **Parameters** - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be selected. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - The number of nodes. **Return type** - int ###### Examples Get a number of atoms in a node: ```pycon >>> number_of_atoms = node.countNodes('node.type atom') ``` 2. countNodes(self: samson.SBNode, nodeType: samson.SBNode.Type, selectedNodesOnly: bool = False, visitString: str = ‘*’, includeDependencies: bool = False) -> int Counts nodes based on *nodeType* and other parameters. This function traverses the node’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and counts nodes whose type is *nodeType*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns true, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is true, the function also counts nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *nodeType* and *visitString*, they are counted if *includeDependencies* is true. **Parameters** - **nodeType** ([*samson.SBNode.Type*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.Type)) – A type of nodes that should be collected. - **selectedNodesOnly** (*bool**,**default=False*) – If set to *True*, then only nodes that are selected, directly or via their parents, will be traversed. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - The number of nodes. **Return type** - int ###### Examples Get a number of residues in a node: ```pycon >>> number_of_residues = node.countNodes(SBNode.Residue) ``` ###### Method `samson.SBNode.create` Signature: `create(self: samson.SBNode) -> None` Creates the node ###### Method `samson.SBNode.descendsFrom` Signature: `descendsFrom(*args, **kwargs)` Overloaded function. 1. descendsFrom(self: samson.SBNode, node: samson.SBNode) -> bool Returns *True* if and only if this node is *node*, or descends from it 2. descendsFrom(self: samson.SBNode, nodeIndexer: SBDDataGraphNodeIndexer) -> bool Returns *True* if and only if this node is one of the nodes of the *nodeIndexer*, or descends from one of them ###### Method `samson.SBNode.erase` Signature: `erase(self: samson.SBNode) -> None` Erases the node ###### Method `samson.SBNode.getDocument` Signature: `getDocument(self: samson.SBNode) -> SBDDocument` Returns the document the node belongs to ###### Method `samson.SBNode.getFlags` Signature: `getFlags(self: samson.SBNode) -> int` Returns the flags ###### Method `samson.SBNode.getHierarchyString` Signature: `getHierarchyString(self: samson.SBNode, separator: str = ' / ', includeNodeType: bool = False) -> str` Returns a string with hierarchical information on the node and its parents names. ###### Method `samson.SBNode.getInheritedFlags` Signature: `getInheritedFlags(self: samson.SBNode) -> int` Returns the inherited flags ###### Method `samson.SBNode.getMaterial` Signature: `getMaterial(self: samson.SBNode) -> SBDDataGraphNodeMaterial` Returns the material of the node. ###### Method `samson.SBNode.getMaterialOwner` Signature: `getMaterialOwner(self: samson.SBNode) -> samson.SBNode` Returns the node whose material is inherited. ###### Method `samson.SBNode.getNextNode` Signature: `getNextNode(*args, **kwargs)` Overloaded function. 1. getNextNode(self: samson.SBNode) -> samson.SBNode Returns the pointer to the next node in the children of the node’s parent 2. getNextNode(self: samson.SBNode, nodeType: samson.SBNode.Type) -> samson.SBNode Returns the pointer to the next node with type *nodeType* in the children of the node’s parent ###### Method `samson.SBNode.getNode` Signature: `static getNode(nodeIndex: int) -> samson.SBNode` Returns the unique node corresponding to *nodeIndex*. **Parameters** - **nodeIndex** (*int*) – The runtime node index. **Returns** - The node corresponding to *nodeIndex*, if any. **Return type** - [samson.SBNode](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) ###### Method `samson.SBNode.getNodes` Signature: `getNodes(*args, **kwargs)` Overloaded function. 1. getNodes(self: samson.SBNode, selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> SBDDataGraphNodeIndexer Returns a node indexer with nodes based on the provided selection filter *selectionString* and other parameters. This function traverses the node’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and stores in *nodeIndexer* the nodes for which the *selectionString* is *True*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns *True*, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is *True*, the function also adds to *nodeIndexer* nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *selectionString* and *visitString*, they are added to the *nodeIndexer* if *includeDependencies* is *True*. **Parameters** - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be selected. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - A node indexer. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ###### Examples Get a node indexer with all the atoms in a node: ```pycon >>> nodeIndexer = node.getNodes('node.type atom') ``` 2. getNodes(self: samson.SBNode, nodeIndexer: SBDDataGraphNodeIndexer, selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> None Collects into the *nodeIndexer* nodes based on the provided selection filter *selectionString* and other parameters. This function traverses the node’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and stores in *nodeIndexer* the nodes for which the *selectionString* is true. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns true, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is true, the function also adds to *nodeIndexer* nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *selectionString* and *visitString*, they are added to the *nodeIndexer* if *includeDependencies* is true. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An existing node indexer in which nodes should be added. Note that this node indexer is not cleared in the function. - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be selected. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. ###### Notes The *nodeIndexer* is not cleared when entering this function. ###### Examples Collect in an existing *nodeIndexer* all the residues in a node: ```pycon >>> nodeIndexer = SBNodeIndexer() >>> node.getNodes(nodeIndexer, 'node.type residue') ``` 3. getNodes(self: samson.SBNode, nodeType: samson.SBNode.Type, selectedNodesOnly: bool = False, visitString: str = ‘*’, includeDependencies: bool = False) -> SBDDataGraphNodeIndexer Returns a node indexer with nodes based on the provided *nodeType*, a selection status, a visit predicate, with or without dependencies. This function traverses the node’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and stores in *nodeIndexer* the nodes whose type is *nodeType*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns true, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is true, the function also adds to *nodeIndexer* nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *nodeType* and *visitString*, they are added to the *nodeIndexer* if *includeDependencies* is true. **Parameters** - **nodeType** ([*samson.SBNode.Type*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.Type)) – A type of nodes that should be collected. - **selectedNodesOnly** (*bool**,**default=False*) – If set to *True*, then only nodes that are selected, directly or via their parents, will be traversed. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - A node indexer. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ###### Examples Get a node indexer with all the atoms in a node: ```pycon >>> nodeIndexer = node.getNodes(SBNode.Atom) ``` 4. getNodes(self: samson.SBNode, nodeIndexer: SBDDataGraphNodeIndexer, nodeType: samson.SBNode.Type, selectedNodesOnly: bool = False, visitString: str = ‘*’, includeDependencies: bool = False) -> None Collects into the provided *nodeIndexer* nodes based on the provided *nodeType*, a selection status, a visit predicate, with or without dependencies. This function traverses the node’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and stores in *nodeIndexer* the nodes whose type is *nodeType*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns true, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is true, the function also adds to *nodeIndexer* nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *nodeType* and *visitString*, they are added to the *nodeIndexer* if *includeDependencies* is true. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An existing node indexer in which nodes should be added. Note that this node indexer is not cleared in the function. - **nodeType** ([*samson.SBNode.Type*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.Type)) – A type of nodes that should be collected. - **selectedNodesOnly** (*bool**,**default=False*) – If set to *True*, then only nodes that are selected, directly or via their parents, will be traversed. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. ###### Notes The *nodeIndexer* is not cleared when entering this function. ###### Examples Get a node indexer with all the bonds in a node: ```pycon >>> nodeIndexer = SBNodeIndexer() >>> node.getNodes(nodeIndexer, SBNode.Bond) ``` ###### Method `samson.SBNode.getParent` Signature: `getParent(self: samson.SBNode) -> samson.SBNode` Returns the parent of the node ###### Method `samson.SBNode.getPreviousNode` Signature: `getPreviousNode(*args, **kwargs)` Overloaded function. 1. getPreviousNode(self: samson.SBNode) -> samson.SBNode Returns the pointer to the previous node in the children of the node’s parent 2. getPreviousNode(self: samson.SBNode, nodeType: samson.SBNode.Type) -> samson.SBNode Returns the pointer to the previous node with type *nodeType* in the children of the node’s parent ###### Method `samson.SBNode.getRoot` Signature: `getRoot(self: samson.SBNode) -> samson.SBNode` Returns the root of the hierarchy the node belongs to ###### Method `samson.SBNode.getThisNode` Signature: `getThisNode(self: samson.SBNode) -> samson.SBNode` Returns the pointer to this node ###### Method `samson.SBNode.getTypeString` Signature: `static getTypeString(type: samson.SBNode.Type, humanReadable: bool = False) -> str` Returns a string describing the type of the data graph node type ###### Method `samson.SBNode.hasNode` Signature: `hasNode(*args, **kwargs)` Overloaded function. 1. hasNode(self: samson.SBNode, selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> bool Checks for nodes based on the provided selection filter *selectionString* and other parameters. This function traverses the node’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and stores checks for the nodes for which the *selectionString* is true. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns true, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is true, the function also checks for nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *selectionString* and *visitString*, they are checked for if *includeDependencies* is true. **Parameters** - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be checked. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - Whether the nodes are present **Return type** - bool ###### Examples Checks for the presence of atoms in a node: ```pycon >>> res = node.hasNode('node.type atom') ``` 2. hasNode(self: samson.SBNode, nodeType: samson.SBNode.Type, selectedNodesOnly: bool = False, visitString: str = ‘*’, includeDependencies: bool = False) -> bool Checks for nodes based on *nodeType* and other parameters. This function traverses the node’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and checks for nodes whose type is *nodeType*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns true, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is true, the function also checks for nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *nodeType* and *visitString*, they are checked for if *includeDependencies* is true. **Parameters** - **nodeType** ([*samson.SBNode.Type*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.Type)) – A type of nodes that should be checked for. - **selectedNodesOnly** (*bool**,**default=False*) – If set to *True*, then only nodes that are selected, directly or via their parents, will be traversed. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - Whether the nodes are present **Return type** - bool ###### Examples Checks for the presence of residues in a node: ```pycon >>> res = node.hasNode(SBNode.Residue) ``` ###### Method `samson.SBNode.hasOneOf` Signature: `hasOneOf(self: samson.SBNode, nodeIndexer: SBDDataGraphNodeIndexer) -> bool` Returns *True* if and only if this node is one of the nodes of the *nodeIndexer*, or is the ancestor of one of them ###### Method `samson.SBNode.isAtom` Signature: `isAtom(self: samson.SBNode) -> bool` Returns *True* when the node is an atom ###### Method `samson.SBNode.isBallAndStick` Signature: `isBallAndStick(self: samson.SBNode) -> bool` Returns *True* when the node is the default ball-and-stick visual model ###### Method `samson.SBNode.isBond` Signature: `isBond(self: samson.SBNode) -> bool` Returns *True* when the node is a bond ###### Method `samson.SBNode.isCartoon` Signature: `isCartoon(self: samson.SBNode) -> bool` Returns *True* when the node is the default cartoon visual model ###### Method `samson.SBNode.isDynamicalModel` Signature: `isDynamicalModel(self: samson.SBNode) -> bool` Returns *True* when the node is a dynamical model ###### Method `samson.SBNode.isGaussianSurface` Signature: `isGaussianSurface(self: samson.SBNode) -> bool` Returns *True* when the node is the default Gaussian surface visual model ###### Method `samson.SBNode.isIn` Signature: `isIn(*args, **kwargs)` Overloaded function. 1. isIn(self: samson.SBNode, node: samson.SBNode) -> bool Returns *True* if and only if this node is *node*, or descends from it, or belongs to a group stored in node 2. isIn(self: samson.SBNode, nodeIndexer: SBDDataGraphNodeIndexer) -> bool Returns *True* if and only if this node is one of the nodes of the *nodeIndexer*, or descends from one of them, or belongs to a group stored in one of the nodes of the nodeIndexer ###### Method `samson.SBNode.isInteractionModel` Signature: `isInteractionModel(self: samson.SBNode) -> bool` Returns *True* when the node is a interaction model ###### Method `samson.SBNode.isLicorice` Signature: `isLicorice(self: samson.SBNode) -> bool` Returns *True* when the node is the default licorice visual model ###### Method `samson.SBNode.isLight` Signature: `isLight(self: samson.SBNode) -> bool` Returns *True* when the node is a light ###### Method `samson.SBNode.isMesh` Signature: `isMesh(self: samson.SBNode) -> bool` Returns *True* when the node is a mesh ###### Method `samson.SBNode.isModel` Signature: `isModel(self: samson.SBNode) -> bool` Returns *True* when the node is a model ###### Method `samson.SBNode.isOneOf` Signature: `isOneOf(self: samson.SBNode, nodeIndexer: SBDDataGraphNodeIndexer) -> bool` Returns *True* if and only if this node is one of the nodes of the *nodeIndexer* ###### Method `samson.SBNode.isPropertyModel` Signature: `isPropertyModel(self: samson.SBNode) -> bool` Returns *True* when the node is a property model ###### Method `samson.SBNode.isRibbon` Signature: `isRibbon(self: samson.SBNode) -> bool` Returns *True* when the node is the default ribbon visual model ###### Method `samson.SBNode.isSimulator` Signature: `isSimulator(self: samson.SBNode) -> bool` Returns *True* when the node is a simulator ###### Method `samson.SBNode.isSolventAccessibleSurface` Signature: `isSolventAccessibleSurface(self: samson.SBNode) -> bool` Returns *True* when the node is the default solvent accessible surface visual model ###### Method `samson.SBNode.isSolventExcludedSurface` Signature: `isSolventExcludedSurface(self: samson.SBNode) -> bool` Returns *True* when the node is the default solvent excluded surface visual model ###### Method `samson.SBNode.isStructuralModel` Signature: `isStructuralModel(self: samson.SBNode) -> bool` Returns *True* when the node is a structural model ###### Method `samson.SBNode.isStructuralNode` Signature: `isStructuralNode(self: samson.SBNode) -> bool` Returns *True* when the node is a structural node ###### Method `samson.SBNode.isTube` Signature: `isTube(self: samson.SBNode) -> bool` Returns *True* when the node is the default tube visual model ###### Method `samson.SBNode.isType` Signature: `isType(self: samson.SBNode, type: samson.SBNode.Type) -> bool` Returns *True* when the type of the node corresponds to type ###### Method `samson.SBNode.isVanDerWaals` Signature: `isVanDerWaals(self: samson.SBNode) -> bool` Returns *True* when the node is the default van der Waals visual model ###### Method `samson.SBNode.isVisualModel` Signature: `isVisualModel(self: samson.SBNode) -> bool` Returns *True* when the node is a visual model ###### Method `samson.SBNode.print` Signature: `print(self: samson.SBNode, offset: int = 0) -> None` Prints debugging information in stdout ###### Method `samson.SBNode.removeChild` Signature: `removeChild(self: samson.SBNode, node: samson.SBNode) -> bool` Removes a child from the node ###### Method `samson.SBNode.removeMaterial` Signature: `removeMaterial(self: samson.SBNode) -> bool` Removes material from the node. ###### Method `samson.SBNode.removeMaterialsFromDescendants` Signature: `removeMaterialsFromDescendants(self: samson.SBNode) -> None` Removes materials from all nodes that descend from this node, but it does not remove the material from the node itself. ###### Method `samson.SBNode.setColor` Signature: `setColor(self: samson.SBNode, color: samson.SBColor) -> bool` Sets the color for the node (modifies an existing material of the node or adds a material with the given color). The color is set via the constant color scheme (*SBColorSchemeConstant*). **Parameters** - **color** ([*samson.SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) – A color. **Returns** - Returns *True* if it could set the color, else returns *False*. **Return type** - bool ###### Method `samson.SBNode.setColorScheme` Signature: `setColorScheme(self: samson.SBNode, colorScheme: SBDDataGraphNodeColorScheme) -> bool` Sets the color scheme for the node (modifies an existing material of the node or adds a material with the given color scheme). The color scheme is cloned internally, since the material owns the color scheme. **Parameters** - **colorScheme** ([*samson.SBNodeColorScheme*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme)) – A color scheme. **Returns** - Returns *True* if it could set the color scheme, else returns *False*. **Return type** - bool ###### Method `samson.SBNode.setMaterial` Signature: `setMaterial(self: samson.SBNode, material: SBDDataGraphNodeMaterial) -> bool` Sets the material to the node. If the node already has a material, it removes it first. The node takes ownership of the material. **Parameters** - **material** ([*samson.SBNodeMaterial*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterial.md#samson.SBNodeMaterial)) – A material. **Returns** - Returns *True* if it could set the material to the node. **Return type** - bool ###### Method `samson.SBNode.setMaterialAppearance` Signature: `setMaterialAppearance(self: samson.SBNode, materialAppearance: SBDDataGraphNodeMaterialAppearance) -> bool` Sets the material appearance *materialAppearance* to the node’s material. If the node does not have a material, then it sets the material first. **Parameters** - **materialAppearance** ([*SBNodeMaterialAppearance*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterialAppearance.md#samson.SBNodeMaterialAppearance)) – The material appearance **Returns** - Returns *True* if it could set the material appearance, else returns *False*. **Return type** - bool ###### Attribute `samson.SBNode.Animation` Signature: `Animation = ` ###### Attribute `samson.SBNode.ArticulatedBody` Signature: `ArticulatedBody = ` ###### Attribute `samson.SBNode.ArticulatedBodySystem` Signature: `ArticulatedBodySystem = ` ###### Attribute `samson.SBNode.Asset` Signature: `Asset = ` ###### Attribute `samson.SBNode.Atom` Signature: `Atom = ` ###### Attribute `samson.SBNode.Backbone` Signature: `Backbone = ` ###### Attribute `samson.SBNode.Bond` Signature: `Bond = ` ###### Attribute `samson.SBNode.Camera` Signature: `Camera = ` ###### Attribute `samson.SBNode.Chain` Signature: `Chain = ` ###### Attribute `samson.SBNode.Conformation` Signature: `Conformation = ` ###### Attribute `samson.SBNode.Controller` Signature: `Controller = ` ###### Attribute `samson.SBNode.ControllerNode` Signature: `ControllerNode = ` ###### Attribute `samson.SBNode.DataGraphNodeGroup` Signature: `DataGraphNodeGroup = ` ###### Attribute `samson.SBNode.Document` Signature: `Document = ` ###### Attribute `samson.SBNode.DocumentManager` Signature: `DocumentManager = ` ###### Attribute `samson.SBNode.DynamicalGroup` Signature: `DynamicalGroup = ` ###### Attribute `samson.SBNode.DynamicalModel` Signature: `DynamicalModel = ` ###### Attribute `samson.SBNode.DynamicalModelArticulatedBodySystem` Signature: `DynamicalModelArticulatedBodySystem = ` ###### Attribute `samson.SBNode.DynamicalModelNode` Signature: `DynamicalModelNode = ` ###### Attribute `samson.SBNode.DynamicalModelNodeArticulatedBody` Signature: `DynamicalModelNodeArticulatedBody = ` ###### Attribute `samson.SBNode.DynamicalModelNodeGroup` Signature: `DynamicalModelNodeGroup = ` ###### Attribute `samson.SBNode.DynamicalModelNodeParticle` Signature: `DynamicalModelNodeParticle = ` ###### Attribute `samson.SBNode.DynamicalModelNodeRigidBody` Signature: `DynamicalModelNodeRigidBody = ` ###### Attribute `samson.SBNode.DynamicalModelNodeRoot` Signature: `DynamicalModelNodeRoot = ` ###### Attribute `samson.SBNode.DynamicalModelParticleSystem` Signature: `DynamicalModelParticleSystem = ` ###### Attribute `samson.SBNode.DynamicalModelRigidBodySystem` Signature: `DynamicalModelRigidBodySystem = ` ###### Attribute `samson.SBNode.DynamicalNode` Signature: `DynamicalNode = ` ###### Attribute `samson.SBNode.DynamicalRoot` Signature: `DynamicalRoot = ` ###### Attribute `samson.SBNode.File` Signature: `File = ` ###### Attribute `samson.SBNode.Folder` Signature: `Folder = ` ###### Attribute `samson.SBNode.HydrogenBond` Signature: `HydrogenBond = ` ###### Attribute `samson.SBNode.HydrogenBondGroup` Signature: `HydrogenBondGroup = ` ###### Attribute `samson.SBNode.InteractionModel` Signature: `InteractionModel = ` ###### Attribute `samson.SBNode.InteractionModelArticulatedBodySystem` Signature: `InteractionModelArticulatedBodySystem = ` ###### Attribute `samson.SBNode.InteractionModelParticleSystem` Signature: `InteractionModelParticleSystem = ` ###### Attribute `samson.SBNode.InteractionModelRigidBodySystem` Signature: `InteractionModelRigidBodySystem = ` ###### Attribute `samson.SBNode.Label` Signature: `Label = ` ###### Attribute `samson.SBNode.Light` Signature: `Light = ` ###### Attribute `samson.SBNode.Mesh` Signature: `Mesh = ` ###### Attribute `samson.SBNode.Molecule` Signature: `Molecule = ` ###### Attribute `samson.SBNode.NodeGroup` Signature: `NodeGroup = ` ###### Attribute `samson.SBNode.Note` Signature: `Note = ` ###### Attribute `samson.SBNode.Particle` Signature: `Particle = ` ###### Attribute `samson.SBNode.ParticleSystem` Signature: `ParticleSystem = ` ###### Attribute `samson.SBNode.Path` Signature: `Path = ` ###### Attribute `samson.SBNode.Presentation` Signature: `Presentation = ` ###### Attribute `samson.SBNode.PropertyModel` Signature: `PropertyModel = ` ###### Attribute `samson.SBNode.PropertyModelFunction` Signature: `PropertyModelFunction = ` ###### Attribute `samson.SBNode.RenderPreset` Signature: `RenderPreset = ` ###### Attribute `samson.SBNode.Residue` Signature: `Residue = ` ###### Attribute `samson.SBNode.RigidBody` Signature: `RigidBody = ` ###### Attribute `samson.SBNode.RigidBodySystem` Signature: `RigidBodySystem = ` ###### Attribute `samson.SBNode.Root` Signature: `Root = ` ###### Attribute `samson.SBNode.Segment` Signature: `Segment = ` ###### Attribute `samson.SBNode.SideChain` Signature: `SideChain = ` ###### Attribute `samson.SBNode.Simulator` Signature: `Simulator = ` ###### Attribute `samson.SBNode.SimulatorArticulatedBodySystem` Signature: `SimulatorArticulatedBodySystem = ` ###### Attribute `samson.SBNode.SimulatorParticleSystem` Signature: `SimulatorParticleSystem = ` ###### Attribute `samson.SBNode.SimulatorRigidBodySystem` Signature: `SimulatorRigidBodySystem = ` ###### Attribute `samson.SBNode.StateUpdater` Signature: `StateUpdater = ` ###### Attribute `samson.SBNode.StateUpdaterArticulatedBodySystem` Signature: `StateUpdaterArticulatedBodySystem = ` ###### Attribute `samson.SBNode.StateUpdaterParticleSystem` Signature: `StateUpdaterParticleSystem = ` ###### Attribute `samson.SBNode.StateUpdaterRigidBodySystem` Signature: `StateUpdaterRigidBodySystem = ` ###### Attribute `samson.SBNode.StructuralGroup` Signature: `StructuralGroup = ` ###### Attribute `samson.SBNode.StructuralModel` Signature: `StructuralModel = ` ###### Attribute `samson.SBNode.StructuralModelConformation` Signature: `StructuralModelConformation = ` ###### Attribute `samson.SBNode.StructuralModelNode` Signature: `StructuralModelNode = ` ###### Attribute `samson.SBNode.StructuralModelNodeAtom` Signature: `StructuralModelNodeAtom = ` ###### Attribute `samson.SBNode.StructuralModelNodeBackbone` Signature: `StructuralModelNodeBackbone = ` ###### Attribute `samson.SBNode.StructuralModelNodeBond` Signature: `StructuralModelNodeBond = ` ###### Attribute `samson.SBNode.StructuralModelNodeChain` Signature: `StructuralModelNodeChain = ` ###### Attribute `samson.SBNode.StructuralModelNodeGroup` Signature: `StructuralModelNodeGroup = ` ###### Attribute `samson.SBNode.StructuralModelNodeHydrogenBond` Signature: `StructuralModelNodeHydrogenBond = ` ###### Attribute `samson.SBNode.StructuralModelNodeHydrogenBondGroup` Signature: `StructuralModelNodeHydrogenBondGroup = ` ###### Attribute `samson.SBNode.StructuralModelNodeMolecule` Signature: `StructuralModelNodeMolecule = ` ###### Attribute `samson.SBNode.StructuralModelNodeResidue` Signature: `StructuralModelNodeResidue = ` ###### Attribute `samson.SBNode.StructuralModelNodeRoot` Signature: `StructuralModelNodeRoot = ` ###### Attribute `samson.SBNode.StructuralModelNodeSegment` Signature: `StructuralModelNodeSegment = ` ###### Attribute `samson.SBNode.StructuralModelNodeSideChain` Signature: `StructuralModelNodeSideChain = ` ###### Attribute `samson.SBNode.StructuralModelPath` Signature: `StructuralModelPath = ` ###### Attribute `samson.SBNode.Undefined` Signature: `Undefined = ` ###### Attribute `samson.SBNode.VisualModel` Signature: `VisualModel = ` ###### Attribute `samson.SBNode.VisualModelMesh` Signature: `VisualModelMesh = ` ###### Property `samson.SBNode.defaultOpacity` Signature: `property defaultOpacity` Returns the default opacity. ###### Property `samson.SBNode.defaultTransparency` Signature: `property defaultTransparency` Returns the default transparency. ###### Property `samson.SBNode.hasMaterial` Signature: `property hasMaterial` Returns whether the node has a material (by itself, or inherited). ###### Property `samson.SBNode.hasOpacityRange` Signature: `property hasOpacityRange` Returns whether the node has opacity range. ###### Property `samson.SBNode.hasTransparencyRange` Signature: `property hasTransparencyRange` Returns whether the node has transparency range. ###### Property `samson.SBNode.highlightingFlag` Signature: `property highlightingFlag` Highlighting flag ###### Property `samson.SBNode.inheritedOpacity` Signature: `property inheritedOpacity` Returns the cumulative inherited opacity. ###### Property `samson.SBNode.inheritedTransparency` Signature: `property inheritedTransparency` Returns the cumulative inherited transparency. ###### Property `samson.SBNode.isCreated` Signature: `property isCreated` Returns *True* if and only if the node is created ###### Property `samson.SBNode.isErased` Signature: `property isErased` Returns *True* if and only if the node is erased ###### Property `samson.SBNode.isHighlighted` Signature: `property isHighlighted` Returns whether the node is highlighted ###### Property `samson.SBNode.isLocked` Signature: `property isLocked` Returns whether the node is locked ###### Property `samson.SBNode.isSelected` Signature: `property isSelected` Returns whether the node is selected ###### Property `samson.SBNode.isSerializable` Signature: `property isSerializable` Returns *True* when the class is serializable ###### Property `samson.SBNode.isVisible` Signature: `property isVisible` Returns whether the node is visible ###### Property `samson.SBNode.lockedFlag` Signature: `property lockedFlag` Locked flag ###### Property `samson.SBNode.maximumOpacity` Signature: `property maximumOpacity` Returns the maximum opacity. ###### Property `samson.SBNode.maximumTransparency` Signature: `property maximumTransparency` Returns the maximum transparency. ###### Property `samson.SBNode.minimumOpacity` Signature: `property minimumOpacity` Returns the minimum opacity. ###### Property `samson.SBNode.minimumTransparency` Signature: `property minimumTransparency` Returns the minimum transparency. ###### Property `samson.SBNode.molecularWeight` Signature: `property molecularWeight` Returns the molecular weight ###### Property `samson.SBNode.name` Signature: `property name` The name of the node ###### Property `samson.SBNode.nodeIndex` Signature: `property nodeIndex` Returns the node index (unique in the whole data graph, but non-persistent) ###### Property `samson.SBNode.nodeUUID` Signature: `property nodeUUID` Returns the node UUID ###### Property `samson.SBNode.numberOfAtoms` Signature: `property numberOfAtoms` Returns the number of atoms ###### Property `samson.SBNode.numberOfCarbons` Signature: `property numberOfCarbons` Returns the number of carbons ###### Property `samson.SBNode.numberOfChains` Signature: `property numberOfChains` Returns the number of chains ###### Property `samson.SBNode.numberOfCoarseGrainedAtoms` Signature: `property numberOfCoarseGrainedAtoms` Returns the number of coarse-grained atoms ###### Property `samson.SBNode.numberOfHydrogens` Signature: `property numberOfHydrogens` Returns the number of hydrogens ###### Property `samson.SBNode.numberOfMolecules` Signature: `property numberOfMolecules` Returns the number of molecules ###### Property `samson.SBNode.numberOfNitrogens` Signature: `property numberOfNitrogens` Returns the number of nitrogens ###### Property `samson.SBNode.numberOfOtherAtoms` Signature: `property numberOfOtherAtoms` Returns the number of other atoms ###### Property `samson.SBNode.numberOfOxygens` Signature: `property numberOfOxygens` Returns the number of oxygens ###### Property `samson.SBNode.numberOfResidues` Signature: `property numberOfResidues` Returns the number of residues ###### Property `samson.SBNode.numberOfSegments` Signature: `property numberOfSegments` Returns the number of segments ###### Property `samson.SBNode.numberOfStructuralGroups` Signature: `property numberOfStructuralGroups` Returns the number of structural groups ###### Property `samson.SBNode.numberOfStructuralModels` Signature: `property numberOfStructuralModels` Returns the number of structural models ###### Property `samson.SBNode.numberOfSulfurs` Signature: `property numberOfSulfurs` Returns the number of sulfurs ###### Property `samson.SBNode.opacity` Signature: `property opacity` Opacity. ###### Property `samson.SBNode.ownsMaterial` Signature: `property ownsMaterial` Returns whether the node owns a material. ###### Property `samson.SBNode.selectionFlag` Signature: `property selectionFlag` Selection flag ###### Property `samson.SBNode.sumOfFormalCharges` Signature: `property sumOfFormalCharges` Returns the sum of formal charges ###### Property `samson.SBNode.sumOfPartialCharges` Signature: `property sumOfPartialCharges` Returns the sum of partial charges ###### Property `samson.SBNode.transparency` Signature: `property transparency` Transparency ###### Property `samson.SBNode.type` Signature: `property type` Returns the type of the data graph node ###### Property `samson.SBNode.typeString` Signature: `property typeString` Returns a string describing the type of this data graph node ###### Property `samson.SBNode.visibilityFlag` Signature: `property visibilityFlag` Visibility flag --- # SBNodeColorScheme Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md This is a base class that describes a color scheme in SAMSON. Please refer to the [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) page for information on how to create, apply, and use modify color schemes. !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDataGraphNodeColorScheme/#) ## API Reference #### Class `samson.SBNodeColorScheme` Signature: `class samson.SBNodeColorScheme(self: samson.SBNodeColorScheme)` Bases: `pybind11_object` This class describes a color scheme. Constructs a color scheme ##### Method `samson.SBNodeColorScheme.canHavePalette` Signature: `canHavePalette(self: samson.SBNodeColorScheme) -> bool` Returns whether the color scheme requires and therefore can have a color palette ##### Method `samson.SBNodeColorScheme.clone` Signature: `clone(self: samson.SBNodeColorScheme) -> samson.SBNodeColorScheme` Returns a copy of the color scheme ##### Method `samson.SBNodeColorScheme.getColor` Signature: `getColor(*args, **kwargs)` Overloaded function. 1. getColor(self: samson.SBNodeColorScheme, node: samson.SBNode = None) -> samson.SBColor Returns a color given a node. **Parameters** - **node** ([*samson.SBNode*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode)*,**default=None*) – A node. For constant color schemes can be *None*. **Returns** - A color **Return type** - [samson.SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) 2. getColor(self: samson.SBNodeColorScheme, node: samson.SBNode, position: samson.SBPhysicalVector3) -> samson.SBColor Returns a color given a node and a position. **Parameters** - **node** ([*samson.SBNode*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode)) – A node. - **position** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – A position. **Returns** - A color. **Return type** - [samson.SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) ##### Method `samson.SBNodeColorScheme.getDefaultPalette` Signature: `getDefaultPalette(self: samson.SBNodeColorScheme) -> samson.SBPalette` Returns a pointer to the default color palette for this color scheme ##### Method `samson.SBNodeColorScheme.getPalette` Signature: `getPalette(self: samson.SBNodeColorScheme) -> samson.SBPalette` Returns a pointer to a color palette owned by the color scheme ##### Method `samson.SBNodeColorScheme.requestUpdate` Signature: `requestUpdate(self: samson.SBNodeColorScheme) -> None` Requests a material update for a node to which the material that owns this color scheme is applied ##### Method `samson.SBNodeColorScheme.resetPalette` Signature: `resetPalette(self: samson.SBNodeColorScheme) -> None` Resets the color palette to the default one for color schemes that can have it. ##### Method `samson.SBNodeColorScheme.setPalette` Signature: `setPalette(self: samson.SBNodeColorScheme, palette: samson.SBPalette) -> None` Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If *None* is supplied then it will reset to the default color palette. **Parameters** - **palette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)) – A color palette ##### Property `samson.SBNodeColorScheme.hasPalette` Signature: `property hasPalette` Returns whether the color scheme has a color palette defined ##### Property `samson.SBNodeColorScheme.isSerializable` Signature: `property isSerializable` Returns *True* when the class is serializable --- # SBNodeGroup Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeGroup.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeGroup.md This class describes a group of [`nodes`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode). In SAMSON, you can group selected nodes to perform various operations using them, e.g. to select the nodes in the group, intersect the current selection with the nodes in the group, etc. A node group does not contain the nodes but only refers to them. Node groups, as other nodes, can be added in a document. Let’s for example create a group which contains references to all currently selected nodes. Caption: Creating a node group ```python # get the active document activeDocument = SAMSON.getActiveDocument() # get a node indexer of all currently selected nodes selectedNodesIndexer = activeDocument.getSelectedNodes() # construct a group based on the node indexer group = SBNodeGroup("My selection", selectedNodesIndexer) # make the operation undoable with SAMSON.holding("Group selection"): # hold the group SAMSON.hold(group) # create the group (it node should be created before adding it to another node of the data graph) group.create() # add the group to the active document activeDocument.addChild(group) ``` You can get the node indexer of nodes in the group using the `SBNodeGroup.getGroupNodes()` function: ```python # print the number of nodes referenced by the group print(group.size) # or get an indexer of nodes from the group groupNodesIndexer = group.getGroupNodes() print(len(groupNodesIndexer)) ``` !!! note "See also" SAMSON SDK: [SBDDataGraphNodeGroup](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDataGraphNodeGroup/#) ## API Reference #### Class `samson.SBNodeGroup` Signature: `class samson.SBNodeGroup(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes a node group. Overloaded function. 1. __init__(self: samson.SBNodeGroup) -> None Constructs an empty group 2. __init__(self: samson.SBNodeGroup, name: str, nodeIndexer: samson.SBNodeIndexer) -> None Constructs a group with *name* from nodes in *nodeIndexer*. **Parameters** - **name** (*str*) – A name of the group - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer of nodes that should be put into the group. ##### Examples Create a group with all the atoms from the active document and add it to the active document in an undoable way. ```pycon >>> atomIndexer = SAMSON.getNodes('n.t a') >>> group = SBNodeGroup('Atoms', atomIndexer) >>> # add the group to the active document >>> with SAMSON.holding('Add group'): # make the operation undoable ... SAMSON.hold(group) ... group.create() ... SAMSON.getActiveDocument().addChild(group) True ``` ##### Method `samson.SBNodeGroup.getGroupNodes` Signature: `getGroupNodes(self: samson.SBNodeGroup) -> samson.SBNodeIndexer` Returns an indexer of nodes belonging to the group. **Returns** - An indexer of nodes belonging to the group. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Method `samson.SBNodeGroup.getNextGroup` Signature: `getNextGroup(self: samson.SBNodeGroup) -> samson.SBNodeGroup` Returns the next group ##### Method `samson.SBNodeGroup.getPreviousGroup` Signature: `getPreviousGroup(self: samson.SBNodeGroup) -> samson.SBNodeGroup` Returns the previous group ##### Property `samson.SBNodeGroup.size` Signature: `property size` Returns the number of nodes belonging to the group --- # SBNodeIndexer Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md This class describes a node indexer (a list of nodes). You can get node indexers directly from the active document using the SAMSON facade (`SAMSON.getNodes() samson.SAMSON.getNodes>()`) or for from a [`node`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) using the [`SBNode.getNodes()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.getNodes) function. To select specific nodes you can use the [Node Specification Language](https://documentation.samson-connect.net/developers/11.0.0/node-specification-language/#). Getting nodes using the SAMSON facade ([`SAMSON`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#module-samson.SAMSON)): Caption: Getting nodes from the active document ```python # get all nodes in the active document nodeIndexer = SAMSON.getNodes() # get all atoms in the active document nodeIndexer = SAMSON.getNodes('node.type atom') # the same using short names nodeIndexer = SAMSON.getNodes('n.t a') # you can check the size of the indexer print(len(nodeIndexer)) ``` Getting node’s children nodes: Caption: Getting nodes from a node ```python # get all atoms in the node nodeIndexer = node.getNodes('node.type atom') ``` !!! note "See also" [`samson.SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) [Getting nodes](https://documentation.samson-connect.net/scripting/latest/docs/GettingNodes.md#ps-get-nodes) SAMSON SDK: [Node Specification Language](https://documentation.samson-connect.net/developers/11.0.0/node-specification-language/#) You can loop over the node indexer in a pythonic way: Caption: Printing node information ```python for node in nodeIndexer: print(node) ``` !!! note "See also" SAMSON SDK: [SBDDataGraphNodeIndexer](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDataGraphNodeIndexer/#) ## API Reference #### Class `samson.SBNodeIndexer` Signature: `class samson.SBNodeIndexer(*args, **kwargs)` Bases: `pybind11_object` This class describes a node indexer. Overloaded function. 1. __init__(self: samson.SBNodeIndexer) -> None Constructs a node indexer 2. __init__(self: samson.SBNodeIndexer, initialSize: int) -> None Constructs a node indexer with a pre-allocated *initialSize* 3. __init__(self: samson.SBNodeIndexer, other: samson.SBNodeIndexer) -> None Copy constructor 4. __init__(self: samson.SBNodeIndexer, iterable: Iterable) -> None Constructor from iterable ##### Method `samson.SBNodeIndexer.addNode` Signature: `addNode(self: samson.SBNodeIndexer, node: samson.SBNode) -> int` Adds a *node* to the indexer and returns the index of the *node*. **Parameters** - **node** ([*samson.SBNode*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode)) – A node ##### Method `samson.SBNodeIndexer.clear` Signature: `clear(self: samson.SBNodeIndexer) -> None` Clears the node indexer ##### Method `samson.SBNodeIndexer.getIndex` Signature: `getIndex(self: samson.SBNodeIndexer, node: samson.SBNode) -> int` Returns the index associated to the *node*. **Parameters** - **node** ([*samson.SBNode*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode)) – A node ##### Method `samson.SBNodeIndexer.getNode` Signature: `getNode(self: samson.SBNodeIndexer, index: int) -> samson.SBNode` Returns a node with the given index. **Parameters** - **index** (*int*) – An index ##### Method `samson.SBNodeIndexer.getNodes` Signature: `getNodes(*args, **kwargs)` Overloaded function. 1. getNodes(self: samson.SBNodeIndexer, selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> samson.SBNodeIndexer Returns nodes (in a node indexer), based on a *selectionString* and a *visitString*, with or without dependencies). For each node in the node indexer, this function calls the samson.SBNode.getNodes function. **Parameters** - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be selected. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - A node indexer. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) 2. getNodes(self: samson.SBNodeIndexer, nodeIndexer: samson.SBNodeIndexer, selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> None Fills in the node indexer *nodeIndexer* based on a *selectionString* and a *visitString*, with or without dependencies). Note that the *nodeIndexer* is not cleared when entering this function. For each node in the node indexer, this function calls the samson.SBNode.getNodes function. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A node indexer. It is not cleared by this function. - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be selected. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. ##### Method `samson.SBNodeIndexer.getRootNodes` Signature: `getRootNodes(self: samson.SBNodeIndexer) -> samson.SBNodeIndexer` Returns a node indexer with the root nodes among the indexed nodes, i.e. the nodes that do not have indexed ascendants. For example, if the indexed nodes contain two nodes - an atom and its direct parent node (e.g. a backbone node) - then only this parent node will be added in the resulting node indexer. **Returns** - A node indexer. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Method `samson.SBNodeIndexer.hasIndex` Signature: `hasIndex(self: samson.SBNodeIndexer, node: samson.SBNode) -> bool` Returns *True* if the *node* is present in the node indexer, i.e. it has an index. **Parameters** - **node** ([*samson.SBNode*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode)) – A node ##### Method `samson.SBNodeIndexer.hasNode` Signature: `hasNode(*args, **kwargs)` Overloaded function. 1. hasNode(self: samson.SBNodeIndexer, node: samson.SBNode) -> bool Returns *True* if the *node* is present in the node indexer. **Parameters** - **node** ([*samson.SBNode*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode)) – A node 2. hasNode(self: samson.SBNodeIndexer, selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> bool Checks for nodes in the node indexer based on the provided selection filter *selectionString* and other parameters. For each node in the node indexer, this function calls the samson.SBNode.hasNode function. This function traverses nodes in the node indexer for which a predicate based on the *visitString* is *True* (depth-first), and stores checks for the nodes for which the *selectionString* is true. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns true, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is true, the function also checks for nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *selectionString* and *visitString*, they are checked for if *includeDependencies* is true. **Parameters** - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be checked. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - Whether the nodes are present **Return type** - bool ###### Examples Checks for the presence of atoms in a node indexer: ```pycon >>> res = node_indexer.hasNode('node.type atom') ``` ##### Method `samson.SBNodeIndexer.index` Signature: `index(self: samson.SBNodeIndexer, node: samson.SBNode) -> int` Returns the index associated to the *node*. **Parameters** - **node** ([*samson.SBNode*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode)) – A node ##### Method `samson.SBNodeIndexer.removeNode` Signature: `removeNode(self: samson.SBNodeIndexer, node: samson.SBNode) -> int` Removes the *node* from the indexer. **Parameters** - **node** ([*samson.SBNode*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode)) – A node ##### Property `samson.SBNodeIndexer.isEmpty` Signature: `property isEmpty` *True* if empty ##### Property `samson.SBNodeIndexer.size` Signature: `property size` The size of the node indexer --- # SBNodeMaterial Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterial.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterial.md Data graph [`nodes`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) in SAMSON may have materials that apply to themselves and their descendants (if the descendants do not have their own materials). Materials are used to modify the visual appearance of data graph nodes. Each material has: - an associated color scheme ([`SBNodeColorScheme`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme)) to color nodes in a specific way, e.g. by residue, chain, or based on some node properties (e.g., charge, temperature factor, occupancy, etc.), or no color scheme to apply the default colorization; - appearance properties used when rendering nodes using path tracing (the *Trace* command) . Caption: Apply materials to nodes ```python # get all structural models nodeIndexer = SAMSON.getNodes('node.type sm') # make the operation undoable with SAMSON.holding("Add material"): # apply the color scheme to nodes for node in nodeIndexer: # [optional] remove existing materials from the descendants node.removeMaterialsFromDescendants() # create a color scheme per residue type # by providing the node indexer of residues to the color scheme constructor # we allow it to determine the color range based on the min and max residue types colorScheme = SBColorSchemePerResidueType(nodeIndexer) # create a material with the color scheme material = SBNodeMaterial() material.setColorScheme(colorScheme) # set the material to the node node.setMaterial(material) ``` You can set the appearance properties based on available appearance presets using the `SBNodeMaterial.setMaterialAppearance()` function. You can find all the default material appearance presets in the [`SBNodeMaterialAppearance`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterialAppearance.md#samson.SBNodeMaterialAppearance) class. Caption: Apply appearance preset to a material ```python material.setMaterialAppearance(SBNodeMaterialAppearance.metallicCopper) ``` !!! note Materials (and, hence, color schemes that are part of materials) take precedence based on hierarchy: if the node has a material applied directly to it, then it will be colorized based on this material’s color scheme, else it will be colorized based on a color scheme of its parent node’s material. If none of the node’s parents has a material with a color scheme then a default colorization will be applied, e.g. CPK colors for atoms. To remove materials from a node and its descendants call the [`SBNode.removeMaterialsFromDescendants()`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.removeMaterialsFromDescendants) function on the node. !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDDataGraphNodeMaterial](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDataGraphNodeMaterial/#) ## API Reference #### Class `samson.SBNodeMaterial` Signature: `class samson.SBNodeMaterial(*args, **kwargs)` Bases: [`SBReferenceTarget`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference/SBCReferenceTarget.md#samson.SBReferenceTarget) This class describes a material. Overloaded function. 1. __init__(self: samson.SBNodeMaterial) -> None Constructs a material with default parameters and no color scheme. 2. __init__(self: samson.SBNodeMaterial, colorScheme: samson.SBNodeColorScheme) -> None Constructs a material based on the given color scheme. The color scheme is cloned internally, since the material owns the color scheme. **Parameters** - **colorScheme** ([*samson.SBNodeColorScheme*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme)) – The color scheme 3. __init__(self: samson.SBNodeMaterial, color: samson.SBColor) -> None Constructs a material based on the given color. The color is set via the constant color scheme (*SBColorSchemeConstant*). **Parameters** - **color** ([*samson.SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) – The color ##### Method `samson.SBNodeMaterial.clone` Signature: `clone(self: samson.SBNodeMaterial) -> samson.SBNodeMaterial` Returns a copy of the material ##### Method `samson.SBNodeMaterial.getColorScheme` Signature: `getColorScheme(self: samson.SBNodeMaterial) -> samson.SBNodeColorScheme` Returns the material’s color scheme. The material always has a color scheme. **Returns** - The material’s color scheme. **Return type** - [samson.SBNodeColorScheme](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme) ##### Method `samson.SBNodeMaterial.getEmissionColor` Signature: `getEmissionColor(self: samson.SBNodeMaterial) -> samson.SBColor` Returns the emission color ##### Method `samson.SBNodeMaterial.getMaterialAppearance` Signature: `getMaterialAppearance(self: samson.SBNodeMaterial) -> samson.SBNodeMaterialAppearance` Returns the material appearance ##### Method `samson.SBNodeMaterial.getNode` Signature: `getNode(self: samson.SBNodeMaterial) -> samson.SBNode` Returns the node that owns the material ##### Method `samson.SBNodeMaterial.getSubsurfaceColor` Signature: `getSubsurfaceColor(self: samson.SBNodeMaterial) -> samson.SBColor` Returns the subsurface color ##### Method `samson.SBNodeMaterial.getSubsurfaceRadius` Signature: `getSubsurfaceRadius(self: samson.SBNodeMaterial) -> samson.SBPhysicalVector3` Returns the subsurface radius ##### Method `samson.SBNodeMaterial.setColor` Signature: `setColor(self: samson.SBNodeMaterial, color: samson.SBColor) -> bool` Sets the color for the material. The color is set via the constant color scheme (*SBColorSchemeConstant*). **Parameters** - **color** ([*samson.SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) – A color. **Returns** - Returns *True* if it could set the color, else returns *False*. **Return type** - bool ##### Method `samson.SBNodeMaterial.setColorScheme` Signature: `setColorScheme(self: samson.SBNodeMaterial, colorScheme: samson.SBNodeColorScheme) -> bool` Sets the color scheme. The color scheme is cloned internally, since the material owns the color scheme. **Parameters** - **colorScheme** ([*samson.SBNodeColorScheme*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeColorScheme.md#samson.SBNodeColorScheme)) – The color scheme. **Returns** - Returns *True* if it could set the color scheme, else returns *False*. **Return type** - bool ##### Method `samson.SBNodeMaterial.setEmissionColor` Signature: `setEmissionColor(self: samson.SBNodeMaterial, emissionColor: samson.SBColor) -> None` Sets the emission color ##### Method `samson.SBNodeMaterial.setMaterialAppearance` Signature: `setMaterialAppearance(self: samson.SBNodeMaterial, materialAppearance: samson.SBNodeMaterialAppearance) -> None` Sets the material appearance parameters for this material based on *materialAppearance*. **Parameters** - **materialAppearance** ([*SBNodeMaterialAppearance*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterialAppearance.md#samson.SBNodeMaterialAppearance)) – A material appearance. ###### Examples Set the ‘Metallic: Copper’ appearance preset ```pycon >>> material.setMaterialAppearance(SBNodeMaterialAppearance.metallicCopper) ``` ##### Method `samson.SBNodeMaterial.setSubsurfaceColor` Signature: `setSubsurfaceColor(self: samson.SBNodeMaterial, emissionColor: samson.SBColor) -> None` Sets the subsurface color ##### Method `samson.SBNodeMaterial.setSubsurfaceRadius` Signature: `setSubsurfaceRadius(self: samson.SBNodeMaterial, subsurfaceRadius: samson.SBPhysicalVector3) -> None` Sets the subsurface radius ##### Property `samson.SBNodeMaterial.anisotropicCoefficient` Signature: `property anisotropicCoefficient` The anisotropic coefficient. ##### Property `samson.SBNodeMaterial.anisotropicRotation` Signature: `property anisotropicRotation` The anisotropic rotation. ##### Property `samson.SBNodeMaterial.clearcoatCoefficient` Signature: `property clearcoatCoefficient` The clearcoat coefficient. ##### Property `samson.SBNodeMaterial.clearcoatRoughness` Signature: `property clearcoatRoughness` The clearcoat roughness. ##### Property `samson.SBNodeMaterial.emissionStrength` Signature: `property emissionStrength` The emission strength. ##### Property `samson.SBNodeMaterial.isSerializable` Signature: `property isSerializable` Returns *True* when the class is serializable ##### Property `samson.SBNodeMaterial.metallicCoefficient` Signature: `property metallicCoefficient` The metallic coefficient. ##### Property `samson.SBNodeMaterial.roughnessCoefficient` Signature: `property roughnessCoefficient` The roughness coefficient. ##### Property `samson.SBNodeMaterial.sheenCoefficient` Signature: `property sheenCoefficient` The sheen coefficient. ##### Property `samson.SBNodeMaterial.sheenTint` Signature: `property sheenTint` The sheen tint. ##### Property `samson.SBNodeMaterial.specularCoefficient` Signature: `property specularCoefficient` The specular coefficient. ##### Property `samson.SBNodeMaterial.specularTint` Signature: `property specularTint` The specular tint. ##### Property `samson.SBNodeMaterial.subsurfaceAnisotropy` Signature: `property subsurfaceAnisotropy` The subsurface anisotropy. ##### Property `samson.SBNodeMaterial.subsurfaceCoefficient` Signature: `property subsurfaceCoefficient` The subsurface coefficient. ##### Property `samson.SBNodeMaterial.subsurfaceIOR` Signature: `property subsurfaceIOR` The subsurface index of refraction (IOR). ##### Property `samson.SBNodeMaterial.transmissionCoefficient` Signature: `property transmissionCoefficient` The transmission coefficient. ##### Property `samson.SBNodeMaterial.transmissionIOR` Signature: `property transmissionIOR` The transmission index of refraction (IOR). ##### Property `samson.SBNodeMaterial.transmissionRoughness` Signature: `property transmissionRoughness` The transmission roughness. ##### Property `samson.SBNodeMaterial.transparency` Signature: `property transparency` The transparency. --- # SBNodeMaterialAppearance Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterialAppearance.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterialAppearance.md This class describes a material appearance used in [`SBNodeMaterial`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeMaterial.md#samson.SBNodeMaterial). ### List of material appearance presets Below is the table of material appearance presets available by default shown with some of their main values: | Name | Description | `metallic` | `roughness` | `specular` | `clearcoat` | `transmission` | `transmission roughness` | `transmission IOR` | `emission strength` | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `metallicCarbonFiber` | Metallic: Carbon Fiber | 1 | 0.2 | 0.5 | 0 | 0 | 0 | 2.42 | 0 | | `metallicCarbonSteel` | Metallic: Carbon Steel | 0.8 | 0.5 | 0.5 | 0 | 0 | 0 | 2.5 | 0 | | `metallicCopper` | Metallic: Copper | 1 | 0.3 | 0.5 | 0 | 0 | 0 | 1.98 | 0 | | `metallicGold` | Metallic: Gold | 1 | 0.1 | 0.5 | 0 | 0 | 0 | 0.47 | 0 | | `metallicPaint` | Metallic: Paint | 1 | 0.2 | 0.5 | 0.8 | 0 | 0 | 1.45 | 0 | | `metallicSilver` | Metallic: Silver | 1 | 0 | 0.5 | 0 | 0 | 0 | 0.18 | 0 | | `metallicSteel` | Metallic: Steel | 1 | 0.5 | 0.5 | 0 | 0 | 0 | 2.5 | 0 | | `metallicZinc` | Metallic: Zinc | 0.9 | 0.4 | 0.5 | 0 | 0 | 0 | 2.5 | 0 | | `semiMetallicBrass` | Semi-metallic: Brass | 0.65 | 0.65 | 0.6 | 0 | 0 | 0 | 1.7 | 0 | | `semiMetallicBronze` | Semi-metallic: Bronze | 0.75 | 0.4 | 0.6 | 0 | 0 | 0 | 2.5 | 0 | | `semiMetallicEpoxy` | Semi-metallic: Epoxy | 0.2 | 0.4 | 0.6 | 0.1 | 0 | 0 | 1.6 | 0 | | `semiMetallicPearl` | Semi-metallic: Pearl | 0.1 | 0.1 | 0.8 | 0.2 | 0 | 0 | 1.53 | 0 | | `semiMetallicRust` | Semi-metallic: Rust | 0.6 | 0.8 | 0.5 | 0 | 0 | 0 | 2.5 | 0 | | `smoothCeramic` | Smooth: Ceramic | 0 | 0.4 | 0.5 | 0 | 0 | 0 | 1.6 | 0 | | `smoothLatex` | Smooth: Latex | 0 | 0.1 | 0.8 | 0 | 0 | 0 | 1.49 | 0 | | `smoothMarble` | Smooth: Marble | 0 | 0.2 | 0.5 | 0 | 0 | 0 | 1.5 | 0 | | `smoothPaint` | Smooth: Paint | 0 | 0.2 | 0.5 | 0.8 | 0 | 0 | 1.45 | 0 | | `smoothPaper` | Smooth: Paper | 0 | 0.3 | 0.5 | 0 | 0 | 0 | 1.52 | 0 | | `smoothPlastic` | Smooth: Plastic | 0 | 0.4 | 0.5 | 0.2 | 0 | 0 | 1.46 | 0 | | `smoothPolystyrene` | Smooth: Polystyrene | 0 | 0.1 | 0.5 | 0 | 0 | 0 | 1.59 | 0 | | `smoothSatin` | Smooth: Satin | 0 | 0.2 | 0.6 | 0 | 0 | 0 | 1.54 | 0 | | `smoothShinyPlastic` | Smooth: Shiny plastic | 0 | 0.1 | 0.8 | 0.1 | 0 | 0 | 1.52 | 0 | | `roughConcrete` | Rough: Concrete | 0 | 0.9 | 0.2 | 0 | 0 | 0 | 1.5 | 0 | | `roughFeather` | Rough: Feather | 0 | 0.9 | 0.5 | 0.1 | 0 | 0 | 1.56 | 0 | | `roughGranite` | Rough: Granite | 0 | 0.7 | 0.5 | 0 | 0 | 0 | 1.54 | 0 | | `roughVelvet` | Rough: Velvet | 0 | 0.9 | 0.3 | 0 | 0 | 0 | 1.5 | 0 | | `roughWood` | Rough: Wood | 0 | 0.6 | 0.5 | 0.1 | 0 | 0 | 1.52 | 0 | | `emissiveFaint` | Emissive: Faint (0.1) | 0 | 0.5 | 0.5 | 0 | 0 | 0 | 1.5 | 0.1 | | `emissiveSoft` | Emissive: Soft (1) | 0 | 0.5 | 0.5 | 0 | 0 | 0 | 1.5 | 1 | | `emissiveGlowing` | Emissive: Glowing (10) | 0 | 0.5 | 0.5 | 0 | 0 | 0 | 1.5 | 10 | | `emissiveShining` | Emissive: Shining (100) | 0 | 0.5 | 0.5 | 0 | 0 | 0 | 1.5 | 100 | | `emissiveBright` | Emissive: Bright (1000) | 0 | 0.5 | 0.5 | 0 | 0 | 0 | 1.5 | 1000 | | `emissiveStrong` | Emissive: Strong (10000) | 0 | 0.5 | 0.5 | 0 | 0 | 0 | 1.5 | 10000 | | `emissiveIntense` | Emissive: Intense (100000) | 0 | 0.5 | 0.5 | 0 | 0 | 0 | 1.5 | 100000 | | `transparentIce` | Transparent: Ice | 0 | 0 | 0.5 | 0 | 0.98 | 0.1 | 1.31 | 0 | | `transparentGlass` | Transparent: Glass | 0 | 0 | 0.5 | 0 | 1 | 0 | 1.52 | 0 | | `transparentJade` | Transparent: Jade | 0 | 0.3 | 0.5 | 0 | 0.2 | 0 | 1.66 | 0 | | `transparentObsidian` | Transparent: Obsidian | 0 | 0.07 | 0.5 | 0 | 0.1 | 0.1 | 1.5 | 0 | | `transparentWater` | Transparent: Water | 0 | 0 | 0.5 | 0 | 0.95 | 0 | 1.33 | 0 | | `transparentWax` | Transparent: Wax | 0 | 0.1 | 0.5 | 0 | 0.3 | 0 | 1.46 | 0 | !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDDataGraphNodeMaterialAppearance](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDataGraphNodeMaterialAppearance/#) ## API Reference ##### Class `samson.SBNodeMaterialAppearance` Signature: `class samson.SBNodeMaterialAppearance(*args, **kwargs)` Bases: [`SBReferenceTarget`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference/SBCReferenceTarget.md#samson.SBReferenceTarget) This class describes a material appearance. Overloaded function. 1. __init__(self: samson.SBNodeMaterialAppearance, metallicCoefficient: float = 0.0, roughnessCoefficient: float = 0.5, specularCoefficient: float = 0.5, specularTint: float = 0.0, clearcoatCoefficient: float = 0.0, clearcoatRoughness: float = 0.029999999329447746, transmissionCoefficient: float = 0.0, transmissionRoughness: float = 0.0, transmissionIOR: float = 1.4500000476837158, emissionStrength: float = 0.0, emissionColor: samson.SBColor = SBColor(0.000000, 0.000000, 0.000000, 1.000000), subsurfaceCoefficient: float = 0.0, subsurfaceRadius: samson.SBPhysicalVector3 = (1 (dimensionless), 0.2 (dimensionless), 0.1 (dimensionless)), subsurfaceColor: samson.SBColor = SBColor(0.800000, 0.800000, 0.800000, 1.000000), subsurfaceIOR: float = 1.399999976158142, subsurfaceAnisotropy: float = 0.0, transparency: float = 0.0, sheenCoefficient: float = 0.0, sheenTint: float = 0.5, anisotropicCoefficient: float = 0.0, anisotropicRotation: float = 0.0) -> None Constructs a material appearance with the given parameters. **Parameters** - **metallicCoefficient** (*float**,**default=0.0*) – The metallic coefficient - **roughnessCoefficient** (*float**,**default=0.5*) – The roughness coefficient - **specularCoefficient** (*float**,**default=0.5*) – The specular coefficient - **specularTint** (*float**,**default=0.0*) – The specular tint - **clearcoatCoefficient** (*float**,**default=0.0*) – The clearcoat coefficient - **clearcoatRoughness** (*float**,**default=0.03*) – The clearcoat roughness - **transmissionCoefficient** (*float**,**default=0.0*) – The transmission coefficient - **transmissionRoughness** (*float**,**default=0.0*) – The transmission roughness - **transmissionIOR** (*float**,**default=1.45*) – The transmission index of refraction (IOR) - **emissionStrength** (*float**,**default=0.0*) – The emission strength - **emissionColor** ([*SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)*,**default=SBColor**(**0**,**0**,**0**)*) – The emission color - **subsurfaceCoefficient** (*float**,**default=0.0*) – The subsurface coefficient - **subsurfaceRadius** ([*SBVector3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md#samson.SBVector3)*,*[*SBVector3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/dimensionless3.md#samson.SBVector3)*(**1.0**,**0.2**,**0.1**)*) – The subsurface radius - **subsurfaceColor** ([*SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)*,**default=SBColor**(**0.8f**,**0.8f**,**0.8f**)*) – The subsurface color - **subsurfaceIOR** (*float**,**default=1.4*) – The subsurface index of refraction (IOR) - **subsurfaceAnisotropy** (*float**,**default=0.0*) – The subsurface anisotropy - **transparency** (*float**,**default=0.0*) – The transparency - **sheenCoefficient** (*float**,**default=0.0*) – The sheen coefficient - **sheenTint** (*float**,**default=0.5*) – The sheen tint - **anisotropicCoefficient** (*float**,**default=0.0*) – The anisotropic coefficient - **anisotropicRotation** (*float**,**default=0.0*) – The anisotropic rotation 2. __init__(self: samson.SBNodeMaterialAppearance, materialAppearance: samson.SBNodeMaterialAppearance) -> None Copy constructor. ###### Method `samson.SBNodeMaterialAppearance.getEmissionColor` Signature: `getEmissionColor(self: samson.SBNodeMaterialAppearance) -> samson.SBColor` Returns the emission color ###### Method `samson.SBNodeMaterialAppearance.getSubsurfaceColor` Signature: `getSubsurfaceColor(self: samson.SBNodeMaterialAppearance) -> samson.SBColor` Returns the subsurface color ###### Method `samson.SBNodeMaterialAppearance.getSubsurfaceRadius` Signature: `getSubsurfaceRadius(self: samson.SBNodeMaterialAppearance) -> samson.SBPhysicalVector3` Returns the subsurface radius ###### Method `samson.SBNodeMaterialAppearance.setEmissionColor` Signature: `setEmissionColor(self: samson.SBNodeMaterialAppearance, color: samson.SBColor) -> None` Sets the emission color ###### Method `samson.SBNodeMaterialAppearance.setSubsurfaceColor` Signature: `setSubsurfaceColor(self: samson.SBNodeMaterialAppearance, color: samson.SBColor) -> None` Sets the subsurface color ###### Method `samson.SBNodeMaterialAppearance.setSubsurfaceRadius` Signature: `setSubsurfaceRadius(self: samson.SBNodeMaterialAppearance, subsurfaceRadius: samson.SBPhysicalVector3) -> None` Sets the subsurface radius ###### Property `samson.SBNodeMaterialAppearance.anisotropicCoefficient` Signature: `property anisotropicCoefficient` The anisotropic coefficient. ###### Property `samson.SBNodeMaterialAppearance.anisotropicRotation` Signature: `property anisotropicRotation` The anisotropic rotation. ###### Property `samson.SBNodeMaterialAppearance.clearcoatCoefficient` Signature: `property clearcoatCoefficient` The clearcoat coefficient. ###### Property `samson.SBNodeMaterialAppearance.clearcoatRoughness` Signature: `property clearcoatRoughness` The clearcoat roughness. ###### Property `samson.SBNodeMaterialAppearance.emissionStrength` Signature: `property emissionStrength` The emission strength. ###### Attribute `samson.SBNodeMaterialAppearance.emissiveBright` Signature: `emissiveBright = SBNodeMaterialAppearance.emissiveBright` ###### Attribute `samson.SBNodeMaterialAppearance.emissiveFaint` Signature: `emissiveFaint = SBNodeMaterialAppearance.emissiveFaint` ###### Attribute `samson.SBNodeMaterialAppearance.emissiveGlowing` Signature: `emissiveGlowing = SBNodeMaterialAppearance.emissiveGlowing` ###### Attribute `samson.SBNodeMaterialAppearance.emissiveIntense` Signature: `emissiveIntense = SBNodeMaterialAppearance.emissiveIntense` ###### Attribute `samson.SBNodeMaterialAppearance.emissiveShining` Signature: `emissiveShining = SBNodeMaterialAppearance.emissiveShining` ###### Attribute `samson.SBNodeMaterialAppearance.emissiveSoft` Signature: `emissiveSoft = SBNodeMaterialAppearance.emissiveSoft` ###### Attribute `samson.SBNodeMaterialAppearance.emissiveStrong` Signature: `emissiveStrong = SBNodeMaterialAppearance.emissiveStrong` ###### Property `samson.SBNodeMaterialAppearance.isSerializable` Signature: `property isSerializable` Returns *True* when the class is serializable ###### Attribute `samson.SBNodeMaterialAppearance.metallicCarbonFiber` Signature: `metallicCarbonFiber = SBNodeMaterialAppearance.metallicCarbonFiber` ###### Attribute `samson.SBNodeMaterialAppearance.metallicCarbonSteel` Signature: `metallicCarbonSteel = SBNodeMaterialAppearance.metallicCarbonSteel` ###### Property `samson.SBNodeMaterialAppearance.metallicCoefficient` Signature: `property metallicCoefficient` The metallic coefficient. ###### Attribute `samson.SBNodeMaterialAppearance.metallicCopper` Signature: `metallicCopper = SBNodeMaterialAppearance.metallicCopper` ###### Attribute `samson.SBNodeMaterialAppearance.metallicGold` Signature: `metallicGold = SBNodeMaterialAppearance.metallicGold` ###### Attribute `samson.SBNodeMaterialAppearance.metallicPaint` Signature: `metallicPaint = SBNodeMaterialAppearance.metallicPaint` ###### Attribute `samson.SBNodeMaterialAppearance.metallicSilver` Signature: `metallicSilver = SBNodeMaterialAppearance.metallicSilver` ###### Attribute `samson.SBNodeMaterialAppearance.metallicSteel` Signature: `metallicSteel = SBNodeMaterialAppearance.metallicSteel` ###### Attribute `samson.SBNodeMaterialAppearance.metallicZinc` Signature: `metallicZinc = SBNodeMaterialAppearance.metallicZinc` ###### Attribute `samson.SBNodeMaterialAppearance.roughConcrete` Signature: `roughConcrete = SBNodeMaterialAppearance.roughConcrete` ###### Attribute `samson.SBNodeMaterialAppearance.roughFeather` Signature: `roughFeather = SBNodeMaterialAppearance.roughFeather` ###### Attribute `samson.SBNodeMaterialAppearance.roughGranite` Signature: `roughGranite = SBNodeMaterialAppearance.roughGranite` ###### Attribute `samson.SBNodeMaterialAppearance.roughVelvet` Signature: `roughVelvet = SBNodeMaterialAppearance.roughVelvet` ###### Attribute `samson.SBNodeMaterialAppearance.roughWood` Signature: `roughWood = SBNodeMaterialAppearance.roughWood` ###### Property `samson.SBNodeMaterialAppearance.roughnessCoefficient` Signature: `property roughnessCoefficient` The roughness coefficient. ###### Attribute `samson.SBNodeMaterialAppearance.semiMetallicBrass` Signature: `semiMetallicBrass = SBNodeMaterialAppearance.semiMetallicBrass` ###### Attribute `samson.SBNodeMaterialAppearance.semiMetallicBronze` Signature: `semiMetallicBronze = SBNodeMaterialAppearance.semiMetallicBronze` ###### Attribute `samson.SBNodeMaterialAppearance.semiMetallicEpoxy` Signature: `semiMetallicEpoxy = SBNodeMaterialAppearance.semiMetallicEpoxy` ###### Attribute `samson.SBNodeMaterialAppearance.semiMetallicPearl` Signature: `semiMetallicPearl = SBNodeMaterialAppearance.semiMetallicPearl` ###### Attribute `samson.SBNodeMaterialAppearance.semiMetallicRust` Signature: `semiMetallicRust = SBNodeMaterialAppearance.semiMetallicRust` ###### Property `samson.SBNodeMaterialAppearance.sheenCoefficient` Signature: `property sheenCoefficient` The sheen coefficient. ###### Property `samson.SBNodeMaterialAppearance.sheenTint` Signature: `property sheenTint` The sheen tint. ###### Attribute `samson.SBNodeMaterialAppearance.smoothCeramic` Signature: `smoothCeramic = SBNodeMaterialAppearance.smoothCeramic` ###### Attribute `samson.SBNodeMaterialAppearance.smoothLatex` Signature: `smoothLatex = SBNodeMaterialAppearance.smoothLatex` ###### Attribute `samson.SBNodeMaterialAppearance.smoothMarble` Signature: `smoothMarble = SBNodeMaterialAppearance.smoothMarble` ###### Attribute `samson.SBNodeMaterialAppearance.smoothPaint` Signature: `smoothPaint = SBNodeMaterialAppearance.smoothPaint` ###### Attribute `samson.SBNodeMaterialAppearance.smoothPaper` Signature: `smoothPaper = SBNodeMaterialAppearance.smoothPaper` ###### Attribute `samson.SBNodeMaterialAppearance.smoothPlastic` Signature: `smoothPlastic = SBNodeMaterialAppearance.smoothPlastic` ###### Attribute `samson.SBNodeMaterialAppearance.smoothPolystyrene` Signature: `smoothPolystyrene = SBNodeMaterialAppearance.smoothPolystyrene` ###### Attribute `samson.SBNodeMaterialAppearance.smoothSatin` Signature: `smoothSatin = SBNodeMaterialAppearance.smoothSatin` ###### Attribute `samson.SBNodeMaterialAppearance.smoothShinyPlastic` Signature: `smoothShinyPlastic = SBNodeMaterialAppearance.smoothShinyPlastic` ###### Property `samson.SBNodeMaterialAppearance.specularCoefficient` Signature: `property specularCoefficient` The specular coefficient. ###### Property `samson.SBNodeMaterialAppearance.specularTint` Signature: `property specularTint` The specular tint. ###### Property `samson.SBNodeMaterialAppearance.subsurfaceAnisotropy` Signature: `property subsurfaceAnisotropy` The subsurface anisotropy. ###### Property `samson.SBNodeMaterialAppearance.subsurfaceCoefficient` Signature: `property subsurfaceCoefficient` The subsurface coefficient. ###### Property `samson.SBNodeMaterialAppearance.subsurfaceIOR` Signature: `property subsurfaceIOR` The subsurface index of refraction (IOR). ###### Property `samson.SBNodeMaterialAppearance.transmissionCoefficient` Signature: `property transmissionCoefficient` The transmission coefficient. ###### Property `samson.SBNodeMaterialAppearance.transmissionIOR` Signature: `property transmissionIOR` The transmission index of refraction (IOR). ###### Property `samson.SBNodeMaterialAppearance.transmissionRoughness` Signature: `property transmissionRoughness` The transmission roughness. ###### Property `samson.SBNodeMaterialAppearance.transparency` Signature: `property transparency` The transparency. ###### Attribute `samson.SBNodeMaterialAppearance.transparentGlass` Signature: `transparentGlass = SBNodeMaterialAppearance.transparentGlass` ###### Attribute `samson.SBNodeMaterialAppearance.transparentIce` Signature: `transparentIce = SBNodeMaterialAppearance.transparentIce` ###### Attribute `samson.SBNodeMaterialAppearance.transparentJade` Signature: `transparentJade = SBNodeMaterialAppearance.transparentJade` ###### Attribute `samson.SBNodeMaterialAppearance.transparentObsidian` Signature: `transparentObsidian = SBNodeMaterialAppearance.transparentObsidian` ###### Attribute `samson.SBNodeMaterialAppearance.transparentWater` Signature: `transparentWater = SBNodeMaterialAppearance.transparentWater` ###### Attribute `samson.SBNodeMaterialAppearance.transparentWax` Signature: `transparentWax = SBNodeMaterialAppearance.transparentWax` --- # SBNodeSelector Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeSelector.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeSelector.md This class describes a node selector. !!! note "See also" SAMSON SDK: [SBDDataGraphNodeSelector](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDataGraphNodeSelector/#) ## API Reference #### Class `samson.SBNodeSelector` Signature: `class samson.SBNodeSelector(*args, **kwargs)` Bases: `pybind11_object` This class describes a selector. Overloaded function. 1. __init__(self: samson.SBNodeSelector) -> None Constructs a selector 2. __init__(self: samson.SBNodeSelector, parameterMap: samson.SBValueMap) -> None Constructs a selector from parameters. **Parameters** - **parameterMap** ([*samson.SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – Selector parameters. ##### Method `samson.SBNodeSelector.getNodes` Signature: `getNodes(self: samson.SBNodeSelector, nodeIndexer: samson.SBNodeIndexer) -> samson.SBNodeIndexer` Selects nodes from *nodeIndexer* and returns a node indexer with the result. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – The input node indexer. **Returns** - The output node indexer with the results. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Property `samson.SBNodeSelector.NSLExpression` Signature: `property NSLExpression` Returns an NSL expression equivalent to the selector, if such expression exists, else returns an empty string ##### Property `samson.SBNodeSelector.isSerializable` Signature: `property isSerializable` Returns *True* when the class is serializable ##### Property `samson.SBNodeSelector.name` Signature: `property name` Returns the selector’s name --- # Document Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document.md This group contains classes related to SAMSON documents and the document-level nodes they can contain, such as folders, cameras, labels, notes, lights, presentations, and render presets. !!! note "See also" SAMSON SDK: [The SBDDocument Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/DataModel/Document/#) - [SBDocument](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md) - [SBAnimation](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentAnimation.md) - [SBCamera](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentCamera.md) - [SBFile](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFile.md) - [SBFolder](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md) - [SBLabel](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentLabel.md) - [SBLight](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentLight.md) - [SBNote](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentNote.md) - [SBPresentation](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentPresentation.md) - [SBRenderPreset](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentRenderPreset.md) --- # SBDocument Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md This class describes a document. A document may contain various types of nodes: cameras, structural nodes, dynamical models, simulators, visual models, notes, labels, folders, etc. There is always one active document - the one visible in the Document view. You can access the active document through [`samson.SAMSON`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#module-samson.SAMSON): ```python activeDocument = SAMSON.getActiveDocument() ``` The set of selected nodes is accessible from the document: ```python selectedNodesIndexer = activeDocument.getSelectedNodes() ``` This node indexer is a copy of an internal node indexer of the selected nodes and any you can modify this node - it does not affect the selection. Note, that if the selection has been modified this node indexer is not updated and you need to call the `samson.SBDocument.getSelectedNodes()` function again. You can access nodes in the node indexer to perform some actions e.g. remove them from the selection: ```python for node in selectedNodesIndexer: node.selectionFlag = False ``` You can also add nodes to selection and remove them from the selection yourself by modifying the selection flag of a node: ```python node.selectionFlag = True # the node is selected node.selectionFlag = False # the node is deselected ``` or by modifying the document selection itself: ```python activeDocument.addNodeToSelection(node) # the node is selected activeDocument.removeNodeFromSelection(node) # the node is deselected ``` Note that you should **always** turn the “Undo system” on when modifying the selection: ```python with SAMSON.holding("Modify selection"): # turn the undo system on SAMSON.getActiveDocument().clearSelection() # clear the selection ``` This allows for undoing: ```python SAMSON.undo() # go back to before clearing ``` !!! note "See also" SAMSON SDK: [SBDDocument](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDocument/#) ## API Reference #### Class `samson.SBDocument` Signature: `class samson.SBDocument(*args, **kwargs)` Bases: [`SBFolder`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md#samson.SBFolder) This class describes a document. Overloaded function. 1. __init__(self: samson.SBDocument) -> None Constructs a document. 2. __init__(self: samson.SBDocument, name: str) -> None Constructs a document with a name. ##### Method `samson.SBDocument.addGroupNodesToSelection` Signature: `addGroupNodesToSelection(self: samson.SBDocument, group: samson.SBNodeGroup) -> None` Adds the group nodes to the document selection. **Parameters** - **samson.SBNodeGroup** – A node group. !!! note "See also" `getSelectedNodes`, `clearSelection`, `selectGroupNodes`, `removeGroupNodesFromSelection`, `intersectGroupNodesWithSelection` ##### Method `samson.SBDocument.addNodeToSelection` Signature: `addNodeToSelection(self: samson.SBDocument, node: samson.SBNode) -> None` Adds a node to the selection ##### Method `samson.SBDocument.clearHighlighting` Signature: `clearHighlighting(self: samson.SBDocument) -> None` Clears the highlighting in the document. ###### Examples Clear the highlighting in the active document ```pycon >>> document = SAMSON.getActiveDocument() >>> document.clearHighlighting() ``` ##### Method `samson.SBDocument.clearSelection` Signature: `clearSelection(self: samson.SBDocument) -> None` Clears the selection in the document. ###### Examples Clear the selection in the active document ```pycon >>> document = SAMSON.getActiveDocument() >>> document.clearSelection() ``` ##### Method `samson.SBDocument.createGroup` Signature: `createGroup(self: samson.SBDocument, name: str, selectionString: str = '*', visitString: str = '*') -> samson.SBNodeGroup` Create a group with its name based on a *selectionString* and a *visitString*. This function traverses the node’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and creates a node group for nodes for which the *selectionString* is *True*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns *True*, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. This function internally creates a node group in an undoable way, adds it to the document, and returns the just created node group. ###### Notes A node group does not directly contain nodes but only refers to them. **Parameters** - **name** (*str*) – A name of the group. - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be selected. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited. **Returns** - The resulting node group. **Return type** - [samson.SBNodeGroup](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeGroup.md#samson.SBNodeGroup) ###### Examples Create a group for water nodes and make this operation undoable. ```pycon >>> with SAMSON.holding('Create node group'): ... document = SAMSON.getActiveDocument() ... nodeGroup = document.createGroup('Water nodes', 'water') ``` !!! note "See also" `groupSelection`, `getSelectedNodes` ##### Method `samson.SBDocument.getActiveCamera` Signature: `getActiveCamera(self: samson.SBDocument) -> samson.SBCamera` Returns the active camera in the document. **Returns** - The active camera in the document **Return type** - [samson.SBCamera](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentCamera.md#samson.SBCamera) ###### Notes A created document always has at least one camera. ###### Examples Go to the back view with the active camera. ```pycon >>> active_document = SAMSON.getActiveDocument() >>> active_camera = active_document.getActiveCamera() >>> active_camera.backView() ``` !!! note "See also" `setActiveCamera` ##### Method `samson.SBDocument.getActivePresentation` Signature: `getActivePresentation(self: samson.SBDocument) -> samson.SBPresentation` Returns the active presentation of the document. **Returns** - The active presentation in the document, if any, else return *None* **Return type** - [samson.SBPresentation](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentPresentation.md#samson.SBPresentation) ###### Examples Get the active presentation in the document. ```pycon >>> active_document = SAMSON.getActiveDocument() >>> active_presentation = active_document.getActivePresentation() ``` !!! note "See also" `setActivePresentation` ##### Method `samson.SBDocument.getActiveStructuralModel` Signature: `getActiveStructuralModel(self: samson.SBDocument) -> samson.SBStructuralModel` Returns the active structural model in the document. **Returns** - The active structural model in the document, if any, else return *None* **Return type** - [samson.SBStructuralModel](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md#samson.SBStructuralModel) ###### Examples Get the active structural model in the document. ```pycon >>> active_document = SAMSON.getActiveDocument() >>> active_structural_model = active_document.getActiveStructuralModel() ``` !!! note "See also" `setActiveStructuralModel` ##### Method `samson.SBDocument.getNextDocument` Signature: `getNextDocument(self: samson.SBDocument) -> samson.SBDocument` Returns the next document. ###### Notes SAMSON might have multiple documents open at the same time. ##### Method `samson.SBDocument.getNumberOfSelectedNodes` Signature: `getNumberOfSelectedNodes(*args, **kwargs)` Overloaded function. 1. getNumberOfSelectedNodes(self: samson.SBDocument, proxy: samson.SBProxy) -> int Returns the number of selected nodes corresponding to the given *proxy*. **Parameters** - **proxy** ([*samson.SBProxy*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy)) – A proxy. **Returns** - A number of selected nodes. **Return type** - int !!! note "See also" `clearSelection`, `groupSelection`, `addNodeToSelection`, `removeNodeFromSelection` 2. getNumberOfSelectedNodes(self: samson.SBDocument, classUUID: samson.SBUUID, extensionUUID: samson.SBUUID) -> int Returns the number of selected nodes corresponding to the given *classUUID* and *extensionUUID*. **Parameters** - **classUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A UUID of a class. - **extensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A UUID of an extension. **Returns** - A number of selected nodes. **Return type** - int !!! note "See also" `clearSelection`, `groupSelection`, `addNodeToSelection`, `removeNodeFromSelection` ##### Method `samson.SBDocument.getPreviousDocument` Signature: `getPreviousDocument(self: samson.SBDocument) -> samson.SBDocument` Returns the previous document. ###### Notes SAMSON might have multiple documents open at the same time. ##### Method `samson.SBDocument.getSelectedNodes` Signature: `getSelectedNodes(*args, **kwargs)` Overloaded function. 1. getSelectedNodes(self: samson.SBDocument) -> samson.SBNodeIndexer Returns an indexer of the selected nodes. **Returns** - An indexer of selected nodes. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ###### Examples Print the number of selected nodes in the active document. ```pycon >>> document = SAMSON.getActiveDocument() >>> print(len(document.getSelectedNodes())) 0 ``` !!! note "See also" `getNumberOfSelectedNodes`, `clearSelection`, `groupSelection`, `addNodeToSelection`, `removeNodeFromSelection` 2. getSelectedNodes(self: samson.SBDocument, proxy: samson.SBProxy) -> samson.SBNodeIndexer Returns the indexer of selected nodes corresponding to a given *proxy*. **Parameters** - **proxy** ([*samson.SBProxy*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy)) – A proxy. **Returns** - An indexer of selected nodes. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) !!! note "See also" `getNumberOfSelectedNodes`, `clearSelection`, `groupSelection`, `addNodeToSelection`, `removeNodeFromSelection` 3. getSelectedNodes(self: samson.SBDocument, classUUID: samson.SBUUID, extensionUUID: samson.SBUUID) -> samson.SBNodeIndexer Returns the indexer of selected nodes corresponding to a given *classUUID* and *extensionUUID* **Parameters** - **classUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A UUID of a class. - **extensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A UUID of an extension. **Returns** - An indexer of selected nodes. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) !!! note "See also" `getNumberOfSelectedNodes`, `clearSelection`, `groupSelection`, `addNodeToSelection`, `removeNodeFromSelection` 4. getSelectedNodes(self: samson.SBDocument, type: samson.SBNode.Type) -> samson.SBNodeIndexer Returns an indexer of the selected nodes of the given *type*. **Parameters** - **type** ([*samson.SBNode.Type*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.Type)) – A node type. **Returns** - An indexer of selected nodes. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ###### Examples Print the number of selected atoms in the active document. ```pycon >>> document = SAMSON.getActiveDocument() >>> print(len(document.getSelectedNodes(SBNode.Atom))) 0 ``` !!! note "See also" `getNumberOfSelectedNodes`, `clearSelection`, `groupSelection`, `addNodeToSelection`, `removeNodeFromSelection` 5. getSelectedNodes(self: samson.SBDocument, selectionString: str) -> samson.SBNodeIndexer Returns an indexer of the selected nodes satisfying the given *selectionString*. **Parameters** - **selectionString** (*str*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)). **Returns** - An indexer of selected nodes. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ###### Examples Print the number of selected atoms and bonds in the active document. ```pycon >>> document = SAMSON.getActiveDocument() >>> print(len(document.getSelectedNodes('n.t a or n.t b'))) 0 ``` !!! note "See also" `getNumberOfSelectedNodes`, `clearSelection`, `groupSelection`, `addNodeToSelection`, `removeNodeFromSelection` ##### Method `samson.SBDocument.groupSelection` Signature: `groupSelection(self: samson.SBDocument, name: str) -> samson.SBNodeGroup` Stores the selected nodes into a group with the given name. This function internally creates a node group in an undoable way, adds it to the document, and returns the just created node group. ###### Notes A node group does not directly contain nodes but only refers to them. **Parameters** - **name** (*str*) – A name of the group. **Returns** - The resulting node group. **Return type** - [samson.SBNodeGroup](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeGroup.md#samson.SBNodeGroup) ###### Examples Create a group for the currently selected nodes and make this operation undoable. ```pycon >>> document = SAMSON.getActiveDocument() >>> if len(document.getSelectedNodes()): ... with SAMSON.holding('Create node group'): ... nodeGroup = document.groupSelection('Group name') ``` !!! note "See also" `createGroup`, `getSelectedNodes` ##### Method `samson.SBDocument.hasSelectedNodes` Signature: `hasSelectedNodes(self: samson.SBDocument) -> bool` Returns whether the document has any nodes selected. **Return type** - bool ###### Examples Print whether there are any nodes selected in the active document. ```pycon >>> document = SAMSON.getActiveDocument() >>> print(document.hasSelectedNodes()) False ``` !!! note "See also" `getSelectedNodes`, `clearSelection`, `groupSelection`, `addNodeToSelection`, `removeNodeFromSelection` ##### Method `samson.SBDocument.intersectGroupNodesWithSelection` Signature: `intersectGroupNodesWithSelection(self: samson.SBDocument, group: samson.SBNodeGroup) -> None` Keeps in the document selection only the nodes stored in this group. **Parameters** - **samson.SBNodeGroup** – A node group. !!! note "See also" `getSelectedNodes`, `clearSelection`, `addGroupNodesToSelection`, `removeGroupNodesFromSelection`, `selectGroupNodes` ##### Method `samson.SBDocument.removeGroupNodesFromSelection` Signature: `removeGroupNodesFromSelection(self: samson.SBDocument, group: samson.SBNodeGroup) -> None` Removes the group nodes from the document selection. **Parameters** - **samson.SBNodeGroup** – A node group. !!! note "See also" `getSelectedNodes`, `clearSelection`, `addGroupNodesToSelection`, `selectGroupNodes`, `intersectGroupNodesWithSelection` ##### Method `samson.SBDocument.removeNodeFromSelection` Signature: `removeNodeFromSelection(self: samson.SBDocument, node: samson.SBNode) -> None` Removes a node from the selection ##### Method `samson.SBDocument.selectGroupNodes` Signature: `selectGroupNodes(self: samson.SBDocument, group: samson.SBNodeGroup) -> None` Clears the document selection and select the group nodes. **Parameters** - **samson.SBNodeGroup** – A node group. !!! note "See also" `getSelectedNodes`, `clearSelection`, `addGroupNodesToSelection`, `removeGroupNodesFromSelection`, `intersectGroupNodesWithSelection` ##### Method `samson.SBDocument.setActiveCamera` Signature: `setActiveCamera(self: samson.SBDocument, camera: samson.SBCamera) -> None` Sets the active camera for the document. **Parameters** - **camera** ([*samson.SBCamera*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentCamera.md#samson.SBCamera)) – A camera in the document ###### Notes A created document always has at least one camera. ###### Examples Set the 1st camera in the document as the active one ```pycon >>> active_document = SAMSON.getActiveDocument() >>> camera_indexer = active_document.getNodes('node.type camera') >>> active_document.setActiveCamera(camera_indexer[0]) ``` !!! note "See also" `getActiveCamera` ##### Method `samson.SBDocument.setActivePresentation` Signature: `setActivePresentation(self: samson.SBDocument, presentation: samson.SBPresentation) -> None` Sets the active presentation for the document. **Parameters** - **presentation** ([*samson.SBPresentation*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentPresentation.md#samson.SBPresentation)) – A presentation in the document ###### Examples Set the 1st presentation in the document as the active one ```pycon >>> active_document = SAMSON.getActiveDocument() >>> presentation_indexer = active_document.getNodes('node.type presentation') >>> if presentation_indexer.size: ... active_document.setActivePresentation(presentation_indexer[0]) ``` !!! note "See also" `getActivePresentation` ##### Method `samson.SBDocument.setActiveStructuralModel` Signature: `setActiveStructuralModel(self: samson.SBDocument, structuralModel: samson.SBStructuralModel) -> None` Sets the active structural model. **Parameters** - **structuralModel** ([*samson.SBStructuralModel*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md#samson.SBStructuralModel)) – A structural model in the document ###### Examples Set the 1st structural model in the document as the active one ```pycon >>> active_document = SAMSON.getActiveDocument() >>> structural_model_indexer = active_document.getNodes('node.type structuralModel') >>> if structural_model_indexer.size: ... active_document.setActiveStructuralModel(structural_model_indexer[0]) ``` !!! note "See also" `getActiveStructuralModel` ##### Property `samson.SBDocument.fileName` Signature: `property fileName` The name of the file associated to the document ##### Property `samson.SBDocument.isSaved` Signature: `property isSaved` Returns whether the document is saved ##### Property `samson.SBDocument.isTrusted` Signature: `property isTrusted` Returns whether the document is trusted --- # SBAnimation Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentAnimation.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentAnimation.md See [Presenting and animating](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#ps-animating) section to learn how to create animations. !!! note "See also" Example: [Presentation: play path](https://documentation.samson-connect.net/scripting/latest/docs/examples/Example_PresentationPlayPath.md#ps-presentation-play-path) SAMSON SDK: [SBDDocumentAnimation](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDocumentAnimation/#) ## API Reference #### Class `samson.SBAnimation` Signature: `class samson.SBAnimation(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes an animation. Overloaded function. 1. __init__(self: samson.SBAnimation) -> None Constructs an animation 2. __init__(self: samson.SBAnimation, name: str, nodeIndexer: samson.SBNodeIndexer, frame: float) -> None Constructs an animation with *name* from the nodes in *nodeIndexer* at given *frame* 3. __init__(self: samson.SBAnimation, name: str, nodeIndexer: samson.SBNodeIndexer, frame: float, parameterMap: samson.SBValueMap) -> None Constructs an animation with *name* from the nodes in *nodeIndexer* at given *frame* and with *parameterMap*. ##### Class `samson.SBAnimation.Category` Signature: `class Category(self: samson.SBAnimation.Category, value: int)` Bases: `pybind11_object` **Members** - `Entrance`: Entrance - `Highlight`: Highlight - `Motion`: Motion - `Exit`: Exit - `Camera`: Camera - `Other`: Other ##### Method `samson.SBAnimation.addKeyframe` Signature: `addKeyframe(self: samson.SBAnimation, frame: float) -> bool` Adds a keyframe at frame frame ##### Method `samson.SBAnimation.canAddKeyframe` Signature: `canAddKeyframe(self: samson.SBAnimation, frame: float) -> bool` Returns whether it is possible to add a keyframe at frame frame ##### Method `samson.SBAnimation.canMoveKeyframe` Signature: `canMoveKeyframe(self: samson.SBAnimation, fromFrame: float, toFrame: float) -> bool` Returns whether it is possible to move the keyframe from frame fromFrame to frame toFrame ##### Method `samson.SBAnimation.canRemoveKeyframe` Signature: `canRemoveKeyframe(self: samson.SBAnimation, frame: float) -> bool` Returns whether it is possible to remove a keyframe at frame frame ##### Method `samson.SBAnimation.categoryString` Signature: `categoryString(self: samson.SBAnimation, humanReadable: bool = False) -> str` Returns a string describing the category of the animation ##### Method `samson.SBAnimation.getCategoryString` Signature: `static getCategoryString(category: samson.SBAnimation.Category, humanReadable: bool = False) -> str` Returns a string describing the category of the animation ##### Method `samson.SBAnimation.getIntervalIndex` Signature: `getIntervalIndex(self: samson.SBAnimation, keyframe: float) -> int` Returns the index of interval that contains *keyframe* (-1 if the keyframe is not in an interval). ##### Method `samson.SBAnimation.getKeyframeIndex` Signature: `getKeyframeIndex(self: samson.SBAnimation, keyframe: float) -> int` Returns the index of keyframe in the vector of keyframes (-1 if the keyframe is not present) ##### Method `samson.SBAnimation.getNextAnimation` Signature: `getNextAnimation(self: samson.SBAnimation) -> samson.SBAnimation` Returns the next animation ##### Method `samson.SBAnimation.getPreviousAnimation` Signature: `getPreviousAnimation(self: samson.SBAnimation) -> samson.SBAnimation` Returns the previous animation ##### Method `samson.SBAnimation.hasKeyframe` Signature: `hasKeyframe(self: samson.SBAnimation, frame: float) -> bool` Returns whether the animation has a keyframe at frame frame ##### Method `samson.SBAnimation.hasKeyframes` Signature: `hasKeyframes(self: samson.SBAnimation) -> bool` Returns whether the animation has keyframes ##### Method `samson.SBAnimation.moveKeyframe` Signature: `moveKeyframe(self: samson.SBAnimation, fromFrame: float, toFrame: float) -> bool` Moves the keyframe from frame fromFrame to frame toFrame ##### Method `samson.SBAnimation.removeKeyframe` Signature: `removeKeyframe(self: samson.SBAnimation, frame: float) -> bool` Removes a keyframe at frame frame ##### Attribute `samson.SBAnimation.Camera` Signature: `Camera = ` ##### Attribute `samson.SBAnimation.Entrance` Signature: `Entrance = ` ##### Attribute `samson.SBAnimation.Exit` Signature: `Exit = ` ##### Attribute `samson.SBAnimation.Highlight` Signature: `Highlight = ` ##### Attribute `samson.SBAnimation.Motion` Signature: `Motion = ` ##### Attribute `samson.SBAnimation.Other` Signature: `Other = ` ##### Property `samson.SBAnimation.beginKeyframe` Signature: `property beginKeyframe` Returns the first keyframe, or zero if there are no key frames. A read-only property. ##### Property `samson.SBAnimation.category` Signature: `property category` Returns the category of the animation. A read-only property. ##### Property `samson.SBAnimation.endKeyframe` Signature: `property endKeyframe` Returns the last keyframe, or zero if there are no key frames. A read-only property. ##### Property `samson.SBAnimation.numberOfKeyframes` Signature: `property numberOfKeyframes` Returns the number of keyframes. A read-only property. --- # SBCamera Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentCamera.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentCamera.md The `SBCamera` class implements all mechanisms related to cameras in SAMSON. A camera provides a 3D view of visualizable objects in SAMSON’s data graph, and can be easily controlled to point to a specific location, zoom in or out, translate, rotate, etc. Basically, you may consider your screen as a camera pointing into the viewport and yourself as an operator seeing through the camera. Cameras and their positions and properties are saved and loaded together with a [`document`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument). The currently active camera can be retrieved through the [`SAMSON`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#module-samson.SAMSON) interface: ```python # get the active camera of the active document camera = SAMSON.getActiveCamera() # make the change undoable with SAMSON.holding("Change camera"): # set the front view of the camera camera.frontView() camera.name = "Front view camera" ``` Let’s center a camera on all structural models in the active document. ```python # get a node indexer with all structural models in the active document nodeIndexer = SAMSON.getNodes('node.type sm') # make the change undoable with SAMSON.holding("Change camera"): # center the camera on the nodes in the nodeIndexer camera.center(nodeIndexer) ``` Let’s rotate a camera around some center with a given velocity. ```python # get all atoms nodeIndexer = SAMSON.getNodes('node.type atom') # compute the centroid center = SBStructuralModel.getCentroid(nodeIndexer) # rotate the camera numberOfRotations = 36 # the number of rotations # set the rotation velocity in x-direction velocity3 = SBRadianPerSecond3() # the zero vector velocity3.x = SBQuantity.radPerS(3.14159 / 180.0) # rotate several times in the loop for i in range(numberOfRotations): # rotate the camera once with the given velocity around the given center camera.rotate(velocity3, center) # request SAMSON to process events SAMSON.processEvents() ``` There can be multiple cameras in a document which might be useful if you want to switch fast between different views (e.g., positions, projections, close-up views, and a full view) in the same document. To switch between cameras in the document Caption: Change the active camera in a document ```python # get all cameras in the document cameraIndexer = document.getNodes("node.type camera") if len(cameraIndexer): # make the change undoable with SAMSON.holding("Change camera"): # change the document's active camera to the first camera in the document document.setActiveCamera(cameraIndexer[0]) ``` You can also change camera view, zoom it via SAMSON actions using [`SAMSON.runCommand()`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand) (see [Running actions](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md#ps-run-command)). The following actions are available: - Change view: ‘Top view’, ‘Bottom view’, ‘Front view’, ‘Back view’, ‘Left view’, ‘Right view’ - Zoom: ‘Zoom in’, ‘Zoom out’, ‘Zoom to fit’, ‘Zoom on selection’ - Changing projection: ‘Projection’ Caption: Change the camera view ```python # change the active camera's view using commands SAMSON.runCommand('Top view') ``` !!! note If you want to produce pictures, you can capture the current viewport using the [`SAMSON.captureViewportToFile`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.captureViewportToFile) function. !!! note "See also" SAMSON SDK: [SBDDocumentCamera](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDocumentCamera/#) ## API Reference #### Class `samson.SBCamera` Signature: `class samson.SBCamera(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes a camera. Overloaded function. 1. __init__(self: samson.SBCamera) -> None Constructs a camera. 2. __init__(self: samson.SBCamera, name: str) -> None Constructs a camera with the given name. **Parameters** - **name** (*str*) – A name of the camera. ##### Examples Add a camera to the active document and make this operation undoable. ```pycon >>> camera = SBCamera('New camera') >>> with SAMSON.holding('Add camera'): ... SAMSON.hold(camera) ... camera.create() ... SAMSON.getActiveDocument().addChild(camera) True ``` ##### Method `samson.SBCamera.alignWithAxis` Signature: `alignWithAxis(self: samson.SBCamera, nodeIndexer: samson.SBNodeIndexer, reversed: bool = False) -> None` Aligns the indexed nodes with the camera axis ##### Method `samson.SBCamera.alignWithPlane` Signature: `alignWithPlane(self: samson.SBCamera, nodeIndexer: samson.SBNodeIndexer, reversed: bool = False) -> None` Aligns the indexed nodes with the camera plane ##### Method `samson.SBCamera.backView` Signature: `backView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the back view ##### Method `samson.SBCamera.bottomView` Signature: `bottomView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the bottom view ##### Method `samson.SBCamera.center` Signature: `center(*args, **kwargs)` Overloaded function. 1. center(self: samson.SBCamera, immediate: bool = False) -> None Centers the camera 2. center(self: samson.SBCamera, nodeIndexer: samson.SBNodeIndexer, immediate: bool = False) -> None Centers the camera on the indexed nodes ##### Method `samson.SBCamera.defaultView` Signature: `defaultView(self: samson.SBCamera) -> None` Sets the view to default parameters ##### Method `samson.SBCamera.frontView` Signature: `frontView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the front view ##### Method `samson.SBCamera.getEyeDestination` Signature: `getEyeDestination(self: samson.SBCamera) -> samson.SBPhysicalVector3` Returns destination of the eye ##### Method `samson.SBCamera.getEyePosition` Signature: `getEyePosition(self: samson.SBCamera) -> samson.SBPhysicalVector3` Returns position of the eye ##### Method `samson.SBCamera.getEyeVelocity` Signature: `getEyeVelocity(self: samson.SBCamera) -> samson.SBPhysicalVector3` Returns velocity of the eye ##### Method `samson.SBCamera.getFrustumPositionFromWorldPosition` Signature: `getFrustumPositionFromWorldPosition(self: samson.SBCamera, worldPosition: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` Returns the projection in the frustum of the given world position ##### Method `samson.SBCamera.getHeadForwardVector` Signature: `getHeadForwardVector(self: samson.SBCamera) -> samson.SBPhysicalVector3` Returns the head forward vector ##### Method `samson.SBCamera.getHeadPosition` Signature: `getHeadPosition(self: samson.SBCamera) -> samson.SBPhysicalVector3` Returns position of the head ##### Method `samson.SBCamera.getHeadUpVector` Signature: `getHeadUpVector(self: samson.SBCamera) -> samson.SBPhysicalVector3` Returns the head up vector ##### Method `samson.SBCamera.getNextCamera` Signature: `getNextCamera(self: samson.SBCamera) -> samson.SBCamera` Returns the next camera. ##### Method `samson.SBCamera.getPreviousCamera` Signature: `getPreviousCamera(self: samson.SBCamera) -> samson.SBCamera` Returns the previous camera. ##### Method `samson.SBCamera.getProjectionMatrix` Signature: `getProjectionMatrix(self: samson.SBCamera) -> list[list[float]]` Returns the projection matrix ##### Method `samson.SBCamera.getProjectionMatrixTranspose` Signature: `getProjectionMatrixTranspose(self: samson.SBCamera) -> list[list[float]]` Returns the transpose of the projection matrix ##### Method `samson.SBCamera.getRotationVelocity` Signature: `getRotationVelocity(self: samson.SBCamera) -> samson.SBPhysicalVector3` Returns rotation velocity ##### Method `samson.SBCamera.getTargetDestination` Signature: `getTargetDestination(self: samson.SBCamera) -> samson.SBPhysicalVector3` Returns destination of the target ##### Method `samson.SBCamera.getTargetPosition` Signature: `getTargetPosition(self: samson.SBCamera) -> samson.SBPhysicalVector3` Returns position of the target ##### Method `samson.SBCamera.getTargetVelocity` Signature: `getTargetVelocity(self: samson.SBCamera) -> samson.SBPhysicalVector3` Returns velocity of the target ##### Method `samson.SBCamera.getUpVector` Signature: `getUpVector(self: samson.SBCamera) -> samson.SBPhysicalVector3` Returns up vector ##### Method `samson.SBCamera.getUpVectorDestination` Signature: `getUpVectorDestination(self: samson.SBCamera) -> samson.SBPhysicalVector3` Returns destination of the up vector ##### Method `samson.SBCamera.getViewMatrix` Signature: `getViewMatrix(self: samson.SBCamera) -> list[list[float]]` Returns the view matrix ##### Method `samson.SBCamera.getViewMatrixTranspose` Signature: `getViewMatrixTranspose(self: samson.SBCamera) -> list[list[float]]` Returns the transpose of the view matrix ##### Method `samson.SBCamera.getViewProjectionMatrix` Signature: `getViewProjectionMatrix(self: samson.SBCamera) -> list[list[float]]` Returns the view projection matrix ##### Method `samson.SBCamera.getViewProjectionMatrixTranspose` Signature: `getViewProjectionMatrixTranspose(self: samson.SBCamera) -> list[list[float]]` Returns the transpose of the view projection matrix ##### Method `samson.SBCamera.getViewProjectionMatrixTransposeInverse` Signature: `getViewProjectionMatrixTransposeInverse(self: samson.SBCamera) -> list[list[float]]` Returns the inverse of the transpose of the view projection matrix ##### Method `samson.SBCamera.getWorldPositionFromFrustumPosition` Signature: `getWorldPositionFromFrustumPosition(self: samson.SBCamera, frustumPosition: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` Returns the world position that corresponds to the frustum position ##### Method `samson.SBCamera.isMoving` Signature: `isMoving(self: samson.SBCamera) -> bool` Returns whether the camera is currently moving ##### Method `samson.SBCamera.leftBackBottomView` Signature: `leftBackBottomView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the left back bottom view ##### Method `samson.SBCamera.leftBackTopView` Signature: `leftBackTopView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the left back top view ##### Method `samson.SBCamera.leftFrontBottomView` Signature: `leftFrontBottomView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the left front bottom view ##### Method `samson.SBCamera.leftFrontTopView` Signature: `leftFrontTopView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the left front top view ##### Method `samson.SBCamera.leftView` Signature: `leftView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the left view ##### Method `samson.SBCamera.orientUpwards` Signature: `orientUpwards(self: samson.SBCamera, immediate: bool = False) -> None` Turns the camera around its Z vector to the upwards direction ##### Method `samson.SBCamera.rightBackBottomView` Signature: `rightBackBottomView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the right back bottom view ##### Method `samson.SBCamera.rightBackTopView` Signature: `rightBackTopView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the right back top view ##### Method `samson.SBCamera.rightFrontBottomView` Signature: `rightFrontBottomView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the right front bottom view ##### Method `samson.SBCamera.rightFrontTopView` Signature: `rightFrontTopView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the right front top view ##### Method `samson.SBCamera.rightView` Signature: `rightView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the right view ##### Method `samson.SBCamera.rotate` Signature: `rotate(*args, **kwargs)` Overloaded function. 1. rotate(self: samson.SBCamera, axis: samson.SBPhysicalVector3, angle: samson.SBQuantity.unitsSI, immediate: bool = False) -> None Rotates the camera 2. rotate(self: samson.SBCamera, velocity: samson.SBPhysicalVector3, center: samson.SBPhysicalVector3) -> None Rotates the camera ##### Method `samson.SBCamera.rotateClockwise` Signature: `rotateClockwise(self: samson.SBCamera, immediate: bool = False) -> None` Rotates the camera 45 degrees clockwise around its target ##### Method `samson.SBCamera.rotateCounterClockwise` Signature: `rotateCounterClockwise(self: samson.SBCamera, immediate: bool = False) -> None` Rotates the camera 45 degrees counterclockwise around its target ##### Method `samson.SBCamera.rotateDown` Signature: `rotateDown(self: samson.SBCamera, immediate: bool = False) -> None` Rotates the camera 45 degrees down around its target ##### Method `samson.SBCamera.rotateLeft` Signature: `rotateLeft(self: samson.SBCamera, immediate: bool = False) -> None` Rotates the camera 45 degrees left around its target ##### Method `samson.SBCamera.rotateRight` Signature: `rotateRight(self: samson.SBCamera, immediate: bool = False) -> None` Rotates the camera 45 degrees right around its target ##### Method `samson.SBCamera.rotateUp` Signature: `rotateUp(self: samson.SBCamera, immediate: bool = False) -> None` Rotates the camera 45 degrees up around its target ##### Method `samson.SBCamera.setEyeDestination` Signature: `setEyeDestination(self: samson.SBCamera, arg0: samson.SBPhysicalVector3) -> None` Sets destination of the eye ##### Method `samson.SBCamera.setEyePosition` Signature: `setEyePosition(self: samson.SBCamera, arg0: samson.SBPhysicalVector3) -> None` Sets position of the eye ##### Method `samson.SBCamera.setEyeVelocity` Signature: `setEyeVelocity(self: samson.SBCamera, arg0: samson.SBPhysicalVector3) -> None` Sets velocity of the eye ##### Method `samson.SBCamera.setHeadForwardVector` Signature: `setHeadForwardVector(self: samson.SBCamera, arg0: samson.SBPhysicalVector3) -> None` Sets the head forward vector ##### Method `samson.SBCamera.setHeadPosition` Signature: `setHeadPosition(self: samson.SBCamera, arg0: samson.SBPhysicalVector3) -> None` Sets position of the head ##### Method `samson.SBCamera.setHeadUpVector` Signature: `setHeadUpVector(self: samson.SBCamera, arg0: samson.SBPhysicalVector3) -> None` Sets the head up vector ##### Method `samson.SBCamera.setRotationVelocity` Signature: `setRotationVelocity(self: samson.SBCamera, arg0: samson.SBPhysicalVector3) -> None` Sets rotation velocity ##### Method `samson.SBCamera.setTargetDestination` Signature: `setTargetDestination(self: samson.SBCamera, arg0: samson.SBPhysicalVector3) -> None` Sets destination of the target ##### Method `samson.SBCamera.setTargetPosition` Signature: `setTargetPosition(self: samson.SBCamera, arg0: samson.SBPhysicalVector3) -> None` Sets position of the target ##### Method `samson.SBCamera.setTargetVelocity` Signature: `setTargetVelocity(self: samson.SBCamera, arg0: samson.SBPhysicalVector3) -> None` Sets velocity of the target ##### Method `samson.SBCamera.setUpVector` Signature: `setUpVector(self: samson.SBCamera, arg0: samson.SBPhysicalVector3) -> None` Sets up vector ##### Method `samson.SBCamera.setUpVectorDestination` Signature: `setUpVectorDestination(self: samson.SBCamera, arg0: samson.SBPhysicalVector3) -> None` Sets destination of the up vector ##### Method `samson.SBCamera.stop` Signature: `stop(self: samson.SBCamera) -> None` Stops the camera ##### Method `samson.SBCamera.topView` Signature: `topView(self: samson.SBCamera, immediate: bool = False) -> None` Goes to the top view ##### Method `samson.SBCamera.transform` Signature: `transform(self: samson.SBCamera, spatialTransform: samson.SBSpatialTransform, immediate: bool = False) -> None` Applies a spatial transform to the camera ##### Method `samson.SBCamera.translate` Signature: `translate(self: samson.SBCamera, velocity: samson.SBPhysicalVector3, immediate: bool = False) -> None` Translates the camera ##### Method `samson.SBCamera.updateState` Signature: `updateState(self: samson.SBCamera) -> bool` Updates the state of the camera and returns *True* if the camera moved ##### Method `samson.SBCamera.zoomIn` Signature: `zoomIn(self: samson.SBCamera, velocity: samson.SBQuantity.unitsSI, center: samson.SBPhysicalVector3) -> None` Zooms in ##### Method `samson.SBCamera.zoomOut` Signature: `zoomOut(self: samson.SBCamera, velocity: samson.SBQuantity.unitsSI, center: samson.SBPhysicalVector3) -> None` Zooms out ##### Method `samson.SBCamera.zoomTo` Signature: `zoomTo(self: samson.SBCamera, cameraTargetDestination: samson.SBPhysicalVector3) -> None` Zooms to a specific destination ##### Property `samson.SBCamera.aspectRatio` Signature: `property aspectRatio` The aspect ratio ##### Property `samson.SBCamera.autofocusFlag` Signature: `property autofocusFlag` The autofocus flag ##### Property `samson.SBCamera.basisX` Signature: `property basisX` The x vector of the camera basis ##### Property `samson.SBCamera.basisY` Signature: `property basisY` The y vector of the camera basis ##### Property `samson.SBCamera.basisZ` Signature: `property basisZ` The z vector of the camera basis ##### Property `samson.SBCamera.clippingRatio` Signature: `property clippingRatio` The clipping ratio ##### Property `samson.SBCamera.depthOfFieldFlag` Signature: `property depthOfFieldFlag` The depth of field flag ##### Property `samson.SBCamera.fNumber` Signature: `property fNumber` The f-number ##### Property `samson.SBCamera.farPlane` Signature: `property farPlane` The far plane ##### Property `samson.SBCamera.fieldOfViewAngleY` Signature: `property fieldOfViewAngleY` The field of view angle ##### Property `samson.SBCamera.fieldOfViewAngleYSingleStep` Signature: `property fieldOfViewAngleYSingleStep` The single-step value for the field-of-view angle in the Y direction. ##### Property `samson.SBCamera.fieldOfViewAngleYSuffix` Signature: `property fieldOfViewAngleYSuffix` The suffix used when displaying the field-of-view angle in the Y direction. ##### Property `samson.SBCamera.focalDistance` Signature: `property focalDistance` The focal distance ##### Property `samson.SBCamera.fogRatio` Signature: `property fogRatio` The fog ratio ##### Property `samson.SBCamera.getTransform` Signature: `property getTransform` The spatial transform ##### Property `samson.SBCamera.inertiaFlag` Signature: `property inertiaFlag` The inertia flag ##### Property `samson.SBCamera.maximumFieldOfViewAngleY` Signature: `property maximumFieldOfViewAngleY` The maximum field of view angle in the Y direction. ##### Property `samson.SBCamera.minimumFieldOfViewAngleY` Signature: `property minimumFieldOfViewAngleY` The minimum field of view angle in the Y direction. ##### Property `samson.SBCamera.nearPlane` Signature: `property nearPlane` The near plane ##### Property `samson.SBCamera.orthographicProjectionFlag` Signature: `property orthographicProjectionFlag` the orthographic projection flag --- # SBFile Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFile.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFile.md !!! note "See also" SAMSON SDK: [SBDDocumentFile](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDocumentFile/#) ## API Reference #### Class `samson.SBFile` Signature: `class samson.SBFile(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes a file. Overloaded function. 1. __init__(self: samson.SBFile) -> None Constructs a file. 2. __init__(self: samson.SBFile, name: str) -> None Constructs a file with the given name. 3. __init__(self: samson.SBFile, name: str, contents: str) -> None Constructs a file with the given name and contents. 4. __init__(self: samson.SBFile, name: str, contents: SBCContainerVector) -> None Constructs a file with the given name and contents. ##### Method `samson.SBFile.getCreationDate` Signature: `getCreationDate(self: samson.SBFile) -> samson.SBDateTime` Returns the creation date (in SAMSON). **Returns** - The creation date time **Return type** - [samson.SBDateTime](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBDateTime.md#samson.SBDateTime) ##### Method `samson.SBFile.getLastAccessDate` Signature: `getLastAccessDate(self: samson.SBFile) -> samson.SBDateTime` Returns the last access date (in SAMSON). **Returns** - The last access date **Return type** - [samson.SBDateTime](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBDateTime.md#samson.SBDateTime) ##### Method `samson.SBFile.getLastModificationDate` Signature: `getLastModificationDate(self: samson.SBFile) -> samson.SBDateTime` Returns the last modification date (in SAMSON). **Returns** - The last modification date **Return type** - [samson.SBDateTime](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBDateTime.md#samson.SBDateTime) ##### Method `samson.SBFile.getNextFile` Signature: `getNextFile(self: samson.SBFile) -> samson.SBFile` Returns the next file. ##### Method `samson.SBFile.getPreviousFile` Signature: `getPreviousFile(self: samson.SBFile) -> samson.SBFile` Returns the previous file. ##### Method `samson.SBFile.getSize` Signature: `getSize(self: samson.SBFile) -> int` Returns the file size ##### Method `samson.SBFile.getSizeString` Signature: `getSizeString(self: samson.SBFile) -> str` Returns the file size as a user-friendly string ##### Method `samson.SBFile.getText` Signature: `getText(self: samson.SBFile) -> str` Returns the contents of the file as a string ##### Method `samson.SBFile.setText` Signature: `setText(self: samson.SBFile, arg0: str) -> None` Sets the contents of the file from a string ##### Property `samson.SBFile.executable` Signature: `property executable` Whether the file’s the file is executable directly (only for Python scripts) or not. --- # SBFolder Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md This class describes a document folder. A document folder may contain various types of nodes: structural nodes, dynamical models, simulators, visual models, notes, labels, other folders, etc. Apart from possibility to get nodes using `samson.SBFolder.getNodes()` or `samson.SBFolder.getChildren()` function, `samson.SBFolder` provides additional functionality to get a list of nodes with specific types. Let’s for example get a list of folders inside of a folder: ```python # get a list of all folders in the given folder folderIndexer = folder.getFolderList() # print names of subfolders for f in folderIndexer: print(f) ``` Note that this function is not recursive. You can clone a folder with all its descendants as any other data graph node: ```python # clone the folder clonedFolder = folder.clone() # turn the undo system on with SAMSON.holding("Add new folder"): # hold the cloned folder instance SAMSON.hold(clonedFolder) # create the cloned folder clonedFolder.create() # add the cloned folder to the active document SAMSON.getActiveDocument().addChild(clonedFolder) ``` !!! note "See also" SAMSON SDK: [SBDDocumentFolder](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDocumentFolder/#) ## API Reference #### Class `samson.SBFolder` Signature: `class samson.SBFolder(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes a document folder. Overloaded function. 1. __init__(self: samson.SBFolder) -> None Constructs a folder. 2. __init__(self: samson.SBFolder, name: str) -> None Constructs a folder with the given name. **Parameters** - **name** (*str*) – A name of the folder. ##### Examples Add a folder to the active document and make this operation undoable. ```pycon >>> folder = SBFolder('New folder') >>> with SAMSON.holding('Add folder'): ... SAMSON.hold(folder) ... folder.create() ... SAMSON.getActiveDocument().addChild(folder) True ``` ##### Method `samson.SBFolder.getAnimationIndexer` Signature: `getAnimationIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of animations in this folder. ##### Method `samson.SBFolder.getAssetIndexer` Signature: `getAssetIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of assets in this folder. ##### Method `samson.SBFolder.getCameraIndexer` Signature: `getCameraIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of cameras in this folder. ##### Method `samson.SBFolder.getChildren` Signature: `getChildren(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of children of the folder ##### Method `samson.SBFolder.getConformationIndexer` Signature: `getConformationIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of conformations in this folder. ##### Method `samson.SBFolder.getControllerIndexer` Signature: `getControllerIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of controllers in this folder. ##### Method `samson.SBFolder.getDynamicalModelIndexer` Signature: `getDynamicalModelIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of dynamical models in this folder. ##### Method `samson.SBFolder.getFileIndexer` Signature: `getFileIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of files in this folder. ##### Method `samson.SBFolder.getFolderIndexer` Signature: `getFolderIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of folders in this folder. ##### Method `samson.SBFolder.getInteractionModelIndexer` Signature: `getInteractionModelIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of interaction models in this folder. ##### Method `samson.SBFolder.getLabelIndexer` Signature: `getLabelIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of labels in this folder. ##### Method `samson.SBFolder.getLightIndexer` Signature: `getLightIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of lights in this folder. ##### Method `samson.SBFolder.getModelIndexer` Signature: `getModelIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of models in this folder. ##### Method `samson.SBFolder.getNextFolder` Signature: `getNextFolder(self: samson.SBFolder) -> samson.SBFolder` Returns the next folder. ##### Method `samson.SBFolder.getNodeGroupIndexer` Signature: `getNodeGroupIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of node groups in this folder. ##### Method `samson.SBFolder.getNoteIndexer` Signature: `getNoteIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of notes in this folder. ##### Method `samson.SBFolder.getPathIndexer` Signature: `getPathIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of paths in this folder. ##### Method `samson.SBFolder.getPresentationIndexer` Signature: `getPresentationIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of presentations in this folder. ##### Method `samson.SBFolder.getPreviousFolder` Signature: `getPreviousFolder(self: samson.SBFolder) -> samson.SBFolder` Returns the previous folder. ##### Method `samson.SBFolder.getPropertyModelIndexer` Signature: `getPropertyModelIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of property models in this folder. ##### Method `samson.SBFolder.getRenderPresetIndexer` Signature: `getRenderPresetIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of render presets in this folder. ##### Method `samson.SBFolder.getSimulatorIndexer` Signature: `getSimulatorIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of simulators in this folder. ##### Method `samson.SBFolder.getStructuralModelIndexer` Signature: `getStructuralModelIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of structural models in this folder. ##### Method `samson.SBFolder.getVisualModelIndexer` Signature: `getVisualModelIndexer(self: samson.SBFolder) -> samson.SBNodeIndexer` Returns an indexer of visual models in this folder. ##### Method `samson.SBFolder.initialize` Signature: `initialize(self: samson.SBFolder) -> bool` Initializes the folder. ###### Notes This is a virtual function that might be overridden in classes based on SBFolder. --- # SBLabel Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentLabel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentLabel.md !!! note "See also" SAMSON SDK: [SBDDocumentLabel](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDocumentLabel/#) ## API Reference #### Class `samson.SBLabel` Signature: `class samson.SBLabel(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes a label. Overloaded function. 1. __init__(self: samson.SBLabel) -> None Constructs a label. 2. __init__(self: samson.SBLabel, name: str) -> None Constructs a label with the given name. ##### Method `samson.SBLabel.getNextLabel` Signature: `getNextLabel(self: samson.SBLabel) -> samson.SBLabel` Returns the next Label. ##### Method `samson.SBLabel.getPosition` Signature: `getPosition(self: samson.SBLabel) -> samson.SBPhysicalVector3` Returns the position of the label ##### Method `samson.SBLabel.getPreviousLabel` Signature: `getPreviousLabel(self: samson.SBLabel) -> samson.SBLabel` Returns the previous Label. ##### Method `samson.SBLabel.getViewportOffset` Signature: `getViewportOffset(self: samson.SBLabel) -> samson.SBPhysicalVector3` Returns the viewport offset on the position of the label ##### Method `samson.SBLabel.setViewportOffset` Signature: `setViewportOffset(self: samson.SBLabel, arg0: samson.SBPhysicalVector3) -> None` Sets the viewport offset on the position of the label ##### Method `samson.SBLabel.updateText` Signature: `updateText(self: samson.SBLabel) -> None` Updates the label’s text. ##### Property `samson.SBLabel.drawOnTop` Signature: `property drawOnTop` Whether label is rendered on top of other geometry. ##### Property `samson.SBLabel.drawOutline` Signature: `property drawOutline` Whether label text is rendered with an outline. ##### Property `samson.SBLabel.fontString` Signature: `property fontString` The string representation of the font of the label. ##### Property `samson.SBLabel.maximumDisplayRadius` Signature: `property maximumDisplayRadius` Maximum radius at which the label is displayed. ##### Property `samson.SBLabel.minimumDisplayRadius` Signature: `property minimumDisplayRadius` Minimum radius at which the label is displayed. ##### Property `samson.SBLabel.minimumLimitOfMaximumDisplayRadius` Signature: `property minimumLimitOfMaximumDisplayRadius` Lower limit for *maximumDisplayRadius*. ##### Property `samson.SBLabel.minimumLimitOfMinimumDisplayRadius` Signature: `property minimumLimitOfMinimumDisplayRadius` Lower limit for *minimumDisplayRadius*. ##### Property `samson.SBLabel.text` Signature: `property text` The label’s text. --- # SBLight Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentLight.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentLight.md This class implements all mechanisms related to lights in SAMSON which are used in rendering (path tracing). Lights have the following properties: - **position**, the default value is (0 nm, 0 nm, 40 nm) - **color**, the default value is white color - **radius**, the default value is 1 nm - **power**, the default value is 1 femtowatt Caption: Create and add a light ```python # construct a light node light = SBLight("Light") # change the light properties light.setPosition(SBPosition3(SBQuantity.nm(1), SBQuantity.nm(2), SBQuantity.nm(5))) light.setPower(SBQuantity.femtowatt(2.0)) light.setColor(SBColor(0, 200, 0)) # make the operation undoable with SAMSON.holding("Add light"): SAMSON.hold(light) # create a light node light.create() # add it to the active document SAMSON.getActiveDocument().addChild(light) ``` !!! note "See also" SAMSON SDK: [SBDDocumentLight](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDocumentLight/#) ## API Reference #### Class `samson.SBLight` Signature: `class samson.SBLight(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes a light. Overloaded function. 1. __init__(self: samson.SBLight) -> None Constructs a light. 2. __init__(self: samson.SBLight, name: str) -> None Constructs a light with the given name. ##### Method `samson.SBLight.getColor` Signature: `getColor(self: samson.SBLight) -> samson.SBColor` Returns the color ##### Method `samson.SBLight.getDefaultPower` Signature: `getDefaultPower(self: samson.SBLight) -> samson.SBQuantity.unitsSI` Returns the default power ##### Method `samson.SBLight.getDefaultRadius` Signature: `getDefaultRadius(self: samson.SBLight) -> samson.SBQuantity.unitsSI` Returns the default radius ##### Method `samson.SBLight.getMaximumPower` Signature: `getMaximumPower(self: samson.SBLight) -> samson.SBQuantity.unitsSI` Returns the maximum power ##### Method `samson.SBLight.getMaximumRadius` Signature: `getMaximumRadius(self: samson.SBLight) -> samson.SBQuantity.unitsSI` Returns the maximum radius ##### Method `samson.SBLight.getMinimumPower` Signature: `getMinimumPower(self: samson.SBLight) -> samson.SBQuantity.unitsSI` Returns the minimum power ##### Method `samson.SBLight.getMinimumRadius` Signature: `getMinimumRadius(self: samson.SBLight) -> samson.SBQuantity.unitsSI` Returns the minimum radius ##### Method `samson.SBLight.getNextLight` Signature: `getNextLight(self: samson.SBLight) -> samson.SBLight` Returns the next Light. ##### Method `samson.SBLight.getPosition` Signature: `getPosition(self: samson.SBLight) -> samson.SBPhysicalVector3` Get the position ##### Method `samson.SBLight.getPower` Signature: `getPower(self: samson.SBLight) -> samson.SBQuantity.unitsSI` Returns the power ##### Method `samson.SBLight.getPreviousLight` Signature: `getPreviousLight(self: samson.SBLight) -> samson.SBLight` Returns the previous Light. ##### Method `samson.SBLight.getRadius` Signature: `getRadius(self: samson.SBLight) -> samson.SBQuantity.unitsSI` Returns the radius ##### Method `samson.SBLight.setColor` Signature: `setColor(self: samson.SBLight, color: samson.SBColor) -> None` Sets the color ##### Method `samson.SBLight.setPosition` Signature: `setPosition(self: samson.SBLight, arg0: samson.SBPhysicalVector3) -> None` Set the position ##### Method `samson.SBLight.setPower` Signature: `setPower(self: samson.SBLight, arg0: samson.SBQuantity.unitsSI) -> None` Sets the power ##### Method `samson.SBLight.setRadius` Signature: `setRadius(self: samson.SBLight, arg0: samson.SBQuantity.unitsSI) -> None` Sets the radius ##### Property `samson.SBLight.activeFlag` Signature: `property activeFlag` Whether this light is active. --- # SBNote Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentNote.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentNote.md You can add notes in documents. They can be used, for example, to store experiment notebooks, descriptions, code snippets, etc. This notes can be accessed and modified from Python and in SAMSON using the **Inspector**. Caption: Create and add a note ```python # construct a note note = SBNote('Experiment note', 'A description of an experiment...') # make the operation undoable with SAMSON.holding('Add note'): SAMSON.hold(note) # create a note node note.create() # add it to the active document SAMSON.getActiveDocument().addChild(note) ``` !!! note "See also" SAMSON SDK: [SBDDocumentNote](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDocumentNote/#) ## API Reference #### Class `samson.SBNote` Signature: `class samson.SBNote(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes a note. Overloaded function. 1. __init__(self: samson.SBNote) -> None Constructs a note. 2. __init__(self: samson.SBNote, name: str) -> None Constructs a note with the given name. **Parameters** - **name** (*str*) – A name of the note. 3. __init__(self: samson.SBNote, name: str, text: str) -> None Constructs a note with the given name and text. **Parameters** - **name** (*str*) – A name of the note. - **text** (*str*) – A text in the note. ##### Examples Add a note to the active document and make this operation undoable. ```pycon >>> note = SBNote('Experiment note', 'A description of an experiment...') >>> with SAMSON.holding('Add note'): ... SAMSON.hold(note) ... note.create() ... SAMSON.getActiveDocument().addChild(note) True ``` ##### Method `samson.SBNote.getNextNote` Signature: `getNextNote(self: samson.SBNote) -> samson.SBNote` Returns the next Note. ##### Method `samson.SBNote.getPreviousNote` Signature: `getPreviousNote(self: samson.SBNote) -> samson.SBNote` Returns the previous Note. ##### Property `samson.SBNote.text` Signature: `property text` The note’s text. --- # SBPresentation Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentPresentation.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentPresentation.md !!! note "See also" [Presenting and animating](https://documentation.samson-connect.net/scripting/latest/docs/Animating.md#ps-animating) SAMSON SDK: [SBDDocumentPresentation](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDocumentPresentation/#) ## API Reference #### Class `samson.SBPresentation` Signature: `class samson.SBPresentation(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes a presentation. Overloaded function. 1. __init__(self: samson.SBPresentation) -> None Constructs a presentation. 2. __init__(self: samson.SBPresentation, arg0: str) -> None Constructs a presentation with the given name. **Parameters** - **name** (*str*) – A name of the presentation. ##### Examples Add a presentation to the active document and make this operation undoable. ```pycon >>> presentation = SBPresentation('New presentation') >>> with SAMSON.holding('Add presentation'): ... SAMSON.hold(presentation) ... presentation.create() ... SAMSON.getActiveDocument().addChild(presentation) True ``` ##### Method `samson.SBPresentation.getChildren` Signature: `getChildren(self: samson.SBPresentation) -> samson.SBNodeIndexer` Returns an indexer of children in this presentation. ##### Method `samson.SBPresentation.getNextPresentation` Signature: `getNextPresentation(self: samson.SBPresentation) -> samson.SBPresentation` Returns the next presentation. ##### Method `samson.SBPresentation.getPreviousPresentation` Signature: `getPreviousPresentation(self: samson.SBPresentation) -> samson.SBPresentation` Returns the previous presentation. ##### Method `samson.SBPresentation.initialize` Signature: `initialize(self: samson.SBPresentation) -> bool` Initializes the presentation. ###### Notes This is a virtual function that might be overridden in classes based on SBPresentation. ##### Property `samson.SBPresentation.beginFrame` Signature: `property beginFrame` The presentation’s begin frame. ##### Property `samson.SBPresentation.currentFrame` Signature: `property currentFrame` The presentation’s current frame. ##### Property `samson.SBPresentation.endFrame` Signature: `property endFrame` The presentation’s end frame. --- # SBRenderPreset Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentRenderPreset.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentRenderPreset.md This class describes a render preset that contains various rendering settings. You can add multiple render preset nodes in a document, copy them, and apply them to set the global rendering settings accordingly. The render preset has the following rendering settings which you can specify, including their parameters: - **Screen-Space Ambient occlusion (SSAO)**: kernel size, strength, radius, randomization - **Object-Space Ambient occlusion (OSAO)**: grid size, strength - **Anti-aliasing**: presets - **Background**: presets and background colors and image - **Bloom effect**: radius, threshold, strength - **Depth-of-field**: strenght, distance - **Fog**: strenght, near and far distances - **Grid**: spacing, thickness, radius, transparency - **Lighting**: parameters for first, second, and global lights - **Pinhole** effect: sharpness - **Scale**: minimum length, thickness - **Shadows**: preset, transparency, spread, offset - **Silhouettes**: color, transparency, thickness, distance threshold, fog attenuation - **Structural model rendering options**: atom and bond radii Caption: Create and add a render preset ```python # construct a render preset node renderPreset = SBRenderPreset("Render preset") # or create it based on the current rendering settings #renderPreset = SAMSON.createRenderPreset() # change the render preset properties # make the operation undoable with SAMSON.holding("Add render preset"): SAMSON.hold(renderPreset) # create a render preset node renderPreset.create() # add it to the active document SAMSON.getActiveDocument().addChild(renderPreset) ``` You can then simply apply the render preset to change the rendering settings. Caption: Apply a render preset ```python # make the operation undoable with SAMSON.holding("Apply render preset"): # apply a render preset renderPreset.apply() ``` !!! note "See also" SAMSON SDK: [SBDDocumentRenderPreset](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDDocumentRenderPreset/#) [Rendering](https://documentation.samson-connect.net/scripting/latest/docs/Rendering.md#ps-rendering) ## API Reference #### Class `samson.SBRenderPreset` Signature: `class samson.SBRenderPreset(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes a render preset. Overloaded function. 1. __init__(self: samson.SBRenderPreset) -> None Constructs a render preset. 2. __init__(self: samson.SBRenderPreset, name: str) -> None Constructs a render preset with the given name. ##### Class `samson.SBRenderPreset.AntiAliasingPreset` Signature: `class AntiAliasingPreset(self: samson.SBRenderPreset.AntiAliasingPreset, value: int)` Bases: `pybind11_object` **Members** - `BestSpeed`: The anti-aliasing preset for the best speed (low quality) - `BetterSpeed`: The anti-aliasing preset for the better speed (medium quality) - `HigherQuality`: The anti-aliasing preset for the higher quality - `HighestQuality`: The anti-aliasing preset for the highest quality - `Custom`: A custom anti-aliasing preset ##### Class `samson.SBRenderPreset.BackgroundImageMode` Signature: `class BackgroundImageMode(self: samson.SBRenderPreset.BackgroundImageMode, value: int)` Bases: `pybind11_object` **Members** - `ContainedInViewport`: Background image is fully contained in the viewport - `CoveringViewport`: Background image is covering in the viewport ##### Class `samson.SBRenderPreset.BackgroundType` Signature: `class BackgroundType(self: samson.SBRenderPreset.BackgroundType, value: int)` Bases: `pybind11_object` **Members** - `Default`: The default background - `White`: White background - `Black`: Black background - `Custom`: Custom background changing from top color to bottom color - `Image`: Image as a background ##### Class `samson.SBRenderPreset.ClippingPreset` Signature: `class ClippingPreset(self: samson.SBRenderPreset.ClippingPreset, value: int)` Bases: `pybind11_object` **Members** - `FineHalftone`: A fine halftone clipping preset (default) - `CoarseHalftone`: A coarse halftone clipping preset - `LowFrequencyNoise`: A low-frequency noise clipping preset - `HighFrequencyNoise`: A high-frequency noise clipping preset - `Sharp`: A sharp clipping preset - `Custom`: A custom clipping preset ##### Class `samson.SBRenderPreset.LightingPreset` Signature: `class LightingPreset(self: samson.SBRenderPreset.LightingPreset, value: int)` Bases: `pybind11_object` **Members** - `Default`: The default 3D lighting preset - `FlatLight`: The flat lighting preset - `Custom`: A custom lighting preset ##### Class `samson.SBRenderPreset.ShadowPreset` Signature: `class ShadowPreset(self: samson.SBRenderPreset.ShadowPreset, value: int)` Bases: `pybind11_object` **Members** - `LowQuality`: Low quality shadows - `MediumQuality`: Medium quality shadows - `HighQuality`: High quality shadows - `SoftShadow`: Soft shadows (highest quality) - `Custom`: A custom shadow preset ##### Method `samson.SBRenderPreset.apply` Signature: `apply(self: samson.SBRenderPreset) -> None` Applies the render preset. This function applies the render preset by setting the rendering preferences in the Main Preferences according to the render preset. This function is undoable. It calls SAMSON.beginHolding and SAMSON.endHolding internally. ##### Method `samson.SBRenderPreset.clearBackgroundImageBase64` Signature: `clearBackgroundImageBase64(self: samson.SBRenderPreset) -> None` Clears the background image. ##### Method `samson.SBRenderPreset.getAntiAliasingPresetString` Signature: `static getAntiAliasingPresetString(arg0: samson.SBRenderPreset.AntiAliasingPreset) -> str` Returns a human-readable string representation of the anti-aliasing preset *preset*. ##### Method `samson.SBRenderPreset.getBackgroundBottomColor` Signature: `getBackgroundBottomColor(self: samson.SBRenderPreset) -> samson.SBColor` Returns the background bottom color. ##### Method `samson.SBRenderPreset.getBackgroundImageModeString` Signature: `static getBackgroundImageModeString(arg0: samson.SBRenderPreset.BackgroundImageMode) -> str` Returns a human-readable string representation of the background image mode *mode*. ##### Method `samson.SBRenderPreset.getBackgroundTopColor` Signature: `getBackgroundTopColor(self: samson.SBRenderPreset) -> samson.SBColor` Returns the background top color. ##### Method `samson.SBRenderPreset.getBackgroundTypeString` Signature: `static getBackgroundTypeString(arg0: samson.SBRenderPreset.BackgroundType) -> str` Returns a human-readable string representation of the background type *type*. ##### Method `samson.SBRenderPreset.getBondRadius` Signature: `getBondRadius(self: samson.SBRenderPreset) -> samson.SBQuantity.unitsSI` Return the bond radius. ##### Method `samson.SBRenderPreset.getClippingPresetString` Signature: `static getClippingPresetString(arg0: samson.SBRenderPreset.ClippingPreset) -> str` Returns a human-readable string representation of the clipping preset *preset*. ##### Method `samson.SBRenderPreset.getConstantAtomRadius` Signature: `getConstantAtomRadius(self: samson.SBRenderPreset) -> samson.SBQuantity.unitsSI` Return the constant atom radius. ##### Method `samson.SBRenderPreset.getDefaultBondRadius` Signature: `static getDefaultBondRadius(arg0: samson.SBRenderPreset) -> samson.SBQuantity.unitsSI` Return the default bond radius. ##### Method `samson.SBRenderPreset.getDefaultConstantAtomRadius` Signature: `static getDefaultConstantAtomRadius() -> samson.SBQuantity.unitsSI` Return the default constant atom radius. ##### Method `samson.SBRenderPreset.getDefaultDepthOfFieldDistance` Signature: `static getDefaultDepthOfFieldDistance() -> samson.SBQuantity.unitsSI` Return the default distance at which the depth-of-field effect begins. ##### Method `samson.SBRenderPreset.getDefaultFirstLightColor` Signature: `static getDefaultFirstLightColor() -> samson.SBColor` Returns the first light’s default color. ##### Method `samson.SBRenderPreset.getDefaultGridRadius` Signature: `static getDefaultGridRadius() -> samson.SBQuantity.unitsSI` Return the default grid radius. ##### Method `samson.SBRenderPreset.getDefaultGridSpacing` Signature: `static getDefaultGridSpacing() -> samson.SBQuantity.unitsSI` Return the default grid spacing. ##### Method `samson.SBRenderPreset.getDefaultGridThickness` Signature: `static getDefaultGridThickness() -> samson.SBQuantity.unitsSI` Return the default grid thickness. ##### Method `samson.SBRenderPreset.getDefaultSecondLightColor` Signature: `static getDefaultSecondLightColor() -> samson.SBColor` Returns the second light’s default color. ##### Method `samson.SBRenderPreset.getDefaultShadowOffset` Signature: `static getDefaultShadowOffset() -> samson.SBQuantity.unitsSI` Return the default offset between objects and their shadows. ##### Method `samson.SBRenderPreset.getDefaultSilhouetteColor` Signature: `static getDefaultSilhouetteColor() -> samson.SBColor` Returns the silhouette’s default color. ##### Method `samson.SBRenderPreset.getDefaultSilhouetteDistanceThreshold` Signature: `static getDefaultSilhouetteDistanceThreshold() -> samson.SBQuantity.unitsSI` Return the silhouette’s default distance threshold. ##### Method `samson.SBRenderPreset.getDepthOfFieldDistance` Signature: `getDepthOfFieldDistance(self: samson.SBRenderPreset) -> samson.SBQuantity.unitsSI` Return the distance at which the depth-of-field effect begins. ##### Method `samson.SBRenderPreset.getFirstLightColor` Signature: `getFirstLightColor(self: samson.SBRenderPreset) -> samson.SBColor` Returns the first light’s color. ##### Method `samson.SBRenderPreset.getGridRadius` Signature: `getGridRadius(self: samson.SBRenderPreset) -> samson.SBQuantity.unitsSI` Return the grid radius. ##### Method `samson.SBRenderPreset.getGridSpacing` Signature: `getGridSpacing(self: samson.SBRenderPreset) -> samson.SBQuantity.unitsSI` Return the grid spacing. ##### Method `samson.SBRenderPreset.getGridThickness` Signature: `getGridThickness(self: samson.SBRenderPreset) -> samson.SBQuantity.unitsSI` Return the grid thickness. ##### Method `samson.SBRenderPreset.getLightingPresetString` Signature: `static getLightingPresetString(arg0: samson.SBRenderPreset.LightingPreset) -> str` Returns a human-readable string representation of the lighting preset *preset*. ##### Method `samson.SBRenderPreset.getNextRenderPreset` Signature: `getNextRenderPreset(self: samson.SBRenderPreset) -> samson.SBRenderPreset` Returns the next render preset. ##### Method `samson.SBRenderPreset.getPreviousRenderPreset` Signature: `getPreviousRenderPreset(self: samson.SBRenderPreset) -> samson.SBRenderPreset` Returns the previous render preset. ##### Method `samson.SBRenderPreset.getSecondLightColor` Signature: `getSecondLightColor(self: samson.SBRenderPreset) -> samson.SBColor` Returns the second light’s color. ##### Method `samson.SBRenderPreset.getShadowOffset` Signature: `getShadowOffset(self: samson.SBRenderPreset) -> samson.SBQuantity.unitsSI` Return the offset between objects and their shadows. ##### Method `samson.SBRenderPreset.getShadowPresetString` Signature: `static getShadowPresetString(arg0: samson.SBRenderPreset.ShadowPreset) -> str` Returns a human-readable string representation of the shadow preset *preset*. ##### Method `samson.SBRenderPreset.getSilhouetteColor` Signature: `getSilhouetteColor(self: samson.SBRenderPreset) -> samson.SBColor` Returns the silhouette color. ##### Method `samson.SBRenderPreset.getSilhouetteDistanceThreshold` Signature: `getSilhouetteDistanceThreshold(self: samson.SBRenderPreset) -> samson.SBQuantity.unitsSI` Return the silhouette distance threshold. A pixel is considered to be part of the silhouette if the difference between the depth of one of its neighbors and its own depth is larger than this parameter. ##### Method `samson.SBRenderPreset.hasBackgroundImageBase64` Signature: `hasBackgroundImageBase64(self: samson.SBRenderPreset) -> bool` Returns whether a background image is set. ##### Method `samson.SBRenderPreset.setBackgroundBottomColor` Signature: `setBackgroundBottomColor(self: samson.SBRenderPreset, color: samson.SBColor) -> None` Sets the background bottom color. ##### Method `samson.SBRenderPreset.setBackgroundTopColor` Signature: `setBackgroundTopColor(self: samson.SBRenderPreset, color: samson.SBColor) -> None` Sets the background top color. ##### Method `samson.SBRenderPreset.setBondRadius` Signature: `setBondRadius(self: samson.SBRenderPreset, arg0: samson.SBQuantity.unitsSI) -> None` Set the bond radius. ##### Method `samson.SBRenderPreset.setConstantAtomRadius` Signature: `setConstantAtomRadius(self: samson.SBRenderPreset, arg0: samson.SBQuantity.unitsSI) -> None` Set the constant atom radius. ##### Method `samson.SBRenderPreset.setDepthOfFieldDistance` Signature: `setDepthOfFieldDistance(self: samson.SBRenderPreset, arg0: samson.SBQuantity.unitsSI) -> None` Set the distance at which the depth-of-field effect begins. ##### Method `samson.SBRenderPreset.setFirstLightColor` Signature: `setFirstLightColor(self: samson.SBRenderPreset, color: samson.SBColor) -> None` Sets the first light’s color. ##### Method `samson.SBRenderPreset.setGridRadius` Signature: `setGridRadius(self: samson.SBRenderPreset, arg0: samson.SBQuantity.unitsSI) -> None` Set the grid radius. ##### Method `samson.SBRenderPreset.setGridSpacing` Signature: `setGridSpacing(self: samson.SBRenderPreset, arg0: samson.SBQuantity.unitsSI) -> None` Set the grid spacing. ##### Method `samson.SBRenderPreset.setGridThickness` Signature: `setGridThickness(self: samson.SBRenderPreset, arg0: samson.SBQuantity.unitsSI) -> None` Set the grid thickness. ##### Method `samson.SBRenderPreset.setSecondLightColor` Signature: `setSecondLightColor(self: samson.SBRenderPreset, color: samson.SBColor) -> None` Sets the second light’s color. ##### Method `samson.SBRenderPreset.setShadowOffset` Signature: `setShadowOffset(self: samson.SBRenderPreset, arg0: samson.SBQuantity.unitsSI) -> None` Set the offset between objects and their shadows. ##### Method `samson.SBRenderPreset.setSilhouetteColor` Signature: `setSilhouetteColor(self: samson.SBRenderPreset, color: samson.SBColor) -> None` Sets the silhouette color. ##### Method `samson.SBRenderPreset.setSilhouetteDistanceThreshold` Signature: `setSilhouetteDistanceThreshold(self: samson.SBRenderPreset, arg0: samson.SBQuantity.unitsSI) -> None` Set the silhouette distance threshold. A pixel is considered to be part of the silhouette if the difference between the depth of one of its neighbors and its own depth is larger than this parameter. ##### Method `samson.SBRenderPreset.toString` Signature: `toString(self: samson.SBRenderPreset, offset: int = 0) -> str` Returns a string representation of the render preset with the full information on all the options ##### Attribute `samson.SBRenderPreset.BestSpeed` Signature: `BestSpeed = ` ##### Attribute `samson.SBRenderPreset.BetterSpeed` Signature: `BetterSpeed = ` ##### Attribute `samson.SBRenderPreset.Black` Signature: `Black = ` ##### Attribute `samson.SBRenderPreset.CoarseHalftone` Signature: `CoarseHalftone = ` ##### Attribute `samson.SBRenderPreset.ContainedInViewport` Signature: `ContainedInViewport = ` ##### Attribute `samson.SBRenderPreset.CoveringViewport` Signature: `CoveringViewport = ` ##### Attribute `samson.SBRenderPreset.Custom` Signature: `Custom = ` ##### Attribute `samson.SBRenderPreset.Default` Signature: `Default = ` ##### Property `samson.SBRenderPreset.FXAAFlag` Signature: `property FXAAFlag` The Fast Approximate Anti-Aliasing (FXAA) slightly slows down rendering but greatly reduces aliasing artefacts (jagged edges). ##### Attribute `samson.SBRenderPreset.FineHalftone` Signature: `FineHalftone = ` ##### Attribute `samson.SBRenderPreset.FlatLight` Signature: `FlatLight = ` ##### Attribute `samson.SBRenderPreset.HighFrequencyNoise` Signature: `HighFrequencyNoise = ` ##### Attribute `samson.SBRenderPreset.HighQuality` Signature: `HighQuality = ` ##### Attribute `samson.SBRenderPreset.HigherQuality` Signature: `HigherQuality = ` ##### Attribute `samson.SBRenderPreset.HighestQuality` Signature: `HighestQuality = ` ##### Attribute `samson.SBRenderPreset.Image` Signature: `Image = ` ##### Attribute `samson.SBRenderPreset.LowFrequencyNoise` Signature: `LowFrequencyNoise = ` ##### Attribute `samson.SBRenderPreset.LowQuality` Signature: `LowQuality = ` ##### Attribute `samson.SBRenderPreset.MediumQuality` Signature: `MediumQuality = ` ##### Property `samson.SBRenderPreset.OSAOFlag` Signature: `property OSAOFlag` Whether the object-space ambient occlusion (OSAO) is on or off. Ambient occlusion improves the perception of depth in molecules, by simulating the fact that deeper regions are less accessible to light and are thus darker. Object-space ambient occlusion (OSAO) is more realistic, but slower. Adjust the strength (*OSAOStrength*) of the effect to make objects lighter or darker. ##### Property `samson.SBRenderPreset.OSAOGridSize` Signature: `property OSAOGridSize` The precision of the ambient occlusion effect (higher is better and slower) ##### Property `samson.SBRenderPreset.OSAOStrength` Signature: `property OSAOStrength` The strength of the ambient occlusion term. ##### Property `samson.SBRenderPreset.SSAOFlag` Signature: `property SSAOFlag` Whether the screen-space ambient occlusion (SSAO) effect os on or off. Ambient occlusion improves the perception of depth in molecules, by simulating the fact that deeper regions are less accessible to light and are thus darker. Screen-space ambient occlusion (SSAO) efficiently provides an approximate simulation, but is sensitive to the distance to the camera. Adjust the strength (*SSAOStrength*) of the effect to make objects lighter or darker. ##### Property `samson.SBRenderPreset.SSAOKernelSize` Signature: `property SSAOKernelSize` The kernel size influences the quality (higher is better and slower). ##### Property `samson.SBRenderPreset.SSAORadius` Signature: `property SSAORadius` The size of the potentially occluding region. Larger radii emphasize larger structures. ##### Property `samson.SBRenderPreset.SSAORandomization` Signature: `property SSAORandomization` A randomization term to smooth the ambient occlusion effect. ##### Property `samson.SBRenderPreset.SSAOStrength` Signature: `property SSAOStrength` The strength of the ambient occlusion term. ##### Attribute `samson.SBRenderPreset.Sharp` Signature: `Sharp = ` ##### Attribute `samson.SBRenderPreset.SoftShadow` Signature: `SoftShadow = ` ##### Attribute `samson.SBRenderPreset.White` Signature: `White = ` ##### Property `samson.SBRenderPreset.ambientLight` Signature: `property ambientLight` The global light’s ambient light. ##### Property `samson.SBRenderPreset.antiAliasingMultisamplingFactor` Signature: `property antiAliasingMultisamplingFactor` The multisampling factor of anti-aliasing (MSAA) determines how many pixels are actually computed for each rendered pixel (higher is better and slower). ##### Property `samson.SBRenderPreset.antiAliasingPreset` Signature: `property antiAliasingPreset` The anti-aliasing preset (better is slower). ##### Property `samson.SBRenderPreset.atomRadiusRatioToVanDerWaalsRadius` Signature: `property atomRadiusRatioToVanDerWaalsRadius` The default atom size proportional to Van der Waals radius. ##### Property `samson.SBRenderPreset.backgroundImageBase64` Signature: `property backgroundImageBase64` The background image in base64. ##### Property `samson.SBRenderPreset.backgroundImageMode` Signature: `property backgroundImageMode` The background image mode. ##### Property `samson.SBRenderPreset.backgroundType` Signature: `property backgroundType` The background type. ##### Property `samson.SBRenderPreset.bloomFlag` Signature: `property bloomFlag` The bloom rendering option produces highlights on the brightest parts of the image. ##### Property `samson.SBRenderPreset.bloomRadius` Signature: `property bloomRadius` The bloom radius. ##### Property `samson.SBRenderPreset.bloomStrength` Signature: `property bloomStrength` The bloom strength. ##### Property `samson.SBRenderPreset.bloomThreshold` Signature: `property bloomThreshold` The bloom threshold. ##### Property `samson.SBRenderPreset.clippingBorderSize` Signature: `property clippingBorderSize` The clipping border size. ##### Property `samson.SBRenderPreset.clippingHalftoneAmplitude` Signature: `property clippingHalftoneAmplitude` The the wave amplitude of clipping. ##### Property `samson.SBRenderPreset.clippingHalftoneFrequency` Signature: `property clippingHalftoneFrequency` The the wave frequency of clipping. ##### Property `samson.SBRenderPreset.clippingNoiseAmplitude` Signature: `property clippingNoiseAmplitude` The the noise amplitude of clipping. ##### Property `samson.SBRenderPreset.clippingNoiseFrequency` Signature: `property clippingNoiseFrequency` The the noise frequency of clipping. ##### Property `samson.SBRenderPreset.clippingPreset` Signature: `property clippingPreset` The clipping preset. ##### Property `samson.SBRenderPreset.clippingTransitionSize` Signature: `property clippingTransitionSize` The clipping transition size. ##### Property `samson.SBRenderPreset.constantAtomRadiusFlag` Signature: `property constantAtomRadiusFlag` If *True* then render atoms with a constant atom radius, else render atoms with the atom size proportional to Van der Waals radius. ##### Attribute `samson.SBRenderPreset.defaultAmbientLight` Signature: `defaultAmbientLight = 0.10000000149011612` ##### Attribute `samson.SBRenderPreset.defaultAtomRadiusRatioToVanDerWaalsRadius` Signature: `defaultAtomRadiusRatioToVanDerWaalsRadius = 0.20000000298023224` ##### Attribute `samson.SBRenderPreset.defaultBloomRadius` Signature: `defaultBloomRadius = 10` ##### Attribute `samson.SBRenderPreset.defaultBloomStrength` Signature: `defaultBloomStrength = 1.0` ##### Attribute `samson.SBRenderPreset.defaultBloomThreshold` Signature: `defaultBloomThreshold = 0.8999999761581421` ##### Attribute `samson.SBRenderPreset.defaultDepthOfFieldStrength` Signature: `defaultDepthOfFieldStrength = 20.0` ##### Attribute `samson.SBRenderPreset.defaultFirstLightIntensity` Signature: `defaultFirstLightIntensity = 1.0` ##### Attribute `samson.SBRenderPreset.defaultFirstLightLatitude` Signature: `defaultFirstLightLatitude = 45` ##### Attribute `samson.SBRenderPreset.defaultFirstLightLongitude` Signature: `defaultFirstLightLongitude = -45` ##### Attribute `samson.SBRenderPreset.defaultFirstLightSpecularIntensity` Signature: `defaultFirstLightSpecularIntensity = 0.5` ##### Attribute `samson.SBRenderPreset.defaultFirstLightSpecularPower` Signature: `defaultFirstLightSpecularPower = 52.0` ##### Attribute `samson.SBRenderPreset.defaultFresnelIntensity` Signature: `defaultFresnelIntensity = 0.550000011920929` ##### Attribute `samson.SBRenderPreset.defaultFresnelPower` Signature: `defaultFresnelPower = 1.0` ##### Attribute `samson.SBRenderPreset.defaultGridTransparency` Signature: `defaultGridTransparency = 50` ##### Attribute `samson.SBRenderPreset.defaultOSAOGridSize` Signature: `defaultOSAOGridSize = 16` ##### Attribute `samson.SBRenderPreset.defaultOSAOStrength` Signature: `defaultOSAOStrength = 0.5` ##### Attribute `samson.SBRenderPreset.defaultPinholeSharpness` Signature: `defaultPinholeSharpness = 1` ##### Attribute `samson.SBRenderPreset.defaultSSAOKernelSize` Signature: `defaultSSAOKernelSize = 4` ##### Attribute `samson.SBRenderPreset.defaultSSAORadius` Signature: `defaultSSAORadius = 200.0` ##### Attribute `samson.SBRenderPreset.defaultSSAORandomization` Signature: `defaultSSAORandomization = 150.0` ##### Attribute `samson.SBRenderPreset.defaultSSAOStrength` Signature: `defaultSSAOStrength = 0.6499999761581421` ##### Attribute `samson.SBRenderPreset.defaultScalePasses` Signature: `defaultScalePasses = 100` ##### Attribute `samson.SBRenderPreset.defaultScaleThickness` Signature: `defaultScaleThickness = 2` ##### Attribute `samson.SBRenderPreset.defaultSecondLightIntensity` Signature: `defaultSecondLightIntensity = 0.25` ##### Attribute `samson.SBRenderPreset.defaultSecondLightLatitude` Signature: `defaultSecondLightLatitude = -45` ##### Attribute `samson.SBRenderPreset.defaultSecondLightLongitude` Signature: `defaultSecondLightLongitude = 45` ##### Attribute `samson.SBRenderPreset.defaultSecondLightSpecularIntensity` Signature: `defaultSecondLightSpecularIntensity = 0.5` ##### Attribute `samson.SBRenderPreset.defaultSecondLightSpecularPower` Signature: `defaultSecondLightSpecularPower = 8.0` ##### Attribute `samson.SBRenderPreset.defaultShadowMultisamplingFactor` Signature: `defaultShadowMultisamplingFactor = 2` ##### Attribute `samson.SBRenderPreset.defaultShadowResolution` Signature: `defaultShadowResolution = 3` ##### Attribute `samson.SBRenderPreset.defaultShadowSpread` Signature: `defaultShadowSpread = 9.999999747378752e-05` ##### Attribute `samson.SBRenderPreset.defaultShadowTransparency` Signature: `defaultShadowTransparency = 60` ##### Attribute `samson.SBRenderPreset.defaultSilhouetteThickness` Signature: `defaultSilhouetteThickness = 1` ##### Attribute `samson.SBRenderPreset.defaultSilhouetteTransparency` Signature: `defaultSilhouetteTransparency = 20` ##### Property `samson.SBRenderPreset.depthOfFieldFlag` Signature: `property depthOfFieldFlag` This effect simulates the depth-of-field effect produced by actual cameras (e.g. blurred distant objects). If enabled, when you zoom in the molecule its distant parts will be blurred. ##### Property `samson.SBRenderPreset.depthOfFieldStrength` Signature: `property depthOfFieldStrength` The strength of the depth-of-field effect. ##### Property `samson.SBRenderPreset.descriptionForInspector` Signature: `property descriptionForInspector` A text description shown in the Inspector. ##### Property `samson.SBRenderPreset.firstLightIntensity` Signature: `property firstLightIntensity` The first light’s intensity. ##### Property `samson.SBRenderPreset.firstLightLatitude` Signature: `property firstLightLatitude` The first light’s latitude. ##### Property `samson.SBRenderPreset.firstLightLongitude` Signature: `property firstLightLongitude` The first light’s longitude. ##### Property `samson.SBRenderPreset.firstLightSpecularIntensity` Signature: `property firstLightSpecularIntensity` The first light’s specular intensity. The intensity of the light reflection on surfaces. High values make surfaces look like plastic, while low values make surfaces look matte.

Changes from 0 to 1. ##### Property `samson.SBRenderPreset.firstLightSpecularPower` Signature: `property firstLightSpecularPower` The first light’s specular power. The decay of specular reflection. High values produce sharper specular reflections and make materials look shinier. ##### Property `samson.SBRenderPreset.fresnelIntensity` Signature: `property fresnelIntensity` The global light’s fresnel intensity. Fresnel intensity influences how much light is reflected at grazing angles (higher is stronger). ##### Property `samson.SBRenderPreset.fresnelPower` Signature: `property fresnelPower` The global light’s fresnel power. Fresnel power influences how materials reflect light at grazing angles (lower decreases the influence of the angle). ##### Property `samson.SBRenderPreset.gridFlag` Signature: `property gridFlag` The grid can provide an indication of the objects sizes, and can help when constructing molecular systems. ##### Property `samson.SBRenderPreset.gridTransparency` Signature: `property gridTransparency` The grid transparency. ##### Property `samson.SBRenderPreset.isCustomBackground` Signature: `property isCustomBackground` A convenience function that return true if the custom gradient background is chosen. ##### Property `samson.SBRenderPreset.isImageBackground` Signature: `property isImageBackground` A convenience function that return true if the image background is chosen. ##### Property `samson.SBRenderPreset.lightingPreset` Signature: `property lightingPreset` The lighting preset. ##### Property `samson.SBRenderPreset.pinholeFlag` Signature: `property pinholeFlag` The pinhole effect makes objects less visible when they are far from the center of the viewport. ##### Property `samson.SBRenderPreset.pinholeSharpness` Signature: `property pinholeSharpness` The pinhole sharpness. ##### Property `samson.SBRenderPreset.renderMultipleBondsFlag` Signature: `property renderMultipleBondsFlag` If *True* then render multiple bonds explicitly (default), else the order of a bond is represented by its thickness. ##### Property `samson.SBRenderPreset.scaleFlag` Signature: `property scaleFlag` The scale, shown in the bottom right part of the viewport, provides an indication of the objects sizes in the plane of the camera, i.e. the plane containing the camera target. ##### Property `samson.SBRenderPreset.scalePasses` Signature: `property scalePasses` The scale’s minimum lengths, in pixels. ##### Property `samson.SBRenderPreset.scaleThickness` Signature: `property scaleThickness` The scale thickness, in pixels. ##### Property `samson.SBRenderPreset.secondLightIntensity` Signature: `property secondLightIntensity` The second light’s intensity. ##### Property `samson.SBRenderPreset.secondLightLatitude` Signature: `property secondLightLatitude` The second light’s latitude. ##### Property `samson.SBRenderPreset.secondLightLongitude` Signature: `property secondLightLongitude` The second light’s longitude. ##### Property `samson.SBRenderPreset.secondLightSpecularIntensity` Signature: `property secondLightSpecularIntensity` The second light’s specular intensity. The intensity of the light reflection on surfaces. High values make surfaces look like plastic, while low values make surfaces look matte.

Changes from 0 to 1. ##### Property `samson.SBRenderPreset.secondLightSpecularPower` Signature: `property secondLightSpecularPower` The second light’s specular power. The decay of specular reflection. High values produce sharper specular reflections and make materials look shinier. ##### Property `samson.SBRenderPreset.shadowFlag` Signature: `property shadowFlag` Shadow are particularly helpful to improve the perception of relative positions. Note: on old graphics card you may want to either disable shadow or choose the lowest preset. ##### Property `samson.SBRenderPreset.shadowMultisamplingFactor` Signature: `property shadowMultisamplingFactor` The shadow’s multisampling factor (higher is better and slower). ##### Property `samson.SBRenderPreset.shadowPreset` Signature: `property shadowPreset` The preset for rendering shadow (better is slower). ##### Property `samson.SBRenderPreset.shadowResolution` Signature: `property shadowResolution` The resolution of shadow (higher is better and slower). ##### Property `samson.SBRenderPreset.shadowSpread` Signature: `property shadowSpread` The spread of shadow (higher is softer). ##### Property `samson.SBRenderPreset.shadowTransparency` Signature: `property shadowTransparency` The shadow transparency. ##### Property `samson.SBRenderPreset.silhouetteFlag` Signature: `property silhouetteFlag` Silhouettes make it easier to separate regions with different depths. ##### Property `samson.SBRenderPreset.silhouetteFogAttenuationFlag` Signature: `property silhouetteFogAttenuationFlag` Whether fog attenuates silhouettes of distant objects. ##### Property `samson.SBRenderPreset.silhouetteThickness` Signature: `property silhouetteThickness` The silhouette thickness, in pixels. ##### Property `samson.SBRenderPreset.silhouetteTransparency` Signature: `property silhouetteTransparency` The silhouette transparency. --- # Palette Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette.md This group contains classes related to color palettes. Palettes are especially useful when you want to map numeric values or categories to colors in a consistent way. Please refer to [`samson.SBPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette) and [Apply color from color palette](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-apply-color-via-palette). !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) [Apply color from color palette](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-apply-color-via-palette) SAMSON SDK: [The SBDPalette Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/DataModel/Palette/#) - [SBPalette](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md) - [SBPaletteDefaultPalette](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDefaultPalette.md) - [SBPaletteDiscrete](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDiscrete.md) - [SBPaletteDiverging](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDiverging.md) - [SBPaletteDivergingHCL](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDivergingHCL.md) - [SBPaletteFlexibleDivergingHCL](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteFlexibleDivergingHCL.md) - [SBPaletteQualitative](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteQualitative.md) - [SBPaletteQualitativeHCL](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteQualitativeHCL.md) - [SBPaletteSequential](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteSequential.md) - [SBPaletteSequentialHCL](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteSequentialHCL.md) --- # SBPalette Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md This class is a base class for color palettes. The default implementation describes the HSV (Hue, Saturation, Value) color palette. !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDPalette](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDPalette/#) ## API Reference #### Class `samson.SBPalette` Signature: `class samson.SBPalette(self: samson.SBPalette, reverse: bool = False)` Bases: `pybind11_object` This class is a base class for color palettes. Constructor for HSV color palette. **Parameters** - **reverse** (*bool**,**default=False*) – The reverse flag - whether the color palette is mirrored or not. ##### Class `samson.SBPalette.PaletteType` Signature: `class PaletteType(self: samson.SBPalette.PaletteType, value: int)` Bases: `pybind11_object` **Members** - `Custom`: An undefined type - a custom color palette which does not fall into any of other categories - `Qualitative`: A qualitative color palette type - for coding categorical information, i.e., where no particular ordering of categories is available and every color should receive the same perceptual weight. - `Sequential`: A sequential color palette type - for coding ordered/numeric information, i.e., going from high to low (or vice versa). - `Diverging`: A diverging color palette type - for coding ordered/numeric information around a central neutral value, i.e., where colors diverge from neutral to two extremes. - `FlexibleDiverging`: A flexible diverging color palette type - for coding ordered/numeric information around a central neutral value, i.e., where colors diverge from neutral to two extremes. - `Discrete`: A discrete color palette type. ##### Method `samson.SBPalette.clone` Signature: `clone(self: samson.SBPalette) -> samson.SBPalette` Returns a copy of the color palette. ##### Method `samson.SBPalette.getColor` Signature: `getColor(self: samson.SBPalette, x: float) -> samson.SBColor` Returns SBColor based on the palette and an intensity value *x* which should be in the range [0.0, 1.0]. **Parameters** - **x** (*float*) – An intensity value in the range [0.0, 1.0] **Returns** - A color. **Return type** - [samson.SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) ###### Examples ```pycon >>> palette = SBPaletteDefaultPalette.qualitativeHCLPastel >>> color = palette.getColor(0.5) >>> print(color) [0.599446, 0.885390, 0.848834, 1.000000] ``` ##### Method `samson.SBPalette.getColorInPaletteColorSpace` Signature: `getColorInPaletteColorSpace(self: samson.SBPalette, x: float) -> list[float]` Returns color coordinates in this palette’s color space for the given intensity value *x* value which should be in the range [0.0, 1.0]. **Parameters** - **x** (*float*) – An intensity value in the range [0.0, 1.0] **Returns** - A color in the color space of the color palette. **Return type** - [samson.SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) ###### Examples ```pycon >>> palette = SBPaletteDefaultPalette.flexibleDivergingHCLCividis >>> color = palette.getColorInPaletteColorSpace(0.75) >>> print(color) [75.0, 47.5, 72.0, 1.0] ``` ##### Method `samson.SBPalette.getColorVector` Signature: `getColorVector(self: samson.SBPalette, x: float) -> list[float]` Returns RGB color in a float vector based on the palette and an intensity value *x* value which should be in the range [0.0, 1.0]. **Parameters** - **x** (*float*) – An intensity value in the range [0.0, 1.0] **Returns** - An rgba color. **Return type** - list of 4 floats (rgba) ###### Examples ```pycon >>> palette = SBPaletteDefaultPalette.divergingHCLBlue2Red >>> color = palette.getColorVector(1.0) >>> print("[" + ", ".join(f"{x:.5g}" for x in color) + "]") # print only 5 digits [0.55801, 0.025099, 0.23243, 1] ``` ##### Method `samson.SBPalette.getValueAlongLinearTrajectory` Signature: `static getValueAlongLinearTrajectory(y1: float, y2: float, power: float, x: float) -> float` Returns a value along the linear trajectory or a power-transformed curve. :param y1: The start of the trajectory :type y1: float :param y2: The end of the trajectory :type y2: float :param power: A power parameter for the value *x*; if the power is equal to 1.0 the trajectory is linear, else it is a power-transformed curve :type power: float :param x: A value, should be in the range [0.0, 1.0]. :type x: float **Returns** - The value along the trajectory **Return type** - float ##### Method `samson.SBPalette.getValueAlongTriangularTrajectory` Signature: `static getValueAlongTriangularTrajectory(y1: float, ymax: float, y2: float, power: float, x: float) -> float` Returns a value along the triangular trajectory with linear or power-transformed curves. **Parameters** - **y1** (*float*) – The start of the trajectory - **ymax** (*float*) – The max value on the trajectory that defines the triangular shape. If it is smaller than *y1* or *y2* then it defaults to the linear trajectory between *y1* and *y2*. - **y2** (*float*) – The end of the trajectory - **power** (*float*) – A power parameter for the value *x*; if the power is equal to 1.0 the trajectories that constitute the triangular trajectory are linear, else they are power-transformed curves - **x** (*float*) – A value, should be in the range [0.0, 1.0]. **Returns** - The value along the “triangular” trajectory **Return type** - float ##### Attribute `samson.SBPalette.Custom` Signature: `Custom = ` ##### Attribute `samson.SBPalette.Discrete` Signature: `Discrete = ` ##### Attribute `samson.SBPalette.Diverging` Signature: `Diverging = ` ##### Attribute `samson.SBPalette.FlexibleDiverging` Signature: `FlexibleDiverging = ` ##### Attribute `samson.SBPalette.Qualitative` Signature: `Qualitative = ` ##### Attribute `samson.SBPalette.Sequential` Signature: `Sequential = ` ##### Property `samson.SBPalette.isSerializable` Signature: `property isSerializable` Returns *True* when the class is serializable ##### Property `samson.SBPalette.name` Signature: `property name` The color palette’s name. ##### Property `samson.SBPalette.reverseFlag` Signature: `property reverseFlag` The reverse flag - whether the color palette is mirrored or not. ##### Property `samson.SBPalette.type` Signature: `property type` The color palette’s type. --- # SBPaletteDefaultPalette Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDefaultPalette.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDefaultPalette.md This class contains pre-defined default palettes. Currently, it contains only HCL palettes. ```python palette = SBPaletteDefaultPalette.qualitativeHCLDynamic color = palette.getColor(0.75) ``` !!! note To see how these color palettes look like check User Guide: [Default color palettes](https://documentation.samson-connect.net/users/11.0.0/color-palettes/#) !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDPaletteDefaultPalette](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDPaletteDefaultPalette/#) ## API Reference #### Class `samson.SBPaletteDefaultPalette` Signature: `class samson.SBPaletteDefaultPalette` Bases: `pybind11_object` This class contains pre-defined default palettes. ##### Method `samson.SBPaletteDefaultPalette.getListOfDefaultHCLColorPalettes` Signature: `static getListOfDefaultHCLColorPalettes() -> list[samson.SBPalette]` Returns a list of all default HCL color palettes. **Returns** - A list of default HCL color palettes. **Return type** - list of [samson.SBPalette](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette) ##### Attribute `samson.SBPaletteDefaultPalette.discreteAccent` Signature: `discreteAccent = SBPaletteDefaultPalette.discreteAccent` ##### Attribute `samson.SBPaletteDefaultPalette.discreteCartoAntique` Signature: `discreteCartoAntique = SBPaletteDefaultPalette.discreteCartoAntique` ##### Attribute `samson.SBPaletteDefaultPalette.discreteCartoBold` Signature: `discreteCartoBold = SBPaletteDefaultPalette.discreteCartoBold` ##### Attribute `samson.SBPaletteDefaultPalette.discreteCartoPastel` Signature: `discreteCartoPastel = SBPaletteDefaultPalette.discreteCartoPastel` ##### Attribute `samson.SBPaletteDefaultPalette.discreteCartoPrism` Signature: `discreteCartoPrism = SBPaletteDefaultPalette.discreteCartoPrism` ##### Attribute `samson.SBPaletteDefaultPalette.discreteCartoSafe` Signature: `discreteCartoSafe = SBPaletteDefaultPalette.discreteCartoSafe` ##### Attribute `samson.SBPaletteDefaultPalette.discreteCartoVivid` Signature: `discreteCartoVivid = SBPaletteDefaultPalette.discreteCartoVivid` ##### Attribute `samson.SBPaletteDefaultPalette.discreteDark2` Signature: `discreteDark2 = SBPaletteDefaultPalette.discreteDark2` ##### Attribute `samson.SBPaletteDefaultPalette.discreteOkabeIto` Signature: `discreteOkabeIto = SBPaletteDefaultPalette.discreteOkabeIto` ##### Attribute `samson.SBPaletteDefaultPalette.discretePaired` Signature: `discretePaired = SBPaletteDefaultPalette.discretePaired` ##### Attribute `samson.SBPaletteDefaultPalette.discreteR4` Signature: `discreteR4 = SBPaletteDefaultPalette.discreteR4` ##### Attribute `samson.SBPaletteDefaultPalette.discreteSet1` Signature: `discreteSet1 = SBPaletteDefaultPalette.discreteSet1` ##### Attribute `samson.SBPaletteDefaultPalette.discreteSet2` Signature: `discreteSet2 = SBPaletteDefaultPalette.discreteSet2` ##### Attribute `samson.SBPaletteDefaultPalette.discreteSet3` Signature: `discreteSet3 = SBPaletteDefaultPalette.discreteSet3` ##### Attribute `samson.SBPaletteDefaultPalette.discreteTab10` Signature: `discreteTab10 = SBPaletteDefaultPalette.discreteTab10` ##### Attribute `samson.SBPaletteDefaultPalette.discreteTab20` Signature: `discreteTab20 = SBPaletteDefaultPalette.discreteTab20` ##### Attribute `samson.SBPaletteDefaultPalette.discreteTab20b` Signature: `discreteTab20b = SBPaletteDefaultPalette.discreteTab20b` ##### Attribute `samson.SBPaletteDefaultPalette.discreteTab20c` Signature: `discreteTab20c = SBPaletteDefaultPalette.discreteTab20c` ##### Attribute `samson.SBPaletteDefaultPalette.divergingHCLBerlin` Signature: `divergingHCLBerlin = SBPaletteDefaultPalette.divergingHCLBerlin` ##### Attribute `samson.SBPaletteDefaultPalette.divergingHCLBlue2Red` Signature: `divergingHCLBlue2Red = SBPaletteDefaultPalette.divergingHCLBlue2Red` ##### Attribute `samson.SBPaletteDefaultPalette.divergingHCLBlue2Red2` Signature: `divergingHCLBlue2Red2 = SBPaletteDefaultPalette.divergingHCLBlue2Red2` ##### Attribute `samson.SBPaletteDefaultPalette.divergingHCLBlue2Red3` Signature: `divergingHCLBlue2Red3 = SBPaletteDefaultPalette.divergingHCLBlue2Red3` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLArmyRose` Signature: `flexibleDivergingHCLArmyRose = SBPaletteDefaultPalette.flexibleDivergingHCLArmyRose` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLBrBG` Signature: `flexibleDivergingHCLBrBG = SBPaletteDefaultPalette.flexibleDivergingHCLBrBG` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLCividis` Signature: `flexibleDivergingHCLCividis = SBPaletteDefaultPalette.flexibleDivergingHCLCividis` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLEarth` Signature: `flexibleDivergingHCLEarth = SBPaletteDefaultPalette.flexibleDivergingHCLEarth` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLFall` Signature: `flexibleDivergingHCLFall = SBPaletteDefaultPalette.flexibleDivergingHCLFall` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLGeyser` Signature: `flexibleDivergingHCLGeyser = SBPaletteDefaultPalette.flexibleDivergingHCLGeyser` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLPRGn` Signature: `flexibleDivergingHCLPRGn = SBPaletteDefaultPalette.flexibleDivergingHCLPRGn` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLPiYG` Signature: `flexibleDivergingHCLPiYG = SBPaletteDefaultPalette.flexibleDivergingHCLPiYG` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLPuOr` Signature: `flexibleDivergingHCLPuOr = SBPaletteDefaultPalette.flexibleDivergingHCLPuOr` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLRdBu` Signature: `flexibleDivergingHCLRdBu = SBPaletteDefaultPalette.flexibleDivergingHCLRdBu` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLRdGy` Signature: `flexibleDivergingHCLRdGy = SBPaletteDefaultPalette.flexibleDivergingHCLRdGy` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLRdYlBu` Signature: `flexibleDivergingHCLRdYlBu = SBPaletteDefaultPalette.flexibleDivergingHCLRdYlBu` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLRdYlGn` Signature: `flexibleDivergingHCLRdYlGn = SBPaletteDefaultPalette.flexibleDivergingHCLRdYlGn` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLRoma` Signature: `flexibleDivergingHCLRoma = SBPaletteDefaultPalette.flexibleDivergingHCLRoma` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLSpectral` Signature: `flexibleDivergingHCLSpectral = SBPaletteDefaultPalette.flexibleDivergingHCLSpectral` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLTealRose` Signature: `flexibleDivergingHCLTealRose = SBPaletteDefaultPalette.flexibleDivergingHCLTealRose` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLTemps` Signature: `flexibleDivergingHCLTemps = SBPaletteDefaultPalette.flexibleDivergingHCLTemps` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLTropic` Signature: `flexibleDivergingHCLTropic = SBPaletteDefaultPalette.flexibleDivergingHCLTropic` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLZissou1` Signature: `flexibleDivergingHCLZissou1 = SBPaletteDefaultPalette.flexibleDivergingHCLZissou1` ##### Attribute `samson.SBPaletteDefaultPalette.flexibleDivergingHCLpLDDT` Signature: `flexibleDivergingHCLpLDDT = SBPaletteFlexibleDivergingHCL(hue1 = 15, hue2 = 60, hue3 = 260, chroma1 = 90, chroma2 = 100, chroma3 = 90, luminance1 = 50, luminance2 = 90, luminance3 = 30, chromaPower1 = 1.000000, luminancePower1 = 1.000000, chromaPower2 = 1.000000, luminancePower2 = 1.200000, maximumChroma1 = 90, maximumChroma2 = 90, neutralPoint = 0.600000, name = "Flexible diverging: pLDDT")` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLBlue2Green` Signature: `qualitativeHCLBlue2Green = SBPaletteDefaultPalette.qualitativeHCLBlue2Green` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLBlue2GreenDark` Signature: `qualitativeHCLBlue2GreenDark = SBPaletteDefaultPalette.qualitativeHCLBlue2GreenDark` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLBlue2Red` Signature: `qualitativeHCLBlue2Red = SBPaletteDefaultPalette.qualitativeHCLBlue2Red` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLBlue2RedDark` Signature: `qualitativeHCLBlue2RedDark = SBPaletteDefaultPalette.qualitativeHCLBlue2RedDark` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLCold` Signature: `qualitativeHCLCold = SBPaletteDefaultPalette.qualitativeHCLCold` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLDark2` Signature: `qualitativeHCLDark2 = SBPaletteDefaultPalette.qualitativeHCLDark2` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLDark3` Signature: `qualitativeHCLDark3 = SBPaletteDefaultPalette.qualitativeHCLDark3` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLDefault` Signature: `qualitativeHCLDefault = SBPaletteDefaultPalette.qualitativeHCLDefault` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLDynamic` Signature: `qualitativeHCLDynamic = SBPaletteDefaultPalette.qualitativeHCLDynamic` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLGreen2Blue` Signature: `qualitativeHCLGreen2Blue = SBPaletteDefaultPalette.qualitativeHCLGreen2Blue` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLGreen2BlueDark` Signature: `qualitativeHCLGreen2BlueDark = SBPaletteDefaultPalette.qualitativeHCLGreen2BlueDark` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLGreen2Red` Signature: `qualitativeHCLGreen2Red = SBPaletteDefaultPalette.qualitativeHCLGreen2Red` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLGreen2RedDark` Signature: `qualitativeHCLGreen2RedDark = SBPaletteDefaultPalette.qualitativeHCLGreen2RedDark` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLHarmonic` Signature: `qualitativeHCLHarmonic = SBPaletteDefaultPalette.qualitativeHCLHarmonic` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLPastel` Signature: `qualitativeHCLPastel = SBPaletteDefaultPalette.qualitativeHCLPastel` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLRed2Blue` Signature: `qualitativeHCLRed2Blue = SBPaletteDefaultPalette.qualitativeHCLRed2Blue` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLRed2BlueDark` Signature: `qualitativeHCLRed2BlueDark = SBPaletteDefaultPalette.qualitativeHCLRed2BlueDark` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLRed2Green` Signature: `qualitativeHCLRed2Green = SBPaletteDefaultPalette.qualitativeHCLRed2Green` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLRed2GreenDark` Signature: `qualitativeHCLRed2GreenDark = SBPaletteDefaultPalette.qualitativeHCLRed2GreenDark` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLSet2` Signature: `qualitativeHCLSet2 = SBPaletteDefaultPalette.qualitativeHCLSet2` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLSet3` Signature: `qualitativeHCLSet3 = SBPaletteDefaultPalette.qualitativeHCLSet3` ##### Attribute `samson.SBPaletteDefaultPalette.qualitativeHCLWarm` Signature: `qualitativeHCLWarm = SBPaletteDefaultPalette.qualitativeHCLWarm` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLBlue` Signature: `sequentialHCLBlue = SBPaletteDefaultPalette.sequentialHCLBlue` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLBlue2` Signature: `sequentialHCLBlue2 = SBPaletteDefaultPalette.sequentialHCLBlue2` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLBlueGreenYellow` Signature: `sequentialHCLBlueGreenYellow = SBPaletteDefaultPalette.sequentialHCLBlueGreenYellow` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLBlueYellow` Signature: `sequentialHCLBlueYellow = SBPaletteDefaultPalette.sequentialHCLBlueYellow` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLBlueYellow2` Signature: `sequentialHCLBlueYellow2 = SBPaletteDefaultPalette.sequentialHCLBlueYellow2` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLDarkMint` Signature: `sequentialHCLDarkMint = SBPaletteDefaultPalette.sequentialHCLDarkMint` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLGray` Signature: `sequentialHCLGray = SBPaletteDefaultPalette.sequentialHCLGray` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLGreen` Signature: `sequentialHCLGreen = SBPaletteDefaultPalette.sequentialHCLGreen` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLGreen2` Signature: `sequentialHCLGreen2 = SBPaletteDefaultPalette.sequentialHCLGreen2` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLGreenYellow` Signature: `sequentialHCLGreenYellow = SBPaletteDefaultPalette.sequentialHCLGreenYellow` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLHeat` Signature: `sequentialHCLHeat = SBPaletteDefaultPalette.sequentialHCLHeat` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLInferno` Signature: `sequentialHCLInferno = SBPaletteDefaultPalette.sequentialHCLInferno` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLLightGray` Signature: `sequentialHCLLightGray = SBPaletteDefaultPalette.sequentialHCLLightGray` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLOslo` Signature: `sequentialHCLOslo = SBPaletteDefaultPalette.sequentialHCLOslo` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLPlasma` Signature: `sequentialHCLPlasma = SBPaletteDefaultPalette.sequentialHCLPlasma` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLPurple` Signature: `sequentialHCLPurple = SBPaletteDefaultPalette.sequentialHCLPurple` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLPurple2` Signature: `sequentialHCLPurple2 = SBPaletteDefaultPalette.sequentialHCLPurple2` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLPurpleBlue` Signature: `sequentialHCLPurpleBlue = SBPaletteDefaultPalette.sequentialHCLPurpleBlue` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLPurpleOrange` Signature: `sequentialHCLPurpleOrange = SBPaletteDefaultPalette.sequentialHCLPurpleOrange` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLRed` Signature: `sequentialHCLRed = SBPaletteDefaultPalette.sequentialHCLRed` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLRed2` Signature: `sequentialHCLRed2 = SBPaletteDefaultPalette.sequentialHCLRed2` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLRedYellow` Signature: `sequentialHCLRedYellow = SBPaletteDefaultPalette.sequentialHCLRedYellow` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLTeal` Signature: `sequentialHCLTeal = SBPaletteDefaultPalette.sequentialHCLTeal` ##### Attribute `samson.SBPaletteDefaultPalette.sequentialHCLViridis` Signature: `sequentialHCLViridis = SBPaletteDefaultPalette.sequentialHCLViridis` --- # SBPaletteDiscrete Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDiscrete.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDiscrete.md This class is a base class for discrete color palettes. A discrete color palette is constructed based on a list of colors. !!! note You can find available default palettes in [`samson.SBPaletteDefaultPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDefaultPalette.md#samson.SBPaletteDefaultPalette). !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDPaletteDiscrete](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDPaletteDiscrete/#) ## API Reference #### Class `samson.SBPaletteDiscrete` Signature: `class samson.SBPaletteDiscrete(*args, **kwargs)` Bases: [`SBPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette) This class is a base class for discrete color palettes. Overloaded function. 1. __init__(self: samson.SBPaletteDiscrete) -> None Default constructor 2. __init__(self: samson.SBPaletteDiscrete, colors: list[samson.SBColor], name: str = ‘’, reverse: bool = False) -> None Constructs a discrete color palette with the given colors. **Parameters** - **colors** (*list**of*[*samson.SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) – The list of samson.SBColor - **name** (*str**,**default=''*) – A palette name - **reverse** (*bool**,**default=False*) – The reverse flag - whether the color palette is mirrored or not. ##### Examples ```pycon >>> discrete_palette = SBPaletteDiscrete([SBColor.blue, SBColor.white, SBColor.red]) ``` 3. __init__(self: samson.SBPaletteDiscrete, palette: samson.SBPaletteDiscrete) -> None Constructs a discrete color palette based on the given discrete color palette. **Parameters** - **palette** ([*samson.SBPaletteDiscrete*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDiscrete.md#samson.SBPaletteDiscrete)) – Another discrete color palette ##### Method `samson.SBPaletteDiscrete.getColors` Signature: `getColors(self: samson.SBPaletteDiscrete) -> list[samson.SBColor]` Returns a list of colors. **Return type** - A list of [samson.SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) ##### Method `samson.SBPaletteDiscrete.getCycledColor` Signature: `getCycledColor(self: samson.SBPaletteDiscrete, v: int) -> samson.SBColor` Returns SBColor based on the palette and a value *v* that will be cycled to be within the range [0, number of colors in the palette]. **Parameters** - **v** (*int*) – An integer value based on which the resulting color is computed, the value will be cycled to be within the range [0, number of colors in the palette] **Returns** - A color. **Return type** - [samson.SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) ###### Examples ```pycon >>> palette = SBPaletteDefaultPalette.discreteOkabeIto >>> color = palette.getCycledColor(2) >>> print(color) [0.337255, 0.705882, 0.913725, 1.000000] ``` ##### Method `samson.SBPaletteDiscrete.getCycledColorVector` Signature: `getCycledColorVector(self: samson.SBPaletteDiscrete, v: int) -> list[float]` Returns RGB color in a float vector based on the palette and a value *v* value that will be cycled to be within the range [0, number of colors in the palette]. **Parameters** - **v** (*int*) – An integer value based on which the resulting color is computed, the value will be cycled to be within the range [0, number of colors in the palette] **Returns** - An rgba color. **Return type** - list of 4 floats (rgba) ###### Examples ```pycon >>> palette = SBPaletteDefaultPalette.discreteOkabeIto >>> color = palette.getCycledColorVector(0) >>> print(color) [0.0, 0.0, 0.0, 1.0] ``` ##### Property `samson.SBPaletteDiscrete.numberOfColors` Signature: `property numberOfColors` Returns the number of colors in the color palette. --- # SBPaletteDiverging Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDiverging.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDiverging.md This class is a base class for diverging color palettes. A diverging palette is constructed in a 3D color coordinate space with coordinates named `hue`, `chroma`, and `luminance`. The diverging palette can be represented as two sequential palettes: one to the left (left arm) and another one to the right (right arm) from the diverging point (neutral point, `neutralPoint`). The value for `hue` is constant for both arms: - `hue1` for the left arm (the intensity value less or equal than `neutralPoint`); - `hue2` for the right arm (the intensity value greater than `neutralPoint`). In each arm, the `chroma` value changes from `chroma1` to 0.0 through `maximumChroma` (if present and if `maximumChroma > chroma1`) in the same way as in the sequential palette. In each arm, the `luminance` value changes from `luminance1` to `luminance2` as in the sequential palette. Coordinate `hue` can designate e.g. hue (as in HCL, HSV, HSL color spaces). Coordinate `chroma` can designate e.g. chroma (as in HCL color space) or saturation (as in HSV, HSL color spaces). Coordinate `luminance` can designate e.g. luminance (as in HCL color space), lightning (as in HSL color space), or another value (as in HSV color space). !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDPaletteDiverging](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDPaletteDiverging/#) ## API Reference #### Class `samson.SBPaletteDiverging` Signature: `class samson.SBPaletteDiverging(*args, **kwargs)` Bases: [`SBPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette) This class is a base class for diverging color palettes. Overloaded function. 1. __init__(self: samson.SBPaletteDiverging) -> None Default constructor 2. __init__(self: samson.SBPaletteDiverging, hue1: int, hue2: int, chroma1: int = 50, maximumChroma: int = 50, luminance1: int = 70, luminance2: int = 70, chromaPower: float = 1.0, luminancePower: float = 1.0, neutralPoint: float = 0.5, name: str = ‘’, reverse: bool = False) -> None Constructs a diverging color palette with the given parameters. **Parameters** - **hue1** (*int*) – The left-side hue - **hue2** (*int*) – The right-side hue - **chroma1** (*int**,**default=50*) – The chroma value - **maximumChroma** (*int**,**default=50*) – The maximum chroma - **luminance1** (*int**,**default=70*) – The left-side luminance - **luminance2** (*int**,**default=70*) – The right-side luminance - **chromaPower** (*float**,**default=1.0*) – The chroma power - **luminancePower** (*float**,**default=1.0*) – The luminance power - **neutralPoint** (*float**,**default=0.5*) – The neutral point - **name** (*str**,**default=''*) – A palette name - **reverse** (*bool**,**default=False*) – The reverse flag - whether the color palette is mirrored or not. ##### Examples ```pycon >>> palette = SBPaletteDiverging(hue1 = 60, hue2 = 270, chroma1 = 60, maximumChroma = 60, luminance1 = 80, luminance2 = 80) ``` 3. __init__(self: samson.SBPaletteDiverging, palette: samson.SBPaletteDiverging) -> None Constructs a diverging color palette based on the given diverging color palette. **Parameters** - **palette** ([*samson.SBPaletteDiverging*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDiverging.md#samson.SBPaletteDiverging)) – Another diverging color palette ##### Method `samson.SBPaletteDiverging.setChroma` Signature: `setChroma(self: samson.SBPaletteDiverging, chroma1: int, maximumChroma: int, chromaPower: float = 1.0) -> None` Sets chroma values. **Parameters** - **chroma1** (*int*) – The chroma value - **maximumChroma** (*int*) – The maximum chroma - **chromaPower** (*float**,**default=1.0*) – The chroma power ##### Method `samson.SBPaletteDiverging.setHue` Signature: `setHue(self: samson.SBPaletteDiverging, hue1: int, hue2: int) -> None` Sets hue values. **Parameters** - **hue1** (*int*) – The left-side hue - **hue2** (*int*) – The right-side hue ##### Method `samson.SBPaletteDiverging.setLuminance` Signature: `setLuminance(self: samson.SBPaletteDiverging, luminance1: int, luminance2: int, luminancePower: float = 1.0) -> None` Sets luminance values. **Parameters** - **luminance1** (*int*) – The left-side luminance - **luminance2** (*int*) – The right-side luminance - **luminancePower** (*float**,**default=1.0*) – The luminance power ##### Property `samson.SBPaletteDiverging.chroma1` Signature: `property chroma1` The endpoint chroma value. ##### Property `samson.SBPaletteDiverging.chromaPower` Signature: `property chromaPower` The chroma interpolation power. ##### Property `samson.SBPaletteDiverging.hue1` Signature: `property hue1` The left-side hue. ##### Property `samson.SBPaletteDiverging.hue2` Signature: `property hue2` The right-side hue. ##### Property `samson.SBPaletteDiverging.luminance1` Signature: `property luminance1` The left-side luminance. ##### Property `samson.SBPaletteDiverging.luminance2` Signature: `property luminance2` The right-side luminance. ##### Property `samson.SBPaletteDiverging.luminancePower` Signature: `property luminancePower` The luminance interpolation power. ##### Property `samson.SBPaletteDiverging.maximumChroma` Signature: `property maximumChroma` The maximum chroma value. ##### Property `samson.SBPaletteDiverging.neutralPoint` Signature: `property neutralPoint` The neutral midpoint position in [0, 1]. --- # SBPaletteDivergingHCL Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDivergingHCL.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDivergingHCL.md This class is a base class for diverging HCL (Hue-Chroma-Luminance) color palettes. A diverging palette is constructed in a 3D color coordinate space with coordinates named `hue`, `chroma`, and `luminance`. The diverging palette can be represented as two sequential palettes: one to the left (left arm) and another one to the right (right arm) from the diverging point (neutral point, `neutralPoint`). The value for `hue` is constant for both arms: - `hue1` for the left arm (the intensity value less or equal than `neutralPoint`); - `hue2` for the right arm (the intensity value greater than `neutralPoint`). In each arm, the `chroma` value changes from `chroma1` to 0.0 through `maximumChroma` (if present and if `maximumChroma > chroma1`) in the same way as in the sequential palette (samson.SBPaletteSequentialHCL). In each arm, the `luminance` value changes from `luminance1` to `luminance2` as in the sequential palette (samson.SBPaletteSequentialHCL). Caption: Example of a diverging HCL palette ```python # Diverging: Blue-Red palette = SBPaletteDivergingHCL( hue1 = 260, hue2 = 0, chroma1 = 80, maximumChroma = 80, luminance1 = 30, luminance2 = 90, chromaPower = 1.0, luminancePower = 1.5, neutralPoint = 0.5, name = "Diverging: Blue-Red") ``` !!! note You can find available default palettes in [`samson.SBPaletteDefaultPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDefaultPalette.md#samson.SBPaletteDefaultPalette). !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDPaletteDivergingHCL](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDPaletteDivergingHCL/#) ## API Reference #### Class `samson.SBPaletteDivergingHCL` Signature: `class samson.SBPaletteDivergingHCL(*args, **kwargs)` Bases: [`SBPaletteDiverging`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDiverging.md#samson.SBPaletteDiverging) This class is a base class for the diverging HCL (Hue-Chroma-Luminance) color palette. Overloaded function. 1. __init__(self: samson.SBPaletteDivergingHCL) -> None Default constructor 2. __init__(self: samson.SBPaletteDivergingHCL, hue1: int, hue2: int, chroma1: int = 50, maximumChroma: int = 50, luminance1: int = 70, luminance2: int = 70, chromaPower: float = 1.0, luminancePower: float = 1.0, neutralPoint: float = 0.5, name: str = ‘’, reverse: bool = False) -> None Constructs a diverging HCL color palette with the given parameters. **Parameters** - **hue1** (*int*) – The left-side hue - **hue2** (*int*) – The right-side hue - **chroma1** (*int**,**default=50*) – The chroma value - **maximumChroma** (*int**,**default=50*) – The maximum chroma - **luminance1** (*int**,**default=70*) – The left-side luminance - **luminance2** (*int**,**default=70*) – The right-side luminance - **chromaPower** (*float**,**default=1.0*) – The chroma power - **luminancePower** (*float**,**default=1.0*) – The luminance power - **neutralPoint** (*float**,**default=0.5*) – The neutral point - **name** (*str**,**default=''*) – A palette name - **reverse** (*bool**,**default=False*) – The reverse flag - whether the color palette is mirrored or not. ##### Examples ```pycon >>> palette = SBPaletteDivergingHCL(hue1 = 60, hue2 = 270, chroma1 = 60, maximumChroma = 60, luminance1 = 80, luminance2 = 80) ``` 3. __init__(self: samson.SBPaletteDivergingHCL, palette: samson.SBPaletteDivergingHCL) -> None Constructs a diverging color palette based on the given diverging HCL color palette. **Parameters** - **palette** ([*samson.SBPaletteDivergingHCL*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDivergingHCL.md#samson.SBPaletteDivergingHCL)) – Another diverging HCL color palette --- # SBPaletteFlexibleDivergingHCL Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteFlexibleDivergingHCL.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteFlexibleDivergingHCL.md This class is a base class for flexible diverging HCL (Hue-Chroma-Luminance) color palette A flexible diverging palette is constructed in a 3D color coordinate space with coordinates named `hue`, `chroma`, and `luminance`. Flexible diverging HCL color palettes is generated through a combination of two fully flexible multi-hue sequential palettes (samson.SBPaletteSequentialHCL). Caption: Examples of flexible diverging HCL palettes ```python # Flexible diverging: Earth palette1 = SBPaletteFlexibleDivergingHCL( hue1 = 43, hue2 = 82, hue3 = 221, chroma1 = 61, chroma2 = 30, chroma3 = 45, luminance1 = 50, luminance2 = 92, luminance3 = 52, chromaPower1 = 1.0, luminancePower1 = 1.0, chromaPower2 = 0.8, luminancePower2 = 1.0, maximumChroma1 = 50, maximumChroma2 = 10, neutralPoint = 0.5, name = "Flexible diverging: Earth") # Flexible diverging: Zissou 1 palette2 = SBPaletteFlexibleDivergingHCL( hue1 = 218, hue2 = 71, hue3 = 12, chroma1 = 46, chroma2 = 88, chroma3 = 165, luminance1 = 59, luminance2 = 82, luminance3 = 52, chromaPower1 = 0.2, luminancePower1 = 1.0, chromaPower2 = 3.0, luminancePower2 = 1.0, maximumChroma1 = 33, maximumChroma2 = 33, neutralPoint = 0.5, name = "Flexible diverging: Zissou 1") # Flexible diverging: Cividis palette3 = SBPaletteFlexibleDivergingHCL( hue1 = 255, hue2 = 1000, hue3 = 75, chroma1 = 30, chroma2 = 0, chroma3 = 95, luminance1 = 13, luminance2 = 52, luminance3 = 92, chromaPower1 = 1.1, luminancePower1 = 1.0, chromaPower2 = 1.0, luminancePower2 = 1.0, maximumChroma1 = 47, maximumChroma2 = 47, neutralPoint = 0.5, name = "Flexible diverging: Cividis") ``` !!! note You can find available default palettes in [`samson.SBPaletteDefaultPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDefaultPalette.md#samson.SBPaletteDefaultPalette). !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDPaletteFlexibleDivergingHCL](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDPaletteFlexibleDivergingHCL/#) ## API Reference #### Class `samson.SBPaletteFlexibleDivergingHCL` Signature: `class samson.SBPaletteFlexibleDivergingHCL(*args, **kwargs)` Bases: [`SBPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette) This class is a class for the flexible diverging HCL (Hue-Chroma-Luminance) color palette. Overloaded function. 1. __init__(self: samson.SBPaletteFlexibleDivergingHCL) -> None Default constructor 2. __init__(self: samson.SBPaletteFlexibleDivergingHCL, hue1: int, hue2: int, hue3: int, chroma1: int, chroma2: int, chroma3: int, luminance1: int = 70, luminance2: int = 70, luminance3: int = 70, chromaPower1: float = 1.0, luminancePower1: float = 1.0, chromaPower2: float = 1.0, luminancePower2: float = 1.0, maximumChroma1: int = 50, maximumChroma2: int = 50, neutralPoint: float = 0.5, name: str = ‘’, reverse: bool = False) -> None Constructs a flexible diverging HCL color palette with the given parameters. **Parameters** - **hue1** (*int*) – The left-side hue - **hue2** (*int*) – The central hue - **hue3** (*int*) – The right-side hue - **chroma1** (*int*) – The left-side chroma - **chroma2** (*int*) – The central chroma - **chroma3** (*int*) – The right-side chroma - **luminance1** (*int**,**default=70*) – The left-side luminance - **luminance2** (*int**,**default=70*) – The central luminance - **luminance3** (*int**,**default=70*) – The right-side luminance - **chromaPower1** (*float**,**default=1.0*) – The chroma power of the left-side - **chromaPower2** (*float**,**default=1.0*) – The chroma power of the right-side - **luminancePower1** (*float**,**default=1.0*) – The luminance power of the left-side - **luminancePower2** (*float**,**default=1.0*) – The luminance power of the right-side - **maximumChroma1** (*int**,**default=50*) – The maximum chroma of the left-side - **maximumChroma2** (*int**,**default=50*) – The maximum chroma of the right-side - **neutralPoint** (*float**,**default=0.5*) – The neutral point - **name** (*str**,**default=''*) – A palette name - **reverse** (*bool**,**default=False*) – The reverse flag - whether the color palette is mirrored or not. ##### Examples ```pycon >>> palette = SBPaletteFlexibleDivergingHCL(hue1 = 260, hue2 = 0, hue3 = 180, chroma1 = 40, chroma2 = 50, chroma3 = 40) ``` 3. __init__(self: samson.SBPaletteFlexibleDivergingHCL, palette: samson.SBPaletteFlexibleDivergingHCL) -> None Constructs a flexible diverging color palette based on the given flexible diverging HCL color palette. **Parameters** - **palette** ([*samson.SBPaletteFlexibleDivergingHCL*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteFlexibleDivergingHCL.md#samson.SBPaletteFlexibleDivergingHCL)) – Another flexible diverging HCL color palette ##### Method `samson.SBPaletteFlexibleDivergingHCL.setChroma` Signature: `setChroma(self: samson.SBPaletteFlexibleDivergingHCL, chroma1: int, chroma2: int, chroma3: int, maximumChroma1: int, maximumChroma2: int, chromaPower1: float = 1.0, chromaPower2: float = 1.0) -> None` Sets chroma values. **Parameters** - **chroma1** (*int*) – The left-side chroma - **chroma2** (*int*) – The central chroma - **chroma3** (*int*) – The right-side chroma - **maximumChroma1** (*int*) – The maximum chroma of the left-side - **maximumChroma2** (*int*) – The maximum chroma of the right-side - **chromaPower1** (*float**,**default=1.0*) – The chroma power of the left-side - **chromaPower2** (*float**,**default=1.0*) – The chroma power of the right-side ##### Method `samson.SBPaletteFlexibleDivergingHCL.setHue` Signature: `setHue(self: samson.SBPaletteFlexibleDivergingHCL, hue1: int, hue2: int, hue3: int) -> None` Sets hue values. **Parameters** - **hue1** (*int*) – The left-side hue - **hue2** (*int*) – The central hue - **hue3** (*int*) – The right-side hue ##### Method `samson.SBPaletteFlexibleDivergingHCL.setLuminance` Signature: `setLuminance(self: samson.SBPaletteFlexibleDivergingHCL, luminance1: int, luminance2: int, luminance3: int, luminancePower1: float = 1.0, luminancePower2: float = 1.0) -> None` Sets luminance values. **Parameters** - **luminance1** (*int*) – The left-side luminance - **luminance2** (*int*) – The central luminance - **luminance3** (*int*) – The right-side luminance - **luminancePower1** (*float**,**default=1.0*) – The luminance power of the left-side - **luminancePower2** (*float**,**default=1.0*) – The luminance power of the right-side ##### Property `samson.SBPaletteFlexibleDivergingHCL.chroma1` Signature: `property chroma1` The left-side chroma. ##### Property `samson.SBPaletteFlexibleDivergingHCL.chroma2` Signature: `property chroma2` The central chroma. ##### Property `samson.SBPaletteFlexibleDivergingHCL.chroma3` Signature: `property chroma3` The right-side chroma. ##### Property `samson.SBPaletteFlexibleDivergingHCL.chromaPower1` Signature: `property chromaPower1` The left-side chroma interpolation power. ##### Property `samson.SBPaletteFlexibleDivergingHCL.chromaPower2` Signature: `property chromaPower2` The right-side chroma interpolation power. ##### Property `samson.SBPaletteFlexibleDivergingHCL.hue1` Signature: `property hue1` The left-side hue. ##### Property `samson.SBPaletteFlexibleDivergingHCL.hue2` Signature: `property hue2` The central hue. ##### Property `samson.SBPaletteFlexibleDivergingHCL.hue3` Signature: `property hue3` The right-side hue. ##### Property `samson.SBPaletteFlexibleDivergingHCL.luminance1` Signature: `property luminance1` The left-side luminance. ##### Property `samson.SBPaletteFlexibleDivergingHCL.luminance2` Signature: `property luminance2` The central luminance. ##### Property `samson.SBPaletteFlexibleDivergingHCL.luminance3` Signature: `property luminance3` The right-side luminance. ##### Property `samson.SBPaletteFlexibleDivergingHCL.luminancePower1` Signature: `property luminancePower1` The left-side luminance interpolation power. ##### Property `samson.SBPaletteFlexibleDivergingHCL.luminancePower2` Signature: `property luminancePower2` The right-side luminance interpolation power. ##### Property `samson.SBPaletteFlexibleDivergingHCL.maximumChroma1` Signature: `property maximumChroma1` The left-side maximum chroma. ##### Property `samson.SBPaletteFlexibleDivergingHCL.maximumChroma2` Signature: `property maximumChroma2` The right-side maximum chroma. ##### Property `samson.SBPaletteFlexibleDivergingHCL.neutralPoint` Signature: `property neutralPoint` The neutral midpoint position in [0, 1]. --- # SBPaletteQualitative Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteQualitative.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteQualitative.md This class is a base class for qualitative color palettes. A qualitative palette is constructed in a 3D color coordinate space with coordinates named `hue`, `chroma`, and `luminance`. The coordinate `hue` can have an arbitrary value: `hue = hue1 + i * (hue2 - hue1)`, where `i` is a value (of intensity) based on which the colorization should be done. And `chroma` and `luminance` coordinates are constant. Coordinate `hue` can designate e.g. hue (as in HCL, HSV, HSL color spaces). Coordinate `chroma` can designate e.g. chroma (as in HCL color space) or saturation (as in HSV, HSL color spaces). Coordinate `luminance` can designate e.g. luminance (as in HCL color space), lightning (as in HSL color space), or another value (as in HSV color space). !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDPaletteQualitative](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDPaletteQualitative/#) ## API Reference #### Class `samson.SBPaletteQualitative` Signature: `class samson.SBPaletteQualitative(*args, **kwargs)` Bases: [`SBPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette) This class is a base class for qualitative color palettes. Overloaded function. 1. __init__(self: samson.SBPaletteQualitative) -> None Default constructor 2. __init__(self: samson.SBPaletteQualitative, hue1: int, hue2: int, chroma: int = 50, luminance: int = 70, name: str = ‘’, reverse: bool = False) -> None Constructs a qualitative color palette with the given parameters. **Parameters** - **hue1** (*int*) – The left-side hue - **hue2** (*int*) – The right-side hue - **chroma** (*int**,**default=50*) – The *chroma* coordinate can designate e.g. chroma (as in HCL color space) or saturation (as in HSV, HSL color spaces). - **luminance** (*int**,**default=70*) – The *luminance* coordinate can designate e.g. luminance (as in HCL color space), lightning (as in HSL color space), or another value (as in HSV color space). - **name** (*str**,**default=''*) – A palette name - **reverse** (*bool**,**default=False*) – The reverse flag - whether the color palette is mirrored or not. ##### Examples ```pycon >>> palette = SBPaletteQualitative(hue1 = 60, hue2 = 270, chroma = 60, luminance = 80) ``` 3. __init__(self: samson.SBPaletteQualitative, palette: samson.SBPaletteQualitative) -> None Constructs a qualitative color palette based on the given qualitative color palette. **Parameters** - **palette** ([*samson.SBPaletteQualitative*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteQualitative.md#samson.SBPaletteQualitative)) – Another qualitative color palette ##### Method `samson.SBPaletteQualitative.setHue` Signature: `setHue(self: samson.SBPaletteQualitative, hue1: int, hue2: int) -> None` Sets hue values. **Parameters** - **hue1** (*int*) – The left-side hue - **hue2** (*int*) – The right-side hue ##### Property `samson.SBPaletteQualitative.chroma` Signature: `property chroma` The chroma coordinate. ##### Property `samson.SBPaletteQualitative.hue1` Signature: `property hue1` The starting hue. ##### Property `samson.SBPaletteQualitative.hue2` Signature: `property hue2` The ending hue. ##### Property `samson.SBPaletteQualitative.luminance` Signature: `property luminance` The luminance coordinate. --- # SBPaletteQualitativeHCL Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteQualitativeHCL.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteQualitativeHCL.md This class is a base class for qualitative HCL (Hue-Chroma-Luminance) color palettes. A qualitative HCL palette is constructed in a 3D color coordinate space with coordinates named `hue`, `chroma`, and `luminance`. The coordinate h can have an arbitrary value: `hue = hue1 + i * (hue2 - hue1)`, where `i` is a value (of intensity) based on which the colorization should be done. And `chroma` and `luminance` coordinates are constant. Caption: Example of a qualitative HCL palette ```python # Qualitative: Pastel palette = SBPaletteQualitativeHCL( hue1 = 0, hue2 = 360, chroma = 35, luminance = 85, name = "Qualitative: Pastel") ``` !!! note You can find available default palettes in [`samson.SBPaletteDefaultPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDefaultPalette.md#samson.SBPaletteDefaultPalette). !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDPaletteQualitativeHCL](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDPaletteQualitativeHCL/#) ## API Reference #### Class `samson.SBPaletteQualitativeHCL` Signature: `class samson.SBPaletteQualitativeHCL(*args, **kwargs)` Bases: [`SBPaletteQualitative`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteQualitative.md#samson.SBPaletteQualitative) This class is a base class for the qualitative HCL (Hue-Chroma-Luminance) color palette. Overloaded function. 1. __init__(self: samson.SBPaletteQualitativeHCL) -> None Default constructor 2. __init__(self: samson.SBPaletteQualitativeHCL, hue1: int, hue2: int, chroma: int = 50, luminance: int = 70, name: str = ‘’, reverse: bool = False) -> None Constructs a qualitative HCL color palette with the given parameters. **Parameters** - **hue1** (*int*) – The left-side hue - **hue2** (*int*) – The right-side hue - **chroma** (*int**,**default=50*) – The chroma coordinate. - **luminance** (*int**,**default=70*) – The luminance coordinate. - **name** (*str**,**default=''*) – A palette name - **reverse** (*bool**,**default=False*) – The reverse flag - whether the color palette is mirrored or not. ##### Examples ```pycon >>> palette = SBPaletteQualitativeHCL(hue1 = 60, hue2 = 270, chroma = 60, luminance = 80) ``` 3. __init__(self: samson.SBPaletteQualitativeHCL, palette: samson.SBPaletteQualitativeHCL) -> None Constructs a qualitative color palette based on the given qualitative HCL color palette. **Parameters** - **palette** ([*samson.SBPaletteQualitativeHCL*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteQualitativeHCL.md#samson.SBPaletteQualitativeHCL)) – Another qualitative HCL color palette --- # SBPaletteSequential Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteSequential.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteSequential.md This class is a base class for sequential color palettes. A sequential palette is constructed in a 3D color coordinate space with coordinates named `hue`, `chroma`, and `luminance`, that are computed as follows: - `hue = hue1 + i * (hue2 - hue1)` - if `Cmax < chroma1` or `maximumChroma < chroma2` then `chroma` is computed based on a “linear” trajectory `chroma = chroma1 + i^(chromaPower) * (chroma2 - chroma1)` (see samson.SBPalette.getValueAlongLinearTrajectory), else it is computed based on the triangular trajectory (see samson.SBPalette.getValueAlongTriangularTrajectory) - `luminance = luminance1 + i^(luminancePower) * (luminance2 - luminance1)` Here `i` is a value (of intensity) based on which the colorization should be done. Coordinate `hue` can designate e.g. hue (as in HCL, HSV, HSL color spaces). Coordinate `chroma` can designate e.g. chroma (as in HCL color space) or saturation (as in HSV, HSL color spaces). Coordinate `luminance` can designate e.g. luminance (as in HCL color space), lightning (as in HSL color space), or another value (as in HSV color space). !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDPaletteSequential](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDPaletteSequential/#) ## API Reference #### Class `samson.SBPaletteSequential` Signature: `class samson.SBPaletteSequential(*args, **kwargs)` Bases: [`SBPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette) This class is a base class for sequential color palettes. Overloaded function. 1. __init__(self: samson.SBPaletteSequential) -> None Default constructor 2. __init__(self: samson.SBPaletteSequential, hue1: int, hue2: int, chroma1: int = 50, maximumChroma: int = 50, chroma2: int = 50, luminance1: int = 70, luminance2: int = 70, chromaPower: float = 1.0, luminancePower: float = 1.0, name: str = ‘’, reverse: bool = False) -> None Constructs a sequential color palette with the given parameters. **Parameters** - **hue1** (*int*) – The left-side hue - **hue2** (*int*) – The right-side hue - **chroma1** (*int**,**default=50*) – The left-side chroma - **maximumChroma** (*int**,**default=50*) – The maximum chroma - **chroma2** (*int**,**default=50*) – The right-side chroma - **luminance1** (*int**,**default=70*) – The left-side luminance - **luminance2** (*int**,**default=70*) – The right-side luminance - **chromaPower** (*float**,**default=1.0*) – The chroma power - **luminancePower** (*float**,**default=1.0*) – The luminance power - **name** (*str**,**default=''*) – A palette name - **reverse** (*bool**,**default=False*) – The reverse flag - whether the color palette is mirrored or not. ##### Examples ```pycon >>> palette = SBPaletteSequential(hue1 = 60, hue2 = 270, chroma1 = 60, maximumChroma = 60, chroma2 = 60, luminance1 = 80, luminance2 = 80) ``` 3. __init__(self: samson.SBPaletteSequential, palette: samson.SBPaletteSequential) -> None Constructs a sequential color palette based on the given sequential color palette. **Parameters** - **palette** ([*samson.SBPaletteSequential*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteSequential.md#samson.SBPaletteSequential)) – Another sequential color palette ##### Method `samson.SBPaletteSequential.setChroma` Signature: `setChroma(self: samson.SBPaletteSequential, chroma1: int, maximumChroma: int, chroma2: int, chromaPower: float = 1.0) -> None` Sets chroma values. **Parameters** - **chroma1** (*int*) – The left-side chroma - **maximumChroma** (*int*) – The maximum chroma - **chroma2** (*int*) – The right-side chroma - **chromaPower** (*float**,**default=1.0*) – The chroma power ##### Method `samson.SBPaletteSequential.setHue` Signature: `setHue(self: samson.SBPaletteSequential, hue1: int, hue2: int) -> None` Sets hue values. **Parameters** - **hue1** (*int*) – The left-side hue - **hue2** (*int*) – The right-side hue ##### Method `samson.SBPaletteSequential.setLuminance` Signature: `setLuminance(self: samson.SBPaletteSequential, luminance1: int, luminance2: int, luminancePower: float = 1.0) -> None` Sets luminance values. **Parameters** - **luminance1** (*int*) – The left-side luminance - **luminance2** (*int*) – The right-side luminance - **luminancePower** (*float**,**default=1.0*) – The luminance power ##### Property `samson.SBPaletteSequential.chroma1` Signature: `property chroma1` The starting chroma. ##### Property `samson.SBPaletteSequential.chroma2` Signature: `property chroma2` The ending chroma. ##### Property `samson.SBPaletteSequential.chromaPower` Signature: `property chromaPower` The chroma interpolation power. ##### Property `samson.SBPaletteSequential.hue1` Signature: `property hue1` The starting hue. ##### Property `samson.SBPaletteSequential.hue2` Signature: `property hue2` The ending hue. ##### Property `samson.SBPaletteSequential.luminance1` Signature: `property luminance1` The starting luminance. ##### Property `samson.SBPaletteSequential.luminance2` Signature: `property luminance2` The ending luminance. ##### Property `samson.SBPaletteSequential.luminancePower` Signature: `property luminancePower` The luminance interpolation power. ##### Property `samson.SBPaletteSequential.maximumChroma` Signature: `property maximumChroma` The maximum chroma used by the triangular trajectory. --- # SBPaletteSequentialHCL Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteSequentialHCL.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteSequentialHCL.md This class is a base class for sequential HCL color palettes. A sequential palette is constructed in a 3D color coordinate space with coordinates named `hue`, `chroma`, and `luminance`, that are computed as follows: - `hue = hue1 + i * (hue2 - hue1)` - if `Cmax < chroma1` or `maximumChroma < chroma2` then `chroma` is computed based on a “linear” trajectory `c = chroma1 + i^(chromaPower) * (chroma2 - chroma1)` (see samson.SBPalette.getValueAlongLinearTrajectory), else it is computed based on the triangular trajectory (see samson.SBPalette.getValueAlongTriangularTrajectory) - `luminance = luminance1 + i^(luminancePower) * (luminance2 - luminance1)` Here `i` is a value (of intensity) based on which the colorization should be done. Caption: Examples of sequential HCL palettes ```python # Single-hue sequential HCL palette - Green palette1 = SBPaletteSequentialHCL( hue1 = 135, hue2 = 135, chroma1 = 45, maximumChroma = 0, chroma2 = 45, luminance1 = 35, luminance2 = 95, chromaPower = 1.0, luminancePower = 1.3, name = "Sequential: Green") # Multi-hue sequential HCL palette - Viridis palette2 = SBPaletteSequentialHCL( hue1 = 300, hue2 = 75, chroma1 = 40, maximumChroma = 0, chroma2 = 95, luminance1 = 15, luminance2 = 90, chromaPower = 1.0, luminancePower = 1.1, name = "Sequential: Viridis") # Multi-hue sequential HCL palette - Teal palette3 = SBPaletteSequentialHCL( hue1 = 240, hue2 = 180, chroma1 = 35, maximumChroma = 40, chroma2 = 15, luminance1 = 35, luminance2 = 92, chromaPower = 0.6, luminancePower = 1.1, name = "Sequential: Teal") ``` !!! note You can find available default palettes in [`samson.SBPaletteDefaultPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteDefaultPalette.md#samson.SBPaletteDefaultPalette). !!! note "See also" [Colorizing nodes](https://documentation.samson-connect.net/scripting/latest/docs/Colorizing.md#ps-colorizing) SAMSON SDK: [SBDPaletteSequentialHCL](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDPaletteSequentialHCL/#) ## API Reference #### Class `samson.SBPaletteSequentialHCL` Signature: `class samson.SBPaletteSequentialHCL(*args, **kwargs)` Bases: [`SBPaletteSequential`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteSequential.md#samson.SBPaletteSequential) This class is a base class for the sequential HCL (Hue-Chroma-Luminance) color palette. Overloaded function. 1. __init__(self: samson.SBPaletteSequentialHCL) -> None Default constructor 2. __init__(self: samson.SBPaletteSequentialHCL, hue1: int, hue2: int, chroma1: int = 50, maximumChroma: int = 50, chroma2: int = 50, luminance1: int = 70, luminance2: int = 70, chromaPower: float = 1.0, luminancePower: float = 1.0, name: str = ‘’, reverse: bool = False) -> None Constructs a sequential HCL color palette with the given parameters. **Parameters** - **hue1** (*int*) – The left-side hue - **hue2** (*int*) – The right-side hue - **chroma1** (*int**,**default=50*) – The left-side chroma - **maximumChroma** (*int**,**default=50*) – The maximum chroma - **chroma2** (*int**,**default=50*) – The right-side chroma - **luminance1** (*int**,**default=70*) – The left-side luminance - **luminance2** (*int**,**default=70*) – The right-side luminance - **chromaPower** (*float**,**default=1.0*) – The chroma power - **luminancePower** (*float**,**default=1.0*) – The luminance power - **name** (*str**,**default=''*) – A palette name - **reverse** (*bool**,**default=False*) – The reverse flag - whether the color palette is mirrored or not. ##### Examples ```pycon >>> palette = SBPaletteSequentialHCL(hue1 = 60, hue2 = 270, chroma1 = 60, maximumChroma = 60, chroma2 = 60, luminance1 = 80, luminance2 = 80) ``` 3. __init__(self: samson.SBPaletteSequentialHCL, palette: samson.SBPaletteSequentialHCL) -> None Constructs a sequential HCL color palette based on the given sequential HCL color palette **Parameters** - **palette** ([*samson.SBPaletteSequential*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPaletteSequential.md#samson.SBPaletteSequential)) – Another sequential HCL color palette --- # Visualization Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization.md This group contains classes related to visualization management, in particular visual presets and their individual steps. !!! note "See also" SAMSON SDK: [The SBDVisualization Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/DataModel/Visualization/#) - [SBVisualPresetStep](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPresetStep.md) - [SBVisualPreset](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPreset.md) --- # SBVisualPresetStep Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPresetStep.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPresetStep.md This class is a base class for visual presets. A visual preset gets several arguments depending on the constructor: - A selection: a [Node Specification Language (NSL)](https://documentation.samson-connect.net/users/11.0.0/nsl/#) expression and an arbitrary name for the selection which will be used for naming the visual model if one should be created. - A visual model: a name of the visual model or a name of the visual model class and a [`UUID`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID) of its extension. - A color scheme: a name of the color scheme or a name of the color scheme class and a [`UUID`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID) of its extension. - A color ([`SBColor`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) for a constant color scheme or a color palette ([`SBPalette`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)) for a per-attribute color scheme. - A boolean flag indicating whether structural nodes corresponding to the selection should be hidden or shown. Caption: Create and apply a visual preset ```python # get an indexer of all structural models structuralModelIndexer = SAMSON.getNodes("n.t sm") # create a visual preset visualPresetStep = SBVisualPresetStep( # selection selectionFilterString = "n.c receptor", selectionFilterName = "Receptor", # visual model: Ribbons visualModelName = "Ribbons", # color scheme colorSchemeName = "Constant", color = SBColor.white, # hiding structural nodes hideStructureFlag = False) # apply the visual preset visualPresetStep.apply(structuralModelIndexer) ``` Please refer to the [Applying visual presets](https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.md#ps-apply-visual-presets) page for more information on how to create and apply visual presets. !!! note "See also" SAMSON SDK: [SBDVisualPresetStep](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDVisualPresetStep/#) ## API Reference #### Class `samson.SBVisualPresetStep` Signature: `class samson.SBVisualPresetStep(*args, **kwargs)` Bases: `pybind11_object` This class describes a visual preset step. Overloaded function. 1. __init__(self: samson.SBVisualPresetStep) -> None Default constructor 2. __init__(self: samson.SBVisualPresetStep, selectionFilterString: str, selectionFilterName: str, visualModelName: str = ‘’, actions: list[samson.SBUUID] = []) -> None Constructs a visual preset step based on the given parameters. **Parameters** - **selectionFilterString** (*str*) – A selection filter - Node Specification Language (NSL) expression string (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) - **selectionFilterName** (*str*) – A selection filter name - **visualModelName** (*str**,**default=''*) – A visual model name. If empty, then no visual model will be applied. - **actions** (*list**of*[*SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)*,**default=**[**]*) – A list of UUIDs of actions that should be applied to the ‘selected’ nodes ##### Examples Create a visual preset step for receptors depicted as ribbons ```pycon >>> visualPreset = SBVisualPresetStep(selectionFilterString = "n.c receptor", selectionFilterName = "Receptor", visualModelName = "Ribbons") ``` 3. __init__(self: samson.SBVisualPresetStep, selectorClassName: str, selectorExtensionUUID: samson.SBUUID, actions: list[samson.SBUUID] = []) -> None Constructs a visual preset step from a selector class and extension UUID. **Parameters** - **selectorClassName** (*str*) – A selector class name - **selectorExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A selector extension UUID - **actions** (*list**of*[*SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)*,**default=**[**]*) – A list of UUIDs of actions that should be applied to the selected nodes 4. __init__(self: samson.SBVisualPresetStep, selectorClassName: str, selectorExtensionUUID: samson.SBUUID, visualModelClassName: str, visualModelExtensionUUID: samson.SBUUID, actions: list[samson.SBUUID] = []) -> None Constructs a visual preset step from selector and visual model class information. **Parameters** - **selectorClassName** (*str*) – A selector class name - **selectorExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A selector extension UUID - **visualModelClassName** (*str*) – A visual model class name - **visualModelExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A visual model extension UUID - **actions** (*list**of*[*SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)*,**default=**[**]*) – A list of UUIDs of actions that should be applied to the selected nodes 5. __init__(self: samson.SBVisualPresetStep, selectionFilterString: str, selectionFilterName: str, visualModelClassName: str, visualModelExtensionUUID: samson.SBUUID, actions: list[samson.SBUUID] = []) -> None Constructs a visual preset step based on the given parameters. **Parameters** - **selectionFilterString** (*str*) – A selection filter - Node Specification Language (NSL) expression string (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) - **selectionFilterName** (*str*) – A selection filter name - **visualModelClassName** (*str*) – A visual model class name - **visualModelExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A visual model extension UUID - **actions** (*list**of*[*SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)*,**default=**[**]*) – A list of UUIDs of actions that should be applied to the ‘selected’ nodes 6. __init__(self: samson.SBVisualPresetStep, selectionFilterString: str, selectionFilterName: str, visualModelName: str, colorSchemeName: str, color: samson.SBColor, actions: list[samson.SBUUID] = []) -> None Constructs a visual preset step based on the given parameters. **Parameters** - **selectionFilterString** (*str*) – A selection filter - Node Specification Language (NSL) expression string (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) - **selectionFilterName** (*str*) – A selection filter name - **visualModelName** (*str*) – A visual model name - **colorSchemeName** (*str*) – A name of a constant color scheme: Constant, ConstantIllustrate, CPK - **color** ([*samson.SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) – A color for the color scheme - **actions** (*list**of*[*SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)*,**default=**[**]*) – A list of UUIDs of actions that should be applied to the ‘selected’ nodes ##### Examples Create a visual preset step for receptors depicted as van der Waals ```pycon >>> visualPreset = SBVisualPresetStep(selectionFilterString = "n.c receptor", selectionFilterName = "Receptor", visualModelName = "Van der Waals", colorSchemeName = "Constant", color = SBColor(255, 255, 255)) ``` 7. __init__(self: samson.SBVisualPresetStep, selectionFilterString: str, selectionFilterName: str, visualModelClassName: str, visualModelExtensionUUID: samson.SBUUID, colorSchemeClassName: str, colorSchemeExtensionUUID: samson.SBUUID, color: samson.SBColor, actions: list[samson.SBUUID] = []) -> None Constructs a visual preset step based on the given parameters. **Parameters** - **selectionFilterString** (*str*) – A selection filter - Node Specification Language (NSL) expression string (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) - **selectionFilterName** (*str*) – A selection filter name - **visualModelClassName** (*str*) – A visual model class name - **visualModelExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A visual model extension UUID - **colorSchemeClassName** (*str*) – A class name of a constant color scheme: SBColorSchemeConstant, SBColorSchemeConstantIllustrate, SBColorSchemeCPK - **colorSchemeExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A color scheme extension UUID - **color** ([*samson.SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) – A color for the color scheme - **actions** (*list**of*[*SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)*,**default=**[**]*) – A list of UUIDs of actions that should be applied to the ‘selected’ nodes 8. __init__(self: samson.SBVisualPresetStep, selectionFilterString: str, selectionFilterName: str, visualModelName: str, colorSchemeName: str, colorPalette: samson.SBPalette = None, actions: list[samson.SBUUID] = []) -> None Constructs a visual preset step based on the given parameters. **Parameters** - **selectionFilterString** (*str*) – A selection filter - Node Specification Language (NSL) expression string (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) - **selectionFilterName** (*str*) – A selection filter name - **visualModelName** (*str*) – A visual model name - **colorSchemeName** (*str*) – A name of a color scheme that uses a color palette (e.g. PerChainIllustrate, PerFormalCharge, etc.) - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette for the color scheme. If *None*, then the default color palette associated with this color scheme will be used. - **actions** (*list**of*[*SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)*,**default=**[**]*) – A list of UUIDs of actions that should be applied to the ‘selected’ nodes ##### Examples Create a visual preset step for receptors depicted as ribbons ```pycon >>> visualPreset = SBVisualPresetStep(selectionFilterString = "n.c receptor", selectionFilterName = "Receptor", visualModelName = "Ribbons", colorSchemeName = "Secondary structure type", colorPalette = SBPaletteDefaultPalette.qualitativeHCLDynamic) ``` 9. __init__(self: samson.SBVisualPresetStep, selectionFilterString: str, selectionFilterName: str, visualModelClassName: str, visualModelExtensionUUID: samson.SBUUID, colorSchemeClassName: str, colorSchemeExtensionUUID: samson.SBUUID, colorPalette: samson.SBPalette = None, actions: list[samson.SBUUID] = []) -> None Constructs a visual preset step based on the given parameters. **Parameters** - **selectionFilterString** (*str*) – A selection filter - Node Specification Language (NSL) expression string (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) - **selectionFilterName** (*str*) – A selection filter name - **visualModelClassName** (*str*) – A visual model class name - **visualModelExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A visual model extension UUID - **colorSchemeClassName** (*str*) – A class name of a color scheme that uses a color palette (e.g. SBColorSchemePerChainIllustrate, SBColorSchemePerFormalCharge, etc.) - **colorSchemeExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A color scheme extension UUID - **colorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)*,**default=None*) – A color palette for the color scheme. If *None*, then the default color palette associated with this color scheme will be used. - **actions** (*list**of*[*SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)*,**default=**[**]*) – A list of UUIDs of actions that should be applied to the ‘selected’ nodes ##### Method `samson.SBVisualPresetStep.addActionUUID` Signature: `addActionUUID(self: samson.SBVisualPresetStep, actionUUID: samson.SBUUID) -> bool` Adds an UUID of an action to the action UUIDs list. Returns whether *actionUUID* has been added to the list. If this action UUID is already present in this visual preset step then it does nothing. **Parameters** - **actionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A UUID of an SBAction ##### Method `samson.SBVisualPresetStep.apply` Signature: `apply(self: samson.SBVisualPresetStep, nodeIndexer: samson.SBNodeIndexer, preferredFolder: samson.SBFolder = None) -> None` Applies the visual preset step to nodes in *nodeIndexer* and adds the visual models (if any) to *preferredFolder*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer of nodes to which the visual preset step should be applied - **preferredFolder** ([*samson.SBFolder*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md#samson.SBFolder)*,**default=None*) – A folder for the created visual models. If *None*, then the visual model will be added to the active document. ##### Method `samson.SBVisualPresetStep.clearColor` Signature: `clearColor(self: samson.SBVisualPresetStep) -> None` Clears the color ##### Method `samson.SBVisualPresetStep.clearColorScheme` Signature: `clearColorScheme(self: samson.SBVisualPresetStep) -> None` Clears the color scheme ##### Method `samson.SBVisualPresetStep.clearSelectionFilter` Signature: `clearSelectionFilter(self: samson.SBVisualPresetStep) -> None` Clears the selection filter ##### Method `samson.SBVisualPresetStep.clearSelector` Signature: `clearSelector(self: samson.SBVisualPresetStep) -> None` Clears the selector ##### Method `samson.SBVisualPresetStep.clearVisualModel` Signature: `clearVisualModel(self: samson.SBVisualPresetStep) -> None` Clears the visual model ##### Method `samson.SBVisualPresetStep.clone` Signature: `clone(self: samson.SBVisualPresetStep) -> samson.SBVisualPresetStep` Returns a copy of the visual preset step ##### Method `samson.SBVisualPresetStep.createColorScheme` Signature: `static createColorScheme(colorSchemeClassName: str, nodeIndexer: samson.SBNodeIndexer, colorPalette: samson.SBPalette) -> samson.SBNodeColorScheme` Creates a color scheme *colorSchemeClassName* ##### Method `samson.SBVisualPresetStep.getActionUUIDs` Signature: `getActionUUIDs(self: samson.SBVisualPresetStep) -> list[samson.SBUUID]` Returns a vector of UUIDs of actions that should be applied to the ‘selected’ nodes ##### Method `samson.SBVisualPresetStep.getColor` Signature: `getColor(self: samson.SBVisualPresetStep) -> samson.SBColor` Returns the color ##### Method `samson.SBVisualPresetStep.getColorSchemeProxy` Signature: `getColorSchemeProxy(self: samson.SBVisualPresetStep) -> samson.SBProxy` Returns a proxy to the color scheme ##### Method `samson.SBVisualPresetStep.getColorSchemeProxyFromPublicName` Signature: `static getColorSchemeProxyFromPublicName(publicName: str) -> samson.SBProxy` Returns a proxy that corresponds to a color scheme with the public name *publicName* ##### Method `samson.SBVisualPresetStep.getDefaultColorPaletteForCurrentColorScheme` Signature: `getDefaultColorPaletteForCurrentColorScheme(self: samson.SBVisualPresetStep) -> samson.SBPalette` Returns the default color palette of the color scheme ##### Method `samson.SBVisualPresetStep.getDefaultPalette` Signature: `static getDefaultPalette(colorSchemeClassName: str) -> samson.SBPalette` Returns the default color palette for color scheme *colorSchemeClassName*. ##### Method `samson.SBVisualPresetStep.getPalette` Signature: `getPalette(self: samson.SBVisualPresetStep) -> samson.SBPalette` Returns the color palette ##### Method `samson.SBVisualPresetStep.getSelectorProxy` Signature: `getSelectorProxy(self: samson.SBVisualPresetStep) -> samson.SBProxy` Returns a proxy to the selector ##### Method `samson.SBVisualPresetStep.getVisualModelProxy` Signature: `getVisualModelProxy(self: samson.SBVisualPresetStep) -> samson.SBProxy` Returns a proxy to the visual model ##### Method `samson.SBVisualPresetStep.getVisualModelProxyFromPublicName` Signature: `static getVisualModelProxyFromPublicName(publicName: str) -> samson.SBProxy` Returns a proxy that corresponds to a visual model with the public name *publicName* ##### Method `samson.SBVisualPresetStep.isPerAttributeColorScheme` Signature: `static isPerAttributeColorScheme(colorSchemeClassName: str) -> bool` Returns *True* if the color scheme *colorSchemeClassName* is a per-attribute color scheme ##### Method `samson.SBVisualPresetStep.removeActionUUID` Signature: `removeActionUUID(self: samson.SBVisualPresetStep, actionUUID: samson.SBUUID) -> None` Removes an UUID of an action from the action UUIDs list. **Parameters** - **actionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A UUID of an SBAction ##### Method `samson.SBVisualPresetStep.resetPalette` Signature: `resetPalette(self: samson.SBVisualPresetStep) -> None` Sets the color palette to the default color palette for this color scheme ##### Method `samson.SBVisualPresetStep.setActionUUIDs` Signature: `setActionUUIDs(self: samson.SBVisualPresetStep, actionUUIDs: list[samson.SBUUID]) -> None` Sets UUIDs of actions that should be applied to the ‘selected’ nodes. **Parameters** - **actionUUIDs** (*list**of*[*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A list of UUIDs of actions (SBAction) ##### Method `samson.SBVisualPresetStep.setColor` Signature: `setColor(self: samson.SBVisualPresetStep, color: samson.SBColor) -> None` Sets the color ##### Method `samson.SBVisualPresetStep.setColorSchemeProxy` Signature: `setColorSchemeProxy(self: samson.SBVisualPresetStep, colorSchemeProxy: samson.SBProxy) -> None` Sets the color scheme by proxy ##### Method `samson.SBVisualPresetStep.setPalette` Signature: `setPalette(self: samson.SBVisualPresetStep, colorPalette: samson.SBPalette) -> None` Sets the color palette ##### Method `samson.SBVisualPresetStep.setSelectionFilter` Signature: `setSelectionFilter(self: samson.SBVisualPresetStep, arg0: str, arg1: str) -> None` Sets the selection filter string and name ##### Method `samson.SBVisualPresetStep.setSelectorProxy` Signature: `setSelectorProxy(self: samson.SBVisualPresetStep, selectorProxy: samson.SBProxy) -> None` Sets the selector by proxy ##### Method `samson.SBVisualPresetStep.setVisualModelProxy` Signature: `setVisualModelProxy(self: samson.SBVisualPresetStep, visualModelProxy: samson.SBProxy) -> None` Sets the visual model by proxy ##### Property `samson.SBVisualPresetStep.colorSchemeClassName` Signature: `property colorSchemeClassName` Returns the color scheme’s class name ##### Property `samson.SBVisualPresetStep.colorSchemeExtensionUUID` Signature: `property colorSchemeExtensionUUID` Returns the color scheme’s extension UUID ##### Property `samson.SBVisualPresetStep.hasColor` Signature: `property hasColor` Returns *True* if the visual preset step has a color ##### Property `samson.SBVisualPresetStep.hasColorScheme` Signature: `property hasColorScheme` Returns *True* if the visual preset step has a color scheme ##### Property `samson.SBVisualPresetStep.hasDefaultPalette` Signature: `property hasDefaultPalette` Returns *True* if the color scheme has a default color palette ##### Property `samson.SBVisualPresetStep.hasSelector` Signature: `property hasSelector` Returns *True* if the visual preset step has a selector ##### Property `samson.SBVisualPresetStep.hasVisualModel` Signature: `property hasVisualModel` Returns *True* if the visual preset step has a visual model ##### Property `samson.SBVisualPresetStep.selectionFilterName` Signature: `property selectionFilterName` Returns the selection filter name ##### Property `samson.SBVisualPresetStep.selectionFilterString` Signature: `property selectionFilterString` Returns the selection filter string ##### Property `samson.SBVisualPresetStep.selectorClassName` Signature: `property selectorClassName` Returns the selector’s class name ##### Property `samson.SBVisualPresetStep.selectorExtensionUUID` Signature: `property selectorExtensionUUID` Returns the selector’s extension UUID ##### Property `samson.SBVisualPresetStep.visualModelClassName` Signature: `property visualModelClassName` Returns the visual model’s class name ##### Property `samson.SBVisualPresetStep.visualModelExtensionUUID` Signature: `property visualModelExtensionUUID` Returns the visual model’s extension UUID --- # SBVisualPreset Source: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPreset.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPreset.md This class is a base class for visual presets. Caption: Create and apply a visual preset ```python # get an indexer of all structural models structuralModelIndexer = SAMSON.getNodes("n.t sm") # create a visual preset visualPresetGroup = SBVisualPresetStep("Receptor-ligand interaction", [ SBVisualPresetStep( selectionFilterString = "n.c receptor", selectionFilterName = "Receptor", visualModelName = "Ribbons", colorSchemeName = "Constant", color = SBColor.white), SBVisualPresetStep( selectionFilterString = "n.c ligand", selectionFilterName = "Ligand", visualModelName = "Licorice"), SBVisualPresetStep( selectionFilterString = "a.s C in (n.t r within 5A of n.c ligand)", selectionFilterName = "Carbons in residues with at least one atom within 5A of ligands", visualModelName = "", colorSchemeName = "Constant", color = SBColor.white), SBVisualPresetStep( selectionFilterString = "n.c heavyAtomsWithLinkingBonds in (n.t r within 5A of n.c ligand)", selectionFilterName = "Residues (heavy atoms) with at least one atom within 5A of ligands", visualModelName = "Licorice"), SBVisualPresetStep( selectionFilterString = "n.c water", selectionFilterName = "Water", hideStructureFlag = True), SBVisualPresetStep( selectionFilterString = "a.s O in n.c water", selectionFilterName = "Water oxygen", visualModelName = "Licorice"), SBVisualPresetStep( selectionFilterString = "n.c monatomicIon", selectionFilterName = "Monatomic ions", visualModelName = "Van der Waals") ] ) # apply the visual preset visualPresetGroup.apply(structuralModelIndexer) ``` Please refer to the [Applying visual presets](https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.md#ps-apply-visual-presets) page for more information on how to create and apply visual presets. !!! note "See also" SAMSON SDK: [SBDVisualPreset](https://documentation.samson-connect.net/developers/11.0.0/api/classSBDVisualPreset/#) ## API Reference #### Class `samson.SBVisualPreset` Signature: `class samson.SBVisualPreset(*args, **kwargs)` Bases: `pybind11_object` This class describes a visual preset. Overloaded function. 1. __init__(self: samson.SBVisualPreset, name: str, visualPresetSteps: list[samson.SBVisualPresetStep] = []) -> None Constructs a visual preset with the given name and provided visual preset steps. **Parameters** - **name** (*str*) – A name for the visual preset - **visualPresetSteps** (*list**of**samson.SBVisualPresetStep objects*) – A list of visual preset steps 2. __init__(self: samson.SBVisualPreset, visualPreset: samson.SBVisualPreset) -> None Constructs a visual preset based on the provided visual preset. **Parameters** - **visualPreset** ([*samson.SBVisualPreset*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPreset.md#samson.SBVisualPreset)) – Another visual preset ##### Method `samson.SBVisualPreset.addVisualPresetStep` Signature: `addVisualPresetStep(self: samson.SBVisualPreset, visualPresetStep: samson.SBVisualPresetStep) -> None` Adds a clone of the visual preset step *visualPresetStep* to the visual preset. **Parameters** - **visualPresetStep** ([*samson.SBVisualPresetStep*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPresetStep.md#samson.SBVisualPresetStep)) – A visual preset step to be added to the visual preset. A clone of the visual preset step is added to the visual preset, since it takes ownership of the visual preset step. ##### Method `samson.SBVisualPreset.apply` Signature: `apply(self: samson.SBVisualPreset, nodeIndexer: samson.SBNodeIndexer, preferredFolder: samson.SBFolder = None) -> None` Applies the visual preset to nodes in *nodeIndexer* and adds node groups and visual models (if any) to *preferredFolder*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer of nodes to which the visual preset should be applied - **preferredFolder** ([*samson.SBFolder*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md#samson.SBFolder)) – A folder for the created visual models. If *None*, then a folder will be created based on the visual preset name and it will be added to the active document. ##### Method `samson.SBVisualPreset.clone` Signature: `clone(self: samson.SBVisualPreset) -> samson.SBVisualPreset` Returns a copy of the visual preset ##### Method `samson.SBVisualPreset.deleteVisualPresetStep` Signature: `deleteVisualPresetStep(*args, **kwargs)` Overloaded function. 1. deleteVisualPresetStep(self: samson.SBVisualPreset, index: int) -> None Deletes the visual preset with index *index* from the visual preset. **Parameters** - **index** (*int*) – An index of a visual preset step to be removed from the visual preset. 2. deleteVisualPresetStep(self: samson.SBVisualPreset, visualPresetStep: samson.SBVisualPresetStep) -> None Deletes the visual preset step *visualPresetStep* from the visual preset. **Parameters** - **visualPresetStep** ([*samson.SBVisualPresetStep*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Visualization/SBDVisualPresetStep.md#samson.SBVisualPresetStep)) – A visual preset step to be removed from the visual preset. ##### Method `samson.SBVisualPreset.getDefaultVisualPresets` Signature: `static getDefaultVisualPresets() -> list[samson.SBVisualPreset]` Returns a list of the default visual presets ##### Method `samson.SBVisualPreset.getNumberOfVisualPresetSteps` Signature: `getNumberOfVisualPresetSteps(self: samson.SBVisualPreset) -> int` Returns the number of visual preset steps ##### Method `samson.SBVisualPreset.getVisualPresetSteps` Signature: `getVisualPresetSteps(self: samson.SBVisualPreset) -> list[samson.SBVisualPresetStep]` Returns a list of visual preset steps ##### Method `samson.SBVisualPreset.swap` Signature: `swap(self: samson.SBVisualPreset, i: int, j: int) -> None` Swaps visual preset steps *i* and *j*. **Parameters** - **i** (*int*) – An index of a visual preset step. - **j** (*int*) – An index of a visual preset step. ##### Property `samson.SBVisualPreset.name` Signature: `property name` The name of the visual preset --- # Facade Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Facade.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Facade.md This group contains the high-level interfaces that gather frequently used functionality from across SAMSON into a few convenient entry points. !!! note "See also" SAMSON SDK: [The Facade Library Group](https://documentation.samson-connect.net/developers/11.0.0/sdk/Facade/#) - [SAMSON](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md) --- # SAMSON Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md This sub-module is the main interface to SAMSON API. You can access some of SAMSON functionality directly from this sub-module, for example: ```python activeDocument = SAMSON.getActiveDocument() ``` !!! note "See also" SAMSON SDK: [SAMSON](https://documentation.samson-connect.net/developers/11.0.0/api/classSAMSON/#) This class is the main interface of SAMSON. It acts as a facade that centralizes and exposes other functions from the SAMSON API to make it easy for developers to interact with SAMSON, the data graph, etc. All functions in this class are static. ## API Reference #### Class `samson.SAMSON.holding` Signature: `class samson.SAMSON.holding(self: samson.SAMSON.holding, arg0: str)` Bases: `pybind11_object` A context manager for holding [undoable](https://documentation.samson-connect.net/scripting/latest/docs/MakingOperationsUndoable.md#ps-undo) operations. Calls internally *SAMSON.beginHolding* upon enter and *SAMSON.endHolding* upon exit. **Parameters** - **name** (*str*) – A name of the operation, it will be shown in the History. ##### Examples ```pycon >>> structuralModel = SBStructuralModel() >>> with SAMSON.holding("Add structural model"): >>> SAMSON.hold(structuralModel) >>> structuralModel.create() >>> SAMSON.getActiveDocument().addChild(structuralModel) ``` !!! note "See also" `beginHolding`, `endHolding`, `hold` #### Function `samson.SAMSON.addDocument` Signature: `samson.SAMSON.addDocument(document: samson.SBDocument) -> None` Add a document to the list of open documents. **Parameters** - **document** ([*samson.SBDocument*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument)) – The document to add ##### Examples Create a new document and sets it as active ```pycon >>> myDoc = SBDocument('My document') >>> myDoc.create() >>> SAMSON.addDocument(myDoc) >>> SAMSON.setActiveDocument(myDoc) >>> # use the new clean document ``` !!! note "See also" `addNewDocument`, `getActiveDocument`, `setActiveDocument`, `removeDocument` #### Function `samson.SAMSON.addNewDocument` Signature: `samson.SAMSON.addNewDocument(name: str) -> samson.SBDocument` Create a new document, add it to the list of open documents, set it as the active document, and return the newly created document. This is a convenience function that internally creates a new document, adds it to the list of open documents using *SAMSON.addDocument*, and sets it as the active document using *SAMSON.setActiveDocument*. **Parameters** - **name** (*str*) – The document name **Returns** - The newly created document **Return type** - [samson.SBDocument](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument) ##### Examples Create a new document and sets it as active ```pycon >>> myDoc = SAMSON.addNewDocument('My document') >>> # use the new clean document ``` !!! note "See also" `addDocument`, `getActiveDocument`, `setActiveDocument`, `removeDocument` #### Function `samson.SAMSON.appIsInitialized` Signature: `samson.SAMSON.appIsInitialized(appUUID: samson.SBUUID, extensionUUID: samson.SBUUID = SBUUID('00000000-0000-0000-0000-000000000000')) -> bool` Returns true or false if an app corresponding to a specific p appUUID and p elementUUID is initialized already. **Parameters** - **appUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – The app’s UUID - **extensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – The UUID of the extension with the app **Returns** - Whether the app is initialized or not **Return type** - bool #### Function `samson.SAMSON.askUser` Signature: `samson.SAMSON.askUser(*args, **kwargs)` Overloaded function. 1. askUser(dialogTitle: str, dialogText: str) -> bool Asks a question to the user with a message in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str*) – A title of the pop-up dialog. - **dialogText** (*str*) – A text in the pop-up dialog. **Returns** - *True* if the user clicked *OK*, *False* if the user clicked *Cancel*. **Return type** - bool ##### Examples ```pycon >>> SAMSON.askUser('Error', 'Caught an error during the execution.\nProceed?') ``` !!! note "See also" `informUser` 2. askUser(dialogTitle: str, labelText: str, text: str, monospaceFont: bool) -> bool Asks a question to the user with a message in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str*) – A title of the pop-up dialog. - **labelText** (*str*) – A text of the message label. - **text** (*str*) – A text in the plain text edit. - **monospaceFont** (*bool*) – Whether the text should be shown using a monospace font or not. **Returns** - *True* if the user clicked *OK*, *False* if the user clicked *Cancel*. **Return type** - bool ##### Examples ```pycon >>> SAMSON.askUser('Error', 'Caught an error during the execution.\nProceed?', 'Error message...', True) ``` !!! note "See also" `informUser` #### Function `samson.SAMSON.beginHolding` Signature: `samson.SAMSON.beginHolding(name: str) -> None` Begins holding. Prefer using the context manager *SAMSON.holding* instead. **Parameters** - **name** (*str*) – A name of the operation, it will be shown in the History. ##### Examples Make the selection of molecules undoable: ```pycon >>> SAMSON.beginHolding('Select nodes') >>> nodeIndexer = SAMSON.getNodes('node.type molecule') >>> for node in nodeIndexer: ... node.selectionFlag = True >>> SAMSON.endHolding() ``` !!! note "See also" `holding`, `hold`, `endHolding`, `isHolding`, `disableHolding`, `enableHolding` #### Function `samson.SAMSON.canImportFromFile` Signature: `samson.SAMSON.canImportFromFile(fileName: str) -> bool` Returns true when the files can be imported. **Parameters** - **fileName** (*str*) – A path to the file !!! note "See also" `importFromFile`, `fetch`, `exportToFile` #### Function `samson.SAMSON.captureViewportToFile` Signature: `samson.SAMSON.captureViewportToFile(filename: str, width: int, height: int, transparentBackground: bool = False, usePathTracing: bool = False, showProgressBar: bool = True) -> None` Captures the viewport into file. The image format is based on the file extension. **Parameters** - **filename** (*str*) – The file path. - **width** (*int*) – The width of the image. - **height** (*int*) – The height of the image. - **transparentBackground** (*bool**,**default=False*) – Whether the viewport background should be transparent or not. - **usePathTracing** (*bool**,**default=False*) – Whether to use path tracing. - **showProgressBar** (*bool**,**default=True*) – Whether to show the progress bar when capturing, might be useful when using path tracing. ##### Examples Capture the current viewport in a file. ```pycon >>> SAMSON.captureViewportToFile(filename = '/home/user/test.png', >>> width = 1200, height = 800) ``` #### Function `samson.SAMSON.countNodes` Signature: `samson.SAMSON.countNodes(*args, **kwargs)` Overloaded function. 1. countNodes(selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> int Counts nodes in the active document, based on the provided selection filter *selectionString* and other parameters. This function traverses the active document’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and stores counts the nodes for which the *selectionString* is *True*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns *True*, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is *True*, the function also counts nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *selectionString* and *visitString*, they are counted if *includeDependencies* is *True*. **Parameters** - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be selected from the active document. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited in the active document. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - The number of nodes. **Return type** - int ##### Examples Get a number of atoms in the active document: ```pycon >>> number_of_atoms = SAMSON.countNodes('node.type atom') ``` 2. countNodes(nodeType: samson.SBNode.Type, selectedNodesOnly: bool = False, visitString: str = ‘*’, includeDependencies: bool = False) -> int Counts nodes in the active document, based on *nodeType* and other parameters. This function traverses the active document’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and counts nodes whose type is *nodeType*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns *True*, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is *True*, the function also counts nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *nodeType* and *visitString*, they are counted if *includeDependencies* is *True*. **Parameters** - **nodeType** ([*samson.SBNode.Type*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.Type)) – A type of nodes that should be collected. - **selectedNodesOnly** (*bool**,**default=False*) – If set to *True*, then only nodes that are selected, directly or via their parents, will be traversed. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited in the active document. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - The number of nodes. **Return type** - int ##### Examples Get a number of residues in the active document: ```pycon >>> number_of_residues = SAMSON.countNodes(SBNode.Residue) ``` #### Function `samson.SAMSON.createRenderPreset` Signature: `samson.SAMSON.createRenderPreset() -> samson.SBRenderPreset` Creates a render preset based on the current rendering settings; returns the owning pointer #### Function `samson.SAMSON.deleteDocument` Signature: `samson.SAMSON.deleteDocument(document: samson.SBDocument) -> None` Remove a document from the list of open documents and delete it. This is a convenience function that internally removes the document from the list of open documents and erases it. **Parameters** - **document** ([*samson.SBDocument*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument)) – The document to remove and delete ##### Examples Delete the active document ```pycon >>> document = SAMSON.getActiveDocument() >>> SAMSON.deleteDocument(document) ``` !!! note "See also" `removeDocument`, `getActiveDocument`, `setActiveDocument`, `addDocument`, `addNewDocument` #### Function `samson.SAMSON.disableHolding` Signature: `samson.SAMSON.disableHolding() -> None` Pauses holding. !!! note "See also" `isHolding`, `enableHolding`, `beginHolding`, `hold`, `endHolding` #### Function `samson.SAMSON.enableHolding` Signature: `samson.SAMSON.enableHolding() -> None` Resumes holding. !!! note "See also" `holding`, `isHolding`, `disableHolding`, `beginHolding`, `hold`, `endHolding` #### Function `samson.SAMSON.endHolding` Signature: `samson.SAMSON.endHolding() -> None` Ends holding. Prefer using the context manager *SAMSON.holding* instead. !!! note "See also" `holding`, `beginHolding`, `hold`, `isHolding`, `disableHolding`, `enableHolding` #### Function `samson.SAMSON.exit` Signature: `samson.SAMSON.exit() -> None` Exits SAMSON with a dialog #### Function `samson.SAMSON.exportToFile` Signature: `samson.SAMSON.exportToFile(*args, **kwargs)` Overloaded function. 1. exportToFile(nodeIndexer: samson.SBNodeIndexer, fileName: str) -> None Export a collection of nodes in the nodeIndexer to a file. The format of the file is based on its extension. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer of nodes that should be exported. - **fileName** (*str*) – A path to the file. ##### Examples Export all structural models from the active document into a PDB file. ```pycon >>> nodeIndexer = SAMSON.getNodes('node.type structuralModel') >>> SAMSON.exportToFile(nodeIndexer, '/home/user/example.pdb') ``` !!! note "See also" `importFromFile` 2. exportToFile(nodeIndexer: samson.SBNodeIndexer, fileName: str, parameters: samson.SBValueMap) -> None Export a collection of nodes in the nodeIndexer to a file with parameters specific to the exporter associated with the format of the file. The format of the file is based on its extension. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer of nodes that should be exported. - **fileName** (*str*) – A path to the file. - **parameters** ([*SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – A value map with importer parameters. !!! note "See also" `importFromFile` #### Function `samson.SAMSON.fetch` Signature: `samson.SAMSON.fetch(*args, **kwargs)` Overloaded function. 1. fetch(id: str, source: str = ‘’, folderPath: str = ‘’, importFlag: bool = True, preferredFolder: samson.SBFolder = None) -> None Fetch structure specified by the identifier *id* from a source data bank *source*. This function allows you to fetch structures from the same sources as in “Home > Fetch” in SAMSON. **Parameters** - **id** (*str*) – An identifier. See the description of *source* and “Home > Fetch” in SAMSON for more info and examples. - **source** (*str**,**default=''*) – The source name, case insensitive.If the source name is not provided, then the source will be guessed based on the identifier.Loading files from some sources (‘alphafold’, ‘cod’, ‘mmcif’) will invoke pop-up import dialogs.Available sources:’alphafold’ :Structures predicted by AlphaFold.**Source**: [AlphaFold Protein Structure Database](https://alphafold.ebi.ac.uk).**Format**: mmCIF (.cif).**Identifiers**: UniProtKB entry, optionally, with AlphaFold-specific prefix and suffixes, e.g.: `Q8I3H7` or `AF-Q8I3H7-F1-model_v4`The prefix `AF-` is optional. You can specify the fragment id (e.g. `-F1`), if it’s not specified then `-F1` will be added.You can also specify the model version suffix (e.g., `-model_v4`), if not specified then `-model_v4` will be added.So, for example, `Q8W3K0` will lead to `AF-Q8W3K0-F1-model_v4`.**Example**: `SAMSON.fetch('Q8I3H7', 'alphafold')`’cod’ :Crystal structures.**Source**: [Crystallography Open Database (COD)](https://crystallography.net).**Format**: CIF (.cif).**Identifiers**: COD ID, e.g.: `1100118`**Example**: `SAMSON.fetch('1100118', 'cod')`’esmfold’ :Structures predicted by ESMFold.**Source**: [ESM Metagenomic Atlas](https://esmatlas.com).**Format**: PDB (.pdb).**Identifiers**: MGnify identifier, e.g.: `MGYP000425902587`**Example**: `SAMSON.fetch('MGYP000425902587', 'esmfold')`’iupac’ :Generate 3D structure for the given IUPAC names. It uses [OPSIN](https://ebi.ac.uk/opsin) to convert IUPAC names into SMILES.**Format**: SMI (.smi).**Identifiers**: IUPAC name, e.g.: `cyclohexane-1,2-diol`**Example**: `SAMSON.fetch('cyclohexane-1,2-diol', 'iupac')`’mmcif’ :Protein complexes or small molecules (ligands).**Source**: [RCSB Protein Data Bank](https://rcsb.org).**Format**: mmCIF (.cif).**Identifiers**:CCD ID for ligands, e.g.: `7KH`, `A1LU6`PDB ID, e.g.: `1YRF`, `pdb_00001af6`Load biological assemblies by appending its index to a PDB ID via a dot `.` (e.g.: `.1.2.3`). Examples: `8H2X.1` - download the bio-assembly 1 for 8H2X; `8H2X.1.3` - download bio-assemblies 1 and 3.**Example**: `SAMSON.fetch('1YRF', 'mmcif')`’mmtf’ :Protein complexes.**Source**: [RCSB Protein Data Bank](https://rcsb.org).The MMTF format is not longer supported for new structures - as of July 2, 2024, [RCSB PDB no longer serves PDB data in the MMTF format for structures deposited after this date](https://www.rcsb.org/news/65a1af31c76ca3abcc925d0c).**Format**: MMTF (.mmtf).**Identifiers**: PDB ID, e.g.: `1YRF`, `pdb_00001af6`**Example**: `SAMSON.fetch('1YRF', 'mmtf')`’pdb’ :Protein complexes.**Source**: [RCSB Protein Data Bank](https://rcsb.org).**Format**: PDB (.pdb).**Identifiers**: PDB ID, e.g.: `1YRF`, `pdb_00001af6`Load biological assemblies by appending its index to a PDB ID via a dot `.` (e.g.: `.1.2.3`). Examples: `8H2X.1` - download the bio-assembly 1 for 8H2X; `8H2X.1.3` - download bio-assemblies 1 and 3.**Example**: `SAMSON.fetch('1YRF', 'pdb')`’pubchem’:Small molecules (ligands).**Source**: [PubChem](https://pubchem.ncbi.nlm.nih.gov/) based on their Compound Identifiers (CID).**Format**: SDF (.sdf).**Identifiers**: PubChem CID, e.g.: `2519`**Example**: `SAMSON.fetch('2244', 'pubchem')`’smiles’ :Generate 3D structures for the given SMILES codes. It uses RDKit library and the minimization integrated in SAMSON with the [Universal Force Field](https://www.samson-connect.net/extensions/8cbdc8b1-59e1-6459-d68f-b840275dd5e9).**Identifiers**: SMILES code, e.g.: `C1(C(CCCC1)O)O`**Example**: `SAMSON.fetch('C1(C(CCCC1)O)O', 'smiles')` - **folderPath** (*str**,**default=''*) – A folder path where a downloaded file should be saved. If left empty then it will use the download folder from “Home > Fetch”. - **importFlag** (*bool**,**default=True*) – If true then the downloaded file will be imported. - **preferredFolder** ([*samson.SBFolder*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md#samson.SBFolder)*,**default=None*) – A folder node in SAMSON into which a system from the downloaded file should be imported. ##### Examples Fetch structures from different sources and load them in SAMSON. ```pycon >>> SAMSON.fetch('1YRF', 'pdb') >>> SAMSON.fetch('A1LU6', 'mmcif') >>> SAMSON.fetch('Q8I3H7', 'alphafold') >>> SAMSON.fetch('MGYP000425902587', 'esmfold') >>> SAMSON.fetch('2244', 'pubchem') >>> SAMSON.fetch('cyclohexane-1,2-diol', 'iupac') >>> SAMSON.fetch('C1(C(CCCC1)O)O', 'smiles') >>> SAMSON.fetch('1100118', 'cod') ``` !!! note "See also" `fetch`, `importFromFile`, `exportToFile` 2. fetch(ids: list[str], source: str = ‘’, folderPath: str = ‘’, importFlag: bool = True, preferredFolder: samson.SBFolder = None) -> None Fetch multiple structures specified in the identifiers *ids* list from the same source data bank *source*. This function allows you to fetch structures from the same sources as in “Home > Fetch” in SAMSON. **Parameters** - **ids** (*list**of**str*) – A list of identifiers. See the description of *source* above and “Home > Fetch” in SAMSON for more info and examples. - **source** (*str**,**default=''*) – The source name, case insensitive.If the source name is not provided, then the source will be guessed based on the first non-empty identifier in the list.Loading files from some sources (‘alphafold’, ‘cod’, ‘mmcif’) will invoke pop-up import dialogs.Available sources: ‘alphafold’, ‘cod’, ‘esmfold’, ‘iupac’, ‘mmcif’, ‘mmtf’, ‘pdb’, ‘pubchem’, ‘smiles’See the description of sources above. - **folderPath** (*str**,**default=''*) – A folder path where a downloaded file should be saved. If left empty then it will use the download folder from “Home > Fetch”. - **importFlag** (*bool**,**default=True*) – If true then the downloaded file will be imported. - **preferredFolder** ([*samson.SBFolder*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md#samson.SBFolder)*,**default=None*) – A folder node in SAMSON into which a system from the downloaded file should be imported. ##### Examples Fetch structures from different sources and load them in SAMSON. ```pycon >>> SAMSON.fetch(['1YRF', '2AZ8'], 'pdb') >>> SAMSON.fetch(['2244', '2259'], 'pubchem') ``` !!! note "See also" `fetch`, `importFromFile`, `exportToFile` #### Function `samson.SAMSON.getAction` Signature: `samson.SAMSON.getAction(actionUUID: samson.SBUUID) -> samson.SBAction` Return the action with the given actionUUID. **Parameters** - **actionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A UUID of a command (action). **Returns** - *True* if an action was found, else *False*. **Return type** - bool !!! note "See also" `getActionByText`, `runCommand` #### Function `samson.SAMSON.getActionByText` Signature: `samson.SAMSON.getActionByText(text: str) -> samson.SBAction` Return the first found action with the given text. **Parameters** - **text** (*str*) – A name of an action (command), may include a path to this action (command) in the ribbon menu. **Returns** - An action, or *None* if not found. **Return type** - [samson.SBAction](https://documentation.samson-connect.net/scripting/latest/docs/api/GUI/Action/SBGAction.md#samson.SBAction) ##### Examples Find and trigger an action. ```pycon >>> action = SAMSON.getActionByText('Ribbons') >>> if action: action.trigger() >>> else: print("Could not find the action") ``` !!! note "See also" `runCommand`, `getAction` #### Function `samson.SAMSON.getActiveAsset` Signature: `samson.SAMSON.getActiveAsset() -> samson.SBAsset` Returns the active asset #### Function `samson.SAMSON.getActiveCamera` Signature: `samson.SAMSON.getActiveCamera() -> samson.SBCamera` Returns the active camera from the active document. Note: SAMSON always has an active camera. **Returns** - The active camera in the active document **Return type** - [samson.SBCamera](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentCamera.md#samson.SBCamera) ##### Examples Go to the front view with the active camera. ```pycon >>> SAMSON.getActiveCamera().frontView() ``` !!! note "See also" `getActiveDocument` #### Function `samson.SAMSON.getActiveDocument` Signature: `samson.SAMSON.getActiveDocument() -> samson.SBDocument` Returns the active document. Note: SAMSON always has an active document. **Returns** - The active document **Return type** - [samson.SBDocument](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument) ##### Examples Clear the selection in the active document. ```pycon >>> SAMSON.getActiveDocument().clearSelection() ``` #### Function `samson.SAMSON.getActiveDocumentFilter` Signature: `samson.SAMSON.getActiveDocumentFilter() -> str` Returns the node filter of the active document in the Document View. **Returns** - The current node filter in the Document View. **Return type** - str !!! note "See also" `setActiveDocumentFilter` #### Function `samson.SAMSON.getActiveSelectionFilterNSL` Signature: `samson.SAMSON.getActiveSelectionFilterNSL() -> str` Returns the active selection filter NSL string. **Returns** - The current selection filter Node Specification Language (NSL) expression string (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)). **Return type** - str ##### Examples ```pycon >>> SAMSON.getActiveSelectionFilterNSL() 'n.t r' ``` #### Function `samson.SAMSON.getActiveSelectionFilterName` Signature: `samson.SAMSON.getActiveSelectionFilterName() -> str` Returns the active selection filter name. **Returns** - The current selection filter name. **Return type** - str ##### Examples ```pycon >>> SAMSON.getActiveSelectionFilterName() 'Atoms and bonds' ``` #### Function `samson.SAMSON.getActiveStructuralModel` Signature: `samson.SAMSON.getActiveStructuralModel() -> samson.SBStructuralModel` Returns the active structural model in the active document. **Returns** - The active structural model in the document, if any, else return *None* **Return type** - [samson.SBStructuralModel](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md#samson.SBStructuralModel) ##### Examples Get the active structural model in the active document. ```pycon >>> active_structural_model = SAMSON.getActiveStructuralModel() ``` !!! note "See also" `setActiveStructuralModel` #### Function `samson.SAMSON.getAnimationNames` Signature: `samson.SAMSON.getAnimationNames() -> list[str]` Returns a list of public names of animations #### Function `samson.SAMSON.getAnimationProxyMap` Signature: `samson.SAMSON.getAnimationProxyMap() -> dict[str, samson.SBProxy]` Returns a map between public names of animations and their proxies #### Function `samson.SAMSON.getAtom` Signature: `samson.SAMSON.getAtom(x: int, y: int) -> samson.SBAtom` Returns the atom at location (x, y) in the viewport. **Parameters** - **x** (*int*) – x-coordinate in the viewport. - **y** (*int*) – y-coordinate in the viewport. **Returns** - An atom. **Return type** - [samson.SBAtom](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom) ##### Examples Get an atom at the given coordinates in the viewport: ```pycon >>> atom = SAMSON.getAtom(100, 200) ``` !!! note "See also" `getBond`, `getNode`, `getNodes` #### Function `samson.SAMSON.getAtomRadius` Signature: `samson.SAMSON.getAtomRadius() -> samson.SBQuantity.unitsSI` Get the radius of atoms in the default representation of structural models. **Returns** - A radius of atoms. **Return type** - samson.SBQuantity ##### Examples ```pycon >>> SAMSON.getAtomRadius() 30.000000 pm ``` #### Function `samson.SAMSON.getAtomicWeight` Signature: `samson.SAMSON.getAtomicWeight(element: samson.SBElement.ElementType) -> samson.SBQuantity.unitsSI` Returns the atomic weight of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - An atomic weight of the given periodic table element. **Return type** - samson.SBQuantity ##### Examples Get an atomic weight of a periodic table element in Daltons. ```pycon >>> atomic_weight = SAMSON.getAtomicWeight(SBElement.C) >>> print(atomic_weight.Da) 12.011 Da ``` #### Function `samson.SAMSON.getBlock` Signature: `samson.SAMSON.getBlock(element: samson.SBElement.ElementType) -> str` Returns the block of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A block of the given periodic table element. **Return type** - str ##### Examples Get a block of a periodic table element. ```pycon >>> SAMSON.getBlock(SBElement.Fe) 'd' ``` #### Function `samson.SAMSON.getBond` Signature: `samson.SAMSON.getBond(x: int, y: int) -> samson.SBBond` Returns the bond at location (x, y) in the viewport. **Parameters** - **x** (*int*) – x-coordinate in the viewport. - **y** (*int*) – y-coordinate in the viewport. **Returns** - A bond. **Return type** - [samson.SBBond](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeBond.md#samson.SBBond) ##### Examples Get a bond at the given coordinates in the viewport: ```pycon >>> bond = SAMSON.getBond(100, 200) ``` !!! note "See also" `getAtom`, `getNode`, `getNodes` #### Function `samson.SAMSON.getBondRadius` Signature: `samson.SAMSON.getBondRadius() -> samson.SBQuantity.unitsSI` Get the radius of bonds in the default representation of structural models. **Returns** - A radius of bonds. **Return type** - samson.SBQuantity ##### Examples ```pycon >>> SAMSON.getBondRadius() 10.000000 pm ``` #### Function `samson.SAMSON.getCameraControllerFlag` Signature: `samson.SAMSON.getCameraControllerFlag() -> bool` Returns *True* when the camera controller should be displayed in the viewport. #### Function `samson.SAMSON.getChoiceFromUser` Signature: `samson.SAMSON.getChoiceFromUser(dialogTitle: str, currentIndex: int, label: str, choices: list[str], toolTips: list[str]) -> tuple` Gets a choice from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str*) – A title of the pop-up dialog. - **currentIndex** (*int*) – The input index - **label** (*str*) – The description label in the dialog - **choices** (*list**of**str*) – The list of choices - **toolTips** (*list**of**str*) – The list of tool tips for choices **Returns** - A tuple with the status as the 1st value and the index as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the chosen index. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is input index. **Return type** - Tuple(bool, int) #### Function `samson.SAMSON.getColorFromUser` Signature: `samson.SAMSON.getColorFromUser(dialogTitle: str = 'Choose a color', color: samson.SBColor = SBColor(1.000000, 1.000000, 1.000000, 1.000000)) -> tuple` Gets a color from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str**,**default='Choose a color'*) – A title of the pop-up dialog. - **color** ([*samson.SBColor*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)*,**default=SBColor**(**)*) – The input color **Returns** - A tuple with the status as the 1st value and the color as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the chosen color. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is the input color. **Return type** - Tuple(bool, [samson.SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor)) ##### Examples ```pycon >>> status, color = SAMSON.getColorFromUser("Choose a color") ``` !!! note "See also" `getPaletteFromUser` #### Function `samson.SAMSON.getColorSchemeNames` Signature: `samson.SAMSON.getColorSchemeNames() -> list[str]` Returns a list of public names of color schemes #### Function `samson.SAMSON.getColorSchemeProxyMap` Signature: `samson.SAMSON.getColorSchemeProxyMap() -> dict[str, samson.SBProxy]` Returns a map between public names of color schemes and their proxies #### Function `samson.SAMSON.getCovalentRadius` Signature: `samson.SAMSON.getCovalentRadius(*args, **kwargs)` Overloaded function. 1. getCovalentRadius(element: samson.SBElement.ElementType) -> samson.SBQuantity.unitsSI Returns the covalent radius of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A covalent radius of the given periodic table element. **Return type** - samson.SBQuantity ##### Examples Get a covalent radius of a periodic table element in angstroms. ```pycon >>> covalent_radius = SAMSON.getCovalentRadius(SBElement.Ar) >>> print(covalent_radius.angstrom) 1.06 Å ``` 2. getCovalentRadius(element: samson.SBElement.ElementType, bondType: int) -> samson.SBQuantity.unitsSI Returns the covalent radius of a periodic table element for bond type bondType (1 for single bond, 2 for double bond, 3 for triple bond, for other values it returns getCovalentRadius()) **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element - **bondType** (*{1**,**2**,**3}*) – A bond type: 1 - single, 2 - double, 3 - triple. **Returns** - A covalent radius of the given periodic table element for the given bond type. **Return type** - samson.SBQuantity ##### Examples Get a covalent radius of a double bond to Carbon in angstroms. ```pycon >>> covalent_radius = SAMSON.getCovalentRadius(SBElement.C, 2) >>> print(covalent_radius.angstrom) 0.67 Å ``` #### Function `samson.SAMSON.getDarkModeFlag` Signature: `samson.SAMSON.getDarkModeFlag() -> bool` Returns true when dark mode is on #### Function `samson.SAMSON.getDeepSelectionFlag` Signature: `samson.SAMSON.getDeepSelectionFlag() -> bool` Returns whether the user wants deep selection. #### Function `samson.SAMSON.getDoubleFromUser` Signature: `samson.SAMSON.getDoubleFromUser(dialogTitle: str, currentValue: float, minimum: float, maximum: float, singleStep: float = 1.0, prefix: str = '', suffix: str = '', decimals: int = 2) -> tuple` Gets a float number from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str*) – A title of the pop-up dialog. - **currentValue** (*float*) – The current value. - **minimum** (*float*) – A minimum value. - **maximum** (*float*) – A maximum value. - **singleStep** (*float**,**default=1.0*) – A single step value when changing values in the spin box. - **prefix** (*str**,**default=''*) – A prefix shown in the spin box. - **suffix** (*str**,**default=''*) – A suffix shown in the spin box. - **decimals** (*int**,**default=2*) – A number of decimals shown in the spin box. **Returns** - A tuple with the status as the 1st value and the result as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the chosen value. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is *currentValue*. **Return type** - Tuple(bool, float) ##### Examples ```pycon >>> status, value = SAMSON.getDoubleFromUser('Choose a value...', 0.5, -1.5, 9.6) ``` !!! note "See also" `getDoubleIntervalFromUser`, `getIntegerFromUser` #### Function `samson.SAMSON.getDoubleIntervalFromUser` Signature: `samson.SAMSON.getDoubleIntervalFromUser(dialogTitle: str, labelsText: list[str], currentValues: tuple[float, float], minValueInterval: tuple[float, float], maxValueInterval: tuple[float, float], singleStep: tuple[float, float] = (1.0, 1.0), prefix: str = '', suffix: str = '') -> tuple` Gets a float interval from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str*) – A title of the pop-up dialog. - **labelsText** (*tuple**of**str**,**size=3*) – A text in the main label and in labels for the left and right values of the interval. - **currentValues** (*tuple**of**float**,**size=2*) – A tuple of size 2 with the current values for the left and right values of the interval. - **minValueInterval** (*tuple**of**float**,**size=2*) – A tuple of size 2 describing the range of values for the left value of the interval. - **maxValueInterval** (*tuple**of**float**,**size=2*) – A tuple of size 2 describing the range of values for the right value of the interval. - **singleStep** (*tuple**of**float**,**default=**(**1**,**1**)*) – A tuple of single step values (when changing values in the spin box) for the left and right values of the interval. - **prefix** (*str**,**default=''*) – A prefix shown in the spin box. - **suffix** (*str**,**default=''*) – A suffix shown in the spin box. **Returns** - A tuple with the status as the 1st value and the result interval as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the chosen value interval as a tuple. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is *currentValues*. **Return type** - Tuple(bool, Tuple(float, float)) ##### Examples ```pycon >>> status, value = SAMSON.getDoubleIntervalFromUser('Choose an interval...', >>> ('Choose min and max', 'min', 'max'), (1.5, 7.5), (0, 3), (4, 10)) ``` !!! note "See also" `getDoubleFromUser`, `getIntegerIntervalFromUser` #### Function `samson.SAMSON.getElectronegativity` Signature: `samson.SAMSON.getElectronegativity(element: samson.SBElement.ElementType) -> samson.SBQuantity.unitsSI` Returns the electronegativity of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - An electronegativity of the given periodic table element (dimensionless). **Return type** - samson.SBQuantity ##### Examples Get an electronegativity of a periodic table element. ```pycon >>> electronegativity = SAMSON.getElectronegativity(SBElement.O) >>> print(electronegativity) 3.440000 (dimensionless) ``` #### Function `samson.SAMSON.getElementFromUser` Signature: `samson.SAMSON.getElementFromUser(dialogTitle: str = 'Select an element', currentElement: samson.SBElement.ElementType = ) -> tuple` Gets a periodic table element from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str**,**default='Select an element'*) – A title of the pop-up dialog. - **currentElement** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)*,**default=SBElement.Unknown*) – The current element. **Returns** - A tuple with the status as the 1st value and the result as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the user-chosen element. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is *SBElement.Unknown*. **Return type** - Tuple(bool, str) ##### Examples ```pycon >>> status, value = SAMSON.getElementFromUser() ``` !!! note "See also" `getElementsFromUser` #### Function `samson.SAMSON.getElementName` Signature: `samson.SAMSON.getElementName(element: samson.SBElement.ElementType) -> str` Returns the name of the periodic table element corresponding to the given type. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A name of the given periodic table element. **Return type** - str ##### Examples Get a name of a periodic table element. ```pycon >>> SAMSON.getElementName(SBElement.N) 'Nitrogen' ``` #### Function `samson.SAMSON.getElementSymbol` Signature: `samson.SAMSON.getElementSymbol(element: samson.SBElement.ElementType) -> str` Returns the symbol of the periodic table element corresponding to the given type. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A symbol of the given periodic table element. **Return type** - str ##### Examples Get a symbol of a periodic table element. ```pycon >>> SAMSON.getElementSymbol(SBElement.O) 'O' ``` #### Function `samson.SAMSON.getElementTypeByName` Signature: `samson.SAMSON.getElementTypeByName(elementName: str) -> samson.SBElement.ElementType` Returns the periodic table element type corresponding to the given name. **Parameters** - **elementName** (*str*) – A name of a periodic table element. **Returns** - A type of the periodic table element. **Return type** - [samson.SBElement.ElementType](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType) ##### Examples Get a type of a periodic table element. ```pycon >>> SAMSON.getElementTypeByName('Nitrogen') ``` #### Function `samson.SAMSON.getElementTypeBySymbol` Signature: `samson.SAMSON.getElementTypeBySymbol(elementSymbol: str) -> samson.SBElement.ElementType` Returns the periodic table element type corresponding to the given symbol. **Parameters** - **elementSymbol** (*str*) – A symbol of a periodic table element. **Returns** - A type of the periodic table element. **Return type** - [samson.SBElement.ElementType](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType) ##### Examples Get a type of a periodic table element. ```pycon >>> SAMSON.getElementTypeBySymbol('Ca') ``` #### Function `samson.SAMSON.getElementsFromUser` Signature: `samson.SAMSON.getElementsFromUser(dialogTitle: str = 'Select elements', currentElement: list[samson.SBElement.ElementType] = []) -> tuple` Gets a list of periodic table elements from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str**,**default='Select elements'*) – A title of the pop-up dialog. - **currentElements** (*list**of*[*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)*,**default=empty list*) – A list of elements. **Returns** - A tuple with the status as the 1st value and the result as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the list of user-chosen elements. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is an empty list. **Return type** - Tuple(bool, str) ##### Examples ```pycon >>> status, value = SAMSON.getElementsFromUser() ``` !!! note "See also" `getElementFromUser` #### Function `samson.SAMSON.getFileNameFromUser` Signature: `samson.SAMSON.getFileNameFromUser(dialogTitle: str = 'Choose a file', currentFileName: str = '', dir: str = '', filter: str = '') -> tuple` Gets a filename from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str**,**default='Choose a file'*) – A title of the pop-up dialog. - **currentFileName** (*str**,**default=''*) – The current file name. - **dir** (*str**,**default=''*) – The directory. - **filter** (*str**,**default=''*) – The file extension filter **Returns** - A tuple with the status as the 1st value and the result as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the chosen file name. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is an empty string. **Return type** - Tuple(bool, str) ##### Examples ```pycon >>> status, value = SAMSON.getFileNameFromUser() ``` !!! note "See also" `getPathFromUser`, `getFileNamesFromUser`, `getSaveFileNameFromUser` #### Function `samson.SAMSON.getFileNamesFromUser` Signature: `samson.SAMSON.getFileNamesFromUser(dialogTitle: str = 'Choose files', dir: str = '', filter: str = '') -> tuple` Gets a list of filenames from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str**,**default='Choose files'*) – A title of the pop-up dialog. - **dir** (*str**,**default=''*) – The directory. - **filter** (*str**,**default=''*) – The file extension filter **Returns** - A tuple with the status as the 1st value and the result as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the list of file names. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is an empty list. **Return type** - Tuple(bool, str) ##### Examples ```pycon >>> status, list_of_filenames = SAMSON.getFileNamesFromUser() ``` !!! note "See also" `getFileNameFromUser`, `getPathFromUser`, `getSaveFileNameFromUser` #### Function `samson.SAMSON.getGPUInfo` Signature: `samson.SAMSON.getGPUInfo() -> str` Returns a string with the user’s GPU name #### Function `samson.SAMSON.getGridFlag` Signature: `samson.SAMSON.getGridFlag() -> bool` Returns *True* when the grid should be displayed in the viewport. #### Function `samson.SAMSON.getGroup` Signature: `samson.SAMSON.getGroup(element: samson.SBElement.ElementType) -> int` Returns the group of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A group of the given periodic table element. **Return type** - int ##### Examples Get a group of a periodic table element. ```pycon >>> SAMSON.getGroup(SBElement.S) 16 ``` #### Function `samson.SAMSON.getIntegerFromUser` Signature: `samson.SAMSON.getIntegerFromUser(dialogTitle: str, currentValue: int, minimum: int, maximum: int, singleStep: int = 1, prefix: str = '', suffix: str = '') -> tuple` Gets an int number from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str*) – A title of the pop-up dialog. - **currentValue** (*int*) – The current value. - **minimum** (*int*) – A minimum value. - **maximum** (*int*) – A maximum value. - **singleStep** (*int**,**default=1*) – A single step value when changing values in the spin box. - **prefix** (*str**,**default=''*) – A prefix shown in the spin box. - **suffix** (*str**,**default=''*) – A suffix shown in the spin box. **Returns** - A tuple with the status as the 1st value and the result as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the chosen value. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is *currentValue*. **Return type** - Tuple(bool, int) ##### Examples ```pycon >>> status, value = SAMSON.getIntegerFromUser('Choose a value...', 5, 0, 10) ``` !!! note "See also" `getIntegerIntervalFromUser`, `getDoubleFromUser` #### Function `samson.SAMSON.getIntegerIntervalFromUser` Signature: `samson.SAMSON.getIntegerIntervalFromUser(dialogTitle: str, labelsText: list[str], currentValues: tuple[int, int], minValueInterval: tuple[int, int], maxValueInterval: tuple[int, int], singleStep: tuple[int, int] = (1, 1), prefix: str = '', suffix: str = '') -> tuple` Gets an int interval from the user in a modal pop-up dialog **Parameters** - **dialogTitle** (*str*) – A title of the pop-up dialog. - **labelsText** (*tuple**of**str**,**size=3*) – A text in the main label and in labels for the left and right values of the interval. - **currentValues** (*tuple**of**int**,**size=2*) – A tuple of size 2 with the current values for left and right values of the interval. - **minValueInterval** (*tuple**of**int**,**size=2*) – A tuple of size 2 describing the range of values for the left value of the interval. - **maxValueInterval** (*tuple**of**int**,**size=2*) – A tuple of size 2 describing the range of values for the right value of the interval. - **singleStep** (*tuple**of**int**,**default=**(**1**,**1**)*) – A tuple of single step values (when changing values in the spin box) for the left and right values of the interval. - **prefix** (*str**,**default=''*) – A prefix shown in the spin box. - **suffix** (*str**,**default=''*) – A suffix shown in the spin box. **Returns** - A tuple with the status as the 1st value and the result as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the chosen value interval as a tuple. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is *currentValues*. **Return type** - Tuple(bool, Tuple(int, int)) ##### Examples ```pycon >>> status, value = SAMSON.getIntegerIntervalFromUser('Choose an interval...', >>> ('Choose min and max', 'min', 'max'), (0, 5), (0, 3), (4, 10)) ``` !!! note "See also" `getIntegerFromUser`, `getDoubleIntervalFromUser` #### Function `samson.SAMSON.getInteractionModelNames` Signature: `samson.SAMSON.getInteractionModelNames() -> list[str]` Returns a list of public names of interaction models #### Function `samson.SAMSON.getInteractionModelProxyMap` Signature: `samson.SAMSON.getInteractionModelProxyMap() -> dict[str, samson.SBProxy]` Returns a map between public names of interaction models and their proxies #### Function `samson.SAMSON.getItemFromUser` Signature: `samson.SAMSON.getItemFromUser(*args, **kwargs)` Overloaded function. 1. getItemFromUser(dialogTitle: str, label: str, items: list[str], currentIndex: int = 0) -> tuple Gets an item from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str*) – A title of the pop-up dialog. - **label** (*str*) – A label that will be shown in the dialog. - **items** (*list**of**str*) – A list of items. - **currentIndex** (*int**,**default=0*) – An index of the currently chosen item. **Returns** - A tuple with the status as the 1st value and the result as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the text of the chosen item. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is an empty list. **Return type** - Tuple(bool, str) ##### Examples ```pycon >>> status, text = SAMSON.getItemFromUser('Choose item', 'Choose an item from the list below', >>> ['foo', 'bar'], 1) ``` 2. getItemFromUser(dialogTitle: str, currentIndex: int, label: str, items: list[str]) -> tuple Gets an item from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str*) – A title of the pop-up dialog. - **currentIndex** (*int*) – An index of the currently chosen item. - **label** (*str*) – A label that will be shown in the dialog. - **items** (*list**of**str*) – A list of items. **Returns** - A tuple with the status as the 1st value and the result as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the index of the chosen item. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is an empty list. **Return type** - Tuple(bool, str) ##### Examples ```pycon >>> status, idx = SAMSON.getItemFromUser('Choose item', 1, 'Choose an item from the list below', >>> ['foo', 'bar']) ``` #### Function `samson.SAMSON.getLikeFromUser` Signature: `samson.SAMSON.getLikeFromUser(developerUUID: samson.SBUUID, extensionUUID: samson.SBUUID) -> None` Asks the user to reply to a question. **Parameters** - **developerUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – The UUID of the registered developer. - **extensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – The UUID of the SAMSON Extension. #### Function `samson.SAMSON.getMaximum3DTextureSize` Signature: `samson.SAMSON.getMaximum3DTextureSize() -> int` Returns the maximum 3D texture size. #### Function `samson.SAMSON.getMaximumRectangleTextureSize` Signature: `samson.SAMSON.getMaximumRectangleTextureSize() -> int` Returns the maximum rectangle texture size. #### Function `samson.SAMSON.getMaximumTextureSize` Signature: `samson.SAMSON.getMaximumTextureSize() -> int` Returns the maximum texture size. #### Function `samson.SAMSON.getMinimizationFlag` Signature: `samson.SAMSON.getMinimizationFlag() -> bool` Returns *True* when interactive minimization is on. **Returns** - *True* when interactive minimization is on, else *False*. **Return type** - bool !!! note "See also" `startMinimization`, `stopMinimization`, `toggleMinimization`, `setMinimizationFlag`, `minimize` #### Function `samson.SAMSON.getMousePositionInViewport` Signature: `samson.SAMSON.getMousePositionInViewport() -> tuple[int, int]` Returns the current mouse position in viewport coordinates. **Returns** - The current mouse position in the viewport coordinates. **Return type** - Tuple(int, int) #### Function `samson.SAMSON.getMultiSampleFactor` Signature: `samson.SAMSON.getMultiSampleFactor() -> int` Returns the multisampling factor. #### Function `samson.SAMSON.getMultipleBondDisplayFlag` Signature: `samson.SAMSON.getMultipleBondDisplayFlag() -> bool` Returns *True* when bonds are displayed with a variable number of cylinders to represent their order #### Function `samson.SAMSON.getNextNodeName` Signature: `samson.SAMSON.getNextNodeName(type: samson.SBNode.Type, prefix: str = '', suffix: str = '', parentNode: samson.SBNode = None) -> str` Returns a next name starting with *prefix* and ending with *suffix* for nodes of type *type* in parent node *parentNode* or in the active document if *parentNode* is *None*. **Parameters** - **type** ([*samson.SBNode.Type*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.Type)) – A node type - **prefix** (*str**,**default=''*) – The name prefix - **suffix** (*str**,**default=''*) – The name suffix - **parentNode** ([*samson.SBNode*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode)*,**default=None*) – The parent node. If *None* then the whole document is considered. **Returns** - The next node name **Return type** - str #### Function `samson.SAMSON.getNode` Signature: `samson.SAMSON.getNode(x: int, y: int, selectionFilter: str = '*') -> samson.SBNode` Returns the node at location (x, y) in the viewport based on the selection filter selectionString. **Parameters** - **x** (*int*) – x-coordinate in the viewport. - **y** (*int*) – y-coordinate in the viewport. - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)). **Returns** - A node. **Return type** - [samson.SBNode](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) ##### Examples Get an atom at the given coordinates in the viewport: ```pycon >>> node = SAMSON.getNode(100, 200, "node.type atom") ``` !!! note "See also" `getAtom`, `getBond`, `getNodes` #### Function `samson.SAMSON.getNodes` Signature: `samson.SAMSON.getNodes(*args, **kwargs)` Overloaded function. 1. getNodes(x: int, y: int, width: int, height: int, selectionFilter: str = ‘*’, deepSelectionFlag: bool = False) -> samson.SBNodeIndexer Returns a node indexer with nodes found inside the viewport rectangle (x, y, width, height) based on the selection filter selectionString. **Parameters** - **x** (*int*) – x-coordinate in the viewport. - **y** (*int*) – y-coordinate in the viewport. - **width** (*int*) – The width of the rectangle. - **height** (*int*) – The height of the rectangle. - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)). - **deepSelectionFlag** (*bool**,**default=False*) – Whether the deep selection should be done or not. If set to *True*, then all the nodes behind the given rectangle even that are not visible now due to e.g. depth-of-field or fog will be chosen. **Returns** - A node indexer. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Examples Get a node indexer with atoms in the given rectangle in the viewport: ```pycon >>> nodeIndexer = SAMSON.getNodes(100, 200, 50, 50, "node.type atom") ``` !!! note "See also" `getAtom`, `getBond`, `getNode` 2. getNodes(selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> samson.SBNodeIndexer Returns a node indexer with nodes from the active document based on the provided selection filter *selectionString* and other parameters. This function traverses the active document’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and stores in *nodeIndexer* the nodes for which the *selectionString* is *True*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns *True*, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is *True*, the function also adds to *nodeIndexer* nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *selectionString* and *visitString*, they are added to the *nodeIndexer* if *includeDependencies* is *True*. **Parameters** - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be selected from the active document. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited in the active document. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - A node indexer. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Examples Get a node indexer with all atoms in the active document: ```pycon >>> nodeIndexer = SAMSON.getNodes('node.type atom') ``` 3. getNodes(nodeIndexer: samson.SBNodeIndexer, selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> None Collects into the *nodeIndexer* nodes from the active document based on the provided selection filter *selectionString* and other parameters. This function traverses the active document’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and stores in *nodeIndexer* the nodes for which the *selectionString* is *True*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns *True*, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is *True*, the function also adds to *nodeIndexer* nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *selectionString* and *visitString*, they are added to the *nodeIndexer* if *includeDependencies* is *True*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An existing node indexer in which nodes should be added. Note that this node indexer is not cleared in the function. - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be selected from the active document. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited in the active document. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. ##### Notes The *nodeIndexer* is not cleared when entering this function. ##### Examples Collect in an existing *nodeIndexer* all residues from the active document: ```pycon >>> nodeIndexer = SBNodeIndexer() >>> SAMSON.getNodes(nodeIndexer, 'node.type residue') ``` 4. getNodes(nodeType: samson.SBNode.Type, selectedNodesOnly: bool = False, visitString: str = ‘*’, includeDependencies: bool = False) -> samson.SBNodeIndexer Returns a node indexer with nodes from the active document based on the provided *nodeType*, a selection status, a visit predicate, with or without dependencies. This function traverses the active document’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and stores in *nodeIndexer* the nodes whose type is *nodeType*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns *True*, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is *True*, the function also adds to *nodeIndexer* nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *nodeType* and *visitString*, they are added to the *nodeIndexer* if *includeDependencies* is *True*. **Parameters** - **nodeType** ([*samson.SBNode.Type*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.Type)) – A type of nodes that should be collected. - **selectedNodesOnly** (*bool**,**default=False*) – If set to *True*, then only nodes that are selected, directly or via their parents, will be traversed. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited in the active document. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - A node indexer. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Examples Get a node indexer with all atoms in the active document: ```pycon >>> nodeIndexer = SAMSON.getNodes(SBNode.Atom) ``` 5. getNodes(nodeIndexer: samson.SBNodeIndexer, nodeType: samson.SBNode.Type, selectedNodesOnly: bool = False, visitString: str = ‘*’, includeDependencies: bool = False) -> None Collects into the provided *nodeIndexer* nodes from the active document based on the provided *nodeType*, a selection status, a visit predicate, with or without dependencies. This function traverses the active document’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and stores in *nodeIndexer* the nodes whose type is *nodeType*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns *True*, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is *True*, the function also adds to *nodeIndexer* nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *nodeType* and *visitString*, they are added to the *nodeIndexer* if *includeDependencies* is *True*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An existing node indexer in which nodes should be added. Note that this node indexer is not cleared in the function. - **nodeType** ([*samson.SBNode.Type*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.Type)) – A type of nodes that should be collected. - **selectedNodesOnly** (*bool**,**default=False*) – If set to *True*, then only nodes that are selected, directly or via their parents, will be traversed. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited in the active document. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. ##### Notes The *nodeIndexer* is not cleared when entering this function. ##### Examples Get a node indexer with all bonds in the active document: ```pycon >>> nodeIndexer = SBNodeIndexer() >>> SAMSON.getNodes(nodeIndexer, SBNode.Bond) ``` #### Function `samson.SAMSON.getNumberOfElements` Signature: `samson.SAMSON.getNumberOfElements() -> int` Returns the number of defined periodic table elements, including the Unknown element. #### Function `samson.SAMSON.getPaletteFromUser` Signature: `samson.SAMSON.getPaletteFromUser(dialogTitle: str = 'Choose a color palette', defaultColorPalette: samson.SBPalette = None) -> tuple` Gets a color palette from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str**,**default='Choose a color palette'*) – A title of the pop-up dialog. - **defaultColorPalette** ([*samson.SBPalette*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)) – A default color palette. **Returns** - A tuple with the status as the 1st value and the color palette as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the chosen color palette. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is the *defaultColorPalette*. **Return type** - Tuple(bool, [samson.SBPalette](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Palette/SBDPalette.md#samson.SBPalette)) ##### Examples ```pycon >>> status, palette = SAMSON.getPaletteFromUser('Choose a color palette', >>> samson.SBPaletteDefaultPalette.qualitativeHCLPastel) ``` !!! note "See also" `getColorFromUser` #### Function `samson.SAMSON.getPathFromUser` Signature: `samson.SAMSON.getPathFromUser(dialogTitle: str = 'Choose a path', currentPath: str = '') -> tuple` Gets a path from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str**,**default='Choose a path'*) – A title of the pop-up dialog. - **currentPath** (*str**,**default=''*) – The current path. **Returns** - A tuple with the status as the 1st value and the result as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the chosen path. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is an empty string. **Return type** - Tuple(bool, str) ##### Examples ```pycon >>> status, value = SAMSON.getPathFromUser() ``` !!! note "See also" `getFileNameFromUser`, `getFileNamesFromUser`, `getSaveFileNameFromUser` #### Function `samson.SAMSON.getPeriod` Signature: `samson.SAMSON.getPeriod(element: samson.SBElement.ElementType) -> str` Returns the period of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A period of the given periodic table element. **Return type** - str ##### Examples Get a period of a periodic table element. ```pycon >>> SAMSON.getPeriod(SBElement.C) '2' ``` #### Function `samson.SAMSON.getPromptFromUser` Signature: `samson.SAMSON.getPromptFromUser(dialogTitle: str, placeholderText: str = '') -> tuple` Gets a prompt string from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str*) – A title of the pop-up dialog. - **placeholderText** (*str*) – The placeholder text **Returns** - A tuple with the status as the 1st value and the string as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the user-provided string. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is an empty string. **Return type** - Tuple(bool, str) #### Function `samson.SAMSON.getProxy` Signature: `samson.SAMSON.getProxy(className: str, extensionUUID: samson.SBUUID = SBUUID('00000000-0000-0000-0000-000000000000')) -> samson.SBProxy` Returns the proxy of a class. **Parameters** - **className** (*str*) – A class name - **extensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – UUID of the extension that ships this class **Returns** - A found proxy. *None* if nothing found. **Return type** - [samson.SBProxy](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClassProxy.md#samson.SBProxy) ##### Examples Get the proxy for the Ribbon visual model ```pycon >>> proxy = SAMSON.getProxy(className = "SESecondaryStructureVisualModel", extensionUUID = SBUUID("06485695-DEE2-1383-A575-E5AABA05DCCD")) >>> if proxy: print("Found proxy") Found proxy ``` #### Function `samson.SAMSON.getProxyIndexer` Signature: `samson.SAMSON.getProxyIndexer(classType: samson.SBClass.Type) -> list[samson.SBProxy]` Returns all proxies corresponding to the given class type *classType*. **Parameters** - **classType** ([*samson.SBClass.Type*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Class/SBCClass.md#samson.SBClass.Type)) – A class type **Return type** - list of proxies ##### Examples Get a list of all visual model proxies ```pycon >>> visual_model_proxies = SAMSON.getProxyIndexer(SBClass.VisualModel) >>> if len(visual_model_proxies): print("Found visual model proxies") Found visual model proxies ``` #### Function `samson.SAMSON.getPublicName` Signature: `samson.SAMSON.getPublicName(includeVersion: bool = False, includeHashInVersion: bool = False) -> str` Returns the “public name” of SAMSON. #### Function `samson.SAMSON.getPublicVersionNumber` Signature: `samson.SAMSON.getPublicVersionNumber() -> str` Returns the “public version number” of SAMSON. #### Function `samson.SAMSON.getReplyFromUser` Signature: `samson.SAMSON.getReplyFromUser(developerUUID: samson.SBUUID, questionUUID: samson.SBUUID) -> None` Asks the user to reply to a question. **Parameters** - **developerUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – The UUID of the registered developer. - **questionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – The UUID of the registered question. #### Function `samson.SAMSON.getSAMSONElementsPath` Signature: `samson.SAMSON.getSAMSONElementsPath() -> str` Returns the path where SAMSON Extensions (Elements) are installed #### Function `samson.SAMSON.getSAMSONPath` Signature: `samson.SAMSON.getSAMSONPath() -> str` Returns the path where SAMSON is installed #### Function `samson.SAMSON.getSaveFileNameFromUser` Signature: `samson.SAMSON.getSaveFileNameFromUser(dialogTitle: str = 'Choose a filename', currentFileName: str = '', dir: str = '', filter: str = '') -> tuple` Gets a filename from the user in a modal pop-up dialog with a Save button. **Parameters** - **dialogTitle** (*str**,**default='Choose a filename'*) – A title of the pop-up dialog. - **currentFileName** (*str**,**default=''*) – The current file name. - **dir** (*str**,**default=''*) – The directory. - **filter** (*str**,**default=''*) – The file extension filter **Returns** - A tuple with the status as the 1st value and the result as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the chosen file name. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is an empty string. **Return type** - Tuple(bool, str) ##### Examples ```pycon >>> status, value = SAMSON.getSaveFileNameFromUser() ``` !!! note "See also" `getFileNameFromUser`, `getPathFromUser`, `getFileNamesFromUser` #### Function `samson.SAMSON.getScaleFlag` Signature: `samson.SAMSON.getScaleFlag() -> bool` Returns *True* when the scale should be displayed in the viewport. #### Function `samson.SAMSON.getScratchPath` Signature: `samson.SAMSON.getScratchPath() -> str` Returns the path to scratch data #### Function `samson.SAMSON.getSelectorNames` Signature: `samson.SAMSON.getSelectorNames() -> list[str]` Returns a list of public names of selectors #### Function `samson.SAMSON.getSelectorProxyMap` Signature: `samson.SAMSON.getSelectorProxyMap() -> dict[str, samson.SBProxy]` Returns a map between public names of selectors and their proxies #### Function `samson.SAMSON.getSimulationFlag` Signature: `samson.SAMSON.getSimulationFlag() -> bool` Returns *True* when interactive simulation is on. **Returns** - *True* when interactive simulation is on, else *False*. **Return type** - bool !!! note "See also" `startSimulation`, `stopSimulation`, `toggleSimulation`, `setSimulationFlag`, `minimize` #### Function `samson.SAMSON.getStateUpdaterNames` Signature: `samson.SAMSON.getStateUpdaterNames() -> list[str]` Returns a list of public names of state updaters #### Function `samson.SAMSON.getStateUpdaterProxyMap` Signature: `samson.SAMSON.getStateUpdaterProxyMap() -> dict[str, samson.SBProxy]` Returns a map between public names of state updaters and their proxies #### Function `samson.SAMSON.getStringFromUser` Signature: `samson.SAMSON.getStringFromUser(dialogTitle: str = 'Set a string', currentString: str = '') -> tuple` Gets a string from the user in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str**,**default='Set a string'*) – A title of the pop-up dialog. - **currentString** (*str**,**default=''*) – The current string. **Returns** - A tuple with the status as the 1st value and the result as the 2nd value. If *OK* was clicked, then the 1st value of the tuple is *True* and the second one is the user-provided string. If *Cancel* was clicked, then the 1st value of the tuple is *False* and the second one is an empty string. **Return type** - Tuple(bool, str) ##### Examples ```pycon >>> status, value = SAMSON.getStringFromUser('Set a string', 'Example: ...') ``` #### Function `samson.SAMSON.getTime` Signature: `samson.SAMSON.getTime() -> int` Returns SAMSON’s internal time #### Function `samson.SAMSON.getUserAcademicFlag` Signature: `samson.SAMSON.getUserAcademicFlag() -> bool` Returns *True* when the user is an academic #### Function `samson.SAMSON.getUserDataPath` Signature: `samson.SAMSON.getUserDataPath() -> str` Returns the path where user data is installed #### Function `samson.SAMSON.getUserPlan` Signature: `samson.SAMSON.getUserPlan() -> samson.SBUserPlan` Returns the user plan #### Function `samson.SAMSON.getUserPlanString` Signature: `samson.SAMSON.getUserPlanString() -> str` Returns a string containing the user plan #### Function `samson.SAMSON.getVanDerWaalsAtomRadiusFlag` Signature: `samson.SAMSON.getVanDerWaalsAtomRadiusFlag() -> bool` Returns *True* when atoms are displayed with a radius proportional to their van der Waals radius #### Function `samson.SAMSON.getVanDerWaalsAtomRadiusRatio` Signature: `samson.SAMSON.getVanDerWaalsAtomRadiusRatio() -> float` Returns the constant by which the atoms van der Waals radius is multiplied to represent atoms in the viewport (when a constant radius is not used) #### Function `samson.SAMSON.getVanDerWaalsRadius` Signature: `samson.SAMSON.getVanDerWaalsRadius(element: samson.SBElement.ElementType) -> samson.SBQuantity.unitsSI` Returns the van der Waals radius of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A van der Waals radius of the given periodic table element. **Return type** - samson.SBQuantity ##### Examples Get a van der Waals radius of a periodic table element in nanometers. ```pycon >>> vdw_radius = SAMSON.getVanDerWaalsRadius(SBElement.S) >>> print(vdw_radius.nm) 0.18 ``` #### Function `samson.SAMSON.getVersionNumber` Signature: `samson.SAMSON.getVersionNumber() -> samson.SBVersionNumber` Returns the version number of SAMSON. #### Function `samson.SAMSON.getViewportHeight` Signature: `samson.SAMSON.getViewportHeight() -> int` Returns the viewport height. **Returns** - The viewport height. **Return type** - int ##### Examples Get the viewport width: ```pycon >>> SAMSON.getViewportHeight() 640 ``` !!! note "See also" `getViewportWidth`, `captureViewportToFile` #### Function `samson.SAMSON.getViewportPixelRatio` Signature: `samson.SAMSON.getViewportPixelRatio() -> float` Returns the viewport pixel ratio #### Function `samson.SAMSON.getViewportPositionFromWorldPosition` Signature: `samson.SAMSON.getViewportPositionFromWorldPosition(position: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3` Returns the projection in the viewport of the given world position. #### Function `samson.SAMSON.getViewportWidth` Signature: `samson.SAMSON.getViewportWidth() -> int` Returns the viewport width. **Returns** - The viewport width. **Return type** - int ##### Examples Get the viewport width: ```pycon >>> SAMSON.getViewportWidth() 1024 ``` !!! note "See also" `getViewportHeight`, `captureViewportToFile` #### Function `samson.SAMSON.getVisualModelNames` Signature: `samson.SAMSON.getVisualModelNames() -> list[str]` Returns a list of public names of visual models #### Function `samson.SAMSON.getVisualModelProxyMap` Signature: `samson.SAMSON.getVisualModelProxyMap() -> dict[str, samson.SBProxy]` Returns a map between public names of visual models and their proxies #### Function `samson.SAMSON.hasNode` Signature: `samson.SAMSON.hasNode(*args, **kwargs)` Overloaded function. 1. hasNode(selectionString: str = ‘*’, visitString: str = ‘*’, includeDependencies: bool = False) -> bool Checks for nodes in the active document, based on the provided selection filter *selectionString* and other parameters. This function traverses the active document’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and checks for the nodes for which the *selectionString* is *True*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns *True*, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is *True*, the function also checks for nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *selectionString* and *visitString*, they are checked for if *includeDependencies* is *True*. **Parameters** - **selectionString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be checked in the active document. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited in the active document. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - The number of nodes. **Return type** - int ##### Examples Check if there are any atoms in the active document: ```pycon >>> res = SAMSON.hasNode('node.type atom') ``` 2. hasNode(nodeType: samson.SBNode.Type, selectedNodesOnly: bool = False, visitString: str = ‘*’, includeDependencies: bool = False) -> bool Checks for nodes in the active document, based on *nodeType* and other parameters. This function traverses the active document’s sub-tree for which a predicate based on the *visitString* is *True* (depth-first), and checks for nodes whose type is *nodeType*. Precisely, if the predicate based on the *visitString* returns false, the node is not visited, and neither are its descendants. If the predicate based on the *visitString* returns *True*, the node is visited, and this visit predicate will be used to decide whether its children are visited or not. Note that the node itself must satisfy the predicate based on the *visitString* else nothing is visited. When *includeDependencies* is *True*, the function also checks for nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a SBBond, the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the *nodeType* and *visitString*, they are checked for if *includeDependencies* is *True*. **Parameters** - **nodeType** ([*samson.SBNode.Type*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode.Type)) – A type of nodes that should be checked for. - **selectedNodesOnly** (*bool**,**default=False*) – If set to *True*, then only nodes that are selected, directly or via their parents, will be traversed. - **visitString** (*str**,**default='*'*) – A Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)) that describes what nodes should be visited in the active document. - **includeDependencies** (*bool**,**default=False*) – Whether to include node dependencies or not. **Returns** - The number of nodes. **Return type** - int ##### Examples Check if there are any residues in the active document: ```pycon >>> res = SAMSON.hasNode(SBNode.Residue) ``` #### Function `samson.SAMSON.hideProgressBar` Signature: `samson.SAMSON.hideProgressBar() -> None` Hides the progress bar. !!! note "See also" `setProgressBarValue`, `showProgressBar`, `isProgressBarStopped` #### Function `samson.SAMSON.hold` Signature: `samson.SAMSON.hold(node: samson.SBNode) -> None` Holds a node and its descendants to make their creation undoable. **Parameters** - **node** ([*samson.SBNode*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode)) – A node. ##### Examples Create a folder and add it to the active document. Make this operation undoable. ```pycon >>> SAMSON.beginHolding('Add folder') >>> new_folder = SBFolder('New folder') >>> SAMSON.hold(new_folder) >>> new_folder.create() >>> SAMSON.getActiveDocument().addChild(new_folder) >>> SAMSON.endHolding() ``` !!! note "See also" `holding`, `beginHolding`, `endHolding`, `isHolding`, `disableHolding`, `enableHolding` #### Function `samson.SAMSON.importFromFile` Signature: `samson.SAMSON.importFromFile(*args, **kwargs)` Overloaded function. 1. importFromFile(fileName: str, preferredFolder: samson.SBFolder = None) -> None Import a file from the disk. **Parameters** - **fileName** (*str*) – A path to the file - **preferredFolder** ([*samson.SBFolder*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md#samson.SBFolder)*,**default=None*) – A folder into which the system from the file should be imported. ##### Examples Import a file in SAMSON. ```pycon >>> SAMSON.importFromFile('/home/user/example.pdb') ``` !!! note "See also" `canImportFromFile`, `fetch`, `exportToFile` 2. importFromFile(fileNameList: list[str], preferredFolder: samson.SBFolder = None) -> None Import a list of files from the disk. **Parameters** - **fileNameList** (*list**of**str*) – A list of paths to the files. - **preferredFolder** ([*samson.SBFolder*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md#samson.SBFolder)*,**default=None*) – A folder into which systems from the files should be imported. ##### Examples Import a file in SAMSON. ```pycon >>> SAMSON.importFromFile(['/home/user/example1.pdb', '/home/user/example2.pdb']) ``` !!! note "See also" `canImportFromFile`, `fetch`, `exportToFile` 3. importFromFile(fileName: str, parameters: samson.SBValueMap, preferredFolder: samson.SBFolder = None) -> None Import a file from the disk with parameters specific to each importer. **Parameters** - **fileName** (*str*) – A path to the file. - **parameters** ([*SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – A value map with importer parameters. - **preferredFolder** ([*samson.SBFolder*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md#samson.SBFolder)*,**default=None*) – A folder into which the system from the file should be imported. !!! note "See also" `fetch`, `exportToFile` 4. importFromFile(fileNameList: list[str], parameters: samson.SBValueMap, preferredFolder: samson.SBFolder = None) -> None Import a list of files from the disk with parameters specific to each importer. **Parameters** - **fileNameList** (*list**of**str*) – A list of paths to the files. - **parameters** ([*SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – A value map with importer parameters. - **preferredFolder** ([*samson.SBFolder*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentFolder.md#samson.SBFolder)*,**default=None*) – A folder into which systems from the files should be imported. !!! note "See also" `canImportFromFile`, `fetch`, `exportToFile` #### Function `samson.SAMSON.informUser` Signature: `samson.SAMSON.informUser(*args, **kwargs)` Overloaded function. 1. informUser(dialogTitle: str, dialogText: str) -> None Informs the user with a message in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str*) – A title of the pop-up dialog. - **dialogText** (*str*) – A text in the pop-up dialog. ##### Examples ```pycon >>> SAMSON.informUser('Information', 'The text of the message.') ``` !!! note "See also" `askUser` 2. informUser(dialogTitle: str, labelText: str, text: str, monospaceFont: bool) -> None Informs the user with a message in a modal pop-up dialog. **Parameters** - **dialogTitle** (*str*) – A title of the pop-up dialog. - **labelText** (*str*) – A text of the message label. - **text** (*str*) – A text in the plain text edit. - **monospaceFont** (*bool*) – Whether the text should be shown using a monospace font or not. ##### Examples ```pycon >>> SAMSON.informUser('Warning', 'Caught a warning during the execution:', 'The text of the warning.', True) ``` !!! note "See also" `askUser` #### Function `samson.SAMSON.isGUIThread` Signature: `samson.SAMSON.isGUIThread() -> bool` Returns *True* if called from the main thread (GUI thread), else returns *False*. #### Function `samson.SAMSON.isHolding` Signature: `samson.SAMSON.isHolding() -> bool` Returns *True* when SAMSON is holding. !!! note "See also" `holding`, `disableHolding`, `enableHolding`, `beginHolding`, `hold`, `endHolding` #### Function `samson.SAMSON.isProgressBarStopped` Signature: `samson.SAMSON.isProgressBarStopped() -> bool` Returns *True* when the progress bar is stopped. **Return type** - *True* when the progress bar is stopped, else *False*. !!! note "See also" `showProgressBar`, `setProgressBarValue`, `hideProgressBar` #### Function `samson.SAMSON.isRedoing` Signature: `samson.SAMSON.isRedoing() -> bool` Returns *True* while redoing. **Returns** - *True* while redoing, else *False*. **Return type** - bool !!! note "See also" `isUndoing`, `undo`, `redo` #### Function `samson.SAMSON.isUndoing` Signature: `samson.SAMSON.isUndoing() -> bool` Returns *True* while undoing. **Returns** - *True* while undoing, else *False*. **Return type** - bool !!! note "See also" `isRedoing`, `undo`, `redo` #### Function `samson.SAMSON.makeAnimation` Signature: `samson.SAMSON.makeAnimation(*args, **kwargs)` Overloaded function. 1. makeAnimation(name: str, nodeIndexer: samson.SBNodeIndexer, currentFrame: float, animationClassName: str, animationExtensionUUID: samson.SBUUID, animationParameterMap: samson.SBValueMap = ) -> samson.SBAnimation Make an animation. **Parameters** - **name** (*str*) – A name for the animation node - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer of nodes to which the animation should be applied - **currentFrame** (*float*) – A frame at which the animation should start - **animationClassName** (*str*) – A class name of the animation - **animationExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – UUID of the extension with this animation - **animationParameterMap** ([*samson.SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – The value map with parameters for the animation **Returns** - An animation node or *None* if could not create one **Return type** - [samson.SBAnimation](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentAnimation.md#samson.SBAnimation) 2. makeAnimation(name: str, nodeIndexer: samson.SBNodeIndexer, currentFrame: float, animationName: str, animationParameterMap: samson.SBValueMap = ) -> samson.SBAnimation Make an animation. **Parameters** - **name** (*str*) – A name for the animation node - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer of nodes to which the animation should be applied - **currentFrame** (*float*) – A frame at which the animation should start - **animationName** (*str*) – A public name of the animation - **animationParameterMap** ([*samson.SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – The value map with parameters for the animation **Returns** - An animation node or *None* if could not create one **Return type** - [samson.SBAnimation](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocumentAnimation.md#samson.SBAnimation) #### Function `samson.SAMSON.makeInteractionModel` Signature: `samson.SAMSON.makeInteractionModel(dynamicalModel: samson.SBParticleSystem, interactionModelClassName: str, interactionModelExtensionUUID: samson.SBUUID = SBUUID("00000000-0000-0000-0000-000000000000"), interactionModelParameterMap: samson.SBValueMap = ) -> samson.SBInteractionModelParticleSystem` Make an interaction model. **Parameters** - **dynamicalModel** ([*samson.SBDynamicalModel*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModel.md#samson.SBDynamicalModel)) – A dynamical model - **interactionModelClassName** (*str*) – A class name of the interaction model - **interactionModelExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – UUID of the extension with this interaction model - **interactionModelParameterMap** ([*samson.SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – The value map with parameters for the interaction model **Returns** - A interaction model or *None* if could not create one **Return type** - [samson.SBInteractionModel](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModel.md#samson.SBInteractionModel) #### Function `samson.SAMSON.makeNeighborSearch` Signature: `samson.SAMSON.makeNeighborSearch(dynamicalModel: samson.SBParticleSystem, cutoffDistance: samson.SBQuantity.unitsSI, neighborSearchClassName: str, neighborSearchExtensionUUID: samson.SBUUID = SBUUID('00000000-0000-0000-0000-000000000000')) -> samson.SBNeighborSearchParticleSystem` Make a neighbor search algorithm. **Parameters** - **dynamicalModel** ([*samson.SBDynamicalModel*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModel.md#samson.SBDynamicalModel)) – A dynamical model - **cutoffDistance** (*samson.SBQuantity*) – A cutoff radius - **neighborSearchClassName** (*str*) – A class name of the neighbor search method - **neighborSearchExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – UUID of the extension with this neighbor search method **Returns** - A neighbor search or *None* if could not create one **Return type** - [samson.SBNeighborSearch](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearch.md#samson.SBNeighborSearch) #### Function `samson.SAMSON.makePropertyModel` Signature: `samson.SAMSON.makePropertyModel(nodeIndexer: samson.SBNodeIndexer, propertyModelClassName: str, propertyModelExtensionUUID: samson.SBUUID = SBUUID("00000000-0000-0000-0000-000000000000"), propertyModelParameterMap: samson.SBValueMap = ) -> samson.SBPropertyModel` Make a property model #### Function `samson.SAMSON.makeSelector` Signature: `samson.SAMSON.makeSelector(*args, **kwargs)` Overloaded function. 1. makeSelector(selectorClassName: str, selectorExtensionUUID: samson.SBUUID, selectorParameterMap: samson.SBValueMap = ) -> samson.SBNodeSelector Make a selector. **Parameters** - **selectorClassName** (*str*) – A class name of the selector - **selectorExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – UUID of the extension with this selector - **selectorParameterMap** ([*samson.SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – The value map with parameters for the selector **Returns** - A selector or *None* if could not create one **Return type** - [samson.SBNodeSelector](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeSelector.md#samson.SBNodeSelector) 2. makeSelector(selectorName: str, selectorParameterMap: samson.SBValueMap = ) -> samson.SBNodeSelector Make a selector. **Parameters** - **selectorName** (*str*) – A name of the selector - **selectorParameterMap** ([*samson.SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – The value map with parameters for the selector **Returns** - A selector or *None* if could not create one **Return type** - [samson.SBNodeSelector](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeSelector.md#samson.SBNodeSelector) #### Function `samson.SAMSON.makeSimulator` Signature: `samson.SAMSON.makeSimulator(nodeIndexer: samson.SBNodeIndexer, interactionModelClassName: str, interactionModelExtensionUUID: samson.SBUUID, interactionModelParameterMap: samson.SBValueMap, stateUpdaterClassName: str, stateUpdaterExtensionUUID: samson.SBUUID = SBUUID("00000000-0000-0000-0000-000000000000"), stateUpdaterParameterMap: samson.SBValueMap = ) -> samson.SBSimulatorParticleSystem` Make a simulator. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer of nodes to which the interaction model should be applied - **interactionModelClassName** (*str*) – A class name of the interaction model - **interactionModelExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – UUID of the extension with this interaction model - **interactionModelParameterMap** ([*samson.SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – The value map with parameters for the interaction model - **stateUpdaterClassName** (*str*) – A class name of the state updater - **stateUpdaterExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – UUID of the extension with this state updater - **stateUpdaterParameterMap** ([*samson.SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – The value map with parameters for the state updater **Returns** - A simulator or *None* if could not create one **Return type** - [samson.SBSimulator](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulator.md#samson.SBSimulator) #### Function `samson.SAMSON.makeStateUpdater` Signature: `samson.SAMSON.makeStateUpdater(dynamicalModel: samson.SBParticleSystem, interactionModel: samson.SBInteractionModelParticleSystem, stateUpdaterClassName: str, stateUpdaterExtensionUUID: samson.SBUUID = SBUUID("00000000-0000-0000-0000-000000000000"), stateUpdaterParameterMap: samson.SBValueMap = ) -> samson.SBStateUpdaterParticleSystem` Make a state updater. **Parameters** - **dynamicalModel** ([*samson.SBDynamicalModel*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModel.md#samson.SBDynamicalModel)) – A dynamical model - **interactionModel** ([*samson.SBInteractionModel*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModel.md#samson.SBInteractionModel)) – An interaction model - **stateUpdaterClassName** (*str*) – A class name of the state updater - **stateUpdaterExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – UUID of the extension with this state updater - **stateUpdaterParameterMap** ([*samson.SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – The value map with parameters for the state updater **Returns** - A state updater or *None* if could not create one **Return type** - [samson.SBStateUpdater](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater/SBSStateUpdater.md#samson.SBStateUpdater) #### Function `samson.SAMSON.makeVisualModel` Signature: `samson.SAMSON.makeVisualModel(*args, **kwargs)` Overloaded function. 1. makeVisualModel(nodeIndexer: samson.SBNodeIndexer, visualModelClassName: str, visualModelExtensionUUID: samson.SBUUID, visualModelParameterMap: samson.SBValueMap = ) -> samson.SBVisualModel Make a visual model. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer of nodes to which the visual model should be applied - **visualModelClassName** (*str*) – A class name of the visual model - **visualModelExtensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – UUID of the extension with this visual model - **visualModelParameterMap** ([*samson.SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – The value map with parameters for the visual model **Returns** - A visual model or *None* if could not create one **Return type** - [samson.SBVisualModel](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel) ##### Examples Create a licorice visual model for all structural groups in the active document ```pycon >>> nodeIndexer = SAMSON.getNodes('n.t sg') >>> visualModel = SAMSON.makeVisualModel(nodeIndexer = nodeIndexer, visualModelClassName = "SEMVisualModelLicorice", visualModelExtensionUUID = SBUUID("154ACCDA-8950-C6B2-7456-DAB6BA82AA5D")) >>> if visualModel: >>> SAMSON.beginHolding("Add visual model") >>> SAMSON.hold(visualModel) >>> visualModel.create() >>> SAMSON.getActiveDocument().addChild(visualModel) True >>> SAMSON.endHolding() ``` 2. makeVisualModel(nodeIndexer: samson.SBNodeIndexer, visualModelName: str, visualModelParameterMap: samson.SBValueMap = ) -> samson.SBVisualModel Make a visual model. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer of nodes to which the visual model should be applied - **visualModelName** (*str*) – A public name of the visual model - **visualModelParameterMap** ([*samson.SBValueMap*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Meta/SBCMetaValueMap.md#samson.SBValueMap)) – The value map with parameters for the visual model **Returns** - A visual model or *None* if could not create one **Return type** - [samson.SBVisualModel](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel) ##### Examples Create a licorice visual model for all structural groups in the active document ```pycon >>> nodeIndexer = SAMSON.getNodes('n.t sg') >>> visualModel = SAMSON.makeVisualModel(nodeIndexer = nodeIndexer, visualModelName = "Licorice") >>> if visualModel: >>> SAMSON.beginHolding("Add visual model") >>> SAMSON.hold(visualModel) >>> visualModel.create() >>> SAMSON.getActiveDocument().addChild(visualModel) True >>> SAMSON.endHolding() ``` #### Function `samson.SAMSON.minimize` Signature: `samson.SAMSON.minimize(nodeIndexer: samson.SBNodeIndexer, maximumNumberOfSteps: int, minimumNumberOfStepsInPlateau: int, energyDifferenceCriteria: samson.SBQuantity.unitsSI, printMinimizationInformationFrequency: int = 100, askUser: bool = False) -> bool` Minimize atoms in the *nodeIndexer* according to the provided criteria. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer of nodes (atoms or nodes that have atoms in them) to which minimization should be applied. - **maximumNumberOfSteps** (*int*) – The maximum number of minimization steps. - **minimumNumberOfStepsInPlateau** (*int*) – The minimum number of consecutive steps sufficing the energy difference criteria. - **energyDifferenceCriteria** (*samson.SBQuantity*) – The energy difference threshold between two consecutive minimization steps. - **printMinimizationInformationFrequency** (*int**,**default=100*) – The frequency at which the minimization information should be printed. Set to 0 to disable. Note: printing information too often might decrease the performance. - **askUser** (*bool**,**default=False*) – Whether to ask user if some actions are required. **Return type** - bool ##### Examples Minimize an atomic system in the active document ```pycon >>> nodeIndexer = SAMSON.getNodes('node.type atom'); >>> SAMSON.minimize(nodeIndexer, 1000, 25, SBQuantity.kJPerMol(0.5), 100, False); ``` #### Function `samson.SAMSON.openPreferences` Signature: `samson.SAMSON.openPreferences(*args, **kwargs)` Overloaded function. 1. openPreferences(pageName: str) -> bool Opens the Preferences at the given page p pageName. **Parameters** - **pageName** (*string*) – The name of the page at which it should open the Preferences. If it is empty then it will just open the Preferences. If there are multiple pages with the same name, then provide it as a path with ‘>’ as a separator in the following format: “Editors > Add”. **Return type** - *True* if found such page in Preferences. ##### Examples ```pycon >>> SAMSON.openPreferences("Anti-aliasing") >>> SAMSON.openPreferences("Editors > Add") ``` 2. openPreferences(uuid: samson.SBUUID) -> bool Opens the Preferences at the page corresponding to *uuid* of a class which settings are exposed in Preferences. **Parameters** - **uuid** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – The UUID of an app, editor, or other class that has its settings exposed in Preferences. If the *uuid* is not valid then it will just open the Preferences. **Return type** - *True* if found such page in Preferences. #### Function `samson.SAMSON.printDataGraphState` Signature: `samson.SAMSON.printDataGraphState() -> None` Prints in the terminal the data graph state #### Function `samson.SAMSON.printFullMemoryUsage` Signature: `samson.SAMSON.printFullMemoryUsage() -> None` Prints in the terminal the full memory usage #### Function `samson.SAMSON.printMemoryUsage` Signature: `samson.SAMSON.printMemoryUsage() -> None` Prints in the terminal the memory usage #### Function `samson.SAMSON.printRendererState` Signature: `samson.SAMSON.printRendererState() -> None` Prints in the terminal the renderer state #### Function `samson.SAMSON.printUndoStack` Signature: `samson.SAMSON.printUndoStack() -> None` Prints in the terminal the undo stack #### Function `samson.SAMSON.processEvents` Signature: `samson.SAMSON.processEvents(excludeUserInputEvents: bool = True) -> None` Requests an update of the interface. #### Function `samson.SAMSON.redo` Signature: `samson.SAMSON.redo() -> None` Redo one command. !!! note "See also" `undo`, `isRedoing`, `isUndoing` #### Function `samson.SAMSON.removeDocument` Signature: `samson.SAMSON.removeDocument(document: samson.SBDocument) -> None` Remove a document from the list of open documents. **Parameters** - **document** ([*samson.SBDocument*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument)) – The document to remove ##### Examples Removes the active document ```pycon >>> document = SAMSON.getActiveDocument() >>> SAMSON.removeDocument(document) >>> document.erase() # delete the document ``` !!! note "See also" `deleteDocument`, `getActiveDocument`, `setActiveDocument`, `addDocument`, `addNewDocument` #### Function `samson.SAMSON.requestViewportUpdate` Signature: `samson.SAMSON.requestViewportUpdate() -> None` Requests a viewport update. #### Function `samson.SAMSON.runCommand` Signature: `samson.SAMSON.runCommand(*args, **kwargs)` Overloaded function. 1. runCommand(text: str) -> bool Trigger the first found command with the given text. **Parameters** - **text** (*str*) – A name of a command (action), may include a path to this command (action) in the ribbon menu. **Returns** - *True* if an action was found, else *False*. **Return type** - bool ##### Examples Run a command to add the Licorice visual model to the current selection or the active document if nothing is selected. ```pycon >>> SAMSON.runCommand('Licorice') True ``` !!! note "See also" `getActionByText`, `getAction`, `select` 2. runCommand(actionUUID: samson.SBUUID) -> bool Trigger the action with the given action UUID. **Parameters** - **actionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – A UUID of a command (action). **Returns** - *True* if an action was found, else *False*. **Return type** - bool !!! note "See also" `getActionByText`, `getAction`, `select` #### Function `samson.SAMSON.runPythonCode` Signature: `samson.SAMSON.runPythonCode(codeString: str, raisePythonConsole: bool = False) -> bool` Executes Python code *codeString* in the Python Console. **Parameters** - **codeString** (*str*) – A string with Python code. - **raisePythonConsole** (*bool**,**default=False*) – Whether the Python Console should be raised. **Returns** - *True* if succeeded to launch the code. **Return type** - bool !!! note "See also" `runPythonFile` #### Function `samson.SAMSON.runPythonFile` Signature: `samson.SAMSON.runPythonFile(fileName: str, raisePythonConsole: bool = False) -> bool` Executes Python script file *fileName* in the Python Console. **Parameters** - **fileName** (*str*) – A path to a Python script. - **raisePythonConsole** (*bool**,**default=False*) – Whether the Python Console should be raised. **Returns** - *True* if succeeded to launch the code. **Return type** - bool !!! note "See also" `runPythonCode` #### Function `samson.SAMSON.select` Signature: `samson.SAMSON.select(text: str) -> bool` Select nodes in the active document based on the given NSL string. **Parameters** - **text** (*str*) – An NSL string. **Returns** - *True* if the NSL was correct, else *False*. **Return type** - bool ##### Examples Select all receptors in the active document using NSL: ```pycon >>> SAMSON.select('node.category receptor') ``` !!! note "See also" `getActionByText`, `getAction`, `runCommand` #### Function `samson.SAMSON.setActiveDocument` Signature: `samson.SAMSON.setActiveDocument(document: samson.SBDocument) -> None` Sets the active document. **Parameters** - **document** ([*samson.SBDocument*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Document/SBDDocument.md#samson.SBDocument)) – The active document ##### Examples Create a new document and sets it as active ```pycon >>> myDoc = SBDocument('My document') >>> myDoc.create() >>> SAMSON.addDocument(myDoc) >>> SAMSON.setActiveDocument(myDoc) >>> # use the new clean document ``` !!! note "See also" `getActiveDocument`, `addNewDocument`, `addDocument` #### Function `samson.SAMSON.setActiveDocumentFilter` Signature: `samson.SAMSON.setActiveDocumentFilter(filter: str) -> None` Sets the node filter of the active document in the Document View. **Parameters** - **filter** (*str*) – A node filter, use a Node Specification Language expression (SAMSON API: [Node Specification Language](https://documentation.samson-connect.net/users/11.0.0/nsl/#)). ##### Examples Set a node filter in the Document View to residues. ```pycon >>> SAMSON.setActiveDocumentFilter('node.type residue') ``` !!! note "See also" `getActiveDocumentFilter` #### Function `samson.SAMSON.setActiveEditor` Signature: `samson.SAMSON.setActiveEditor(classUUID: samson.SBUUID, extensionUUID: samson.SBUUID) -> None` Sets the current editor. **Parameters** - **classUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – UUID of the editor’s class. - **extensionUUID** ([*samson.SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)) – UUID of the editor’s extension. #### Function `samson.SAMSON.setActiveSelectionFilterByName` Signature: `samson.SAMSON.setActiveSelectionFilterByName(selectionFilterName: str) -> bool` Sets the active selection filter according to the given selection filter name. **Parameters** - **selectionFilterName** (*str*) – A name of the selection filter. **Returns** - *True* in case of the success. **Return type** - bool ##### Examples Set the current selection filter to ‘Residues’. ```pycon >>> SAMSON.setActiveSelectionFilterByName('Residues') True ``` #### Function `samson.SAMSON.setActiveStructuralModel` Signature: `samson.SAMSON.setActiveStructuralModel(structuralModel: samson.SBStructuralModel) -> None` Sets the active structural model in the active document. **Parameters** - **structuralModel** ([*samson.SBStructuralModel*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md#samson.SBStructuralModel)) – A structural model in the active document ##### Examples Set the 1st structural model in the active document as the active one ```pycon >>> structural_model_indexer = SAMSON.getNodes('node.type structuralModel') >>> if structural_model_indexer.size: ... SAMSON.setActiveStructuralModel(structural_model_indexer[0]) ``` !!! note "See also" `getActiveStructuralModel` #### Function `samson.SAMSON.setBusy` Signature: `samson.SAMSON.setBusy(isBusy: bool) -> None` Notifies the user via the status bar that SAMSON is busy. !!! note "See also" `setStatusMessage` #### Function `samson.SAMSON.setMinimizationFlag` Signature: `samson.SAMSON.setMinimizationFlag(minimizationFlag: bool) -> None` Sets the interactive minimization flag. **Parameters** - **minimizationFlag** (*bool*) – The interactive minimization flag. !!! note "See also" `startMinimization`, `stopMinimization`, `toggleMinimization`, `getMinimizationFlag`, `minimize` #### Function `samson.SAMSON.setProgressBarValue` Signature: `samson.SAMSON.setProgressBarValue(value: int) -> None` Sets the value of the progress bar. !!! note "See also" `showProgressBar`, `hideProgressBar`, `isProgressBarStopped` #### Function `samson.SAMSON.setSimulationFlag` Signature: `samson.SAMSON.setSimulationFlag(simulationFlag: bool) -> None` Sets the interactive simulation flag. **Parameters** - **simulationFlag** (*bool*) – The interactive simulation flag. !!! note "See also" `startSimulation`, `stopSimulation`, `toggleSimulation`, `getSimulationFlag`, `minimize` #### Function `samson.SAMSON.setStatusMessage` Signature: `samson.SAMSON.setStatusMessage(message: str, time: int = 0) -> None` Shows a message in the status bar #### Function `samson.SAMSON.showProgressBar` Signature: `samson.SAMSON.showProgressBar(name: str = '', minimum: int = 0, maximum: int = 0, minimumDurationInSeconds: float = 2.0, isCancellable: bool = True, cancelButtonText: str = 'Cancel') -> None` Shows the progress bar. **Parameters** - **name** (*str**,**default=''*) – A name of the progress bar. - **minimum** (*int**,**default=0*) – A minimum value of the progress bar. - **maximum** (*int**,**default=0*) – A maximum value of the progress bar. - **minimumDurationInSeconds** (*float**,**default=2.0*) – A minimum duration in seconds. - **isCancellable** (*bool**,**default=True*) – Whether the progress bar can be canceled by the user. - **cancelButtonText** (*str**,**default='Cancel'*) – A text of the Cancel button. !!! note "See also" `setProgressBarValue`, `hideProgressBar`, `isProgressBarStopped` #### Function `samson.SAMSON.showProperties` Signature: `samson.SAMSON.showProperties(node: samson.SBNode) -> bool` Shows the properties widget of a node #### Function `samson.SAMSON.snap` Signature: `samson.SAMSON.snap(*args, **kwargs)` Overloaded function. 1. snap(x: int, y: int) -> tuple[int, int] Returns the snapped mouse viewport displacement (x, y). **Parameters** - **x** (*int*) – x-coordinate displacement in the viewport - **y** (*int*) – y-coordinate displacement in the viewport **Returns** - Snapped x-, y-coordinate displacements in the viewport **Return type** - Tuple(int, int) ##### Examples ```pycon >>> xs, ys = SAMSON.snap(12, 23) ``` 2. snap(x: int, y: int, pointInPlane: samson.SBPhysicalVector3) -> tuple[int, int] Returns the snapped mouse viewport displacement (x, y) in the plane containing *pointInPlane*. **Parameters** - **x** (*int*) – x-coordinate displacement in the viewport - **y** (*int*) – y-coordinate displacement in the viewport - **pointInPlane** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – A point in the plane parallel to the viewport plane. **Returns** - Snapped x-, y-coordinate displacements in the viewport. **Return type** - Tuple(int, int) ##### Examples ```pycon >>> xs, ys = SAMSON.snap(12, 23, SBPosition3(SBQuantity.pm(0), SBQuantity.pm(0), SBQuantity.pm(100))) ``` 3. snap(displacement: samson.SBQuantity.unitsSI) -> samson.SBQuantity.unitsSI Returns the snapped translational (if the provided displacement is in length units) or angular (if the provided displacement is in dimensionless units) displacement if the snapping of translational/angular displacements is on, else it returns the unchanged displacement. **Parameters** - **displacement** (*samson.SBQuantity*) – Translational (if the provided displacement is in length units) or angular (if the provided displacement is in dimensionless units) displacement. **Returns** - Snapped translational (if the provided displacement is in length units) or angular (if the provided displacement is in dimensionless units) displacement. **Return type** - samson.SBQuantity ##### Examples Get a snapped translational and angular displacements ```pycon >>> snapped_translational_displacement = SAMSON.snap(SBQuantity.angstrom(1.234)) >>> snapped_angular_displacement = SAMSON.snap(SBQuantity.degree(18.56)) ``` 4. snap(displacement: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3 Returns the snapped displacement if the snapping of translational 3D displacements is on, else it returns the unchanged displacement. **Parameters** - **displacement** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – Translational displacement 3D vector. **Returns** - Snapped translational displacement 3D vector. **Return type** - [samson.SBPosition3](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3) ##### Examples Get a snapped translational and angular displacements ```pycon >>> snapped_displacement = SAMSON.snap(SBPosition3(SBQuantity.nm(0.12), SBQuantity.nm(1.2), SBQuantity.nm(12.3))) ``` 5. snap(rotationMatrix: samson.SBPhysicalMatrix33) -> samson.SBPhysicalMatrix33 Returns the snapped rotation matrix if the snapping of angular displacements is on, else it returns the unchanged rotationMatrix. **Parameters** - **displacement** ([*samson.SBMatrix33*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33)) – A rotation matrix. **Returns** - A rotation matrix for the snapped angular displacement. **Return type** - [samson.SBMatrix33](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalMatrix33ConvenienceConstructors/dimensionless33.md#samson.SBMatrix33) 6. snap(transform: samson.SBSpatialTransform) -> samson.SBSpatialTransform Returns the snapped spatial transform according to the translational and angular snapping parameters. **Parameters** - **displacement** ([*samson.SBSpatialTransform*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialTransform.md#samson.SBSpatialTransform)) – A spatial transform (includes translational and angular displacements). **Returns** - A spatial transform for the snapped translational and angular displacements. **Return type** - [samson.SBSpatialTransform](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBSpatialTransform.md#samson.SBSpatialTransform) #### Function `samson.SAMSON.startMinimization` Signature: `samson.SAMSON.startMinimization() -> None` Starts interactive minimization. !!! note "See also" `stopMinimization`, `toggleMinimization`, `getMinimizationFlag`, `setMinimizationFlag`, `minimize` #### Function `samson.SAMSON.startSimulation` Signature: `samson.SAMSON.startSimulation() -> None` Starts interactive simulation. !!! note "See also" `stopSimulation`, `toggleSimulation`, `getSimulationFlag`, `setSimulationFlag`, `minimize` #### Function `samson.SAMSON.startTimer` Signature: `samson.SAMSON.startTimer() -> None` Starts a new performance timer #### Function `samson.SAMSON.stopMinimization` Signature: `samson.SAMSON.stopMinimization() -> None` Stops interactive minimization. !!! note "See also" `startMinimization`, `toggleMinimization`, `getMinimizationFlag`, `setMinimizationFlag`, `minimize` #### Function `samson.SAMSON.stopSimulation` Signature: `samson.SAMSON.stopSimulation() -> None` Stops interactive simulation. !!! note "See also" `startSimulation`, `toggleSimulation`, `getSimulationFlag`, `setSimulationFlag`, `minimize` #### Function `samson.SAMSON.stopTimer` Signature: `samson.SAMSON.stopTimer() -> list[samson.SBQuantity.unitsSI]` Stops the top performance timer. Returns elapsed time and total time [in seconds] #### Function `samson.SAMSON.toggleMinimization` Signature: `samson.SAMSON.toggleMinimization() -> None` Toggles interactive minimization on and off. !!! note "See also" `startMinimization`, `stopMinimization`, `getMinimizationFlag`, `setMinimizationFlag`, `minimize` #### Function `samson.SAMSON.toggleSimulation` Signature: `samson.SAMSON.toggleSimulation() -> None` Toggles interactive simulation on and off. !!! note "See also" `startSimulation`, `stopSimulation`, `getSimulationFlag`, `setSimulationFlag`, `minimize` #### Function `samson.SAMSON.undo` Signature: `samson.SAMSON.undo() -> None` Undo one command. !!! note "See also" `redo`, `isRedoing`, `isUndoing` --- # GUI Source: https://documentation.samson-connect.net/scripting/latest/docs/api/GUI.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/GUI.md This group contains GUI-related classes that are directly exposed to Python. In everyday scripts, most UI-facing functionality is typically accessed through [`SAMSON`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#module-samson.SAMSON), while this section documents the explicit GUI objects themselves. !!! note "See also" SAMSON SDK: [The GUI Library Group](https://documentation.samson-connect.net/developers/11.0.0/sdk/GUI/#) - [Action](https://documentation.samson-connect.net/scripting/latest/docs/api/GUI/Action.md) --- # Action Source: https://documentation.samson-connect.net/scripting/latest/docs/api/GUI/Action.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/GUI/Action.md This group contains classes related to SAMSON actions, which are the command objects that can be triggered from menus, toolbars, shortcuts, or Python. !!! note "See also" [Running actions](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md#ps-run-command) SAMSON SDK: [The SBGAction Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/GUI/Action/#) - [SBAction](https://documentation.samson-connect.net/scripting/latest/docs/api/GUI/Action/SBGAction.md) --- # SBAction Source: https://documentation.samson-connect.net/scripting/latest/docs/api/GUI/Action/SBGAction.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/GUI/Action/SBGAction.md !!! note "See also" [Running actions](https://documentation.samson-connect.net/scripting/latest/docs/RunningActions.md#ps-run-command) SAMSON SDK: [SBGAction](https://documentation.samson-connect.net/developers/11.0.0/api/classSBGAction/#) ## API Reference #### Class `samson.SBAction` Signature: `class samson.SBAction(*args, **kwargs)` Bases: `pybind11_object` Base class for SAMSON GUI actions. *SBAction* derives from *QAction* and represents interactive commands shown in menus, toolbars, contextual menus, and command search. Overloaded function. 1. __init__(self: samson.SBAction, UUID: samson.SBUUID = SBUUID(“00000000-0000-0000-0000-000000000000”)) -> None Constructs an action with an optional UUID. **Parameters** - **UUID** ([*SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)*,**optional*) – Action UUID. If omitted, an invalid UUID is used. 2. __init__(self: samson.SBAction, text: str, UUID: samson.SBUUID = SBUUID(“00000000-0000-0000-0000-000000000000”)) -> None Constructs an action with display text and an optional UUID. **Parameters** - **text** (*str*) – Action text. - **UUID** ([*SBUUID*](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Container/SBCUUID.md#samson.SBUUID)*,**optional*) – Action UUID. ##### Method `samson.SBAction.run` Signature: `run(self: samson.SBAction, nodeIndexer: samson.SBNodeIndexer) -> None` Runs this action on nodes in *nodeIndexer*. By default, when an action is triggered (via the *SBAction.trigger* function or by triggering it via UI) it is applied to the whole document or to the current selection depending on the action’s implementation. If an action implements this function, it can be applied directly to nodes in *nodeIndexer* without selecting them first. Note: this function is implemented only in a subset of actions. **Parameters** - **nodeIndexer** ([*SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – Indexer of nodes to which the action should be applied. ##### Method `samson.SBAction.trigger` Signature: `trigger(self: samson.SBAction) -> None` Triggers the action. ##### Property `samson.SBAction.UUID` Signature: `property UUID` Returns the action UUID. ##### Property `samson.SBAction.addableToFavoritesFlag` Signature: `property addableToFavoritesFlag` Returns whether this action can be added to favorites. ##### Property `samson.SBAction.badge` Signature: `property badge` Badge value shown on the action (if supported by UI). ##### Property `samson.SBAction.descriptionImagePath` Signature: `property descriptionImagePath` Returns the path to an optional image used in action descriptions. ##### Property `samson.SBAction.favoriteFlag` Signature: `property favoriteFlag` Favorite state. ##### Property `samson.SBAction.hasFavoriteFlag` Signature: `property hasFavoriteFlag` Returns *True* if the action can currently be favorited. ##### Property `samson.SBAction.highlightingFlag` Signature: `property highlightingFlag` Highlighting state. ##### Property `samson.SBAction.isDiscoverable` Signature: `property isDiscoverable` Returns *True* if the action can be discovered by the user. ##### Property `samson.SBAction.isLocked` Signature: `property isLocked` Returns *True* if the action is locked. ##### Property `samson.SBAction.name` Signature: `property name` Returns the action class name. ##### Property `samson.SBAction.objectName` Signature: `property objectName` Returns the action object name. ##### Property `samson.SBAction.text` Signature: `property text` Returns the action text. --- # Modeling Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling.md This group contains classes related to structural, visual, dynamical, interaction, and property models in SAMSON. !!! note "See also" SAMSON SDK: [The Modeling Library Group](https://documentation.samson-connect.net/developers/11.0.0/sdk/Modeling/#) - [Dynamical Model](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel.md) - [Element](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element.md) - [Interaction Model](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel.md) - [Model](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model.md) - [Property Model](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/PropertyModel.md) - [Structural Model](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel.md) - [Visual Model](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel.md) --- # Dynamical Model Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel.md This group defines dynamical models, which store the simulated state associated with a system. The pages listed below correspond to the dynamical model classes that are currently exposed in Python. !!! note "See also" SAMSON SDK: [The SBMDynamicalModel Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Modeling/DynamicalModel/#) - [SBDynamicalModel](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModel.md) - [SBParticleSystem](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModelParticleSystem.md) --- # SBDynamicalModel Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModel.md This class describes the base class for dynamical models. Dynamical models store the simulated state associated with a system and are typically paired with an interaction model and a state updater inside a [`simulator`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulator.md#samson.SBSimulator). !!! note "See also" [`samson.SBInteractionModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModel.md#samson.SBInteractionModel) [`samson.SBStateUpdater`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater/SBSStateUpdater.md#samson.SBStateUpdater) [`samson.SBSimulator`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulator.md#samson.SBSimulator) SAMSON SDK: [SBMDynamicalModel](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMDynamicalModel/#) ## API Reference #### Class `samson.SBDynamicalModel` Signature: `class samson.SBDynamicalModel` Bases: [`SBModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModel.md#samson.SBModel) Base class for dynamical models. It provides a topology rooted at *SBDynamicalRoot*, position-change tracking, and periodic boundary condition controls used by concrete dynamical models. ##### Method `samson.SBDynamicalModel.enforcePeriodicBoundaryConditions` Signature: `enforcePeriodicBoundaryConditions(self: samson.SBDynamicalModel) -> bool` Applies periodic boundary conditions to the model state. ##### Method `samson.SBDynamicalModel.flushPositionBuffer` Signature: `flushPositionBuffer(self: samson.SBDynamicalModel) -> None` Clears the position-change buffer. ##### Method `samson.SBDynamicalModel.getChangedPositionIndex` Signature: `getChangedPositionIndex(self: samson.SBDynamicalModel, i: int) -> int` Returns the index of a changed position ##### Method `samson.SBDynamicalModel.getNumberOfChangedPositions` Signature: `getNumberOfChangedPositions(self: samson.SBDynamicalModel) -> int` Returns the number of changed positions ##### Method `samson.SBDynamicalModel.getPeriodicBoundaryConditions` Signature: `getPeriodicBoundaryConditions(self: samson.SBDynamicalModel) -> samson.SBPhysicalIAVector3` Returns the periodic boundary conditions ##### Method `samson.SBDynamicalModel.getPositionChanged` Signature: `getPositionChanged(self: samson.SBDynamicalModel, i: int) -> bool` Returns whether position i has been changed since the last flush ##### Method `samson.SBDynamicalModel.setPeriodicBoundaryConditions` Signature: `setPeriodicBoundaryConditions(self: samson.SBDynamicalModel, v: samson.SBPhysicalIAVector3) -> None` Sets the periodic boundary conditions ##### Method `samson.SBDynamicalModel.updateStructuralNodes` Signature: `updateStructuralNodes(self: samson.SBDynamicalModel) -> None` Updates structural nodes from the current dynamical state. ##### Property `samson.SBDynamicalModel.dynamicalModelType` Signature: `property dynamicalModelType` Dynamical model type (read-only). ##### Property `samson.SBDynamicalModel.periodicBoundaryConditionsFlag` Signature: `property periodicBoundaryConditionsFlag` Enables or disables periodic boundary conditions. --- # SBParticleSystem Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModelParticleSystem.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModelParticleSystem.md This class describes a particle system in SAMSON, i.e. a dynamical system composed of particles. A particle system has two buffers - a position buffer and a momentum buffer - which may be used to write adaptive simulation algorithms. You can get a number of changed momentums and a momentum of a particle in the particle system: ```python print(particleSystem.numberOfChangedMomentums) print(particleSystem.getMomentum(i)) # the same can be done for positions print(particleSystem.numberOfChangedPositions) print(particleSystem.getPosition(i)) ``` You can get the index of i-th changed momentum. Assume for example that particle 17, 32, and 529 have had their momentum changed since the last flush of the momentum buffer. Then the following code: ```python for i in range(particleSystem.numberOfChangedMomentums): # changedMomentumIndex is the index of the i-th changed momentum changedMomentumIndex = particleSystem.getChangedMomentumIndex(i) print(changedMomentumIndex) ``` This will result in the following output: ```python 17 32 529 ``` You can use these indices in adaptive simulation algorithms for example together with `samson.SBParticleSystem`. !!! note "See also" SAMSON SDK: [SBMDynamicalModelParticleSystem](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMDynamicalModelParticleSystem/#) ## API Reference #### Class `samson.SBParticleSystem` Signature: `class samson.SBParticleSystem(*args, **kwargs)` Bases: [`SBDynamicalModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModel.md#samson.SBDynamicalModel) Dynamical model that simulates particles (atoms). Overloaded function. 1. __init__(self: samson.SBParticleSystem) -> None Constructs a dynamical particle system 2. __init__(self: samson.SBParticleSystem, nodeIndexer: samson.SBNodeIndexer) -> None Constructs a dynamical particle system based on a node indexer. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A node indexer with atoms. ##### Method `samson.SBParticleSystem.addAtom` Signature: `addAtom(self: samson.SBParticleSystem, atom: samson.SBAtom) -> int` Adds an atom to the particle system. ##### Method `samson.SBParticleSystem.addAtoms` Signature: `addAtoms(self: samson.SBParticleSystem, nodeIndexer: samson.SBNodeIndexer) -> None` Adds atoms from a node indexer to the particle system. ##### Method `samson.SBParticleSystem.correctDistanceWithPBC` Signature: `correctDistanceWithPBC(self: samson.SBParticleSystem, distance: samson.SBPhysicalVector3) -> None` Applies periodic boundary correction to a displacement vector. ##### Method `samson.SBParticleSystem.flushMomentumBuffer` Signature: `flushMomentumBuffer(self: samson.SBParticleSystem) -> None` Flushes the momentum buffer ##### Method `samson.SBParticleSystem.getActivityFlag` Signature: `getActivityFlag(*args, **kwargs)` Overloaded function. 1. getActivityFlag(self: samson.SBParticleSystem, atom: samson.SBAtom) -> bool Returns activity flag of an atom 2. getActivityFlag(self: samson.SBParticleSystem, atomIndex: int) -> bool Returns activity flag of an atom ##### Method `samson.SBParticleSystem.getAtomIndexer` Signature: `getAtomIndexer(self: samson.SBParticleSystem) -> samson.SBNodeIndexer` Returns an indexer with the atoms associated to the particle system. **Returns** - A node indexer with the associated atoms. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Method `samson.SBParticleSystem.getChangedMomentumIndex` Signature: `getChangedMomentumIndex(self: samson.SBParticleSystem, i: int) -> int` Returns the index of a changed momentum ##### Method `samson.SBParticleSystem.getInverseMass` Signature: `getInverseMass(*args, **kwargs)` Overloaded function. 1. getInverseMass(self: samson.SBParticleSystem, atom: samson.SBAtom) -> samson.SBQuantity.unitsSI Returns inverse mass of an atom 2. getInverseMass(self: samson.SBParticleSystem, atomIndex: int) -> samson.SBQuantity.unitsSI Returns inverse mass of an atom ##### Method `samson.SBParticleSystem.getMass` Signature: `getMass(*args, **kwargs)` Overloaded function. 1. getMass(self: samson.SBParticleSystem, atom: samson.SBAtom) -> samson.SBQuantity.unitsSI Returns mass of an atom 2. getMass(self: samson.SBParticleSystem, atomIndex: int) -> samson.SBQuantity.unitsSI Returns mass of an atom ##### Method `samson.SBParticleSystem.getMomentum` Signature: `getMomentum(self: samson.SBParticleSystem, i: int) -> samson.SBPhysicalVector3` Returns the momentum of an atom ##### Method `samson.SBParticleSystem.getPosition` Signature: `getPosition(self: samson.SBParticleSystem, i: int) -> samson.SBPhysicalVector3` Returns the position of an atom ##### Method `samson.SBParticleSystem.getPositionChanged` Signature: `getPositionChanged(self: samson.SBParticleSystem, i: int) -> bool` Returns whether position i has been changed since the last flush ##### Method `samson.SBParticleSystem.removeAtom` Signature: `removeAtom(*args, **kwargs)` Overloaded function. 1. removeAtom(self: samson.SBParticleSystem, atom: samson.SBAtom) -> None Removes an atom from the particle system 2. removeAtom(self: samson.SBParticleSystem, atomIndex: int) -> None Removes an atom from the particle system ##### Method `samson.SBParticleSystem.removeAtoms` Signature: `removeAtoms(self: samson.SBParticleSystem, nodeIndexer: samson.SBNodeIndexer) -> None` Removes atoms of a node indexer ##### Method `samson.SBParticleSystem.roundForPBC` Signature: `roundForPBC(self: samson.SBParticleSystem, length: samson.SBQuantity.unitsSI) -> int` Applies periodic rounding to a Cartesian position. ##### Method `samson.SBParticleSystem.setActivityFlag` Signature: `setActivityFlag(*args, **kwargs)` Overloaded function. 1. setActivityFlag(self: samson.SBParticleSystem, atom: samson.SBAtom, flag: bool) -> None Sets activity flag of an atom 2. setActivityFlag(self: samson.SBParticleSystem, atomIndex: int, flag: bool) -> None Sets activity flag of an atom ##### Method `samson.SBParticleSystem.setMass` Signature: `setMass(*args, **kwargs)` Overloaded function. 1. setMass(self: samson.SBParticleSystem, atom: samson.SBAtom, mass: samson.SBQuantity.unitsSI) -> None Sets mass of an atom 2. setMass(self: samson.SBParticleSystem, atomIndex: int, mass: samson.SBQuantity.unitsSI) -> None Sets mass of an atom ##### Method `samson.SBParticleSystem.setMomentum` Signature: `setMomentum(self: samson.SBParticleSystem, i: int, newMomentum: samson.SBPhysicalVector3) -> None` Updates the momentum of an atom ##### Method `samson.SBParticleSystem.setPosition` Signature: `setPosition(self: samson.SBParticleSystem, i: int, newPosition: samson.SBPhysicalVector3) -> None` Updates the position of an atom ##### Property `samson.SBParticleSystem.numberOfChangedMomentums` Signature: `property numberOfChangedMomentums` Returns the number of changed momenta. --- # Element Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element.md This group defines classes related to the periodic table and element information used by structural nodes such as atoms. !!! note "See also" SAMSON SDK: [The SBMElement Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Modeling/Element/#) - [SBElement](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md) - [SBElementTable](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElementTable.md) --- # SBElement Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md This class is used to describe the periodic table in SAMSON. Typically, this class is used when constructing atoms, or when accessing properties of periodic table elements: ```python # get an element based on the element type C = SBElementTable.getElement(SBElement.Carbon) # print Carbon's covalent radius print(C.covalentRadius) ``` Note that convenience attributes and functions exist in [`samson.SBAtom`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom) to access the properties of their element: ```python print(atom.covalentRadius) ``` !!! note "See also" SAMSON SDK: [SBMElement](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMElement/#) ## API Reference #### Class `samson.SBElement` Signature: `class samson.SBElement` Bases: `pybind11_object` This class describes a periodic table element. ##### Class `samson.SBElement.ElementType` Signature: `class ElementType(self: samson.SBElement.ElementType, value: int)` Bases: `pybind11_object` Members: Hydrogen H Helium He Lithium Li Beryllium Be Boron B Carbon C Nitrogen N Oxygen O Fluorine F Neon Ne Sodium Na Magnesium Mg Aluminium Al Silicon Si Phosphorus P Sulfur S Chlorine Cl Argon Ar Potassium K Calcium Ca Scandium Sc Titanium Ti Vanadium V Chromium Cr Manganese Mn Iron Fe Cobalt Co Nickel Ni Copper Cu Zinc Zn Gallium Ga Germanium Ge Arsenic As Selenium Se Bromine Br Krypton Kr Rubidium Rb Strontium Sr Yttrium Y Zirconium Zr Niobium Nb Molybdenum Mo Technetium Tc Ruthenium Ru Rhodium Rh Palladium Pd Silver Ag Cadmium Cd Indium In Tin Sn Antimony Sb Tellurium Te Iodine I Xenon Xe Caesium Cs Barium Ba Lanthanum La Cerium Ce Praseodymium Pr Neodymium Nd Promethium Pm Samarium Sm Europium Eu Gadolinium Gd Terbium Tb Dysprosium Dy Holmium Ho Erbium Er Thulium Tm Ytterbium Yb Lutetium Lu Hafnium Hf Tantalum Ta Tungsten W Rhenium Re Osmium Os Iridium Ir Platinum Pt Gold Au Mercury Hg Thallium Tl Lead Pb Bismuth Bi Polonium Po Astatine At Radon Rn Francium Fr Radium Ra Actinium Ac Thorium Th Protactinium Pa Uranium U Neptunium Np Plutonium Pu Americium Am Curium Cm Berkelium Bk Californium Cf Einsteinium Es Fermium Fm Mendelevium Md Nobelium No Lawrencium Lr Rutherfordium Rf Dubnium Db Seaborgium Sg Bohrium Bh Hassium Hs Meitnerium Mt Darmstadtium Ds Roentgenium Rg Copernicium Cn Nihonium Nh Ununtrium Uut Flerovium Fl Ununquadium Uuq Moscovium Mc Ununpentium Uup Livermorium Lv Ununhexium Uuh Tennessine Ts Ununseptium Uus Oganesson Og Ununoctium Uuo CoarseGrained CG Unknown Un ###### Attribute `samson.SBElement.ElementType.Ac` Signature: `Ac = ` ###### Attribute `samson.SBElement.ElementType.Actinium` Signature: `Actinium = ` ###### Attribute `samson.SBElement.ElementType.Ag` Signature: `Ag = ` ###### Attribute `samson.SBElement.ElementType.Al` Signature: `Al = ` ###### Attribute `samson.SBElement.ElementType.Aluminium` Signature: `Aluminium = ` ###### Attribute `samson.SBElement.ElementType.Am` Signature: `Am = ` ###### Attribute `samson.SBElement.ElementType.Americium` Signature: `Americium = ` ###### Attribute `samson.SBElement.ElementType.Antimony` Signature: `Antimony = ` ###### Attribute `samson.SBElement.ElementType.Ar` Signature: `Ar = ` ###### Attribute `samson.SBElement.ElementType.Argon` Signature: `Argon = ` ###### Attribute `samson.SBElement.ElementType.Arsenic` Signature: `Arsenic = ` ###### Attribute `samson.SBElement.ElementType.As` Signature: `As = ` ###### Attribute `samson.SBElement.ElementType.Astatine` Signature: `Astatine = ` ###### Attribute `samson.SBElement.ElementType.At` Signature: `At = ` ###### Attribute `samson.SBElement.ElementType.Au` Signature: `Au = ` ###### Attribute `samson.SBElement.ElementType.B` Signature: `B = ` ###### Attribute `samson.SBElement.ElementType.Ba` Signature: `Ba = ` ###### Attribute `samson.SBElement.ElementType.Barium` Signature: `Barium = ` ###### Attribute `samson.SBElement.ElementType.Be` Signature: `Be = ` ###### Attribute `samson.SBElement.ElementType.Berkelium` Signature: `Berkelium = ` ###### Attribute `samson.SBElement.ElementType.Beryllium` Signature: `Beryllium = ` ###### Attribute `samson.SBElement.ElementType.Bh` Signature: `Bh = ` ###### Attribute `samson.SBElement.ElementType.Bi` Signature: `Bi = ` ###### Attribute `samson.SBElement.ElementType.Bismuth` Signature: `Bismuth = ` ###### Attribute `samson.SBElement.ElementType.Bk` Signature: `Bk = ` ###### Attribute `samson.SBElement.ElementType.Bohrium` Signature: `Bohrium = ` ###### Attribute `samson.SBElement.ElementType.Boron` Signature: `Boron = ` ###### Attribute `samson.SBElement.ElementType.Br` Signature: `Br = ` ###### Attribute `samson.SBElement.ElementType.Bromine` Signature: `Bromine = ` ###### Attribute `samson.SBElement.ElementType.C` Signature: `C = ` ###### Attribute `samson.SBElement.ElementType.CG` Signature: `CG = ` ###### Attribute `samson.SBElement.ElementType.Ca` Signature: `Ca = ` ###### Attribute `samson.SBElement.ElementType.Cadmium` Signature: `Cadmium = ` ###### Attribute `samson.SBElement.ElementType.Caesium` Signature: `Caesium = ` ###### Attribute `samson.SBElement.ElementType.Calcium` Signature: `Calcium = ` ###### Attribute `samson.SBElement.ElementType.Californium` Signature: `Californium = ` ###### Attribute `samson.SBElement.ElementType.Carbon` Signature: `Carbon = ` ###### Attribute `samson.SBElement.ElementType.Cd` Signature: `Cd = ` ###### Attribute `samson.SBElement.ElementType.Ce` Signature: `Ce = ` ###### Attribute `samson.SBElement.ElementType.Cerium` Signature: `Cerium = ` ###### Attribute `samson.SBElement.ElementType.Cf` Signature: `Cf = ` ###### Attribute `samson.SBElement.ElementType.Chlorine` Signature: `Chlorine = ` ###### Attribute `samson.SBElement.ElementType.Chromium` Signature: `Chromium = ` ###### Attribute `samson.SBElement.ElementType.Cl` Signature: `Cl = ` ###### Attribute `samson.SBElement.ElementType.Cm` Signature: `Cm = ` ###### Attribute `samson.SBElement.ElementType.Cn` Signature: `Cn = ` ###### Attribute `samson.SBElement.ElementType.Co` Signature: `Co = ` ###### Attribute `samson.SBElement.ElementType.CoarseGrained` Signature: `CoarseGrained = ` ###### Attribute `samson.SBElement.ElementType.Cobalt` Signature: `Cobalt = ` ###### Attribute `samson.SBElement.ElementType.Copernicium` Signature: `Copernicium = ` ###### Attribute `samson.SBElement.ElementType.Copper` Signature: `Copper = ` ###### Attribute `samson.SBElement.ElementType.Cr` Signature: `Cr = ` ###### Attribute `samson.SBElement.ElementType.Cs` Signature: `Cs = ` ###### Attribute `samson.SBElement.ElementType.Cu` Signature: `Cu = ` ###### Attribute `samson.SBElement.ElementType.Curium` Signature: `Curium = ` ###### Attribute `samson.SBElement.ElementType.Darmstadtium` Signature: `Darmstadtium = ` ###### Attribute `samson.SBElement.ElementType.Db` Signature: `Db = ` ###### Attribute `samson.SBElement.ElementType.Ds` Signature: `Ds = ` ###### Attribute `samson.SBElement.ElementType.Dubnium` Signature: `Dubnium = ` ###### Attribute `samson.SBElement.ElementType.Dy` Signature: `Dy = ` ###### Attribute `samson.SBElement.ElementType.Dysprosium` Signature: `Dysprosium = ` ###### Attribute `samson.SBElement.ElementType.Einsteinium` Signature: `Einsteinium = ` ###### Attribute `samson.SBElement.ElementType.Er` Signature: `Er = ` ###### Attribute `samson.SBElement.ElementType.Erbium` Signature: `Erbium = ` ###### Attribute `samson.SBElement.ElementType.Es` Signature: `Es = ` ###### Attribute `samson.SBElement.ElementType.Eu` Signature: `Eu = ` ###### Attribute `samson.SBElement.ElementType.Europium` Signature: `Europium = ` ###### Attribute `samson.SBElement.ElementType.F` Signature: `F = ` ###### Attribute `samson.SBElement.ElementType.Fe` Signature: `Fe = ` ###### Attribute `samson.SBElement.ElementType.Fermium` Signature: `Fermium = ` ###### Attribute `samson.SBElement.ElementType.Fl` Signature: `Fl = ` ###### Attribute `samson.SBElement.ElementType.Flerovium` Signature: `Flerovium = ` ###### Attribute `samson.SBElement.ElementType.Fluorine` Signature: `Fluorine = ` ###### Attribute `samson.SBElement.ElementType.Fm` Signature: `Fm = ` ###### Attribute `samson.SBElement.ElementType.Fr` Signature: `Fr = ` ###### Attribute `samson.SBElement.ElementType.Francium` Signature: `Francium = ` ###### Attribute `samson.SBElement.ElementType.Ga` Signature: `Ga = ` ###### Attribute `samson.SBElement.ElementType.Gadolinium` Signature: `Gadolinium = ` ###### Attribute `samson.SBElement.ElementType.Gallium` Signature: `Gallium = ` ###### Attribute `samson.SBElement.ElementType.Gd` Signature: `Gd = ` ###### Attribute `samson.SBElement.ElementType.Ge` Signature: `Ge = ` ###### Attribute `samson.SBElement.ElementType.Germanium` Signature: `Germanium = ` ###### Attribute `samson.SBElement.ElementType.Gold` Signature: `Gold = ` ###### Attribute `samson.SBElement.ElementType.H` Signature: `H = ` ###### Attribute `samson.SBElement.ElementType.Hafnium` Signature: `Hafnium = ` ###### Attribute `samson.SBElement.ElementType.Hassium` Signature: `Hassium = ` ###### Attribute `samson.SBElement.ElementType.He` Signature: `He = ` ###### Attribute `samson.SBElement.ElementType.Helium` Signature: `Helium = ` ###### Attribute `samson.SBElement.ElementType.Hf` Signature: `Hf = ` ###### Attribute `samson.SBElement.ElementType.Hg` Signature: `Hg = ` ###### Attribute `samson.SBElement.ElementType.Ho` Signature: `Ho = ` ###### Attribute `samson.SBElement.ElementType.Holmium` Signature: `Holmium = ` ###### Attribute `samson.SBElement.ElementType.Hs` Signature: `Hs = ` ###### Attribute `samson.SBElement.ElementType.Hydrogen` Signature: `Hydrogen = ` ###### Attribute `samson.SBElement.ElementType.I` Signature: `I = ` ###### Attribute `samson.SBElement.ElementType.In` Signature: `In = ` ###### Attribute `samson.SBElement.ElementType.Indium` Signature: `Indium = ` ###### Attribute `samson.SBElement.ElementType.Iodine` Signature: `Iodine = ` ###### Attribute `samson.SBElement.ElementType.Ir` Signature: `Ir = ` ###### Attribute `samson.SBElement.ElementType.Iridium` Signature: `Iridium = ` ###### Attribute `samson.SBElement.ElementType.Iron` Signature: `Iron = ` ###### Attribute `samson.SBElement.ElementType.K` Signature: `K = ` ###### Attribute `samson.SBElement.ElementType.Kr` Signature: `Kr = ` ###### Attribute `samson.SBElement.ElementType.Krypton` Signature: `Krypton = ` ###### Attribute `samson.SBElement.ElementType.La` Signature: `La = ` ###### Attribute `samson.SBElement.ElementType.Lanthanum` Signature: `Lanthanum = ` ###### Attribute `samson.SBElement.ElementType.Lawrencium` Signature: `Lawrencium = ` ###### Attribute `samson.SBElement.ElementType.Lead` Signature: `Lead = ` ###### Attribute `samson.SBElement.ElementType.Li` Signature: `Li = ` ###### Attribute `samson.SBElement.ElementType.Lithium` Signature: `Lithium = ` ###### Attribute `samson.SBElement.ElementType.Livermorium` Signature: `Livermorium = ` ###### Attribute `samson.SBElement.ElementType.Lr` Signature: `Lr = ` ###### Attribute `samson.SBElement.ElementType.Lu` Signature: `Lu = ` ###### Attribute `samson.SBElement.ElementType.Lutetium` Signature: `Lutetium = ` ###### Attribute `samson.SBElement.ElementType.Lv` Signature: `Lv = ` ###### Attribute `samson.SBElement.ElementType.Magnesium` Signature: `Magnesium = ` ###### Attribute `samson.SBElement.ElementType.Manganese` Signature: `Manganese = ` ###### Attribute `samson.SBElement.ElementType.Mc` Signature: `Mc = ` ###### Attribute `samson.SBElement.ElementType.Md` Signature: `Md = ` ###### Attribute `samson.SBElement.ElementType.Meitnerium` Signature: `Meitnerium = ` ###### Attribute `samson.SBElement.ElementType.Mendelevium` Signature: `Mendelevium = ` ###### Attribute `samson.SBElement.ElementType.Mercury` Signature: `Mercury = ` ###### Attribute `samson.SBElement.ElementType.Mg` Signature: `Mg = ` ###### Attribute `samson.SBElement.ElementType.Mn` Signature: `Mn = ` ###### Attribute `samson.SBElement.ElementType.Mo` Signature: `Mo = ` ###### Attribute `samson.SBElement.ElementType.Molybdenum` Signature: `Molybdenum = ` ###### Attribute `samson.SBElement.ElementType.Moscovium` Signature: `Moscovium = ` ###### Attribute `samson.SBElement.ElementType.Mt` Signature: `Mt = ` ###### Attribute `samson.SBElement.ElementType.N` Signature: `N = ` ###### Attribute `samson.SBElement.ElementType.Na` Signature: `Na = ` ###### Attribute `samson.SBElement.ElementType.Nb` Signature: `Nb = ` ###### Attribute `samson.SBElement.ElementType.Nd` Signature: `Nd = ` ###### Attribute `samson.SBElement.ElementType.Ne` Signature: `Ne = ` ###### Attribute `samson.SBElement.ElementType.Neodymium` Signature: `Neodymium = ` ###### Attribute `samson.SBElement.ElementType.Neon` Signature: `Neon = ` ###### Attribute `samson.SBElement.ElementType.Neptunium` Signature: `Neptunium = ` ###### Attribute `samson.SBElement.ElementType.Nh` Signature: `Nh = ` ###### Attribute `samson.SBElement.ElementType.Ni` Signature: `Ni = ` ###### Attribute `samson.SBElement.ElementType.Nickel` Signature: `Nickel = ` ###### Attribute `samson.SBElement.ElementType.Nihonium` Signature: `Nihonium = ` ###### Attribute `samson.SBElement.ElementType.Niobium` Signature: `Niobium = ` ###### Attribute `samson.SBElement.ElementType.Nitrogen` Signature: `Nitrogen = ` ###### Attribute `samson.SBElement.ElementType.No` Signature: `No = ` ###### Attribute `samson.SBElement.ElementType.Nobelium` Signature: `Nobelium = ` ###### Attribute `samson.SBElement.ElementType.Np` Signature: `Np = ` ###### Attribute `samson.SBElement.ElementType.O` Signature: `O = ` ###### Attribute `samson.SBElement.ElementType.Og` Signature: `Og = ` ###### Attribute `samson.SBElement.ElementType.Oganesson` Signature: `Oganesson = ` ###### Attribute `samson.SBElement.ElementType.Os` Signature: `Os = ` ###### Attribute `samson.SBElement.ElementType.Osmium` Signature: `Osmium = ` ###### Attribute `samson.SBElement.ElementType.Oxygen` Signature: `Oxygen = ` ###### Attribute `samson.SBElement.ElementType.P` Signature: `P = ` ###### Attribute `samson.SBElement.ElementType.Pa` Signature: `Pa = ` ###### Attribute `samson.SBElement.ElementType.Palladium` Signature: `Palladium = ` ###### Attribute `samson.SBElement.ElementType.Pb` Signature: `Pb = ` ###### Attribute `samson.SBElement.ElementType.Pd` Signature: `Pd = ` ###### Attribute `samson.SBElement.ElementType.Phosphorus` Signature: `Phosphorus = ` ###### Attribute `samson.SBElement.ElementType.Platinum` Signature: `Platinum = ` ###### Attribute `samson.SBElement.ElementType.Plutonium` Signature: `Plutonium = ` ###### Attribute `samson.SBElement.ElementType.Pm` Signature: `Pm = ` ###### Attribute `samson.SBElement.ElementType.Po` Signature: `Po = ` ###### Attribute `samson.SBElement.ElementType.Polonium` Signature: `Polonium = ` ###### Attribute `samson.SBElement.ElementType.Potassium` Signature: `Potassium = ` ###### Attribute `samson.SBElement.ElementType.Pr` Signature: `Pr = ` ###### Attribute `samson.SBElement.ElementType.Praseodymium` Signature: `Praseodymium = ` ###### Attribute `samson.SBElement.ElementType.Promethium` Signature: `Promethium = ` ###### Attribute `samson.SBElement.ElementType.Protactinium` Signature: `Protactinium = ` ###### Attribute `samson.SBElement.ElementType.Pt` Signature: `Pt = ` ###### Attribute `samson.SBElement.ElementType.Pu` Signature: `Pu = ` ###### Attribute `samson.SBElement.ElementType.Ra` Signature: `Ra = ` ###### Attribute `samson.SBElement.ElementType.Radium` Signature: `Radium = ` ###### Attribute `samson.SBElement.ElementType.Radon` Signature: `Radon = ` ###### Attribute `samson.SBElement.ElementType.Rb` Signature: `Rb = ` ###### Attribute `samson.SBElement.ElementType.Re` Signature: `Re = ` ###### Attribute `samson.SBElement.ElementType.Rf` Signature: `Rf = ` ###### Attribute `samson.SBElement.ElementType.Rg` Signature: `Rg = ` ###### Attribute `samson.SBElement.ElementType.Rh` Signature: `Rh = ` ###### Attribute `samson.SBElement.ElementType.Rhenium` Signature: `Rhenium = ` ###### Attribute `samson.SBElement.ElementType.Rhodium` Signature: `Rhodium = ` ###### Attribute `samson.SBElement.ElementType.Rn` Signature: `Rn = ` ###### Attribute `samson.SBElement.ElementType.Roentgenium` Signature: `Roentgenium = ` ###### Attribute `samson.SBElement.ElementType.Ru` Signature: `Ru = ` ###### Attribute `samson.SBElement.ElementType.Rubidium` Signature: `Rubidium = ` ###### Attribute `samson.SBElement.ElementType.Ruthenium` Signature: `Ruthenium = ` ###### Attribute `samson.SBElement.ElementType.Rutherfordium` Signature: `Rutherfordium = ` ###### Attribute `samson.SBElement.ElementType.S` Signature: `S = ` ###### Attribute `samson.SBElement.ElementType.Samarium` Signature: `Samarium = ` ###### Attribute `samson.SBElement.ElementType.Sb` Signature: `Sb = ` ###### Attribute `samson.SBElement.ElementType.Sc` Signature: `Sc = ` ###### Attribute `samson.SBElement.ElementType.Scandium` Signature: `Scandium = ` ###### Attribute `samson.SBElement.ElementType.Se` Signature: `Se = ` ###### Attribute `samson.SBElement.ElementType.Seaborgium` Signature: `Seaborgium = ` ###### Attribute `samson.SBElement.ElementType.Selenium` Signature: `Selenium = ` ###### Attribute `samson.SBElement.ElementType.Sg` Signature: `Sg = ` ###### Attribute `samson.SBElement.ElementType.Si` Signature: `Si = ` ###### Attribute `samson.SBElement.ElementType.Silicon` Signature: `Silicon = ` ###### Attribute `samson.SBElement.ElementType.Silver` Signature: `Silver = ` ###### Attribute `samson.SBElement.ElementType.Sm` Signature: `Sm = ` ###### Attribute `samson.SBElement.ElementType.Sn` Signature: `Sn = ` ###### Attribute `samson.SBElement.ElementType.Sodium` Signature: `Sodium = ` ###### Attribute `samson.SBElement.ElementType.Sr` Signature: `Sr = ` ###### Attribute `samson.SBElement.ElementType.Strontium` Signature: `Strontium = ` ###### Attribute `samson.SBElement.ElementType.Sulfur` Signature: `Sulfur = ` ###### Attribute `samson.SBElement.ElementType.Ta` Signature: `Ta = ` ###### Attribute `samson.SBElement.ElementType.Tantalum` Signature: `Tantalum = ` ###### Attribute `samson.SBElement.ElementType.Tb` Signature: `Tb = ` ###### Attribute `samson.SBElement.ElementType.Tc` Signature: `Tc = ` ###### Attribute `samson.SBElement.ElementType.Te` Signature: `Te = ` ###### Attribute `samson.SBElement.ElementType.Technetium` Signature: `Technetium = ` ###### Attribute `samson.SBElement.ElementType.Tellurium` Signature: `Tellurium = ` ###### Attribute `samson.SBElement.ElementType.Tennessine` Signature: `Tennessine = ` ###### Attribute `samson.SBElement.ElementType.Terbium` Signature: `Terbium = ` ###### Attribute `samson.SBElement.ElementType.Th` Signature: `Th = ` ###### Attribute `samson.SBElement.ElementType.Thallium` Signature: `Thallium = ` ###### Attribute `samson.SBElement.ElementType.Thorium` Signature: `Thorium = ` ###### Attribute `samson.SBElement.ElementType.Thulium` Signature: `Thulium = ` ###### Attribute `samson.SBElement.ElementType.Ti` Signature: `Ti = ` ###### Attribute `samson.SBElement.ElementType.Tin` Signature: `Tin = ` ###### Attribute `samson.SBElement.ElementType.Titanium` Signature: `Titanium = ` ###### Attribute `samson.SBElement.ElementType.Tl` Signature: `Tl = ` ###### Attribute `samson.SBElement.ElementType.Tm` Signature: `Tm = ` ###### Attribute `samson.SBElement.ElementType.Ts` Signature: `Ts = ` ###### Attribute `samson.SBElement.ElementType.Tungsten` Signature: `Tungsten = ` ###### Attribute `samson.SBElement.ElementType.U` Signature: `U = ` ###### Attribute `samson.SBElement.ElementType.Un` Signature: `Un = ` ###### Attribute `samson.SBElement.ElementType.Unknown` Signature: `Unknown = ` ###### Attribute `samson.SBElement.ElementType.Ununhexium` Signature: `Ununhexium = ` ###### Attribute `samson.SBElement.ElementType.Ununoctium` Signature: `Ununoctium = ` ###### Attribute `samson.SBElement.ElementType.Ununpentium` Signature: `Ununpentium = ` ###### Attribute `samson.SBElement.ElementType.Ununquadium` Signature: `Ununquadium = ` ###### Attribute `samson.SBElement.ElementType.Ununseptium` Signature: `Ununseptium = ` ###### Attribute `samson.SBElement.ElementType.Ununtrium` Signature: `Ununtrium = ` ###### Attribute `samson.SBElement.ElementType.Uranium` Signature: `Uranium = ` ###### Attribute `samson.SBElement.ElementType.Uuh` Signature: `Uuh = ` ###### Attribute `samson.SBElement.ElementType.Uuo` Signature: `Uuo = ` ###### Attribute `samson.SBElement.ElementType.Uup` Signature: `Uup = ` ###### Attribute `samson.SBElement.ElementType.Uuq` Signature: `Uuq = ` ###### Attribute `samson.SBElement.ElementType.Uus` Signature: `Uus = ` ###### Attribute `samson.SBElement.ElementType.Uut` Signature: `Uut = ` ###### Attribute `samson.SBElement.ElementType.V` Signature: `V = ` ###### Attribute `samson.SBElement.ElementType.Vanadium` Signature: `Vanadium = ` ###### Attribute `samson.SBElement.ElementType.W` Signature: `W = ` ###### Attribute `samson.SBElement.ElementType.Xe` Signature: `Xe = ` ###### Attribute `samson.SBElement.ElementType.Xenon` Signature: `Xenon = ` ###### Attribute `samson.SBElement.ElementType.Y` Signature: `Y = ` ###### Attribute `samson.SBElement.ElementType.Yb` Signature: `Yb = ` ###### Attribute `samson.SBElement.ElementType.Ytterbium` Signature: `Ytterbium = ` ###### Attribute `samson.SBElement.ElementType.Yttrium` Signature: `Yttrium = ` ###### Attribute `samson.SBElement.ElementType.Zinc` Signature: `Zinc = ` ###### Attribute `samson.SBElement.ElementType.Zirconium` Signature: `Zirconium = ` ###### Attribute `samson.SBElement.ElementType.Zn` Signature: `Zn = ` ###### Attribute `samson.SBElement.ElementType.Zr` Signature: `Zr = ` ###### Property `samson.SBElement.ElementType.name` Signature: `property name` ###### Property `samson.SBElement.ElementType.value` Signature: `property value` ##### Class `samson.SBElement.MetalSubcategory` Signature: `class MetalSubcategory(self: samson.SBElement.MetalSubcategory, value: int)` Bases: `pybind11_object` **Members** - `Unknown`: Unknown metal subcategory - `AlkaliMetal`: Alkali metal category - `AlkalineEarthMetal`: Alkaline earth metal category - `Lanthanide`: Lanthanide metal category - `Actinide`: Actinide metal category - `TransitionMetal`: Transition metal category - `PostTransitionMetal`: Post-transition metal category - `Metalloid`: Metalloid metal category - `ReactiveNonmetal`: Reactive nonmetal category - `NobleGas`: Noble gases ##### Method `samson.SBElement.getColorCPK` Signature: `static getColorCPK(elementType: samson.SBElement.ElementType) -> samson.SBColor` Returns the CPK color of the element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A periodic element type **Return type** - [samson.SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) ###### Examples Get a color corresponding to the Carbon element type in the CPK color scheme: ```pycon >>> SBElement.getColorCPK(SBElement.Carbon) SBColor(0.350000, 0.350000, 0.350000, 1.000000) ``` ##### Method `samson.SBElement.getCovalentRadius` Signature: `getCovalentRadius(self: samson.SBElement, bondType: int) -> samson.SBQuantity.unitsSI` Returns the covalent radius of the element for bond type bondType (1 for single bond, 2 for double bond, 3 for triple bond, for other values it returns getCovalentRadius()). **Parameters** - **bondType** (*{1**,**2**,**3}*) – A bond type: 1 - single, 2 - double, 3 - triple. **Return type** - samson.SBQuantity ##### Method `samson.SBElement.hasOxidationState` Signature: `hasOxidationState(self: samson.SBElement, value: int) -> bool` Returns *True* if the element has known oxidation state with the given integer value. **Parameters** - **value** (*int*) – An oxidation state value **Return type** - bool ##### Method `samson.SBElement.print` Signature: `print(self: samson.SBElement, offset: int = 0) -> None` Prints the element ##### Attribute `samson.SBElement.Ac` Signature: `Ac = ` ##### Attribute `samson.SBElement.Actinide` Signature: `Actinide = ` ##### Attribute `samson.SBElement.Actinium` Signature: `Actinium = ` ##### Attribute `samson.SBElement.Ag` Signature: `Ag = ` ##### Attribute `samson.SBElement.Al` Signature: `Al = ` ##### Attribute `samson.SBElement.AlkaliMetal` Signature: `AlkaliMetal = ` ##### Attribute `samson.SBElement.AlkalineEarthMetal` Signature: `AlkalineEarthMetal = ` ##### Attribute `samson.SBElement.Aluminium` Signature: `Aluminium = ` ##### Attribute `samson.SBElement.Am` Signature: `Am = ` ##### Attribute `samson.SBElement.Americium` Signature: `Americium = ` ##### Attribute `samson.SBElement.Antimony` Signature: `Antimony = ` ##### Attribute `samson.SBElement.Ar` Signature: `Ar = ` ##### Attribute `samson.SBElement.Argon` Signature: `Argon = ` ##### Attribute `samson.SBElement.Arsenic` Signature: `Arsenic = ` ##### Attribute `samson.SBElement.As` Signature: `As = ` ##### Attribute `samson.SBElement.Astatine` Signature: `Astatine = ` ##### Attribute `samson.SBElement.At` Signature: `At = ` ##### Attribute `samson.SBElement.Au` Signature: `Au = ` ##### Attribute `samson.SBElement.B` Signature: `B = ` ##### Attribute `samson.SBElement.Ba` Signature: `Ba = ` ##### Attribute `samson.SBElement.Barium` Signature: `Barium = ` ##### Attribute `samson.SBElement.Be` Signature: `Be = ` ##### Attribute `samson.SBElement.Berkelium` Signature: `Berkelium = ` ##### Attribute `samson.SBElement.Beryllium` Signature: `Beryllium = ` ##### Attribute `samson.SBElement.Bh` Signature: `Bh = ` ##### Attribute `samson.SBElement.Bi` Signature: `Bi = ` ##### Attribute `samson.SBElement.Bismuth` Signature: `Bismuth = ` ##### Attribute `samson.SBElement.Bk` Signature: `Bk = ` ##### Attribute `samson.SBElement.Bohrium` Signature: `Bohrium = ` ##### Attribute `samson.SBElement.Boron` Signature: `Boron = ` ##### Attribute `samson.SBElement.Br` Signature: `Br = ` ##### Attribute `samson.SBElement.Bromine` Signature: `Bromine = ` ##### Attribute `samson.SBElement.C` Signature: `C = ` ##### Attribute `samson.SBElement.CG` Signature: `CG = ` ##### Attribute `samson.SBElement.Ca` Signature: `Ca = ` ##### Attribute `samson.SBElement.Cadmium` Signature: `Cadmium = ` ##### Attribute `samson.SBElement.Caesium` Signature: `Caesium = ` ##### Attribute `samson.SBElement.Calcium` Signature: `Calcium = ` ##### Attribute `samson.SBElement.Californium` Signature: `Californium = ` ##### Attribute `samson.SBElement.Carbon` Signature: `Carbon = ` ##### Attribute `samson.SBElement.Cd` Signature: `Cd = ` ##### Attribute `samson.SBElement.Ce` Signature: `Ce = ` ##### Attribute `samson.SBElement.Cerium` Signature: `Cerium = ` ##### Attribute `samson.SBElement.Cf` Signature: `Cf = ` ##### Attribute `samson.SBElement.Chlorine` Signature: `Chlorine = ` ##### Attribute `samson.SBElement.Chromium` Signature: `Chromium = ` ##### Attribute `samson.SBElement.Cl` Signature: `Cl = ` ##### Attribute `samson.SBElement.Cm` Signature: `Cm = ` ##### Attribute `samson.SBElement.Cn` Signature: `Cn = ` ##### Attribute `samson.SBElement.Co` Signature: `Co = ` ##### Attribute `samson.SBElement.CoarseGrained` Signature: `CoarseGrained = ` ##### Attribute `samson.SBElement.Cobalt` Signature: `Cobalt = ` ##### Attribute `samson.SBElement.Copernicium` Signature: `Copernicium = ` ##### Attribute `samson.SBElement.Copper` Signature: `Copper = ` ##### Attribute `samson.SBElement.Cr` Signature: `Cr = ` ##### Attribute `samson.SBElement.Cs` Signature: `Cs = ` ##### Attribute `samson.SBElement.Cu` Signature: `Cu = ` ##### Attribute `samson.SBElement.Curium` Signature: `Curium = ` ##### Attribute `samson.SBElement.Darmstadtium` Signature: `Darmstadtium = ` ##### Attribute `samson.SBElement.Db` Signature: `Db = ` ##### Attribute `samson.SBElement.Ds` Signature: `Ds = ` ##### Attribute `samson.SBElement.Dubnium` Signature: `Dubnium = ` ##### Attribute `samson.SBElement.Dy` Signature: `Dy = ` ##### Attribute `samson.SBElement.Dysprosium` Signature: `Dysprosium = ` ##### Attribute `samson.SBElement.Einsteinium` Signature: `Einsteinium = ` ##### Attribute `samson.SBElement.Er` Signature: `Er = ` ##### Attribute `samson.SBElement.Erbium` Signature: `Erbium = ` ##### Attribute `samson.SBElement.Es` Signature: `Es = ` ##### Attribute `samson.SBElement.Eu` Signature: `Eu = ` ##### Attribute `samson.SBElement.Europium` Signature: `Europium = ` ##### Attribute `samson.SBElement.F` Signature: `F = ` ##### Attribute `samson.SBElement.Fe` Signature: `Fe = ` ##### Attribute `samson.SBElement.Fermium` Signature: `Fermium = ` ##### Attribute `samson.SBElement.Fl` Signature: `Fl = ` ##### Attribute `samson.SBElement.Flerovium` Signature: `Flerovium = ` ##### Attribute `samson.SBElement.Fluorine` Signature: `Fluorine = ` ##### Attribute `samson.SBElement.Fm` Signature: `Fm = ` ##### Attribute `samson.SBElement.Fr` Signature: `Fr = ` ##### Attribute `samson.SBElement.Francium` Signature: `Francium = ` ##### Attribute `samson.SBElement.Ga` Signature: `Ga = ` ##### Attribute `samson.SBElement.Gadolinium` Signature: `Gadolinium = ` ##### Attribute `samson.SBElement.Gallium` Signature: `Gallium = ` ##### Attribute `samson.SBElement.Gd` Signature: `Gd = ` ##### Attribute `samson.SBElement.Ge` Signature: `Ge = ` ##### Attribute `samson.SBElement.Germanium` Signature: `Germanium = ` ##### Attribute `samson.SBElement.Gold` Signature: `Gold = ` ##### Attribute `samson.SBElement.H` Signature: `H = ` ##### Attribute `samson.SBElement.Hafnium` Signature: `Hafnium = ` ##### Attribute `samson.SBElement.Hassium` Signature: `Hassium = ` ##### Attribute `samson.SBElement.He` Signature: `He = ` ##### Attribute `samson.SBElement.Helium` Signature: `Helium = ` ##### Attribute `samson.SBElement.Hf` Signature: `Hf = ` ##### Attribute `samson.SBElement.Hg` Signature: `Hg = ` ##### Attribute `samson.SBElement.Ho` Signature: `Ho = ` ##### Attribute `samson.SBElement.Holmium` Signature: `Holmium = ` ##### Attribute `samson.SBElement.Hs` Signature: `Hs = ` ##### Attribute `samson.SBElement.Hydrogen` Signature: `Hydrogen = ` ##### Attribute `samson.SBElement.I` Signature: `I = ` ##### Attribute `samson.SBElement.In` Signature: `In = ` ##### Attribute `samson.SBElement.Indium` Signature: `Indium = ` ##### Attribute `samson.SBElement.Iodine` Signature: `Iodine = ` ##### Attribute `samson.SBElement.Ir` Signature: `Ir = ` ##### Attribute `samson.SBElement.Iridium` Signature: `Iridium = ` ##### Attribute `samson.SBElement.Iron` Signature: `Iron = ` ##### Attribute `samson.SBElement.K` Signature: `K = ` ##### Attribute `samson.SBElement.Kr` Signature: `Kr = ` ##### Attribute `samson.SBElement.Krypton` Signature: `Krypton = ` ##### Attribute `samson.SBElement.La` Signature: `La = ` ##### Attribute `samson.SBElement.Lanthanide` Signature: `Lanthanide = ` ##### Attribute `samson.SBElement.Lanthanum` Signature: `Lanthanum = ` ##### Attribute `samson.SBElement.Lawrencium` Signature: `Lawrencium = ` ##### Attribute `samson.SBElement.Lead` Signature: `Lead = ` ##### Attribute `samson.SBElement.Li` Signature: `Li = ` ##### Attribute `samson.SBElement.Lithium` Signature: `Lithium = ` ##### Attribute `samson.SBElement.Livermorium` Signature: `Livermorium = ` ##### Attribute `samson.SBElement.Lr` Signature: `Lr = ` ##### Attribute `samson.SBElement.Lu` Signature: `Lu = ` ##### Attribute `samson.SBElement.Lutetium` Signature: `Lutetium = ` ##### Attribute `samson.SBElement.Lv` Signature: `Lv = ` ##### Attribute `samson.SBElement.Magnesium` Signature: `Magnesium = ` ##### Attribute `samson.SBElement.Manganese` Signature: `Manganese = ` ##### Attribute `samson.SBElement.Mc` Signature: `Mc = ` ##### Attribute `samson.SBElement.Md` Signature: `Md = ` ##### Attribute `samson.SBElement.Meitnerium` Signature: `Meitnerium = ` ##### Attribute `samson.SBElement.Mendelevium` Signature: `Mendelevium = ` ##### Attribute `samson.SBElement.Mercury` Signature: `Mercury = ` ##### Attribute `samson.SBElement.Metalloid` Signature: `Metalloid = ` ##### Attribute `samson.SBElement.Mg` Signature: `Mg = ` ##### Attribute `samson.SBElement.Mn` Signature: `Mn = ` ##### Attribute `samson.SBElement.Mo` Signature: `Mo = ` ##### Attribute `samson.SBElement.Molybdenum` Signature: `Molybdenum = ` ##### Attribute `samson.SBElement.Moscovium` Signature: `Moscovium = ` ##### Attribute `samson.SBElement.Mt` Signature: `Mt = ` ##### Attribute `samson.SBElement.N` Signature: `N = ` ##### Attribute `samson.SBElement.Na` Signature: `Na = ` ##### Attribute `samson.SBElement.Nb` Signature: `Nb = ` ##### Attribute `samson.SBElement.Nd` Signature: `Nd = ` ##### Attribute `samson.SBElement.Ne` Signature: `Ne = ` ##### Attribute `samson.SBElement.Neodymium` Signature: `Neodymium = ` ##### Attribute `samson.SBElement.Neon` Signature: `Neon = ` ##### Attribute `samson.SBElement.Neptunium` Signature: `Neptunium = ` ##### Attribute `samson.SBElement.Nh` Signature: `Nh = ` ##### Attribute `samson.SBElement.Ni` Signature: `Ni = ` ##### Attribute `samson.SBElement.Nickel` Signature: `Nickel = ` ##### Attribute `samson.SBElement.Nihonium` Signature: `Nihonium = ` ##### Attribute `samson.SBElement.Niobium` Signature: `Niobium = ` ##### Attribute `samson.SBElement.Nitrogen` Signature: `Nitrogen = ` ##### Attribute `samson.SBElement.No` Signature: `No = ` ##### Attribute `samson.SBElement.Nobelium` Signature: `Nobelium = ` ##### Attribute `samson.SBElement.NobleGas` Signature: `NobleGas = ` ##### Attribute `samson.SBElement.Np` Signature: `Np = ` ##### Attribute `samson.SBElement.O` Signature: `O = ` ##### Attribute `samson.SBElement.Og` Signature: `Og = ` ##### Attribute `samson.SBElement.Oganesson` Signature: `Oganesson = ` ##### Attribute `samson.SBElement.Os` Signature: `Os = ` ##### Attribute `samson.SBElement.Osmium` Signature: `Osmium = ` ##### Attribute `samson.SBElement.Oxygen` Signature: `Oxygen = ` ##### Attribute `samson.SBElement.P` Signature: `P = ` ##### Attribute `samson.SBElement.Pa` Signature: `Pa = ` ##### Attribute `samson.SBElement.Palladium` Signature: `Palladium = ` ##### Attribute `samson.SBElement.Pb` Signature: `Pb = ` ##### Attribute `samson.SBElement.Pd` Signature: `Pd = ` ##### Attribute `samson.SBElement.Phosphorus` Signature: `Phosphorus = ` ##### Attribute `samson.SBElement.Platinum` Signature: `Platinum = ` ##### Attribute `samson.SBElement.Plutonium` Signature: `Plutonium = ` ##### Attribute `samson.SBElement.Pm` Signature: `Pm = ` ##### Attribute `samson.SBElement.Po` Signature: `Po = ` ##### Attribute `samson.SBElement.Polonium` Signature: `Polonium = ` ##### Attribute `samson.SBElement.PostTransitionMetal` Signature: `PostTransitionMetal = ` ##### Attribute `samson.SBElement.Potassium` Signature: `Potassium = ` ##### Attribute `samson.SBElement.Pr` Signature: `Pr = ` ##### Attribute `samson.SBElement.Praseodymium` Signature: `Praseodymium = ` ##### Attribute `samson.SBElement.Promethium` Signature: `Promethium = ` ##### Attribute `samson.SBElement.Protactinium` Signature: `Protactinium = ` ##### Attribute `samson.SBElement.Pt` Signature: `Pt = ` ##### Attribute `samson.SBElement.Pu` Signature: `Pu = ` ##### Attribute `samson.SBElement.Ra` Signature: `Ra = ` ##### Attribute `samson.SBElement.Radium` Signature: `Radium = ` ##### Attribute `samson.SBElement.Radon` Signature: `Radon = ` ##### Attribute `samson.SBElement.Rb` Signature: `Rb = ` ##### Attribute `samson.SBElement.Re` Signature: `Re = ` ##### Attribute `samson.SBElement.ReactiveNonmetal` Signature: `ReactiveNonmetal = ` ##### Attribute `samson.SBElement.Rf` Signature: `Rf = ` ##### Attribute `samson.SBElement.Rg` Signature: `Rg = ` ##### Attribute `samson.SBElement.Rh` Signature: `Rh = ` ##### Attribute `samson.SBElement.Rhenium` Signature: `Rhenium = ` ##### Attribute `samson.SBElement.Rhodium` Signature: `Rhodium = ` ##### Attribute `samson.SBElement.Rn` Signature: `Rn = ` ##### Attribute `samson.SBElement.Roentgenium` Signature: `Roentgenium = ` ##### Attribute `samson.SBElement.Ru` Signature: `Ru = ` ##### Attribute `samson.SBElement.Rubidium` Signature: `Rubidium = ` ##### Attribute `samson.SBElement.Ruthenium` Signature: `Ruthenium = ` ##### Attribute `samson.SBElement.Rutherfordium` Signature: `Rutherfordium = ` ##### Attribute `samson.SBElement.S` Signature: `S = ` ##### Attribute `samson.SBElement.Samarium` Signature: `Samarium = ` ##### Attribute `samson.SBElement.Sb` Signature: `Sb = ` ##### Attribute `samson.SBElement.Sc` Signature: `Sc = ` ##### Attribute `samson.SBElement.Scandium` Signature: `Scandium = ` ##### Attribute `samson.SBElement.Se` Signature: `Se = ` ##### Attribute `samson.SBElement.Seaborgium` Signature: `Seaborgium = ` ##### Attribute `samson.SBElement.Selenium` Signature: `Selenium = ` ##### Attribute `samson.SBElement.Sg` Signature: `Sg = ` ##### Attribute `samson.SBElement.Si` Signature: `Si = ` ##### Attribute `samson.SBElement.Silicon` Signature: `Silicon = ` ##### Attribute `samson.SBElement.Silver` Signature: `Silver = ` ##### Attribute `samson.SBElement.Sm` Signature: `Sm = ` ##### Attribute `samson.SBElement.Sn` Signature: `Sn = ` ##### Attribute `samson.SBElement.Sodium` Signature: `Sodium = ` ##### Attribute `samson.SBElement.Sr` Signature: `Sr = ` ##### Attribute `samson.SBElement.Strontium` Signature: `Strontium = ` ##### Attribute `samson.SBElement.Sulfur` Signature: `Sulfur = ` ##### Attribute `samson.SBElement.Ta` Signature: `Ta = ` ##### Attribute `samson.SBElement.Tantalum` Signature: `Tantalum = ` ##### Attribute `samson.SBElement.Tb` Signature: `Tb = ` ##### Attribute `samson.SBElement.Tc` Signature: `Tc = ` ##### Attribute `samson.SBElement.Te` Signature: `Te = ` ##### Attribute `samson.SBElement.Technetium` Signature: `Technetium = ` ##### Attribute `samson.SBElement.Tellurium` Signature: `Tellurium = ` ##### Attribute `samson.SBElement.Tennessine` Signature: `Tennessine = ` ##### Attribute `samson.SBElement.Terbium` Signature: `Terbium = ` ##### Attribute `samson.SBElement.Th` Signature: `Th = ` ##### Attribute `samson.SBElement.Thallium` Signature: `Thallium = ` ##### Attribute `samson.SBElement.Thorium` Signature: `Thorium = ` ##### Attribute `samson.SBElement.Thulium` Signature: `Thulium = ` ##### Attribute `samson.SBElement.Ti` Signature: `Ti = ` ##### Attribute `samson.SBElement.Tin` Signature: `Tin = ` ##### Attribute `samson.SBElement.Titanium` Signature: `Titanium = ` ##### Attribute `samson.SBElement.Tl` Signature: `Tl = ` ##### Attribute `samson.SBElement.Tm` Signature: `Tm = ` ##### Attribute `samson.SBElement.TransitionMetal` Signature: `TransitionMetal = ` ##### Attribute `samson.SBElement.Ts` Signature: `Ts = ` ##### Attribute `samson.SBElement.Tungsten` Signature: `Tungsten = ` ##### Attribute `samson.SBElement.U` Signature: `U = ` ##### Attribute `samson.SBElement.Un` Signature: `Un = ` ##### Attribute `samson.SBElement.Unknown` Signature: `Unknown = ` ##### Attribute `samson.SBElement.Ununhexium` Signature: `Ununhexium = ` ##### Attribute `samson.SBElement.Ununoctium` Signature: `Ununoctium = ` ##### Attribute `samson.SBElement.Ununpentium` Signature: `Ununpentium = ` ##### Attribute `samson.SBElement.Ununquadium` Signature: `Ununquadium = ` ##### Attribute `samson.SBElement.Ununseptium` Signature: `Ununseptium = ` ##### Attribute `samson.SBElement.Ununtrium` Signature: `Ununtrium = ` ##### Attribute `samson.SBElement.Uranium` Signature: `Uranium = ` ##### Attribute `samson.SBElement.Uuh` Signature: `Uuh = ` ##### Attribute `samson.SBElement.Uuo` Signature: `Uuo = ` ##### Attribute `samson.SBElement.Uup` Signature: `Uup = ` ##### Attribute `samson.SBElement.Uuq` Signature: `Uuq = ` ##### Attribute `samson.SBElement.Uus` Signature: `Uus = ` ##### Attribute `samson.SBElement.Uut` Signature: `Uut = ` ##### Attribute `samson.SBElement.V` Signature: `V = ` ##### Attribute `samson.SBElement.Vanadium` Signature: `Vanadium = ` ##### Attribute `samson.SBElement.W` Signature: `W = ` ##### Attribute `samson.SBElement.Xe` Signature: `Xe = ` ##### Attribute `samson.SBElement.Xenon` Signature: `Xenon = ` ##### Attribute `samson.SBElement.Y` Signature: `Y = ` ##### Attribute `samson.SBElement.Yb` Signature: `Yb = ` ##### Attribute `samson.SBElement.Ytterbium` Signature: `Ytterbium = ` ##### Attribute `samson.SBElement.Yttrium` Signature: `Yttrium = ` ##### Attribute `samson.SBElement.Zinc` Signature: `Zinc = ` ##### Attribute `samson.SBElement.Zirconium` Signature: `Zirconium = ` ##### Attribute `samson.SBElement.Zn` Signature: `Zn = ` ##### Attribute `samson.SBElement.Zr` Signature: `Zr = ` ##### Property `samson.SBElement.atomicNumber` Signature: `property atomicNumber` Returns the atomic number of the element ##### Property `samson.SBElement.atomicWeight` Signature: `property atomicWeight` Returns the atomic weight of the element ##### Property `samson.SBElement.block` Signature: `property block` Returns the block of the element ##### Property `samson.SBElement.colorCPK` Signature: `property colorCPK` Returns the CPK color of the element. **Return type** - [samson.SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) ###### Examples Get a color corresponding to the Nitrogen element type in the CPK color scheme: ```pycon >>> SBElementTable.getElement(SBElement.N).colorCPK SBColor(0.188235, 0.313726, 0.972549, 1.000000) ``` ##### Property `samson.SBElement.covalentRadius` Signature: `property covalentRadius` Returns the covalent radius of the element ##### Property `samson.SBElement.electronegativity` Signature: `property electronegativity` Returns the electronegativity of the element ##### Property `samson.SBElement.group` Signature: `property group` Returns the group of the element ##### Property `samson.SBElement.isActinide` Signature: `property isActinide` Returns *True* if the element is actinide metal ##### Property `samson.SBElement.isAlkaliMetal` Signature: `property isAlkaliMetal` Returns *True* if the element is alkali metal ##### Property `samson.SBElement.isAlkalineEarthMetal` Signature: `property isAlkalineEarthMetal` Returns *True* if the element is alkaline earth metal ##### Property `samson.SBElement.isCoarseGrained` Signature: `property isCoarseGrained` Returns *True* if the element is coarse-grained ##### Property `samson.SBElement.isDiatomicNonmetal` Signature: `property isDiatomicNonmetal` Returns *True* if the element is diatomic nonmetal ##### Property `samson.SBElement.isHalogen` Signature: `property isHalogen` Returns *True* if the element is halogen ##### Property `samson.SBElement.isLanthanide` Signature: `property isLanthanide` Returns *True* if the element is lanthanide metal ##### Property `samson.SBElement.isMetal` Signature: `property isMetal` Returns *True* if the element is metal ##### Property `samson.SBElement.isMetalloid` Signature: `property isMetalloid` Returns *True* if the element is metalloid ##### Property `samson.SBElement.isNobleGas` Signature: `property isNobleGas` Returns *True* if the element is noble gas ##### Property `samson.SBElement.isPolyatomicNonmetal` Signature: `property isPolyatomicNonmetal` Returns *True* if the element is polyatomic nonmetal ##### Property `samson.SBElement.isPostTransitionMetal` Signature: `property isPostTransitionMetal` Returns *True* if the element is post-transition metal ##### Property `samson.SBElement.isReactiveNonmetal` Signature: `property isReactiveNonmetal` Returns *True* if the element is reactive nonmetal ##### Property `samson.SBElement.isTransitionMetal` Signature: `property isTransitionMetal` Returns *True* if the element is transition metal ##### Property `samson.SBElement.metalSubcategory` Signature: `property metalSubcategory` Returns the element’s subcategory type in the metal–metalloid–nonmetal trend ##### Property `samson.SBElement.metalSubcategoryString` Signature: `property metalSubcategoryString` Returns the string representation of the element’s subcategory type in the metal–metalloid–nonmetal trend ##### Property `samson.SBElement.name` Signature: `property name` Returns the name of the element ##### Property `samson.SBElement.period` Signature: `property period` Returns the period of the element ##### Property `samson.SBElement.symbol` Signature: `property symbol` Returns the symbol of the element ##### Property `samson.SBElement.type` Signature: `property type` Returns the type of the element ##### Property `samson.SBElement.vanDerWaalsRadius` Signature: `property vanDerWaalsRadius` Returns the van der Waals radius of the element --- # SBElementTable Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElementTable.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElementTable.md This class is used to describe the periodic table in SAMSON. Typically, this class is used when accessing properties of periodic table elements: ```python # get the covalent radius of the provided element type print(SBElementTable.getCovalentRadius(SBElement.Carbon)) ``` Note that convenience attributes and functions exist in [`samson.SBAtom`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom) to access the properties of their element: ```python print(atom.covalentRadius) ``` !!! note "See also" SAMSON SDK: [SBMElementTable](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMElementTable/#) ## API Reference #### Class `samson.SBElementTable` Signature: `class samson.SBElementTable` Bases: `pybind11_object` This class is used to describe the periodic table. ##### Method `samson.SBElementTable.getAtomicWeight` Signature: `static getAtomicWeight(element: samson.SBElement.ElementType) -> samson.SBQuantity.unitsSI` Returns the atomic weight of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - An atomic weight of the given periodic table element. **Return type** - samson.SBQuantity ###### Examples Get an atomic weight of a periodic table element in Daltons. ```pycon >>> atomic_weight = SBElementTable.getAtomicWeight(SBElement.C) >>> print(atomic_weight.Da) 12.011 Da ``` ##### Method `samson.SBElementTable.getBlock` Signature: `static getBlock(element: samson.SBElement.ElementType) -> str` Returns the block of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A block of the given periodic table element. **Return type** - str ###### Examples Get a block of a periodic table element. ```pycon >>> SBElementTable.getBlock(SBElement.Fe) 'd' ``` ##### Method `samson.SBElementTable.getCovalentRadius` Signature: `static getCovalentRadius(*args, **kwargs)` Overloaded function. 1. getCovalentRadius(element: samson.SBElement.ElementType) -> samson.SBQuantity.unitsSI Returns the covalent radius of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A covalent radius of the given periodic table element. **Return type** - samson.SBQuantity ###### Examples Get a covalent radius of a periodic table element in angstroms. ```pycon >>> covalent_radius = SBElementTable.getCovalentRadius(SBElement.Ar) >>> print(covalent_radius.angstrom) 1.06 Å ``` 2. getCovalentRadius(element: samson.SBElement.ElementType, bondType: int) -> samson.SBQuantity.unitsSI Returns the covalent radius of a periodic table element for bond type bondType (1 for single bond, 2 for double bond, 3 for triple bond, for other values it returns getCovalentRadius()) **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element - **bondType** (*{1**,**2**,**3}*) – A bond type: 1 - single, 2 - double, 3 - triple. **Returns** - A covalent radius of the given periodic table element for the given bond type. **Return type** - samson.SBQuantity ###### Examples Get a covalent radius of a double bond to Carbon in angstroms. ```pycon >>> covalent_radius = SBElementTable.getCovalentRadius(SBElement.C, 2) >>> print(covalent_radius.angstrom) 0.67 Å ``` ##### Method `samson.SBElementTable.getElectronegativity` Signature: `static getElectronegativity(element: samson.SBElement.ElementType) -> samson.SBQuantity.unitsSI` Returns the electronegativity of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - An electronegativity of the given periodic table element (dimensionless). **Return type** - samson.SBQuantity ###### Examples Get an electronegativity of a periodic table element. ```pycon >>> electronegativity = SBElementTable.getElectronegativity(SBElement.O) >>> print(electronegativity) 3.44 (dimensionless) ``` ##### Method `samson.SBElementTable.getElement` Signature: `static getElement(element: samson.SBElement.ElementType) -> samson.SBElement` Returns a reference to periodic table element. Note: this function is supposed to be called only for periodic table elements; it will return Unknown if called for the coarse-grained element type. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element. **Returns** - A periodic table element. **Return type** - [samson.SBElement](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement) ##### Method `samson.SBElementTable.getElementName` Signature: `static getElementName(element: samson.SBElement.ElementType) -> str` Returns the name of the periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A name of the given periodic table element. **Return type** - str ###### Examples Get a name of a periodic table element. ```pycon >>> SBElementTable.getElementName(SBElement.N) 'Nitrogen' ``` ##### Method `samson.SBElementTable.getElementSymbol` Signature: `static getElementSymbol(element: samson.SBElement.ElementType) -> str` Returns the symbol of the periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A symbol of the given periodic table element. **Return type** - str ###### Examples Get a symbol of a periodic table element. ```pycon >>> SBElementTable.getElementSymbol(SBElement.O) 'O' ``` ##### Method `samson.SBElementTable.getElementTypeByName` Signature: `static getElementTypeByName(elementName: str) -> samson.SBElement.ElementType` Returns the periodic table element type corresponding to the given name. **Parameters** - **elementName** (*str*) – A name of a periodic table element. **Returns** - A type of the periodic table element. **Return type** - [samson.SBElement.ElementType](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType) ###### Examples Get a type of a periodic table element. ```pycon >>> SBElementTable.getElementTypeByName('Nitrogen') ``` ##### Method `samson.SBElementTable.getElementTypeBySymbol` Signature: `static getElementTypeBySymbol(elementSymbol: str) -> samson.SBElement.ElementType` Returns the periodic table element type corresponding to the given symbol. **Parameters** - **elementSymbol** (*str*) – A symbol of a periodic table element. **Returns** - A type of the periodic table element. **Return type** - [samson.SBElement.ElementType](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType) ###### Examples Get a type of a periodic table element. ```pycon >>> SBElementTable.getElementTypeBySymbol('Ca') ``` ##### Method `samson.SBElementTable.getElementVector` Signature: `static getElementVector() -> list` Returns all available periodic table elements as a Python list. Note: the returned list contains only periodic table elements and does not contain the coarse-grained element. **Returns** - A list with all elements currently defined in the periodic table. **Return type** - list[[samson.SBElement](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement)] ##### Method `samson.SBElementTable.getGroup` Signature: `static getGroup(element: samson.SBElement.ElementType) -> int` Returns the group of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A group of the given periodic table element. **Return type** - int ###### Examples Get a group of a periodic table element. ```pycon >>> SBElementTable.getGroup(SBElement.S) 16 ``` ##### Method `samson.SBElementTable.getNumberOfElements` Signature: `static getNumberOfElements() -> int` Returns the number of defined periodic table elements, including the Unknown element ##### Method `samson.SBElementTable.getPeriod` Signature: `static getPeriod(element: samson.SBElement.ElementType) -> str` Returns the period of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A period of the given periodic table element. **Return type** - str ###### Examples Get a period of a periodic table element. ```pycon >>> SBElementTable.getPeriod(SBElement.C) '2' ``` ##### Method `samson.SBElementTable.getVanDerWaalsRadius` Signature: `static getVanDerWaalsRadius(element: samson.SBElement.ElementType) -> samson.SBQuantity.unitsSI` Returns the van der Waals radius of a periodic table element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element **Returns** - A van der Waals radius of the given periodic table element. **Return type** - samson.SBQuantity ###### Examples Get a van der Waals radius of a periodic table element in nanometers. ```pycon >>> vdw_radius = SBElementTable.getVanDerWaalsRadius(SBElement.S) >>> print(vdw_radius.nm) 0.18 nm ``` ##### Method `samson.SBElementTable.hasOxidationState` Signature: `static hasOxidationState(element: samson.SBElement.ElementType, value: int) -> bool` Returns *True* if the element has known oxidation state with the given integer value. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – A type of the periodic table element - **value** (*int*) – An oxidation state value **Return type** - bool ##### Method `samson.SBElementTable.isActinide` Signature: `static isActinide(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is actinide metal ##### Method `samson.SBElementTable.isAlkaliMetal` Signature: `static isAlkaliMetal(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is alkali metal ##### Method `samson.SBElementTable.isAlkalineEarthMetal` Signature: `static isAlkalineEarthMetal(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is alkaline earth metal ##### Method `samson.SBElementTable.isDiatomicNonmetal` Signature: `static isDiatomicNonmetal(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is diatomic nonmetal ##### Method `samson.SBElementTable.isHalogen` Signature: `static isHalogen(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is halogen ##### Method `samson.SBElementTable.isLanthanide` Signature: `static isLanthanide(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is lanthanide metal ##### Method `samson.SBElementTable.isMetal` Signature: `static isMetal(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is metal ##### Method `samson.SBElementTable.isMetalloid` Signature: `static isMetalloid(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is metalloid ##### Method `samson.SBElementTable.isNobleGas` Signature: `static isNobleGas(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is noble gas ##### Method `samson.SBElementTable.isPolyatomicNonmetal` Signature: `static isPolyatomicNonmetal(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is polyatomic nonmetal ##### Method `samson.SBElementTable.isPostTransitionMetal` Signature: `static isPostTransitionMetal(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is post-transition metal ##### Method `samson.SBElementTable.isReactiveNonmetal` Signature: `static isReactiveNonmetal(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is reactive nonmetal ##### Method `samson.SBElementTable.isTransitionMetal` Signature: `static isTransitionMetal(element: samson.SBElement.ElementType) -> bool` Returns *True* if the element is transition metal ##### Method `samson.SBElementTable.metalSubcategory` Signature: `static metalSubcategory(element: samson.SBElement.ElementType) -> samson.SBElement.MetalSubcategory` Returns the element’s subcategory type in the metal–metalloid–nonmetal trend ##### Method `samson.SBElementTable.metalSubcategoryString` Signature: `static metalSubcategoryString(element: samson.SBElement.ElementType) -> str` Returns the string representation of the element’s subcategory type in the metal–metalloid–nonmetal trend ##### Method `samson.SBElementTable.print` Signature: `print(self: samson.SBElementTable) -> None` Prints the periodic table --- # Interaction Model Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel.md This group defines interaction models, which compute interactions such as forces for a dynamical model. The particle-system interaction model is the main specialization currently exposed in Python. !!! note "See also" SAMSON SDK: [The SBMInteractionModel Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Modeling/InteractionModel/#) - [SBInteractionModel](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModel.md) - [SBInteractionModelParticleSystem](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModelParticleSystem.md) --- # SBInteractionModel Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModel.md This class describes the base class for interaction models. Interaction models compute interactions for a dynamical model, for example forces that are then consumed by a simulator and its state updater. !!! note "See also" [`samson.SBDynamicalModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModel.md#samson.SBDynamicalModel) [`samson.SBSimulator`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulator.md#samson.SBSimulator) SAMSON SDK: [SBMInteractionModel](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMInteractionModel/#) ## API Reference #### Class `samson.SBInteractionModel` Signature: `class samson.SBInteractionModel(self: samson.SBInteractionModel)` Bases: [`SBModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModel.md#samson.SBModel) Base class for interaction models. Interaction models compute interactions, energies, and force updates that can be consumed by simulators and state updaters. Constructs an interaction model. ##### Method `samson.SBInteractionModel.flushForceBuffer` Signature: `flushForceBuffer(self: samson.SBInteractionModel) -> None` Flushes the force buffer. ##### Method `samson.SBInteractionModel.getChangedForceIndex` Signature: `getChangedForceIndex(self: samson.SBInteractionModel, i: int) -> int` Returns the index of the *i*-th changed force. ##### Method `samson.SBInteractionModel.getForceChanged` Signature: `getForceChanged(self: samson.SBInteractionModel, i: int) -> bool` Returns *True* if force *i* changed since last flush. ##### Method `samson.SBInteractionModel.getSimulatorList` Signature: `getSimulatorList(self: samson.SBInteractionModel) -> samson.SBNodeIndexer` Returns simulators associated with this interaction model. ##### Method `samson.SBInteractionModel.initializeInteractions` Signature: `initializeInteractions(self: samson.SBInteractionModel) -> None` Initializes interactions. ##### Method `samson.SBInteractionModel.updateInteractions` Signature: `updateInteractions(self: samson.SBInteractionModel) -> None` Updates interactions. ##### Property `samson.SBInteractionModel.energy` Signature: `property energy` Current interaction energy. ##### Property `samson.SBInteractionModel.interactionModelType` Signature: `property interactionModelType` Interaction-model type. ##### Property `samson.SBInteractionModel.numberOfChangedForces` Signature: `property numberOfChangedForces` Number of changed forces since last flush. --- # SBInteractionModelParticleSystem Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModelParticleSystem.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModelParticleSystem.md This class describes a particle system interaction model in SAMSON. A particle system interaction model has one buffer - a force buffer which may be used to write adaptive simulation algorithms. You can get a number of changed forces and a force of a particle in the particle system interaction model: ```python print(particleSystemInteractionModel.numberOfChangedForces) print(particleSystemInteractionModel.getForce(i)) ``` You can get the index of i-th changed force. Assume for example that particle 17, 32, and 529 have had their forces changed since the last flush of the force buffer. Then the following code: ```python for i in range(particleSystemInteractionModel.numberOfChangedForces): # changedForceIndex is the index of the i-th changed force changedForceIndex = particleSystemInteractionModel.getChangedForceIndex(i) print(changedForceIndex) ``` This will result in the following output: ```python 17 32 529 ``` You can use these indices in adaptive simulation algorithms for example together with `samson.SBInteractionModelParticleSystem`. !!! note "See also" SAMSON SDK: [SBMInteractionModelParticleSystem](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMInteractionModelParticleSystem/#) ## API Reference #### Class `samson.SBInteractionModelParticleSystem` Signature: `class samson.SBInteractionModelParticleSystem` Bases: [`SBInteractionModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModel.md#samson.SBInteractionModel) Base class for particle-system interaction models. This specialization exposes particle-system specific accessors such as per-particle forces and the attached *SBParticleSystem*. ##### Method `samson.SBInteractionModelParticleSystem.getForce` Signature: `getForce(self: samson.SBInteractionModelParticleSystem, i: int) -> samson.SBPhysicalVector3` Returns force applied to particle *i*. ##### Method `samson.SBInteractionModelParticleSystem.getParticleSystem` Signature: `getParticleSystem(self: samson.SBInteractionModelParticleSystem) -> samson.SBParticleSystem` Returns the attached particle system. --- # Model Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model.md This group defines the common base classes for models in SAMSON. Structural, visual, dynamical, interaction, and property models all build on these abstractions. !!! note "See also" SAMSON SDK: [The SBMModel Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Modeling/Model/#) - [SBModel](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModel.md) - [SBModelNode](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModelNode.md) --- # SBModel Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModel.md This class describes the common base class for models in SAMSON. Structural, visual, dynamical, interaction, and property models all derive from this class. !!! note "See also" [`samson.SBModelNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModelNode.md#samson.SBModelNode) SAMSON SDK: [SBMModel](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMModel/#) ## API Reference #### Class `samson.SBModel` Signature: `class samson.SBModel` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) Base class for model nodes. *SBModel* adds model-specific metadata on top of *SBNode*, notably source-file tracking and model rendering shadowing behavior. ##### Method `samson.SBModel.clearSourceFileName` Signature: `clearSourceFileName(self: samson.SBModel) -> None` Clears the source file name. ##### Method `samson.SBModel.getNextModel` Signature: `getNextModel(self: samson.SBModel) -> samson.SBModel` Returns the next model in the same parent branch. ##### Method `samson.SBModel.getPreviousModel` Signature: `getPreviousModel(self: samson.SBModel) -> samson.SBModel` Returns the previous model in the same parent branch. ##### Property `samson.SBModel.hasSourceFileName` Signature: `property hasSourceFileName` Returns *True* if a source file name is set. ##### Property `samson.SBModel.modelType` Signature: `property modelType` Model type (read-only). ##### Property `samson.SBModel.shadowingFlag` Signature: `property shadowingFlag` Controls whether the model casts shadows. ##### Property `samson.SBModel.sourceFileName` Signature: `property sourceFileName` Source file name associated with the model. --- # SBModelNode Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModelNode.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModelNode.md !!! note "See also" SAMSON SDK: [SBMModelNode](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMModelNode/#) ## API Reference #### Class `samson.SBModelNode` Signature: `class samson.SBModelNode` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) Base class describing a model node. This is a generic model-node abstraction; most functional APIs are inherited from *SBNode* / *SBDDataGraphNode* and specialized in derived modeling classes. --- # Property Model Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/PropertyModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/PropertyModel.md This group defines property models, which are used to represent computed or derived properties associated with a system. !!! note "See also" SAMSON SDK: [The SBMPropertyModel Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Modeling/PropertyModel/#) - [SBPropertyModel](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/PropertyModel/SBMPropertyModel.md) --- # SBPropertyModel Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/PropertyModel/SBMPropertyModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/PropertyModel/SBMPropertyModel.md This class describes the base class for property models. Property models are used to represent derived or computed properties associated with a system. !!! note "See also" SAMSON SDK: [SBMPropertyModel](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMPropertyModel/#) ## API Reference #### Class `samson.SBPropertyModel` Signature: `class samson.SBPropertyModel` Bases: [`SBModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModel.md#samson.SBModel) Base class for property models. --- # Structural Model Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel.md This group defines structural model nodes such as structural models, conformations, molecules, residues, atoms, bonds, and other nodes that describe molecular structure and hierarchy. !!! note "See also" SAMSON SDK: [The SBMStructuralModel Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Modeling/StructuralModel/#) - [SBStructuralModel](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md) - [SBConformation](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelConformation.md) - [SBStructuralModelGrid](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelGrid.md) - [SBStructuralNode](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNode.md) - [SBAtom](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md) - [SBBackbone](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeBackbone.md) - [SBBond](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeBond.md) - [SBChain](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeChain.md) - [SBStructuralGroup](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeGroup.md) - [SBHydrogenBond](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeHydrogenBond.md) - [SBHydrogenBondGroup](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeHydrogenBondGroup.md) - [SBMolecule](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeMolecule.md) - [SBResidue](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeResidue.md) - [SBStructuralRoot](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeRoot.md) - [SBSegment](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeSegment.md) - [SBSideChain](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeSideChain.md) - [SBPath](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelPath.md) --- # SBStructuralModel Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md !!! note "See also" SAMSON SDK: [SBMStructuralModel](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModel/#) ## API Reference #### Class `samson.SBStructuralModel` Signature: `class samson.SBStructuralModel(self: samson.SBStructuralModel)` Bases: [`SBModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModel.md#samson.SBModel) This class describes a structural model. Constructs a structural model. ##### Examples Add a structural model to the active document and make this operation undoable. ```pycon >>> structural_model = SBStructuralModel() >>> structural_model.name = 'Structural model' >>> with SAMSON.holding('Add structural model'): ... SAMSON.hold(structural_model) ... structural_model.create() ... SAMSON.getActiveDocument().addChild(structural_model) True ``` ##### Method `samson.SBStructuralModel.bondExists` Signature: `static bondExists(atom1: SBMStructuralModelNodeAtom, atom2: SBMStructuralModelNodeAtom) -> bool` Checks whether the bond between atoms atom1 and atom2 exists. **Parameters** - **atom1** ([*samson.SBAtom*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)) – A first atom. - **atom2** ([*samson.SBAtom*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)) – A second atom. **Returns** - *True* if the bond exists, else *False*. **Return type** - bool ##### Method `samson.SBStructuralModel.centerAtomsInCommonUnitCell` Signature: `static centerAtomsInCommonUnitCell(nodeIndexer: samson.SBNodeIndexer) -> bool` Centers atoms from *nodeIndexer* using their common unit cell. ##### Method `samson.SBStructuralModel.centerAtomsInUnitCell` Signature: `static centerAtomsInUnitCell(nodeIndexer: samson.SBNodeIndexer, unitCell: samson.SBUnitCell) -> bool` Centers atoms from *nodeIndexer* using *unitCell*. ##### Method `samson.SBStructuralModel.centerInUnitCell` Signature: `centerInUnitCell(self: samson.SBStructuralModel) -> bool` Centers the structural model inside its unit cell. ##### Method `samson.SBStructuralModel.centerTransform` Signature: `centerTransform(self: samson.SBStructuralModel) -> None` Centers the pivot of the transform on the center of mass of the particles contained in the structural model ##### Method `samson.SBStructuralModel.clearConnectivityAnnotationInformation` Signature: `clearConnectivityAnnotationInformation(self: samson.SBStructuralModel) -> None` Clears the model’s connectivity annotation information ##### Method `samson.SBStructuralModel.clearCrystallographicAndTransformationInformation` Signature: `clearCrystallographicAndTransformationInformation(self: samson.SBStructuralModel) -> None` Clears the model’s transformation information ##### Method `samson.SBStructuralModel.clearHeterogenInformation` Signature: `clearHeterogenInformation(self: samson.SBStructuralModel) -> None` Clears the model’s heterogen information ##### Method `samson.SBStructuralModel.clearMiscellaneousInformation` Signature: `clearMiscellaneousInformation(self: samson.SBStructuralModel) -> None` Clears the model’s miscellaneous information ##### Method `samson.SBStructuralModel.clearPrimaryStructureInformation` Signature: `clearPrimaryStructureInformation(self: samson.SBStructuralModel) -> None` Clears the model’s primary structure information ##### Method `samson.SBStructuralModel.clearSecondaryStructureInformation` Signature: `clearSecondaryStructureInformation(self: samson.SBStructuralModel) -> None` Clears the model’s secondary structure information ##### Method `samson.SBStructuralModel.clearTitleInformation` Signature: `clearTitleInformation(self: samson.SBStructuralModel) -> None` Clears the model’s title information ##### Method `samson.SBStructuralModel.computeDomain` Signature: `static computeDomain(nodeIndexer: samson.SBNodeIndexer) -> samson.SBSpatialDomain` Computes the domain containing the atoms and bond atoms in the node indexer ##### Method `samson.SBStructuralModel.computeSecondaryStructure` Signature: `computeSecondaryStructure(self: samson.SBStructuralModel, forceUpdate: bool = False) -> tuple[bool, bool]` Computes the secondary structure for all residues in the structural model. **Parameters** - **forceUpdate** (*bool**,**default=False*) – Whether to force the update of the secondary structure or not. **Returns** - 1st element - *True* if everything went well; 2nd element - *True* if and only if the secondary structure was changed compared to the previous call. **Return type** - Tuple(bool, bool) ##### Method `samson.SBStructuralModel.createBond` Signature: `static createBond(atom1: SBMStructuralModelNodeAtom, atom2: SBMStructuralModelNodeAtom, bondOrder: float, bondType: SBMStructuralModelNodeBond::BondType) -> bool` Creates a bond between *atom1* and *atom2* if there is none; sets the bond order to *bondOrder* and the bond type to *bondType*. **Parameters** - **atom1** ([*samson.SBAtom*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)) – A first atom. - **atom2** ([*samson.SBAtom*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)) – A second atom. - **bondOrder** (*float**,**default=1.0*) – The bond order. - **bondType** ([*samson.SBBond.BondType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeBond.md#samson.SBBond.BondType)*,**default=samson.SBBond.BondType.Undefined*) – The bond type. **Returns** - Whether the bond has been created or not. **Return type** - bool ##### Method `samson.SBStructuralModel.createCovalentBonds` Signature: `createCovalentBonds(*args, **kwargs)` Overloaded function. 1. createCovalentBonds(self: samson.SBStructuralModel) -> None Creates covalent bonds for the atoms belonging to the structural model according to the inter-atomic distances 2. createCovalentBonds(self: samson.SBStructuralModel, additionalMargin: samson.SBQuantity.unitsSI) -> None Creates covalent bonds for the atoms belonging to the structural model according to the inter-atomic distances and the given additional margin. **Parameters** - **additionalMargin** (*samson.SBQuantity*) – A margin additional to the sum of covalent radii of atoms when checking for the covalent bond creation. ##### Method `samson.SBStructuralModel.createCovalentBondsByResidueType` Signature: `createCovalentBondsByResidueType(*args, **kwargs)` Overloaded function. 1. createCovalentBondsByResidueType(self: samson.SBStructuralModel) -> int Creates covalent bonds for the atoms belonging to the structural model according to the residue types, regardless of inter-atomic distances. If the bonds are already present, it sets the order of covalent bonds for the atoms belonging to the structural model according to the residue types. 2. createCovalentBondsByResidueType(self: samson.SBStructuralModel, residueIndexer: samson.SBNodeIndexer) -> int Creates covalent bonds for the atoms belonging to the given residues of the structural model according to the residue types, regardless of inter-atomic distances. If the bonds are already present, it sets the order of covalent bonds for the atoms belonging to the structural model according to the residue types. **Parameters** - **residueIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer with residues. ##### Method `samson.SBStructuralModel.createModel` Signature: `static createModel(smiles: str, name: str, addHydrogens: bool = True, addExplicitHydrogenOnly: bool = False, kekulize: bool = True, runUFF: bool = True, uffMaxIters: int = 500, uffVdwThreshold: float = 10.0, uffConfId: int = 0) -> samson.SBStructuralModel` Creates a structural model from a SMILES string. ##### Method `samson.SBStructuralModel.createSupercell` Signature: `createSupercell(self: samson.SBStructuralModel, nA: int, nB: int, nC: int) -> samson.SBStructuralModel` Creates a supercell by replicating the structural model along lattice vectors. ##### Method `samson.SBStructuralModel.exportImage` Signature: `static exportImage(smiles: str, outputFile: str, widthPx: int = 600, marginPx: int = 10, lineWidth: float = 3.0, fontFamily: str = 'Sans Serif Collection') -> bool` Exports a molecular structure (SMILES) as an image file (png, jpg, svg). ##### Method `samson.SBStructuralModel.findAtom` Signature: `static findAtom(*args, **kwargs)` Overloaded function. 1. findAtom(nodeIndexer: samson.SBNodeIndexer, elementType: samson.SBElement.ElementType, name: str) -> SBMStructuralModelNodeAtom Returns, if found, an atom from a node indexer *nodeIndexer* with the element type *elementType* and name *name*; else returns *None*. 2. findAtom(nodeIndexer: samson.SBNodeIndexer, elementType: samson.SBElement.ElementType, name: str, altLoc: str) -> SBMStructuralModelNodeAtom Returns, if found, an atom from a node indexer *nodeIndexer* with the element type *elementType* and name *name*, and an alternate location *altLoc* (if the atom has an alternate location); else returns *None*. ##### Method `samson.SBStructuralModel.findSubstructureMatchesWithSMARTS` Signature: `static findSubstructureMatchesWithSMARTS(inputNodeIndexer: samson.SBNodeIndexer, smarts: str, parameterMap: samson.SBValueMap = ) -> tuple` Finds SMARTS matches among atoms in *inputNodeIndexer*. **Returns** - Number of matches and the list of match node indexers. **Return type** - Tuple[int, list[[samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)]] ##### Method `samson.SBStructuralModel.getAltLocations` Signature: `static getAltLocations(nodeIndexer: samson.SBNodeIndexer) -> list[str]` Returns all alternate locations for atoms belonging to nodes in *nodeIndexer*. ##### Method `samson.SBStructuralModel.getAsphericity` Signature: `static getAsphericity(nodeIndexer: samson.SBNodeIndexer) -> float` Returns *True* if all atoms in *nodeIndexer* are in the same plane ##### Method `samson.SBStructuralModel.getCenterOfFormalCharge` Signature: `static getCenterOfFormalCharge(nodeIndexer: samson.SBNodeIndexer) -> samson.SBPhysicalVector3` Returns the center of formal charge of atoms in the *nodeIndexer* ##### Method `samson.SBStructuralModel.getCenterOfMass` Signature: `static getCenterOfMass(nodeIndexer: samson.SBNodeIndexer) -> samson.SBPhysicalVector3` Returns the center of mass of atoms in the *nodeIndexer* ##### Method `samson.SBStructuralModel.getCenterOfPartialCharge` Signature: `static getCenterOfPartialCharge(nodeIndexer: samson.SBNodeIndexer) -> samson.SBPhysicalVector3` Returns the center of partial charge of atoms in the *nodeIndexer* ##### Method `samson.SBStructuralModel.getCentroid` Signature: `static getCentroid(nodeIndexer: samson.SBNodeIndexer) -> samson.SBPhysicalVector3` Returns the centroid (the geometric center) of atoms in the *nodeIndexer* ##### Method `samson.SBStructuralModel.getChildren` Signature: `getChildren(self: samson.SBStructuralModel) -> samson.SBNodeIndexer` Returns the children of the structural model ##### Method `samson.SBStructuralModel.getCommonStructuralModel` Signature: `static getCommonStructuralModel(nodeIndexer: samson.SBNodeIndexer) -> samson.SBStructuralModel` Returns the common structural model for nodes in *nodeIndexer*, or *None* if there is none. ##### Method `samson.SBStructuralModel.getCommonUnitCell` Signature: `static getCommonUnitCell(nodeIndexer: samson.SBNodeIndexer) -> tuple` Returns a tuple *(status, unitCell)* for the common unit cell across nodes in *nodeIndexer*. ##### Method `samson.SBStructuralModel.getDipoleMomentAtCenterOfCharge` Signature: `static getDipoleMomentAtCenterOfCharge(nodeIndexer: samson.SBNodeIndexer) -> samson.SBQuantity.unitsSI` Returns the dipole moment of atoms in *nodeIndexer* at their center of charge (based on partial charge) ##### Method `samson.SBStructuralModel.getDipoleMomentAtCenterOfMass` Signature: `static getDipoleMomentAtCenterOfMass(nodeIndexer: samson.SBNodeIndexer) -> samson.SBQuantity.unitsSI` Returns the dipole moment of atoms in *nodeIndexer* at their center of mass ##### Method `samson.SBStructuralModel.getDipoleVectorAtCenterOfCharge` Signature: `static getDipoleVectorAtCenterOfCharge(nodeIndexer: samson.SBNodeIndexer) -> samson.SBPhysicalVector3` Returns the dipole vector of atoms in *nodeIndexer* at their center of charge (based on partial charge) ##### Method `samson.SBStructuralModel.getDipoleVectorAtCenterOfMass` Signature: `static getDipoleVectorAtCenterOfMass(nodeIndexer: samson.SBNodeIndexer) -> samson.SBPhysicalVector3` Returns the dipole vector of atoms in *nodeIndexer* at their center of mass ##### Method `samson.SBStructuralModel.getInertiaTensor` Signature: `static getInertiaTensor(nodeIndexer: samson.SBNodeIndexer) -> samson.SBPhysicalMatrix33` Returns the inertia tensor of the system of atoms (based on their positions and masses) in the *nodeIndexer* ##### Method `samson.SBStructuralModel.getMinimumImageDisplacement` Signature: `getMinimumImageDisplacement(*args, **kwargs)` Overloaded function. 1. getMinimumImageDisplacement(self: samson.SBStructuralModel, position1: samson.SBPhysicalVector3, position2: samson.SBPhysicalVector3) -> samson.SBPhysicalVector3 Returns the minimum-image displacement between two positions using the structural model unit cell. 2. getMinimumImageDisplacement(self: samson.SBStructuralModel, atom1: SBMStructuralModelNodeAtom, atom2: SBMStructuralModelNodeAtom) -> samson.SBPhysicalVector3 Returns the minimum-image displacement between two atoms using the structural model unit cell. ##### Method `samson.SBStructuralModel.getMinimumImageDisplacementBetweenAtoms` Signature: `static getMinimumImageDisplacementBetweenAtoms(atom1: SBMStructuralModelNodeAtom, atom2: SBMStructuralModelNodeAtom, unitCell: samson.SBUnitCell) -> samson.SBPhysicalVector3` Returns the minimum-image displacement between two atoms using *unitCell*. ##### Method `samson.SBStructuralModel.getMinimumImageDisplacementBetweenPositions` Signature: `static getMinimumImageDisplacementBetweenPositions(position1: samson.SBPhysicalVector3, position2: samson.SBPhysicalVector3, unitCell: samson.SBUnitCell) -> samson.SBPhysicalVector3` Returns the minimum-image displacement between two positions using *unitCell*. ##### Method `samson.SBStructuralModel.getMinimumImageDistance` Signature: `getMinimumImageDistance(*args, **kwargs)` Overloaded function. 1. getMinimumImageDistance(self: samson.SBStructuralModel, position1: samson.SBPhysicalVector3, position2: samson.SBPhysicalVector3) -> samson.SBQuantity.unitsSI Returns the minimum-image distance between two positions using the structural model unit cell. 2. getMinimumImageDistance(self: samson.SBStructuralModel, atom1: SBMStructuralModelNodeAtom, atom2: SBMStructuralModelNodeAtom) -> samson.SBQuantity.unitsSI Returns the minimum-image distance between two atoms using the structural model unit cell. ##### Method `samson.SBStructuralModel.getMinimumImageDistanceBetweenAtoms` Signature: `static getMinimumImageDistanceBetweenAtoms(atom1: SBMStructuralModelNodeAtom, atom2: SBMStructuralModelNodeAtom, unitCell: samson.SBUnitCell) -> samson.SBQuantity.unitsSI` Returns the minimum-image distance between two atoms using *unitCell*. ##### Method `samson.SBStructuralModel.getMinimumImageDistanceBetweenPositions` Signature: `static getMinimumImageDistanceBetweenPositions(position1: samson.SBPhysicalVector3, position2: samson.SBPhysicalVector3, unitCell: samson.SBUnitCell) -> samson.SBQuantity.unitsSI` Returns the minimum-image distance between two positions using *unitCell*. ##### Method `samson.SBStructuralModel.getMolecularWeightForNodeIndexer` Signature: `static getMolecularWeightForNodeIndexer(nodeIndexer: samson.SBNodeIndexer) -> samson.SBQuantity.unitsSI` Returns the cumulative molecular weight of atoms in the *nodeIndexer* ##### Method `samson.SBStructuralModel.getOrientation` Signature: `getOrientation(self: samson.SBStructuralModel) -> samson.SBPhysicalMatrix33` Returns the orientation of the structural model ##### Method `samson.SBStructuralModel.getPosition` Signature: `getPosition(self: samson.SBStructuralModel) -> samson.SBPhysicalVector3` Returns the position of the structural model ##### Method `samson.SBStructuralModel.getPrincipalAxes` Signature: `static getPrincipalAxes(nodeIndexer: samson.SBNodeIndexer) -> samson.SBPhysicalMatrix33` Returns the principal axes of the inertia tensor of the system of atoms (based on their positions and masses) in the *nodeIndexer* ##### Method `samson.SBStructuralModel.getRadiusOfGyration` Signature: `static getRadiusOfGyration(nodeIndexer: samson.SBNodeIndexer) -> samson.SBQuantity.unitsSI` Returns the radius of gyration based on atoms in the *nodeIndexer* ##### Method `samson.SBStructuralModel.getShapeParameter` Signature: `static getShapeParameter(nodeIndexer: samson.SBNodeIndexer) -> float` Returns the shape parameter of the system of atoms (based on their positions and masses) in *nodeIndexer*. The shape parameter, S, changes in the [-0.25, 2] interval, where 0 corresponds to a sphere, negative values correspond to oblate ellipsoid, positive values correspond to prolate ellipsoid. ##### Method `samson.SBStructuralModel.getSolventAccessibleSurfaceArea` Signature: `static getSolventAccessibleSurfaceArea(nodeIndexer: samson.SBNodeIndexer, probeRadius: samson.SBQuantity.unitsSI, numberOfPointsOnSphere: int) -> samson.SBQuantity.unitsSI` Returns the Solvent-Accessible Surface Area (SASA) based on atoms in *nodeIndexer* with the probe radius *probeRadius*, and the number of points on a sphere *numberOfPointsOnSphere*. **Parameters** - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – A node indexer with atoms - **probeRadius** ([*samson.SBQuantity.unitsSI*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI)) – The probe radius - **numberOfPointsOnSphere** (*int*) – The number of points on a sphere. Governs the accuracy. **Return type** - [samson.SBQuantity.unitsSI](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI) ##### Method `samson.SBStructuralModel.getSpatialTransform` Signature: `static getSpatialTransform(nodeIndexer: samson.SBNodeIndexer) -> samson.SBSpatialTransform` Returns the spatial transform based on the inertia tensor of the system of atoms (based on their positions and masses) in the *nodeIndexer* ##### Method `samson.SBStructuralModel.getStructuralRoot` Signature: `getStructuralRoot(self: samson.SBStructuralModel) -> SBMStructuralModelNodeRoot` Returns the root ##### Method `samson.SBStructuralModel.getSumOfFormalCharges` Signature: `static getSumOfFormalCharges(nodeIndexer: samson.SBNodeIndexer) -> int` Returns the sum of formal charges of nodes in *nodeIndexer* ##### Method `samson.SBStructuralModel.getSumOfPartialCharges` Signature: `static getSumOfPartialCharges(nodeIndexer: samson.SBNodeIndexer) -> float` Returns the sum of partial charges of nodes in *nodeIndexer* ##### Method `samson.SBStructuralModel.getTransform` Signature: `getTransform(self: samson.SBStructuralModel) -> samson.SBSpatialTransform` Returns the spatial transform of the structural model ##### Method `samson.SBStructuralModel.getUnitCell` Signature: `getUnitCell(self: samson.SBStructuralModel) -> samson.SBUnitCell` Returns the unit cell of the structural model. ##### Method `samson.SBStructuralModel.getWater` Signature: `getWater(self: samson.SBStructuralModel) -> samson.SBNodeIndexer` Finds water nodes in the structural model ##### Method `samson.SBStructuralModel.getWaterFromNodeIndexer` Signature: `static getWaterFromNodeIndexer(nodeIndexer: samson.SBNodeIndexer) -> samson.SBNodeIndexer` Finds water nodes in the *nodeIndexer* ##### Method `samson.SBStructuralModel.hasFiniteUnitCell` Signature: `hasFiniteUnitCell(self: samson.SBStructuralModel) -> bool` Returns *True* if and only if the structural model has a finite unit cell. ##### Method `samson.SBStructuralModel.isPeriodic` Signature: `isPeriodic(self: samson.SBStructuralModel) -> bool` Returns *True* if and only if the structural model is periodic along at least one axis. ##### Method `samson.SBStructuralModel.isPlanar` Signature: `static isPlanar(nodeIndexer: samson.SBNodeIndexer) -> bool` Returns *True* if all atoms in *nodeIndexer* are in the same plane. ##### Method `samson.SBStructuralModel.isValidSMARTS` Signature: `static isValidSMARTS(smarts: str) -> bool` Checks if a given SMARTS string is valid. ##### Method `samson.SBStructuralModel.isValidSMILES` Signature: `static isValidSMILES(smiles: str) -> bool` Checks if a given SMILES string represents a valid molecular structure. ##### Method `samson.SBStructuralModel.makeWhole` Signature: `makeWhole(self: samson.SBStructuralModel) -> bool` Reconstructs bond-connected components across periodic boundaries. ##### Method `samson.SBStructuralModel.makeWholeForCommonUnitCell` Signature: `static makeWholeForCommonUnitCell(nodeIndexer: samson.SBNodeIndexer) -> bool` Reconstructs bond-connected components from *nodeIndexer* using their common unit cell. ##### Method `samson.SBStructuralModel.makeWholeForUnitCell` Signature: `static makeWholeForUnitCell(nodeIndexer: samson.SBNodeIndexer, unitCell: samson.SBUnitCell) -> bool` Reconstructs bond-connected components from *nodeIndexer* using *unitCell*. ##### Method `samson.SBStructuralModel.populateChainIDs` Signature: `populateChainIDs(self: samson.SBStructuralModel, forceRenumbering: bool = False) -> bool` Populates the chain IDs for all chains in the structural model ##### Method `samson.SBStructuralModel.replaceAtom` Signature: `static replaceAtom(oldAtom: SBMStructuralModelNodeAtom, newAtom: SBMStructuralModelNodeAtom, preserveOldAtomPosition: bool = False) -> None` Replaces atom *oldAtom* with atom *newAtom*. All bonds from the old atom are transferred to the new atom. ##### Method `samson.SBStructuralModel.replaceBond` Signature: `static replaceBond(oldBond: SBMStructuralModelNodeBond, newBond: SBMStructuralModelNodeBond, flipBond: bool = False, preserveOldBondPosition: bool = False) -> None` Replaces bond oldBond with bond newBond. All neighboring bonds from the old bond are transferred to the new bond ##### Method `samson.SBStructuralModel.rotate` Signature: `rotate(self: samson.SBStructuralModel, axis: samson.SBPhysicalVector3, angle: samson.SBQuantity.unitsSI) -> None` Rotates the structural model ##### Method `samson.SBStructuralModel.setOrientation` Signature: `setOrientation(*args, **kwargs)` Overloaded function. 1. setOrientation(self: samson.SBStructuralModel, orientation: samson.SBPhysicalMatrix33) -> None Sets the orientation of the structural model 2. setOrientation(self: samson.SBStructuralModel, orientation: samson.SBPhysicalMatrix33, transformParticles: bool) -> None Sets the orientation of the structural model ##### Method `samson.SBStructuralModel.setPosition` Signature: `setPosition(*args, **kwargs)` Overloaded function. 1. setPosition(self: samson.SBStructuralModel, position: samson.SBPhysicalVector3) -> None Sets the position of the structural model 2. setPosition(self: samson.SBStructuralModel, position: samson.SBPhysicalVector3, transformParticles: bool) -> None Sets the position of the structural model ##### Method `samson.SBStructuralModel.setTransform` Signature: `setTransform(*args, **kwargs)` Overloaded function. 1. setTransform(self: samson.SBStructuralModel, transform: samson.SBSpatialTransform) -> None Sets the spatial transform of the structural model 2. setTransform(self: samson.SBStructuralModel, transform: samson.SBSpatialTransform, transformParticles: bool) -> None Sets the spatial transform of the structural model ##### Method `samson.SBStructuralModel.setUnitCell` Signature: `setUnitCell(self: samson.SBStructuralModel, unitCell: samson.SBUnitCell) -> None` Sets the unit cell of the structural model. ##### Method `samson.SBStructuralModel.smilesToSVG` Signature: `static smilesToSVG(smiles: str, widthPx: int = 600) -> str` Converts a SMILES string into an SVG representation. ##### Method `samson.SBStructuralModel.toSMILES` Signature: `toSMILES(self: samson.SBStructuralModel) -> str` Converts the structural model into a SMILES string. ##### Method `samson.SBStructuralModel.toSVG` Signature: `toSVG(self: samson.SBStructuralModel) -> str` Converts the structural model into a 2D SVG representation. ##### Method `samson.SBStructuralModel.transform` Signature: `transform(self: samson.SBStructuralModel, transform: samson.SBSpatialTransform) -> None` Applies a spatial transform to the structural model ##### Method `samson.SBStructuralModel.translate` Signature: `translate(self: samson.SBStructuralModel, translation: samson.SBPhysicalVector3) -> None` Translates the structural model ##### Method `samson.SBStructuralModel.wrapAtomsToCommonUnitCell` Signature: `static wrapAtomsToCommonUnitCell(nodeIndexer: samson.SBNodeIndexer, keepConnectedComponentsWhole: bool = True) -> bool` Wraps atoms from *nodeIndexer* into their common primary unit cell. ##### Method `samson.SBStructuralModel.wrapAtomsToUnitCell` Signature: `static wrapAtomsToUnitCell(nodeIndexer: samson.SBNodeIndexer, unitCell: samson.SBUnitCell, keepConnectedComponentsWhole: bool = True) -> bool` Wraps atoms from *nodeIndexer* into the primary *unitCell*. ##### Method `samson.SBStructuralModel.wrapToUnitCell` Signature: `wrapToUnitCell(self: samson.SBStructuralModel, keepConnectedComponentsWhole: bool = True) -> bool` Wraps the structural model atoms into the primary unit cell. ##### Property `samson.SBStructuralModel.connectivityAnnotationInformation` Signature: `property connectivityAnnotationInformation` The model’s connectivity annotation information ##### Property `samson.SBStructuralModel.crystallographicAndTransformationInformation` Signature: `property crystallographicAndTransformationInformation` The model’s transformation information ##### Property `samson.SBStructuralModel.hasConnectivityAnnotationInformation` Signature: `property hasConnectivityAnnotationInformation` Returns *True* when the model’s connectivity annotation information is set. A read-only property. ##### Property `samson.SBStructuralModel.hasCrystallographicAndTransformationInformation` Signature: `property hasCrystallographicAndTransformationInformation` Returns *True* when the model’s transformation information is set. A read-only property. ##### Property `samson.SBStructuralModel.hasHeterogenInformation` Signature: `property hasHeterogenInformation` Returns *True* when the model’s heterogen information is set. A read-only property. ##### Property `samson.SBStructuralModel.hasMiscellaneousInformation` Signature: `property hasMiscellaneousInformation` Returns *True* when the model’s miscellaneous information is set. A read-only property. ##### Property `samson.SBStructuralModel.hasPrimaryStructureInformation` Signature: `property hasPrimaryStructureInformation` Returns *True* when the model’s primary structure information is set. A read-only property. ##### Property `samson.SBStructuralModel.hasSecondaryStructureInformation` Signature: `property hasSecondaryStructureInformation` Returns *True* when the model’s secondary structure information is set. A read-only property. ##### Property `samson.SBStructuralModel.hasTitleInformation` Signature: `property hasTitleInformation` Returns *True* when the model’s title information is set. A read-only property. ##### Property `samson.SBStructuralModel.heterogenInformation` Signature: `property heterogenInformation` The model’s heterogen information ##### Property `samson.SBStructuralModel.miscellaneousInformation` Signature: `property miscellaneousInformation` The model’s miscellaneous information ##### Property `samson.SBStructuralModel.modelType` Signature: `property modelType` Returns the model type. A read-only property. ##### Property `samson.SBStructuralModel.primaryStructureInformation` Signature: `property primaryStructureInformation` The model’s primary structure information ##### Property `samson.SBStructuralModel.secondaryStructureInformation` Signature: `property secondaryStructureInformation` The model’s secondary structure information ##### Property `samson.SBStructuralModel.structuralSignalFlag` Signature: `property structuralSignalFlag` A flag whether the model can send structural signals ##### Property `samson.SBStructuralModel.titleInformation` Signature: `property titleInformation` The model’s title information --- # SBConformation Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelConformation.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelConformation.md This class describes a structural conformation, i.e. a set of positions of atoms ([`samson.SBAtom`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)). You can get a node indexer of atoms in the conformation: ```python # get all conformation in the active document conformationIndexer = SAMSON.getNodes('node.type conformation') if len(conformationIndexer): # get the first conformation conformation = conformationIndexer[0] # get an indexer of atoms in the conformation atomIndexer = conformation.getAtomIndexer() ``` You can restore a conformation: Caption: Restoring a conformation ```python # make the operation undoable with SAMSON.holding("Restore conformation"): conformation.restore() ``` You can add, insert, and remove atoms using `samson.SBConformation.addAtom()`, `samson.SBConformation.insertAtom()`, and `samson.SBConformation.removeAtom()` functions respectively. You can also get and set positions, velocities, and forces for all atoms in a conformation or for a particular atom. !!! note "See also" SAMSON SDK: [SBMStructuralModelConformation](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelConformation/#) ## API Reference #### Class `samson.SBConformation` Signature: `class samson.SBConformation(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes a structural conformation. Overloaded function. 1. __init__(self: samson.SBConformation) -> None Constructs a structural conformation 2. __init__(self: samson.SBConformation, name: str, nodeIndexer: samson.SBNodeIndexer) -> None Constructs a structural conformation with the given name from the nodes in *nodeIndexer*. **Parameters** - **name** (*str*) – A name of the conformation - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer with structural nodes. ##### Method `samson.SBConformation.addAtom` Signature: `addAtom(self: samson.SBConformation, atom: SBMStructuralModelNodeAtom, position: samson.SBPhysicalVector3) -> bool` Adds a atom with position *position* ##### Method `samson.SBConformation.clearSourceFileName` Signature: `clearSourceFileName(self: samson.SBConformation) -> None` Clears the source file name. ##### Method `samson.SBConformation.createStructuralModels` Signature: `createStructuralModels(self: samson.SBConformation) -> samson.SBNodeIndexer` Create structural models corresponding to all steps ##### Method `samson.SBConformation.getAtomIndexer` Signature: `getAtomIndexer(self: samson.SBConformation) -> samson.SBNodeIndexer` Returns the indexer of atoms for which a position is saved. **Returns** - A node indexer with the associated atoms. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Method `samson.SBConformation.getEnergy` Signature: `getEnergy(self: samson.SBConformation) -> samson.SBQuantity.unitsSI` Returns the energy data ##### Method `samson.SBConformation.getForce` Signature: `getForce(*args, **kwargs)` Overloaded function. 1. getForce(self: samson.SBConformation, atomIndex: int) -> samson.SBPhysicalVector3 Retrieves the force of atom with *atomIndex* 2. getForce(self: samson.SBConformation, atom: SBMStructuralModelNodeAtom) -> samson.SBPhysicalVector3 Retrieves the force of atom ##### Method `samson.SBConformation.getForceData` Signature: `getForceData(self: samson.SBConformation) -> list[samson.SBPhysicalVector3]` Returns the force data ##### Method `samson.SBConformation.getNextConformation` Signature: `getNextConformation(self: samson.SBConformation) -> samson.SBConformation` Returns the next conformation in the document ##### Method `samson.SBConformation.getPosition` Signature: `getPosition(*args, **kwargs)` Overloaded function. 1. getPosition(self: samson.SBConformation, atomIndex: int) -> samson.SBPhysicalVector3 Retrieves the position of atom with *atomIndex* 2. getPosition(self: samson.SBConformation, atom: SBMStructuralModelNodeAtom) -> samson.SBPhysicalVector3 Retrieves the position of atom ##### Method `samson.SBConformation.getPositionData` Signature: `getPositionData(self: samson.SBConformation) -> list[samson.SBPhysicalVector3]` Returns the position data ##### Method `samson.SBConformation.getPreviousConformation` Signature: `getPreviousConformation(self: samson.SBConformation) -> samson.SBConformation` Returns the previous conformation in the document ##### Method `samson.SBConformation.getTime` Signature: `getTime(self: samson.SBConformation) -> samson.SBQuantity.unitsSI` Returns the time data ##### Method `samson.SBConformation.getVelocity` Signature: `getVelocity(*args, **kwargs)` Overloaded function. 1. getVelocity(self: samson.SBConformation, atomIndex: int) -> samson.SBPhysicalVector3 Retrieves the velocity of atom with *atomIndex* 2. getVelocity(self: samson.SBConformation, atom: SBMStructuralModelNodeAtom) -> samson.SBPhysicalVector3 Retrieves the velocity of atom ##### Method `samson.SBConformation.getVelocityData` Signature: `getVelocityData(self: samson.SBConformation) -> list[samson.SBPhysicalVector3]` Returns the velocity data ##### Method `samson.SBConformation.insertAtom` Signature: `insertAtom(self: samson.SBConformation, atomIndex: int, atom: SBMStructuralModelNodeAtom, position: samson.SBPhysicalVector3) -> bool` Inserts an atom with position *position* at index *atomIndex* ##### Method `samson.SBConformation.removeAtom` Signature: `removeAtom(self: samson.SBConformation, atom: SBMStructuralModelNodeAtom) -> bool` Removes an atom from the conformation ##### Method `samson.SBConformation.restore` Signature: `restore(self: samson.SBConformation) -> None` Restores the conformation ##### Method `samson.SBConformation.setEnergy` Signature: `setEnergy(self: samson.SBConformation, energy: samson.SBQuantity.unitsSI) -> None` Sets the energy data ##### Method `samson.SBConformation.setForce` Signature: `setForce(*args, **kwargs)` Overloaded function. 1. setForce(self: samson.SBConformation, atomIndex: int, force: samson.SBPhysicalVector3) -> None Sets the force of atom with *atomIndex* 2. setForce(self: samson.SBConformation, atom: SBMStructuralModelNodeAtom, force: samson.SBPhysicalVector3) -> None Sets the force of atom ##### Method `samson.SBConformation.setForceData` Signature: `setForceData(self: samson.SBConformation, forceData: list[samson.SBPhysicalVector3]) -> None` Sets the force data; *forceData* is a vector of forces ##### Method `samson.SBConformation.setPosition` Signature: `setPosition(*args, **kwargs)` Overloaded function. 1. setPosition(self: samson.SBConformation, atomIndex: int, position: samson.SBPhysicalVector3) -> None Sets the position of atom with *atomIndex* 2. setPosition(self: samson.SBConformation, atom: SBMStructuralModelNodeAtom, position: samson.SBPhysicalVector3) -> None Sets the position of atom ##### Method `samson.SBConformation.setPositionData` Signature: `setPositionData(self: samson.SBConformation, positionData: list[samson.SBPhysicalVector3]) -> None` Sets the position data; *positionData* is a vector of positions ##### Method `samson.SBConformation.setTime` Signature: `setTime(self: samson.SBConformation, time: samson.SBQuantity.unitsSI) -> None` Sets the time data ##### Method `samson.SBConformation.setVelocity` Signature: `setVelocity(*args, **kwargs)` Overloaded function. 1. setVelocity(self: samson.SBConformation, atomIndex: int, velocity: samson.SBPhysicalVector3) -> None Sets the velocity of atom with *atomIndex* 2. setVelocity(self: samson.SBConformation, atom: SBMStructuralModelNodeAtom, velocity: samson.SBPhysicalVector3) -> None Sets the velocity of atom ##### Method `samson.SBConformation.setVelocityData` Signature: `setVelocityData(self: samson.SBConformation, velocityData: list[samson.SBPhysicalVector3]) -> None` Sets the velocity data; *velocityData* is a vector of velocities ##### Property `samson.SBConformation.hasSourceFileName` Signature: `property hasSourceFileName` Returns *True* when the source file name is set. ##### Property `samson.SBConformation.numberOfStructuralParticles` Signature: `property numberOfStructuralParticles` Returns the number of atoms for which a position is saved ##### Property `samson.SBConformation.sourceFileName` Signature: `property sourceFileName` The source file name --- # SBStructuralModelGrid Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelGrid.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelGrid.md This class is a base class to perform neighbor search between atoms. Internally, the neighbor search algorithm uses a grid to efficiently determine neighbors. You can get a neighbor indxer for an atom: ```python # get a neighbor list for a atom with an index 0 neighborIndexer = grid.getNeighborIndexer(0) # get a neighbor list for an atom neighborIndexer = grid.getNeighborIndexer(atom) ``` To update the neighbor list execute: ```python grid.update() ``` !!! note "See also" SAMSON SDK: [SBMStructuralModelGrid](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelGrid/#) ## API Reference #### Class `samson.SBStructuralModelGrid` Signature: `class samson.SBStructuralModelGrid(self: samson.SBStructuralModelGrid, arg0: samson.SBNodeIndexer, arg1: samson.SBQuantity.unitsSI)` Bases: [`SBReferenceTarget`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference/SBCReferenceTarget.md#samson.SBReferenceTarget) This class describes a grid-based neighbor search algorithm that can be applied to atoms. Constructs a structural-model grid from node indexer and cutoff distance. ##### Method `samson.SBStructuralModelGrid.areNeighbors` Signature: `areNeighbors(*args, **kwargs)` Overloaded function. 1. areNeighbors(self: samson.SBStructuralModelGrid, i: int, j: int) -> bool Returns whether particles with indices *i* and *j* are neighbors 2. areNeighbors(self: samson.SBStructuralModelGrid, atomI: SBMStructuralModelNodeAtom, atomJ: SBMStructuralModelNodeAtom) -> bool Returns whether atoms *atomI* and *atomJ* are neighbors ##### Method `samson.SBStructuralModelGrid.getNeighborVector` Signature: `getNeighborVector(*args, **kwargs)` Overloaded function. 1. getNeighborVector(self: samson.SBStructuralModelGrid, i: int) -> list[SBMStructuralModelNodeAtom] Returns the neighbor indexer of atom *i* 2. getNeighborVector(self: samson.SBStructuralModelGrid, atom: SBMStructuralModelNodeAtom) -> list[SBMStructuralModelNodeAtom] Returns the neighbor indexer of atom *atom* ##### Method `samson.SBStructuralModelGrid.getNeighbors` Signature: `getNeighbors(*args, **kwargs)` Overloaded function. 1. getNeighbors(self: samson.SBStructuralModelGrid, position: samson.SBPhysicalVector3, radius: samson.SBQuantity.unitsSI) -> list[SBMStructuralModelNodeAtom] Returns vector of all atoms that are at a distance smaller than or equal to radius from the specified position 2. getNeighbors(self: samson.SBStructuralModelGrid, box: samson.SBPhysicalIAVector3) -> list[SBMStructuralModelNodeAtom] Returns vector of all atoms inside the box ##### Method `samson.SBStructuralModelGrid.print` Signature: `print(self: samson.SBStructuralModelGrid, offset: int = 0) -> None` Prints debugging information for the neighbor-search grid. ##### Method `samson.SBStructuralModelGrid.update` Signature: `update(self: samson.SBStructuralModelGrid) -> None` Updates the grid and neighbor lists --- # SBStructuralNode Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNode.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNode.md This is a base class for structural model nodes. !!! note "See also" SAMSON SDK: [SBMStructuralModelNode](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNode/#) ## API Reference #### Class `samson.SBStructuralNode` Signature: `class samson.SBStructuralNode` Bases: [`SBModelNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModelNode.md#samson.SBModelNode) This class describes a structural model node. ##### Method `samson.SBStructuralNode.getChildren` Signature: `getChildren(self: samson.SBStructuralNode) -> samson.SBNodeIndexer` Returns the children of the node ##### Method `samson.SBStructuralNode.getModel` Signature: `getModel(self: samson.SBStructuralNode) -> samson.SBStructuralModel` Returns the parent structural model. ##### Method `samson.SBStructuralNode.getNextStructuralNode` Signature: `getNextStructuralNode(self: samson.SBStructuralNode) -> samson.SBStructuralNode` Returns the next structural node in topology order. ##### Method `samson.SBStructuralNode.getPreviousStructuralNode` Signature: `getPreviousStructuralNode(self: samson.SBStructuralNode) -> samson.SBStructuralNode` Returns the previous structural node in topology order. ##### Property `samson.SBStructuralNode.structuralSignalFlag` Signature: `property structuralSignalFlag` Whether this node can emit structural signals. --- # SBAtom Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md This class describes an atom in a structural model. You can get a number of atom’s parameters on its topology (bonds), identity (type, element name and symbol, atomic weight, etc), and other properties (chain, occupancy, serial number, formal charge, temperature factor, etc), for example: ```python # get the bond list of an atom atom.getBondList # atom's element name atom.elementName # atom's element symbol atom.elementSymbol # atom's atomic weight atom.atomicWeight # atom's occupancy atom.occupancy # atom's temperature factor if atom.hasTemperatureFactor: atom.temperatureFactor # atom's water flag if atom.hasWaterFlag: atom.waterFlag # the name of a residue to which atom belongs if atom.isInResidue: atom.residueName ``` !!! note Parameters which are owned by an atom are accessible as properties (e.g., `atom.partialCharge`), but due to some limitations some parameters which are owned by atom’s parent nodes are accessible via getter and setter functions (if setter functions are available for a parameter). There is a number of constructors for an atom node, for example: ```python # construct a Carbon atom at (0, 0, 0) position atom1 = SBAtom(SBElement.Carbon) atom1.setPosition(SBPosition3(SBQuantity.nm(1), SBQuantity.nm(-1.5), SBQuantity.nm(0))) print(atom1) # construct a Carbon atom at (0, 0, 0) position atom2 = SBAtom(SBElement.Carbon, SBPosition3(SBQuantity.nm(1), SBQuantity.nm(-1.5), SBQuantity.nm(0))) print(atom2) ``` You can further add an atom to e.g. a structural model, chain, backbone, or sidechain: ```python # turn the undo system on with SAMSON.holding("Add new atom"): # hold the atom instance SAMSON.hold(atom) # create the atom atom.create() # add the atom to a chain chain.addChild(atom) ``` !!! note "See also" [Building](https://documentation.samson-connect.net/scripting/latest/docs/Building.md#ps-building) SAMSON SDK: [SBMStructuralModelNodeAtom](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNodeAtom/#) ## API Reference #### Class `samson.SBAtom` Signature: `class samson.SBAtom(*args, **kwargs)` Bases: [`SBStructuralNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNode.md#samson.SBStructuralNode) This class describes an atom in a structural model. Overloaded function. 1. __init__(self: samson.SBAtom) -> None Constructs an atom of with the element type *samson.SBElement.Unknown* and the default position (0, 0, 0) 2. __init__(self: samson.SBAtom, element: samson.SBElement.ElementType) -> None Constructs an atom of the given element type and the default position (0, 0, 0). **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – The element type 3. __init__(self: samson.SBAtom, element: samson.SBElement.ElementType, x: samson.SBQuantity.unitsSI, y: samson.SBQuantity.unitsSI, z: samson.SBQuantity.unitsSI) -> None Constructs an atom of the given element type at position = (*x*, *y*, *z*). **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – The element type - **x** ([*samson.SBQuantity.unitsSI*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI)) – The x-coordinate - **y** ([*samson.SBQuantity.unitsSI*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI)) – The y-coordinate - **z** ([*samson.SBQuantity.unitsSI*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIClass.md#samson.SBQuantity.unitsSI)) – The z-coordinate 4. __init__(self: samson.SBAtom, element: samson.SBElement.ElementType, position: samson.SBPhysicalVector3) -> None Constructs an atom of the given element type at the given position. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – The element type - **position** ([*samson.SBPosition3*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/PhysicalVector3ConvenienceConstructors/position3.md#samson.SBPosition3)) – The position ##### Class `samson.SBAtom.Geometry` Signature: `class Geometry(self: samson.SBAtom.Geometry, value: int)` Bases: `pybind11_object` **Members** - `Undefined`: Undefined geometry - `Linear`: Linear geometry - `Bent`: Bent geometry - `TrigonalPlanar`: Trigonal planar geometry - `TrigonalPyramidal`: Trigonal pyramidal geometry - `TShaped`: T-shaped geometry - `Tetrahedral`: Tetrahedral geometry - `SquarePlanar`: Square planar geometry - `Seesaw`: Seesaw geometry - `TrigonalBipyramidal`: Trigonal bipyramidal geometry - `SquarePyramidal`: Square pyramidal geometry - `PentagonalPlanar`: Pentagonal planar geometry - `Octahedral`: Octahedral geometry - `TrigonalPrismatic`: Trigonal prismatic geometry - `PentagonalPyramidal`: Pentagonal pyramidal geometry - `PentagonalBipyramidal`: Pentagonal bipyramidal geometry - `CappedOctahedral`: Capped octahedral geometry - `CappedTrigonalPrismatic`: Capped trigonal prismatic geometry - `SquareAntiprismatic`: Square antiprismatic geometry - `Dodecahedral`: Dodecahedral geometry - `BicappedTrigonalPrismatic`: Bicapped trigonal prismatic geometry - `TricappedTrigonalPrismatic`: Tricapped trigonal prismatic geometry - `CappedSquareAntiprismatic`: Capped square antiprismatic geometry ##### Class `samson.SBAtom.Hybridization` Signature: `class Hybridization(self: samson.SBAtom.Hybridization, value: int)` Bases: `pybind11_object` **Members** - `NoHybridization`: No hybridization - `SP`: Hybridization of an s-orbital and one p-orbital - `SP2`: Hybridization of an s-orbital and two p-orbitals - `SP3`: Hybridization of an s-orbital and three p-orbitals - `SP3D`: Hybridization of an s-orbital, three p-orbitals, and a d-orbital - `SP3D2`: Hybridization of an s-orbital, three p-orbitals, and two d-orbital - `Unknown`: Hybridization is unknown ##### Method `samson.SBAtom.addHydrogens` Signature: `addHydrogens(self: samson.SBAtom) -> int` Adds hydrogens and returns the number of added hydrogens ##### Method `samson.SBAtom.clearAltLocation` Signature: `clearAltLocation(self: samson.SBAtom) -> None` Clears the atom’s alternate location ##### Method `samson.SBAtom.clearAnisotropicTFactors` Signature: `clearAnisotropicTFactors(self: samson.SBAtom) -> None` Clears the atom’s anisotropic temperature factors ##### Method `samson.SBAtom.clearAromaticity` Signature: `clearAromaticity(self: samson.SBAtom) -> None` Clears the atom’s aromaticity ##### Method `samson.SBAtom.clearComment` Signature: `clearComment(self: samson.SBAtom) -> None` Clears the atom’s comment ##### Method `samson.SBAtom.clearCustomType` Signature: `clearCustomType(self: samson.SBAtom) -> None` Clears the atom’s custom type ##### Method `samson.SBAtom.clearFormalCharge` Signature: `clearFormalCharge(self: samson.SBAtom) -> None` Clears the atom’s formal charge ##### Method `samson.SBAtom.clearGeometry` Signature: `clearGeometry(self: samson.SBAtom) -> None` Clears the atom’s geometry ##### Method `samson.SBAtom.clearHybridization` Signature: `clearHybridization(self: samson.SBAtom) -> None` Clears the atom’s hybridization ##### Method `samson.SBAtom.clearInsertionCode` Signature: `clearInsertionCode(self: samson.SBAtom) -> None` Clears the atom’s insertion code ##### Method `samson.SBAtom.clearName` Signature: `clearName(self: samson.SBAtom) -> None` Clears the atom’s full name ##### Method `samson.SBAtom.clearOccupancy` Signature: `clearOccupancy(self: samson.SBAtom) -> None` Clears the atom’s occupancy ##### Method `samson.SBAtom.clearOxidationState` Signature: `clearOxidationState(self: samson.SBAtom) -> None` Clears the atom’s oxidation state ##### Method `samson.SBAtom.clearPartialCharge` Signature: `clearPartialCharge(self: samson.SBAtom) -> None` Clears the atom’s partial charge ##### Method `samson.SBAtom.clearRecordType` Signature: `clearRecordType(self: samson.SBAtom) -> None` Clears the atom’s record type ##### Method `samson.SBAtom.clearResonance` Signature: `clearResonance(self: samson.SBAtom) -> None` Clears the atom’s resonance ##### Method `samson.SBAtom.clearSYBYLType` Signature: `clearSYBYLType(self: samson.SBAtom) -> None` Clears the atom’s SYBYL type ##### Method `samson.SBAtom.clearSerialNumber` Signature: `clearSerialNumber(self: samson.SBAtom) -> None` Clears the atom’s serial number ##### Method `samson.SBAtom.clearStatusBit` Signature: `clearStatusBit(self: samson.SBAtom) -> None` Clears the atom’s status bit ##### Method `samson.SBAtom.clearTemperatureFactor` Signature: `clearTemperatureFactor(self: samson.SBAtom) -> None` Clears the atom’s temperature factor ##### Method `samson.SBAtom.clearWaterFlag` Signature: `clearWaterFlag(self: samson.SBAtom) -> None` Clears the atom’s water flag ##### Method `samson.SBAtom.getBackbone` Signature: `getBackbone(self: samson.SBAtom) -> SBMStructuralModelNodeBackbone` Returns a pointer to the backbone ##### Method `samson.SBAtom.getBondList` Signature: `getBondList(self: samson.SBAtom) -> samson.SBNodeIndexer` Returns the bond indexer. **Returns** - The indexer of bonds to the atom **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Method `samson.SBAtom.getBondTo` Signature: `getBondTo(self: samson.SBAtom, atom: samson.SBAtom) -> SBMStructuralModelNodeBond` Returns the bond to the given *atom* (*None* if no bond). **Parameters** - **atom** ([*samson.SBAtom*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)) – An atom **Returns** - The bond between this atom and the given atom *atom* **Return type** - [samson.SBBond](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeBond.md#samson.SBBond) ##### Method `samson.SBAtom.getBondedAtoms` Signature: `getBondedAtoms(*args, **kwargs)` Overloaded function. 1. getBondedAtoms(self: samson.SBAtom) -> samson.SBNodeIndexer Returns an indexer with all bonded atoms. **Returns** - The indexer of atoms bonded to this atom **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) 2. getBondedAtoms(self: samson.SBAtom, element: samson.SBElement.ElementType) -> samson.SBNodeIndexer Returns an indexer with all bonded atoms of type element. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – The element type **Returns** - The indexer of atoms of type *element* bonded to this atom **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Method `samson.SBAtom.getBondedHeavyAtoms` Signature: `getBondedHeavyAtoms(self: samson.SBAtom) -> samson.SBNodeIndexer` Returns an indexer with all bonded heavy atoms (non-Hydrogens). **Returns** - The indexer of heavy atoms bonded to this atom **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Method `samson.SBAtom.getChain` Signature: `getChain(self: samson.SBAtom) -> SBMStructuralModelNodeChain` Returns the atom’s chain ##### Method `samson.SBAtom.getCoarseGrainedColor` Signature: `getCoarseGrainedColor(self: samson.SBAtom) -> samson.SBColor` Get the coarse-grained atom’s color ##### Method `samson.SBAtom.getCoarseGrainedMass` Signature: `getCoarseGrainedMass(self: samson.SBAtom) -> samson.SBQuantity.unitsSI` Get the coarse-grained atom’s mass ##### Method `samson.SBAtom.getCoarseGrainedRadius` Signature: `getCoarseGrainedRadius(self: samson.SBAtom) -> samson.SBQuantity.unitsSI` Get the coarse-grained atom’s radius ##### Method `samson.SBAtom.getCoarseGrainedType` Signature: `getCoarseGrainedType(self: samson.SBAtom) -> str` Get the coarse-grained atom’s type ##### Method `samson.SBAtom.getColor` Signature: `getColor(self: samson.SBAtom) -> samson.SBColor` Returns the atom’s element color (CPK or coarse grained). **Returns** - The color **Return type** - [samson.SBColor](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Type/SBColor.md#samson.SBColor) ##### Method `samson.SBAtom.getComment` Signature: `getComment(self: samson.SBAtom) -> str` Returns the atom’s comment ##### Method `samson.SBAtom.getConnectedComponent` Signature: `getConnectedComponent(*args, **kwargs)` Overloaded function. 1. getConnectedComponent(self: samson.SBAtom) -> samson.SBNodeIndexer Gets all atoms in the connected component containing the atom. **Returns** - The indexer with atoms in the connected component **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) 2. getConnectedComponent(self: samson.SBAtom, maximumNumberOfAtoms: int) -> tuple Gets atoms in the connected component containing the atom and stops once *maximumNumberOfAtoms* is reached. **Parameters** - **maximumNumberOfAtoms** (*int*) – The maximum number of atoms in the connected component after reaching which the algorithm should stop. **Returns** - A tuple with a first element being a boolean showing whether the whole connected component has no more than *maximumNumberOfAtoms* atomsand the second element being the indexer with atoms in the connected component. **Return type** - Tuple(bool, [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) ##### Method `samson.SBAtom.getGeometryString` Signature: `static getGeometryString(geometry: samson.SBAtom.Geometry) -> str` Returns the geometry as a string ##### Method `samson.SBAtom.getHybridizationString` Signature: `static getHybridizationString(hybridization: samson.SBAtom.Hybridization) -> str` Returns the hybridization as a string ##### Method `samson.SBAtom.getHydrogens` Signature: `getHydrogens(self: samson.SBAtom) -> samson.SBNodeIndexer` Returns an indexer with all bonded hydrogens. **Returns** - The indexer of hydrogen atoms bonded to this atom **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Method `samson.SBAtom.getMaximumBondLength` Signature: `getMaximumBondLength(self: samson.SBAtom) -> samson.SBQuantity.unitsSI` Returns the maximum bond length among this atom’s bonds. ##### Method `samson.SBAtom.getMinimumBondLength` Signature: `getMinimumBondLength(self: samson.SBAtom) -> samson.SBQuantity.unitsSI` Returns the minimum bond length among this atom’s bonds. ##### Method `samson.SBAtom.getMolecule` Signature: `getMolecule(self: samson.SBAtom) -> SBMStructuralModelNodeMolecule` Returns a molecule in which the atom is ##### Method `samson.SBAtom.getNumberOfBondedAtoms` Signature: `getNumberOfBondedAtoms(*args, **kwargs)` Overloaded function. 1. getNumberOfBondedAtoms(self: samson.SBAtom) -> int Returns the number of bonded atoms 2. getNumberOfBondedAtoms(self: samson.SBAtom, element: samson.SBElement.ElementType) -> int Returns the number of bonded atoms with element type *element*. **Parameters** - **element** ([*samson.SBElement.ElementType*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Element/SBMElement.md#samson.SBElement.ElementType)) – The element type **Returns** - The number of atoms of type *element* bonded to this atom **Return type** - int ##### Method `samson.SBAtom.getNumberOfBondedCarbons` Signature: `getNumberOfBondedCarbons(self: samson.SBAtom) -> int` Returns the number of bonded carbons ##### Method `samson.SBAtom.getNumberOfBondedHeavyAtoms` Signature: `getNumberOfBondedHeavyAtoms(self: samson.SBAtom) -> int` Returns the number of bonded heavy atoms ##### Method `samson.SBAtom.getNumberOfBondedHydrogens` Signature: `getNumberOfBondedHydrogens(self: samson.SBAtom) -> int` Returns the number of bonded hydrogens ##### Method `samson.SBAtom.getNumberOfBondedNitrogens` Signature: `getNumberOfBondedNitrogens(self: samson.SBAtom) -> int` Returns the number of bonded nitrogens ##### Method `samson.SBAtom.getNumberOfBondedOxygens` Signature: `getNumberOfBondedOxygens(self: samson.SBAtom) -> int` Returns the number of bonded oxygens ##### Method `samson.SBAtom.getNumberOfBondedSulfurs` Signature: `getNumberOfBondedSulfurs(self: samson.SBAtom) -> int` Returns the number of bonded sulfurs ##### Method `samson.SBAtom.getNumberOfBonds` Signature: `getNumberOfBonds(self: samson.SBAtom) -> int` The number of bonds without taking into account the bond order. Note that a double bond is considered as one bond. ##### Method `samson.SBAtom.getPosition` Signature: `getPosition(self: samson.SBAtom) -> samson.SBPhysicalVector3` Returns the position ##### Method `samson.SBAtom.getRecordType` Signature: `getRecordType(self: samson.SBAtom) -> str` Returns the atom’s record type ##### Method `samson.SBAtom.getResidue` Signature: `getResidue(self: samson.SBAtom) -> SBMStructuralModelNodeResidue` Returns a residue in which the atom is ##### Method `samson.SBAtom.getSYBYLType` Signature: `getSYBYLType(self: samson.SBAtom) -> str` Returns the atom’s SYBYL type ##### Method `samson.SBAtom.getSegment` Signature: `getSegment(self: samson.SBAtom) -> SBMStructuralModelNodeSegment` Returns the segment in which the atom is ##### Method `samson.SBAtom.getSideChain` Signature: `getSideChain(self: samson.SBAtom) -> SBMStructuralModelNodeSideChain` Returns a pointer to the side chain ##### Method `samson.SBAtom.getStatusBit` Signature: `getStatusBit(self: samson.SBAtom) -> str` Returns the atom’s status bit ##### Method `samson.SBAtom.getSubstructure` Signature: `getSubstructure(self: samson.SBAtom) -> samson.SBStructuralGroup` Returns a substructure in which the atom is ##### Method `samson.SBAtom.getX` Signature: `getX(self: samson.SBAtom) -> samson.SBQuantity.unitsSI` Returns the x-coordinate ##### Method `samson.SBAtom.getY` Signature: `getY(self: samson.SBAtom) -> samson.SBQuantity.unitsSI` Returns the y-coordinate ##### Method `samson.SBAtom.getZ` Signature: `getZ(self: samson.SBAtom) -> samson.SBQuantity.unitsSI` Returns the z-coordinate ##### Method `samson.SBAtom.isAttachedToHydrogenBondDonor` Signature: `isAttachedToHydrogenBondDonor(self: samson.SBAtom) -> bool` Returns *True* if the atom is connected to an H-Bond donor ##### Method `samson.SBAtom.isCarbon` Signature: `isCarbon(self: samson.SBAtom) -> bool` Returns *True* when the atom is a carbon atom ##### Method `samson.SBAtom.isCarboxylOxygen` Signature: `isCarboxylOxygen(self: samson.SBAtom) -> bool` Returns *True* for an Oxygen atom in a carboxyl group (C(=O)OH) ##### Method `samson.SBAtom.isCoarseGrained` Signature: `isCoarseGrained(self: samson.SBAtom) -> bool` Returns *True* if the atom is coarse grained ##### Method `samson.SBAtom.isDonorBorneHydrogen` Signature: `isDonorBorneHydrogen(self: samson.SBAtom) -> bool` Returns *True* if the atom is a hydrogen connected to an H-Bond donor ##### Method `samson.SBAtom.isHydrogen` Signature: `isHydrogen(self: samson.SBAtom) -> bool` Returns *True* when the atom is a hydrogen atom ##### Method `samson.SBAtom.isHydrogenBondAcceptor` Signature: `isHydrogenBondAcceptor(self: samson.SBAtom) -> bool` Returns *True* if the atom is an H-Bond acceptor (N, O, S, F) ##### Method `samson.SBAtom.isHydrogenBondDonor` Signature: `isHydrogenBondDonor(self: samson.SBAtom) -> bool` Returns *True* if the atom is an H-Bond donor (N, O, S, F) ##### Method `samson.SBAtom.isNitroOxygen` Signature: `isNitroOxygen(self: samson.SBAtom) -> bool` Returns *True* for an Oxygen atom in a nitro group (-NO2) ##### Method `samson.SBAtom.isNitrogen` Signature: `isNitrogen(self: samson.SBAtom) -> bool` Returns *True* when the atom is a nitrogen atom ##### Method `samson.SBAtom.isOxygen` Signature: `isOxygen(self: samson.SBAtom) -> bool` Returns *True* when the atom is an oxygen atom ##### Method `samson.SBAtom.isPlanar` Signature: `isPlanar(self: samson.SBAtom) -> bool` Returns *True* if the atom with atoms bonded to it are in the same plane ##### Method `samson.SBAtom.isSulfoneOxygen` Signature: `isSulfoneOxygen(self: samson.SBAtom) -> bool` Returns *True* for an Oxygen atom in a sulfone (R1-SO2-R2) ##### Method `samson.SBAtom.isSulfur` Signature: `isSulfur(self: samson.SBAtom) -> bool` Returns *True* when the atom is a sulfur atom ##### Method `samson.SBAtom.isThiocarboxylOxygen` Signature: `isThiocarboxylOxygen(self: samson.SBAtom) -> bool` Returns *True* for an Oxygen atom in a thiocarboxyl group (C(=S)OH or C(=O)SH) ##### Method `samson.SBAtom.isUnknown` Signature: `isUnknown(self: samson.SBAtom) -> bool` Returns *True* when the atom is an unknown atom ##### Method `samson.SBAtom.perceiveHybridization` Signature: `perceiveHybridization(self: samson.SBAtom) -> samson.SBAtom.Hybridization` Perceives, sets, and returns the atom’s hybridization ##### Method `samson.SBAtom.removeHydrogens` Signature: `removeHydrogens(self: samson.SBAtom) -> int` Removes the hydrogens bonded to the atom and returns the number of removed hydrogens ##### Method `samson.SBAtom.setCoarseGrainedColor` Signature: `setCoarseGrainedColor(self: samson.SBAtom, color: samson.SBColor) -> None` Set the coarse-grained atom’s color ##### Method `samson.SBAtom.setCoarseGrainedMass` Signature: `setCoarseGrainedMass(*args, **kwargs)` Overloaded function. 1. setCoarseGrainedMass(self: samson.SBAtom, mass: samson.SBQuantity.unitsSI) -> None Set the coarse-grained atom’s mass 2. setCoarseGrainedMass(self: samson.SBAtom, mass: samson.SBQuantity.unitsDalton) -> None Set the coarse-grained atom’s mass ##### Method `samson.SBAtom.setCoarseGrainedRadius` Signature: `setCoarseGrainedRadius(self: samson.SBAtom, radius: samson.SBQuantity.unitsSI) -> None` Set the coarse-grained atom’s radius ##### Method `samson.SBAtom.setCoarseGrainedType` Signature: `setCoarseGrainedType(self: samson.SBAtom, type: str) -> None` Set the coarse-grained atom’s type ##### Method `samson.SBAtom.setComment` Signature: `setComment(self: samson.SBAtom, comment: str) -> None` Set the atom’s comment ##### Method `samson.SBAtom.setPosition` Signature: `setPosition(self: samson.SBAtom, position: samson.SBPhysicalVector3) -> None` Sets the position ##### Method `samson.SBAtom.setPositionOnTetrahedron` Signature: `setPositionOnTetrahedron(self: samson.SBAtom, center: samson.SBPhysicalVector3, vertex1: samson.SBPhysicalVector3, vertex2: samson.SBPhysicalVector3, vertex3: samson.SBPhysicalVector3, distanceFromCenter: samson.SBQuantity.unitsSI) -> None` Sets the particle’s position on a tetrahedron vertex based on the *center* position, the distance from the center *distanceFromCenter*, and positions of other 3 vertices *vertex1*, *vertex2*, and *vertex3*. ##### Method `samson.SBAtom.setRecordType` Signature: `setRecordType(self: samson.SBAtom, recordType: str) -> None` Set the atom’s recordType ##### Method `samson.SBAtom.setSYBYLType` Signature: `setSYBYLType(self: samson.SBAtom, type: str) -> None` Set the atom’s SYBYL type ##### Method `samson.SBAtom.setStatusBit` Signature: `setStatusBit(self: samson.SBAtom, statusBit: str) -> None` Set the atom’s status bit ##### Method `samson.SBAtom.setX` Signature: `setX(self: samson.SBAtom, x: samson.SBQuantity.unitsSI) -> None` Sets the x-coordinate ##### Method `samson.SBAtom.setY` Signature: `setY(self: samson.SBAtom, y: samson.SBQuantity.unitsSI) -> None` Sets the y-coordinate ##### Method `samson.SBAtom.setZ` Signature: `setZ(self: samson.SBAtom, z: samson.SBQuantity.unitsSI) -> None` Sets the z-coordinate ##### Attribute `samson.SBAtom.Bent` Signature: `Bent = ` ##### Attribute `samson.SBAtom.BicappedTrigonalPrismatic` Signature: `BicappedTrigonalPrismatic = ` ##### Attribute `samson.SBAtom.CappedOctahedral` Signature: `CappedOctahedral = ` ##### Attribute `samson.SBAtom.CappedSquareAntiprismatic` Signature: `CappedSquareAntiprismatic = ` ##### Attribute `samson.SBAtom.CappedTrigonalPrismatic` Signature: `CappedTrigonalPrismatic = ` ##### Attribute `samson.SBAtom.Dodecahedral` Signature: `Dodecahedral = ` ##### Attribute `samson.SBAtom.Linear` Signature: `Linear = ` ##### Attribute `samson.SBAtom.NoHybridization` Signature: `NoHybridization = ` ##### Attribute `samson.SBAtom.Octahedral` Signature: `Octahedral = ` ##### Attribute `samson.SBAtom.PentagonalBipyramidal` Signature: `PentagonalBipyramidal = ` ##### Attribute `samson.SBAtom.PentagonalPlanar` Signature: `PentagonalPlanar = ` ##### Attribute `samson.SBAtom.PentagonalPyramidal` Signature: `PentagonalPyramidal = ` ##### Attribute `samson.SBAtom.SP` Signature: `SP = ` ##### Attribute `samson.SBAtom.SP2` Signature: `SP2 = ` ##### Attribute `samson.SBAtom.SP3` Signature: `SP3 = ` ##### Attribute `samson.SBAtom.SP3D` Signature: `SP3D = ` ##### Attribute `samson.SBAtom.SP3D2` Signature: `SP3D2 = ` ##### Attribute `samson.SBAtom.Seesaw` Signature: `Seesaw = ` ##### Attribute `samson.SBAtom.SquareAntiprismatic` Signature: `SquareAntiprismatic = ` ##### Attribute `samson.SBAtom.SquarePlanar` Signature: `SquarePlanar = ` ##### Attribute `samson.SBAtom.SquarePyramidal` Signature: `SquarePyramidal = ` ##### Attribute `samson.SBAtom.TShaped` Signature: `TShaped = ` ##### Attribute `samson.SBAtom.Tetrahedral` Signature: `Tetrahedral = ` ##### Attribute `samson.SBAtom.TricappedTrigonalPrismatic` Signature: `TricappedTrigonalPrismatic = ` ##### Attribute `samson.SBAtom.TrigonalBipyramidal` Signature: `TrigonalBipyramidal = ` ##### Attribute `samson.SBAtom.TrigonalPlanar` Signature: `TrigonalPlanar = ` ##### Attribute `samson.SBAtom.TrigonalPrismatic` Signature: `TrigonalPrismatic = ` ##### Attribute `samson.SBAtom.TrigonalPyramidal` Signature: `TrigonalPyramidal = ` ##### Attribute `samson.SBAtom.Undefined` Signature: `Undefined = ` ##### Attribute `samson.SBAtom.Unknown` Signature: `Unknown = ` ##### Property `samson.SBAtom.alternateLocation` Signature: `property alternateLocation` The atom’s alternate location ##### Property `samson.SBAtom.anisotropicTFactors` Signature: `property anisotropicTFactors` The atom’s anisotropic temperature factors ##### Property `samson.SBAtom.aromaticity` Signature: `property aromaticity` The atom’s aromaticity ##### Property `samson.SBAtom.atomicNumber` Signature: `property atomicNumber` The atom’s atomic number ##### Property `samson.SBAtom.atomicWeight` Signature: `property atomicWeight` The atom’s atomic weight ##### Property `samson.SBAtom.block` Signature: `property block` The atom’s block ##### Property `samson.SBAtom.chainID` Signature: `property chainID` Returns the ID of a chain in which the atom is ##### Property `samson.SBAtom.chainIDString` Signature: `property chainIDString` Returns the ID (as a string) of a chain in which the atom is ##### Property `samson.SBAtom.chainName` Signature: `property chainName` Returns the atom’s chain name ##### Property `samson.SBAtom.covalentRadius` Signature: `property covalentRadius` The atom’s covalent radius ##### Property `samson.SBAtom.currentValence` Signature: `property currentValence` The current valence, i.e. the sum of the orders of the bonds connected to the atom. **Returns** - The current valence **Return type** - samson.SBQuantity ##### Property `samson.SBAtom.customType` Signature: `property customType` The atom’s custom type ##### Property `samson.SBAtom.electronegativity` Signature: `property electronegativity` The atom’s electronegativity ##### Property `samson.SBAtom.elementName` Signature: `property elementName` The atom’s element name ##### Property `samson.SBAtom.elementSymbol` Signature: `property elementSymbol` The atom’s element symbol ##### Property `samson.SBAtom.elementType` Signature: `property elementType` The atom’s element type ##### Property `samson.SBAtom.expectedValence` Signature: `property expectedValence` The expected valence of the atom based on its formal charge and its number of bonds (based on the MDL valence model). **Returns** - The expected valence **Return type** - samson.SBQuantity ##### Property `samson.SBAtom.fixedFlag` Signature: `property fixedFlag` The atom’s fixed flag ##### Property `samson.SBAtom.formalCharge` Signature: `property formalCharge` The atom’s formal charge ##### Property `samson.SBAtom.geometry` Signature: `property geometry` The atom’s geometry ##### Property `samson.SBAtom.geometryString` Signature: `property geometryString` Returns the geometry as a string ##### Property `samson.SBAtom.group` Signature: `property group` The atom’s group ##### Property `samson.SBAtom.hasAltLocation` Signature: `property hasAltLocation` Returns *True* when the atom’s alternate location is set ##### Property `samson.SBAtom.hasAminoAcidBackboneAtomName` Signature: `property hasAminoAcidBackboneAtomName` Returns *True* when the atom’s name corresponds to one of the amino acid backbone atoms ##### Property `samson.SBAtom.hasAnisotropicTFactors` Signature: `property hasAnisotropicTFactors` Returns *True* when the atom’s anisotropic temperature factors are set ##### Property `samson.SBAtom.hasAromaticity` Signature: `property hasAromaticity` Returns *True* when the atom’s aromaticity is set ##### Property `samson.SBAtom.hasChainID` Signature: `property hasChainID` Returns *True* when the atom is in a chain and the chain’s ID is set ##### Property `samson.SBAtom.hasComment` Signature: `property hasComment` Returns *True* when the atom’s comment is set ##### Property `samson.SBAtom.hasCustomType` Signature: `property hasCustomType` Returns *True* when the atom’s custom type is set ##### Property `samson.SBAtom.hasFormalCharge` Signature: `property hasFormalCharge` Returns *True* when the atom’s formal charge is set ##### Property `samson.SBAtom.hasGeometry` Signature: `property hasGeometry` Returns *True* when the atom’s geometry is set ##### Property `samson.SBAtom.hasHybridization` Signature: `property hasHybridization` Returns *True* when the atom’s hybridization is set ##### Property `samson.SBAtom.hasInsertionCode` Signature: `property hasInsertionCode` Returns *True* when the atom’s insertion code is set ##### Property `samson.SBAtom.hasName` Signature: `property hasName` Returns *True* when the atom’s name is set ##### Property `samson.SBAtom.hasNucleicAcidBackboneAtomName` Signature: `property hasNucleicAcidBackboneAtomName` Returns *True* when the atom’s name corresponds to one of the nucleic acid backbone atoms ##### Property `samson.SBAtom.hasOccupancy` Signature: `property hasOccupancy` Returns *True* when the atom’s occupancy is set ##### Property `samson.SBAtom.hasOxidationState` Signature: `property hasOxidationState` Returns *True* when the atom’s oxidation state is set ##### Property `samson.SBAtom.hasPartialCharge` Signature: `property hasPartialCharge` Returns *True* when the atom’s partial charge is set ##### Property `samson.SBAtom.hasRecordType` Signature: `property hasRecordType` Returns *True* when the atom’s record type is set ##### Property `samson.SBAtom.hasResidueSequenceNumber` Signature: `property hasResidueSequenceNumber` Returns *True* when the atom is in a residue and the chain’s ID is set ##### Property `samson.SBAtom.hasResonance` Signature: `property hasResonance` Returns *True* when the atom’s resonance is set ##### Property `samson.SBAtom.hasSYBYLType` Signature: `property hasSYBYLType` Returns *True* when the atom’s SYBYL type is set ##### Property `samson.SBAtom.hasSerialNumber` Signature: `property hasSerialNumber` Returns *True* when the atom’s serial number is set ##### Property `samson.SBAtom.hasStatusBit` Signature: `property hasStatusBit` Returns *True* when the atom’s status bit is set ##### Property `samson.SBAtom.hasSubstructureSequenceNumber` Signature: `property hasSubstructureSequenceNumber` Returns *True* when the atom is in a substructure and the chain’s ID is set ##### Property `samson.SBAtom.hasTemperatureFactor` Signature: `property hasTemperatureFactor` Returns *True* when the atom’s temperature factor is set ##### Property `samson.SBAtom.hasWaterFlag` Signature: `property hasWaterFlag` Returns *True* when the atom’s water flag is set ##### Property `samson.SBAtom.hybridization` Signature: `property hybridization` The atom’s hybridization ##### Property `samson.SBAtom.hybridizationString` Signature: `property hybridizationString` Returns the hybridization as a string ##### Property `samson.SBAtom.insertionCode` Signature: `property insertionCode` The atom’s insertion code ##### Property `samson.SBAtom.isActinide` Signature: `property isActinide` Returns *True* if the atom is actinide metal ##### Property `samson.SBAtom.isAlkaliMetal` Signature: `property isAlkaliMetal` Returns *True* if the atom is alkali metal ##### Property `samson.SBAtom.isAlkalineEarthMetal` Signature: `property isAlkalineEarthMetal` Returns *True* if the atom is alkaline earth metal ##### Property `samson.SBAtom.isDiatomicNonmetal` Signature: `property isDiatomicNonmetal` Returns *True* if the atom is diatomic nonmetal ##### Property `samson.SBAtom.isFixed` Signature: `property isFixed` Returns whether the node is fixed (opposite of mobile) ##### Property `samson.SBAtom.isFromAminoAcidBackbone` Signature: `property isFromAminoAcidBackbone` Returns *True* when the atom is from an amino acid backbone ##### Property `samson.SBAtom.isFromNucleicAcidBackbone` Signature: `property isFromNucleicAcidBackbone` Returns *True* when the atom is from a nucleic acid backbone ##### Property `samson.SBAtom.isHalogen` Signature: `property isHalogen` Returns *True* if the atom is halogen ##### Property `samson.SBAtom.isInAminoAcid` Signature: `property isInAminoAcid` Returns *True* when the atom is in an amino acid residue ##### Property `samson.SBAtom.isInBackbone` Signature: `property isInBackbone` Returns *True* when the atom is in a backbone ##### Property `samson.SBAtom.isInChain` Signature: `property isInChain` Returns *True* when the atom is in a chain ##### Property `samson.SBAtom.isInMolecule` Signature: `property isInMolecule` Returns *True* when the atom is in a molecule ##### Property `samson.SBAtom.isInNucleicAcid` Signature: `property isInNucleicAcid` Returns *True* when the atom is in a nucleic acid residue ##### Property `samson.SBAtom.isInResidue` Signature: `property isInResidue` Returns *True* when the atom is in a residue group ##### Property `samson.SBAtom.isInSegment` Signature: `property isInSegment` Returns *True* when the atom is in segment ##### Property `samson.SBAtom.isInSideChain` Signature: `property isInSideChain` Returns *True* when the atom is in a side chain ##### Property `samson.SBAtom.isInSubstructure` Signature: `property isInSubstructure` Returns *True* when the atom is in a substructure group ##### Property `samson.SBAtom.isLanthanide` Signature: `property isLanthanide` Returns *True* if the atom is lanthanide metal ##### Property `samson.SBAtom.isMetal` Signature: `property isMetal` Returns *True* if the atom is metal ##### Property `samson.SBAtom.isMetalloid` Signature: `property isMetalloid` Returns *True* if the atom is metalloid ##### Property `samson.SBAtom.isNobleGas` Signature: `property isNobleGas` Returns *True* if the atom is noble gas ##### Property `samson.SBAtom.isPolyatomicNonmetal` Signature: `property isPolyatomicNonmetal` Returns *True* if the atom is polyatomic nonmetal ##### Property `samson.SBAtom.isPostTransitionMetal` Signature: `property isPostTransitionMetal` Returns *True* if the atom is post-transition metal ##### Property `samson.SBAtom.isReactiveNonmetal` Signature: `property isReactiveNonmetal` Returns *True* if the atom is reactive nonmetal ##### Property `samson.SBAtom.isTransitionMetal` Signature: `property isTransitionMetal` Returns *True* if the atom is transition metal ##### Property `samson.SBAtom.metalSubcategory` Signature: `property metalSubcategory` Returns the atom’s subcategory type in the metal–metalloid–nonmetal trend ##### Property `samson.SBAtom.metalSubcategoryString` Signature: `property metalSubcategoryString` Returns the string representation of the atom’s subcategory type in the metal–metalloid–nonmetal trend ##### Property `samson.SBAtom.mobilityFlag` Signature: `property mobilityFlag` The atom’s mobility flag. Please note that this attribute has been marked as deprecated and will be removed in future versions of the software. We recommend that you update your code to use the recommended alternative attribute instead, which is *fixedFlag* ##### Property `samson.SBAtom.moleculeName` Signature: `property moleculeName` Returns the name of a molecule in which the atom is ##### Property `samson.SBAtom.name` Signature: `property name` The atom’s full name ##### Property `samson.SBAtom.occupancy` Signature: `property occupancy` The atom’s occupancy ##### Property `samson.SBAtom.oxidationState` Signature: `property oxidationState` The atom’s oxidation state ##### Property `samson.SBAtom.partialCharge` Signature: `property partialCharge` The atom’s partial charge ##### Property `samson.SBAtom.period` Signature: `property period` The atom’s period ##### Property `samson.SBAtom.residueName` Signature: `property residueName` Returns the name of a residue in which the atom is ##### Property `samson.SBAtom.residueSequenceNumber` Signature: `property residueSequenceNumber` Returns the sequence number of a residue in which the atom is ##### Property `samson.SBAtom.residueSequenceNumberString` Signature: `property residueSequenceNumberString` Returns the sequence number (as a string) of a residue in which the atom is ##### Property `samson.SBAtom.residueTypeString` Signature: `property residueTypeString` Returns the name of a residue in which the atom is ##### Property `samson.SBAtom.resonance` Signature: `property resonance` The atom’s resonance ##### Property `samson.SBAtom.segmentName` Signature: `property segmentName` Returns the name of a segment in which the atom is ##### Property `samson.SBAtom.serialNumber` Signature: `property serialNumber` The atom’s serial number ##### Property `samson.SBAtom.substructureName` Signature: `property substructureName` Returns the name of a substructure in which the atom is ##### Property `samson.SBAtom.substructureSequenceNumber` Signature: `property substructureSequenceNumber` Returns the sequence number of a substructure in which the atom is ##### Property `samson.SBAtom.substructureSequenceNumberString` Signature: `property substructureSequenceNumberString` Returns the sequence number (as a string) of a substructure in which the atom is ##### Property `samson.SBAtom.temperatureFactor` Signature: `property temperatureFactor` The atom’s temperature factor ##### Property `samson.SBAtom.vanDerWaalsRadius` Signature: `property vanDerWaalsRadius` The atom’s van der Waals radius ##### Property `samson.SBAtom.waterFlag` Signature: `property waterFlag` The atom’s water flag --- # SBBackbone Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeBackbone.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeBackbone.md !!! note "See also" SAMSON SDK: [SBMStructuralModelNodeBackbone](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNodeBackbone/#) ## API Reference #### Class `samson.SBBackbone` Signature: `class samson.SBBackbone(*args, **kwargs)` Bases: [`SBStructuralGroup`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeGroup.md#samson.SBStructuralGroup) This class describes a residue backbone. Overloaded function. 1. __init__(self: samson.SBBackbone) -> None Constructs a residue backbone. 2. __init__(self: samson.SBBackbone, name: str) -> None Constructs a residue backbone. ##### Method `samson.SBBackbone.getAlphaCarbon` Signature: `getAlphaCarbon(self: samson.SBBackbone) -> samson.SBAtom` Returns the alpha carbon of an amino acid backbone or *None* if no such atom found. ##### Method `samson.SBBackbone.getCarbon` Signature: `getCarbon(self: samson.SBBackbone) -> samson.SBAtom` Returns the carbon of an amino acid backbone or *None* if no such atom found. ##### Method `samson.SBBackbone.getCarbon1p` Signature: `getCarbon1p(self: samson.SBBackbone) -> samson.SBAtom` Returns the C1’ atom of a nucleic acid backbone or *None* if no such atom found. ##### Method `samson.SBBackbone.getCarbon3p` Signature: `getCarbon3p(self: samson.SBBackbone) -> samson.SBAtom` Returns the C3’ atom of a nucleic acid backbone or *None* if no such atom found. ##### Method `samson.SBBackbone.getCarbon4p` Signature: `getCarbon4p(self: samson.SBBackbone) -> samson.SBAtom` Returns the C4’ atom of a nucleic acid backbone or *None* if no such atom found. ##### Method `samson.SBBackbone.getCarbon5p` Signature: `getCarbon5p(self: samson.SBBackbone) -> samson.SBAtom` Returns the C5’ atom of a nucleic acid backbone or *None* if no such atom found. ##### Method `samson.SBBackbone.getNitrogen` Signature: `getNitrogen(self: samson.SBBackbone) -> samson.SBAtom` Returns the nitrogen of an amino acid backbone or *None* if no such atom found. ##### Method `samson.SBBackbone.getOxygen` Signature: `getOxygen(self: samson.SBBackbone) -> samson.SBAtom` Returns the oxygen of an amino acid backbone or *None* if no such atom found. ##### Method `samson.SBBackbone.getOxygen3p` Signature: `getOxygen3p(self: samson.SBBackbone) -> samson.SBAtom` Returns the O3’ atom of a nucleic acid backbone or *None* if no such atom found. ##### Method `samson.SBBackbone.getOxygen4p` Signature: `getOxygen4p(self: samson.SBBackbone) -> samson.SBAtom` Returns the O4’ atom of a nucleic acid backbone or *None* if no such atom found. ##### Method `samson.SBBackbone.getOxygen5p` Signature: `getOxygen5p(self: samson.SBBackbone) -> samson.SBAtom` Returns the O5’ atom of a nucleic acid backbone or *None* if no such atom found. ##### Method `samson.SBBackbone.getPhosphorus` Signature: `getPhosphorus(self: samson.SBBackbone) -> samson.SBAtom` Returns the phosphorus of a nucleic acid backbone or *None* if no such atom found. --- # SBBond Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeBond.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeBond.md This class describes a bond in a structural model. A bond has links to two [`atoms`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom): the left one and the right one. You can get these atoms as follows: ```python print(bond.leftAtom) print(bond.rightAtom) # get the atom opposite to the given one in a bond print(bond.getOppositeAtom(bond.leftAtom)) ``` You can also get some parameters of a bond, such as its type, length, or the middle point position: ```python print(bond.bondType) print(bond.getLength()) print(bond.getMidPoint()) ``` To construct a new bond you need to provide the left and the right atoms, and you can also specify the bond order (the default bond order is 1.0 corresponding to the single bond type): Caption: Create a bond ```python bond = SBBond(atom1, atom2, SBQuantity.dimensionless(2.0)) # make the operation undoable with SAMSON.holding("Add bond"): # hold the node for undo/redo SAMSON.hold(bond) # create the bond in SAMSON bond.create() structuralModel.addChild(bond) # add the bond to a parent of one of the atoms if atom1.getParent(): atom1.getParent().addChild(bond) ``` !!! note "See also" [Building](https://documentation.samson-connect.net/scripting/latest/docs/Building.md#ps-building) SAMSON SDK: [SBMStructuralModelNodeBond](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNodeBond/#) ## API Reference #### Class `samson.SBBond` Signature: `class samson.SBBond(*args, **kwargs)` Bases: [`SBStructuralNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNode.md#samson.SBStructuralNode) This class describes a bond in a structural model. Overloaded function. 1. __init__(self: samson.SBBond) -> None Constructs a bond 2. __init__(self: samson.SBBond, leftAtom: samson.SBAtom, rightAtom: samson.SBAtom, order: float = 1.0) -> None Constructs a bond between atoms *leftAtom* and *rightAtom* and a specific bond order. **Parameters** - **leftAtom** ([*samson.SBAtom*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)) – A first atom. - **rightAtom** ([*samson.SBAtom*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)) – A second atom. - **order** (*float**,**default=1.0*) – The bond order. 3. __init__(self: samson.SBBond, leftAtom: samson.SBAtom, rightAtom: samson.SBAtom, order: samson.SBQuantity.unitsSI) -> None Constructs a bond between atoms leftAtom and rightAtom and a specific bond order. **Parameters** - **leftAtom** ([*samson.SBAtom*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)) – A first atom. - **rightAtom** ([*samson.SBAtom*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)) – A second atom. - **order** (*samson.SBQuantity*) – The bond order. ##### Class `samson.SBBond.BondType` Signature: `class BondType(self: samson.SBBond.BondType, value: int)` Bases: `pybind11_object` **Members** - `Undefined`: The undefined bond type - `Single`: The single bond type - `Double`: The double bond type - `Triple`: The triple bond type - `Amide`: The amide bond type - `Aromatic`: The aromatic bond type - `Dummy`: The dummy bond type ##### Method `samson.SBBond.clearCustomType` Signature: `clearCustomType(self: samson.SBBond) -> None` Clears the bond’s custom type. ##### Method `samson.SBBond.clearStatusBit` Signature: `clearStatusBit(self: samson.SBBond) -> None` Clears the bond’s status bit ##### Method `samson.SBBond.getBondTypeAsString` Signature: `getBondTypeAsString(self: samson.SBBond) -> str` Returns the string representation of the type of the bond. ##### Method `samson.SBBond.getBondTypeString` Signature: `static getBondTypeString(bondType: samson.SBBond.BondType) -> str` Returns the string corresponding to the *bondType*. ##### Method `samson.SBBond.getDisplacement` Signature: `getDisplacement(self: samson.SBBond) -> samson.SBPhysicalVector3` Gets the displacement used for display when multiple bond rendering is turned on. ##### Method `samson.SBBond.getLength` Signature: `getLength(self: samson.SBBond) -> samson.SBQuantity.unitsSI` Gets the length of the bond. ##### Method `samson.SBBond.getMidPoint` Signature: `getMidPoint(self: samson.SBBond) -> samson.SBPhysicalVector3` Gets the mid point of the bond. ##### Method `samson.SBBond.getOppositeAtom` Signature: `getOppositeAtom(self: samson.SBBond, atom: samson.SBAtom) -> samson.SBAtom` Returns a pointer to the atom opposite to *atom*, when *atom* is either the left atom or the right atom of the bond. If the *atom* is not the left or right atom then it return *None*. **Parameters** - **atom** ([*samson.SBAtom*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)) – An atom **Returns** - An atom opposite to *atom* in the bond **Return type** - [samson.SBAtom](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom) ##### Method `samson.SBBond.isAmideBond` Signature: `isAmideBond(self: samson.SBBond) -> bool` Returns *True* if the bond is an amide bond, i.e. between a Nitrogen and a carbonyl Carbon: N-C=O. ##### Method `samson.SBBond.isCarbonylBond` Signature: `isCarbonylBond(self: samson.SBBond) -> bool` Returns *True* if the bond is a carbonyl bond (C=O). ##### Method `samson.SBBond.isEsterBond` Signature: `isEsterBond(self: samson.SBBond) -> bool` Returns *True* if the bond is an ester bond, i.e. between an Oxygen and a carbonyl Carbon: O-C=O. ##### Method `samson.SBBond.isLinking` Signature: `isLinking(*args, **kwargs)` Overloaded function. 1. isLinking(self: samson.SBBond, elementType: samson.SBElement.ElementType) -> bool Returns *True* if and only if at least one of the atoms that the bond links is of element type *elementType*. 2. isLinking(self: samson.SBBond, nodeIndexer: samson.SBNodeIndexer) -> bool Returns *True* if and only if either atom is in *nodeIndexer*, or descends from a node of *nodeIndexer*. ##### Method `samson.SBBond.isPrimaryAmideBond` Signature: `isPrimaryAmideBond(self: samson.SBBond) -> bool` Returns *True* if the bond is a primary amide bond, i.e. an amid bond where the Nitrogen atom has exactly one non-Hydronen bond. ##### Method `samson.SBBond.isSecondaryAmideBond` Signature: `isSecondaryAmideBond(self: samson.SBBond) -> bool` Returns *True* if the bond is a secondary amide bond, i.e. an amid bond where the Nitrogen atom has exactly two non-Hydronen bonds. ##### Method `samson.SBBond.isTertiaryAmideBond` Signature: `isTertiaryAmideBond(self: samson.SBBond) -> bool` Returns *True* if the bond is a tertiary amide bond, i.e. an amid bond where the Nitrogen atom has exactly three non-Hydronen bonds. ##### Attribute `samson.SBBond.Amide` Signature: `Amide = ` ##### Attribute `samson.SBBond.Aromatic` Signature: `Aromatic = ` ##### Attribute `samson.SBBond.Double` Signature: `Double = ` ##### Attribute `samson.SBBond.Dummy` Signature: `Dummy = ` ##### Attribute `samson.SBBond.Single` Signature: `Single = ` ##### Attribute `samson.SBBond.Triple` Signature: `Triple = ` ##### Attribute `samson.SBBond.Undefined` Signature: `Undefined = ` ##### Property `samson.SBBond.bondType` Signature: `property bondType` The bond type. ##### Property `samson.SBBond.customType` Signature: `property customType` The bond’s custom type. ##### Property `samson.SBBond.hasCustomType` Signature: `property hasCustomType` Returns *True* when the bond’s custom type is set. A read-only property. ##### Property `samson.SBBond.hasStatusBit` Signature: `property hasStatusBit` Returns *True* when the bond’s status bit is set. A read-only property. ##### Property `samson.SBBond.leftAtom` Signature: `property leftAtom` Returns a pointer to the left atom. ##### Property `samson.SBBond.maximumOrder` Signature: `property maximumOrder` The maximum allowed bond order in inspectors. ##### Property `samson.SBBond.minimumOrder` Signature: `property minimumOrder` The minimum allowed bond order in inspectors. ##### Property `samson.SBBond.order` Signature: `property order` The bond order. ##### Property `samson.SBBond.rightAtom` Signature: `property rightAtom` Returns a pointer to the right atom. ##### Property `samson.SBBond.statusBit` Signature: `property statusBit` The bond’s status bit. --- # SBChain Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeChain.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeChain.md !!! note "See also" SAMSON SDK: [SBMStructuralModelNodeChain](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNodeChain/#) ## API Reference #### Class `samson.SBChain` Signature: `class samson.SBChain(*args, **kwargs)` Bases: [`SBStructuralGroup`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeGroup.md#samson.SBStructuralGroup) This class describes a chain in a structural model. Overloaded function. 1. __init__(self: samson.SBChain) -> None Constructs a chain. 2. __init__(self: samson.SBChain, name: str) -> None Constructs a chain with the given name. ##### Property `samson.SBChain.chainID` Signature: `property chainID` The chain ID. ##### Property `samson.SBChain.hasChainID` Signature: `property hasChainID` Returns whether the chain ID is set. --- # SBStructuralGroup Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeGroup.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeGroup.md !!! note "See also" SAMSON SDK: [SBMStructuralModelNodeGroup](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNodeGroup/#) ## API Reference #### Class `samson.SBStructuralGroup` Signature: `class samson.SBStructuralGroup(*args, **kwargs)` Bases: [`SBStructuralNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNode.md#samson.SBStructuralNode) This class describes a structural group. Overloaded function. 1. __init__(self: samson.SBStructuralGroup) -> None Constructs a structural group 2. __init__(self: samson.SBStructuralGroup, arg0: str) -> None Constructs a structural group. ##### Method `samson.SBStructuralGroup.clearComment` Signature: `clearComment(self: samson.SBStructuralGroup) -> None` Clears the group’s comment ##### Method `samson.SBStructuralGroup.clearStatusBit` Signature: `clearStatusBit(self: samson.SBStructuralGroup) -> None` Clears the group’s status bit ##### Method `samson.SBStructuralGroup.clearStructuralID` Signature: `clearStructuralID(self: samson.SBStructuralGroup) -> None` Clears the structural group’s id ##### Method `samson.SBStructuralGroup.getNameWithoutID` Signature: `getNameWithoutID(self: samson.SBStructuralGroup) -> str` Returns the name of the structural group without the trailing ID separated by a whitespace ##### Method `samson.SBStructuralGroup.isMonatomicIon` Signature: `isMonatomicIon(self: samson.SBStructuralGroup) -> bool` Returns *True* if the structural group is a monatomic ion, i.e. if it contains a single atom of a particular type common to monatomic ions ##### Method `samson.SBStructuralGroup.isWater` Signature: `isWater(self: samson.SBStructuralGroup) -> bool` Returns *True* if the structural group is a water molecule ##### Property `samson.SBStructuralGroup.comment` Signature: `property comment` The group’s comment ##### Property `samson.SBStructuralGroup.hasComment` Signature: `property hasComment` Returns *True* when the group’s comment is set ##### Property `samson.SBStructuralGroup.hasStatusBit` Signature: `property hasStatusBit` Returns *True* when the group’s status bit is set ##### Property `samson.SBStructuralGroup.hasStructuralID` Signature: `property hasStructuralID` Returns *True* when the structural group’s id is set ##### Property `samson.SBStructuralGroup.statusBit` Signature: `property statusBit` The group’s status bit ##### Property `samson.SBStructuralGroup.structuralID` Signature: `property structuralID` The structural group’s id --- # SBHydrogenBond Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeHydrogenBond.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeHydrogenBond.md !!! note "See also" SAMSON SDK: [SBMStructuralModelNodeHydrogenBond](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNodeHydrogenBond/#) ## API Reference #### Class `samson.SBHydrogenBond` Signature: `class samson.SBHydrogenBond(*args, **kwargs)` Bases: [`SBBond`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeBond.md#samson.SBBond) This class describes a Hydrogen-bond in a structural model Overloaded function. 1. __init__(self: samson.SBHydrogenBond) -> None Constructs a Hydrogen-bond 2. __init__(self: samson.SBHydrogenBond, acceptor: samson.SBAtom, donor: samson.SBAtom, hydrogen: samson.SBAtom = None) -> None Constructs a H-bond ##### Method `samson.SBHydrogenBond.isLinking` Signature: `isLinking(self: samson.SBHydrogenBond, nodeIndexer: samson.SBNodeIndexer) -> bool` Returns *True* if and only if donor and acceptor atoms are in nodeIndexer, or descends from a node of nodeIndexer ##### Property `samson.SBHydrogenBond.acceptor` Signature: `property acceptor` Returns a pointer to the acceptor atom ##### Property `samson.SBHydrogenBond.angle` Signature: `property angle` Returns the donor-hydrogen-acceptor angle ##### Property `samson.SBHydrogenBond.donor` Signature: `property donor` Returns a pointer to the donor atom ##### Property `samson.SBHydrogenBond.donorAcceptorDistance` Signature: `property donorAcceptorDistance` Returns the donor-acceptor distance ##### Property `samson.SBHydrogenBond.donorHydrogenDistance` Signature: `property donorHydrogenDistance` Returns the donor-hydrogen distance ##### Property `samson.SBHydrogenBond.hydrogen` Signature: `property hydrogen` Returns a pointer to the hydrogen atom ##### Property `samson.SBHydrogenBond.hydrogenAcceptorDistance` Signature: `property hydrogenAcceptorDistance` Returns the hydrogen-acceptor distance --- # SBHydrogenBondGroup Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeHydrogenBondGroup.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeHydrogenBondGroup.md !!! note "See also" SAMSON SDK: [SBMStructuralModelNodeHydrogenBondGroup](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNodeHydrogenBondGroup/#) With `SBHydrogenBondGroup` you can: - compute [`hydrogen-bonds`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeHydrogenBond.md#samson.SBHydrogenBond) (H-bonds) for specified systems, - process, remove, and add H-bonds. !!! note "See also" [`SBHydrogenBond`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeHydrogenBond.md#samson.SBHydrogenBond) !!! note [`H-bonds`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeHydrogenBond.md#samson.SBHydrogenBond) are stored within an H-bond group, which itself is stored in a [`structural model`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md#samson.SBStructuralModel). Below are sample codes to add H-bonds based on a [`structural model`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md#samson.SBStructuralModel) or between receptors and ligands (see [Selecting nodes](https://documentation.samson-connect.net/scripting/latest/docs/Selecting.md#ps-selecting) for more information on how to get nodes): Caption: Create hydrogen-bonds between atoms in a structural model ```python # get an indexer of all structural models in the active document structural_model_indexer = SAMSON.getNodes("node.type structuralModel") # get the first structural model structural_model = structural_model_indexer[0] with SAMSON.holding("Add H-bonds"): # make it undoable # create an H-bond group object between atoms in a single node indexer h_bond_group = SBHydrogenBondGroup("H-bonds", structural_model_indexer) # compute H-bonds h_bond_group.update() # hold the node for undo/redo SAMSON.hold(h_bond_group) # create the H-bond group h_bond_group.create() # add the node to the active document structural_model.addChild(h_bond_group) ``` Caption: Create hydrogen-bonds between receptors and ligands ```python # get an indexer of all structural models in the active document structural_model_indexer = SAMSON.getNodes("node.type structuralModel") # get the first structural model structural_model = structural_model_indexer[0] # get an indexer with receptor and ligand nodes receptor_indexer = SAMSON.getNodes("node.category receptor") ligand_indexer = SAMSON.getNodes("node.category ligand") with SAMSON.holding("Add H-bonds"): # make it undoable # create an H-bond group object between atoms in two node indexers h_bond_group = SBHydrogenBondGroup("H-bonds between receptor and ligand", receptor_indexer, ligand_indexer) # compute H-bonds h_bond_group.update() # hold the node for undo/redo SAMSON.hold(h_bond_group) # create the H-bond group h_bond_group.create() # add the node to the active document structural_model.addChild(h_bond_group) ``` You can remove H-bonds from an H-bond group based on some criteria, e.g., based on the donor-acceptor distance: Caption: Remove H-bonds from an H-bonds group based on the donor-acceptor distance ```python # get H-bonds from the H-bond group, excluding the H-bond group itself hbond_indexer = h_bond_group.getNodes("not n.t hbg") print(f"The total number of computed H-bonds is {len(hbond_indexer)}") with SAMSON.holding("Remove some H-bonds"): # make it undoable for hbond in hbond_indexer: # check the donor-acceptor distance if hbond.donorAcceptorDistance > SBQuantity.angstrom(3.5): #print(hbond) h_bond_group.removeChild(hbond) hbond_indexer = h_bond_group.getNodes("not n.t hbg") print(f"The total number of computed H-bonds is {len(hbond_indexer)}") ``` You can also add new H-bonds in an H-bond group, as follows: Caption: Add an H-bond in an H-bond group ```python with SAMSON.holding("Add new H-bonds"): # make it undoable # create an H-bond object based on already defined acceptor, donor, # and (optionally) hydrogen atoms hbond = SBHydrogenBond(acceptor, donor) #, hydrogen # hold the node for undo/redo SAMSON.hold(hbond) # create the H-bond hbond.create() # add the H-bond in the H-bond group h_bond_group.addChild(hbond) ``` ## API Reference #### Class `samson.SBHydrogenBondGroup` Signature: `class samson.SBHydrogenBondGroup(*args, **kwargs)` Bases: [`SBStructuralGroup`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeGroup.md#samson.SBStructuralGroup) This class describes a Hydrogen-bond group in a structural model Overloaded function. 1. __init__(self: samson.SBHydrogenBondGroup) -> None Constructs a Hydrogen-bond group 2. __init__(self: samson.SBHydrogenBondGroup, name: str) -> None Constructs a Hydrogen-bond group with the given name 3. __init__(self: samson.SBHydrogenBondGroup, name: str, nodeIndexer: samson.SBNodeIndexer) -> None Constructs a Hydrogen-bond group with H-bonds within the system present in *nodeIndexer* 4. __init__(self: samson.SBHydrogenBondGroup, name: str, nodeIndexer1: samson.SBNodeIndexer, nodeIndexer2: samson.SBNodeIndexer) -> None Constructs a Hydrogen-bond group with H-bonds between two systems present in *nodeIndexer1* and *nodeIndexer2* ##### Class `samson.SBHydrogenBondGroup.HydrogenBondSystemSetupType` Signature: `class HydrogenBondSystemSetupType(self: samson.SBHydrogenBondGroup.HydrogenBondSystemSetupType, value: int)` Bases: `pybind11_object` **Members** - `SingleSystem`: Within a single system - `BetweenTwoSystems`: Between two systems ##### Method `samson.SBHydrogenBondGroup.getAcceptorElementsString` Signature: `getAcceptorElementsString(self: samson.SBHydrogenBondGroup) -> str` Returns a string with acceptor element types ##### Method `samson.SBHydrogenBondGroup.getAngleThreshold` Signature: `getAngleThreshold(self: samson.SBHydrogenBondGroup) -> samson.SBQuantity.unitsSI` Returns the H-bond group’s D-H-A angle threshold ##### Method `samson.SBHydrogenBondGroup.getDonorBorneHydrogen` Signature: `getDonorBorneHydrogen(self: samson.SBHydrogenBondGroup, donor: samson.SBAtom, acceptor: samson.SBAtom, angleThreshold: samson.SBQuantity.unitsSI) -> samson.SBAtom` Returns a donor-borne hydrogen atom ##### Method `samson.SBHydrogenBondGroup.getDonorElementsString` Signature: `getDonorElementsString(self: samson.SBHydrogenBondGroup) -> str` Returns a string with donor element types ##### Method `samson.SBHydrogenBondGroup.getHydrogenBondAtoms` Signature: `getHydrogenBondAtoms(self: samson.SBHydrogenBondGroup) -> samson.SBNodeIndexer` Gets atoms (acceptors, donors, hydrogens) of visible hydrogen bonds ##### Method `samson.SBHydrogenBondGroup.getHydrogenBondSystemSetupType` Signature: `getHydrogenBondSystemSetupType(self: samson.SBHydrogenBondGroup) -> samson.SBHydrogenBondGroup.HydrogenBondSystemSetupType` Returns the current hydrogen bond system setup type ##### Method `samson.SBHydrogenBondGroup.getNumberOfVisibleHydrogenBonds` Signature: `getNumberOfVisibleHydrogenBonds(self: samson.SBHydrogenBondGroup) -> int` Returns the number of visible hydrogen bonds ##### Method `samson.SBHydrogenBondGroup.getSystem1` Signature: `getSystem1(self: samson.SBHydrogenBondGroup) -> samson.SBNodeIndexer` Returns an indexer of nodes in the system 1 ##### Method `samson.SBHydrogenBondGroup.getSystem2` Signature: `getSystem2(self: samson.SBHydrogenBondGroup) -> samson.SBNodeIndexer` Returns an indexer of nodes in the system 2 ##### Method `samson.SBHydrogenBondGroup.getThresholdDistanceOfModerateHBond` Signature: `getThresholdDistanceOfModerateHBond(self: samson.SBHydrogenBondGroup) -> samson.SBQuantity.unitsSI` Returns the H-bond group’s threshold distance for moderate H-bonds ##### Method `samson.SBHydrogenBondGroup.getThresholdDistanceOfStrongHBond` Signature: `getThresholdDistanceOfStrongHBond(self: samson.SBHydrogenBondGroup) -> samson.SBQuantity.unitsSI` Returns the H-bond group’s threshold distance for strong H-bonds ##### Method `samson.SBHydrogenBondGroup.getThresholdDistanceOfWeakHBond` Signature: `getThresholdDistanceOfWeakHBond(self: samson.SBHydrogenBondGroup) -> samson.SBQuantity.unitsSI` Returns the H-bond group’s threshold distance for weak H-bonds ##### Method `samson.SBHydrogenBondGroup.resetDefaultParameters` Signature: `resetDefaultParameters(self: samson.SBHydrogenBondGroup) -> None` Resets the H-bond group parameters to their default values ##### Method `samson.SBHydrogenBondGroup.selectHydrogenBondAtoms` Signature: `selectHydrogenBondAtoms(self: samson.SBHydrogenBondGroup) -> None` Selects atoms (acceptors, donors, hydrogens) of visible hydrogen bonds ##### Method `samson.SBHydrogenBondGroup.setAngleThreshold` Signature: `setAngleThreshold(self: samson.SBHydrogenBondGroup, angle: samson.SBQuantity.unitsSI) -> None` Sets the H-bond group’s D-H-A angle threshold to *angle* ##### Method `samson.SBHydrogenBondGroup.setSystem` Signature: `setSystem(*args, **kwargs)` Overloaded function. 1. setSystem(self: samson.SBHydrogenBondGroup, nodeIndexer: samson.SBNodeIndexer) -> None Sets a single system 2. setSystem(self: samson.SBHydrogenBondGroup, nodeIndexer1: samson.SBNodeIndexer, nodeIndexer2: samson.SBNodeIndexer) -> None Sets two systems ##### Method `samson.SBHydrogenBondGroup.setThresholdDistanceOfModerateHBond` Signature: `setThresholdDistanceOfModerateHBond(self: samson.SBHydrogenBondGroup, distance: samson.SBQuantity.unitsSI) -> None` Sets the H-bond group’s threshold distance for moderate H-bonds to *distance* ##### Method `samson.SBHydrogenBondGroup.setThresholdDistanceOfStrongHBond` Signature: `setThresholdDistanceOfStrongHBond(self: samson.SBHydrogenBondGroup, distance: samson.SBQuantity.unitsSI) -> None` Sets the H-bond group’s threshold distance for strong H-bonds to *distance* ##### Method `samson.SBHydrogenBondGroup.setThresholdDistanceOfWeakHBond` Signature: `setThresholdDistanceOfWeakHBond(self: samson.SBHydrogenBondGroup, distance: samson.SBQuantity.unitsSI) -> None` Sets the H-bond group’s threshold distance for weak H-bonds to *distance* ##### Method `samson.SBHydrogenBondGroup.update` Signature: `update(self: samson.SBHydrogenBondGroup) -> None` Updates the hydrogen bonds in the hydrogen bond group ##### Attribute `samson.SBHydrogenBondGroup.BetweenTwoSystems` Signature: `BetweenTwoSystems = ` ##### Attribute `samson.SBHydrogenBondGroup.SingleSystem` Signature: `SingleSystem = ` ##### Property `samson.SBHydrogenBondGroup.hideLeastProbableHBondsFlag` Signature: `property hideLeastProbableHBondsFlag` Whether the least probable H-bonds should be hidden ##### Property `samson.SBHydrogenBondGroup.showModerateHBondsFlag` Signature: `property showModerateHBondsFlag` Whether to show the moderate H-bonds ##### Property `samson.SBHydrogenBondGroup.showStrongHBondsFlag` Signature: `property showStrongHBondsFlag` Whether to show the strong H-bonds ##### Property `samson.SBHydrogenBondGroup.showWeakHBondsFlag` Signature: `property showWeakHBondsFlag` Whether to show the weak H-bonds --- # SBMolecule Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeMolecule.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeMolecule.md !!! note "See also" SAMSON SDK: [SBMStructuralModelNodeMolecule](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNodeMolecule/#) ## API Reference #### Class `samson.SBMolecule` Signature: `class samson.SBMolecule(*args, **kwargs)` Bases: [`SBStructuralGroup`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeGroup.md#samson.SBStructuralGroup) This class describes a molecule in a structural model. Overloaded function. 1. __init__(self: samson.SBMolecule) -> None Constructs a molecule. 2. __init__(self: samson.SBMolecule, name: str) -> None Constructs a molecule with the given name. --- # SBResidue Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeResidue.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeResidue.md !!! note "See also" SAMSON SDK: [SBMStructuralModelNodeResidue](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNodeResidue/#) ## API Reference #### Class `samson.SBResidue` Signature: `class samson.SBResidue(*args, **kwargs)` Bases: [`SBStructuralGroup`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeGroup.md#samson.SBStructuralGroup) This class describes a residue in a structural model. Overloaded function. 1. __init__(self: samson.SBResidue) -> None Constructs a residue. 2. __init__(self: samson.SBResidue, name: str) -> None Constructs a residue with the given name. ##### Class `samson.SBResidue.HydrophobicityScale` Signature: `class HydrophobicityScale(self: samson.SBResidue.HydrophobicityScale, value: int)` Bases: `pybind11_object` **Members** - `KyteDoolittle1982`: A hydrophobicity scale of Kyte J, Doolittle RF, A simple method for displaying the hydropathic character of a protein, J Mol Biol. 1982. - `SeredaEtAl1994`: A hydrophobicity scale of Sereda TJ et al. 1994. - `MoneraEtAl1995`: A hydrophobicity scale of Monera et al. 1995. - `WimleyWhite1996`: A hydrophobicity scale of Wimley WC, White SH, Experimentally determined hydrophobicity scale for proteins at membrane interfaces, Nat Struct Biol. 1996. - `HessaEtAl2005`: A hydrophobicity scale of Hessa T et al. Recognition of transmembrane helices by the endoplasmic reticulum translocon. Nature. 2005. - `ZhaoLondon2006`: A hydrophobicity scale of Zhao G, London E. An amino acid transmembrane tendency scale that approaches the theoretical limit to accuracy for prediction of transmembrane helices : relationship to biological hydrophobicity. Protein Sci. 2006. - `MoonFleming2011`: A hydrophobicity scale of Moon CP, Fleming KG. Side chain hydrophobicity scale derived from transmembrane protein folding into lipid bilayers. Proc Natl Acad Sci USA. 2011. ##### Class `samson.SBResidue.ResidueType` Signature: `class ResidueType(self: samson.SBResidue.ResidueType, value: int)` Bases: `pybind11_object` **Members** - `Undefined`: Undefined residue type - `ALA`: Alanine - `ARG`: Arginine - `ASP`: Aspartic acid - `ASN`: Asparagine - `VAL`: Valine - `HIS`: Histidine - `GLY`: Glycine - `GLU`: Glutamic acid - `GLN`: Glutamine - `ILE`: Isoleucine - `LEU`: Leucine - `LYS`: Lysine - `MET`: Methionine - `PRO`: Proline - `SER`: Serine - `TYR`: Tyrosine - `THR`: Threonine - `TRP`: Tryptophan - `PHE`: Phenylalanine - `CYS`: Cysteine - `ASX`: ASN or ASP (Asparagine or Aspartic acid) - `GLX`: GLN or GLU (Glutamine or Glutamic acid) - `XLE`: LEU or ILE (Leucine or Isoleucine) - `XAA`: Unknown residue type - `SEC`: Selenocysteine - `PYL`: Pyrrolysine - `A`: Adenosine-5’-monophosphate - `C`: Cytidine-5’-monophosphate - `G`: Guanosine-5’-monophosphate - `U`: Uridine-5’-monophosphate - `I`: Inosinic acid - `DA`: 2’-deoxyadenosine-5’-monophosphate - `DC`: 2’-deoxycytidine-5’-monophosphate - `DG`: 2’-deoxyguanosine-5’-monophosphate - `DT`: Thymidine-5’-monophosphate - `DI`: 2’-deoxyinosine-5’-monophosphate ##### Class `samson.SBResidue.SecondaryStructureType` Signature: `class SecondaryStructureType(self: samson.SBResidue.SecondaryStructureType, value: int)` Bases: `pybind11_object` **Members** - `Unstructured`: Unstructured secondary structure element - `Alpha`: Alpha helix secondary structure element - `Beta`: Beta strand/sheet secondary structure element ##### Class `samson.SBResidue.SideChainCharge` Signature: `class SideChainCharge(self: samson.SBResidue.SideChainCharge, value: int)` Bases: `pybind11_object` **Members** - `UndefinedSideChainCharge`: Undefined side chain charge - `Negative`: Residue has a side chain with negative charge - `Neutral`: Residue has a side chain with neutral charge - `Positive`: Residue has a side chain with positive charge ##### Class `samson.SBResidue.SideChainPolarity` Signature: `class SideChainPolarity(self: samson.SBResidue.SideChainPolarity, value: int)` Bases: `pybind11_object` **Members** - `UndefinedSideChainPolarity`: Undefined side chain polarity - `Nonpolar`: Residue has a nonpolar side chain - `Polar`: Residue has a polar side chain - `AcidicPolar`: Residue has a side chain with acidic polarity - `BasicPolar`: Residue has a side chain with basic polarity ##### Method `samson.SBResidue.addHydrogensByResidueType` Signature: `addHydrogensByResidueType(self: samson.SBResidue) -> int` Adds hydrogen atoms based on the residue type. ##### Method `samson.SBResidue.computeAminoAcidChi1Angle` Signature: `computeAminoAcidChi1Angle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the *chi1* angle (in degrees) for the amino acid residue’s side chain. ##### Method `samson.SBResidue.computeAminoAcidChi2Angle` Signature: `computeAminoAcidChi2Angle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the *chi2* angle (in degrees) for the amino acid residue’s side chain. ##### Method `samson.SBResidue.computeAminoAcidChi3Angle` Signature: `computeAminoAcidChi3Angle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the *chi3* angle (in degrees) for the amino acid residue’s side chain. ##### Method `samson.SBResidue.computeAminoAcidChi4Angle` Signature: `computeAminoAcidChi4Angle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the *chi4* angle (in degrees) for the amino acid residue’s side chain. ##### Method `samson.SBResidue.computeAminoAcidChi5Angle` Signature: `computeAminoAcidChi5Angle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the *chi5* angle (in degrees) for the amino acid residue’s side chain. ##### Method `samson.SBResidue.computeAminoAcidPhiAngle` Signature: `computeAminoAcidPhiAngle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the *phi* dihedral angle (in degrees) for the amino acid residue’s backbone. ##### Method `samson.SBResidue.computeAminoAcidPsiAngle` Signature: `computeAminoAcidPsiAngle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the *psi* dihedral angle (in degrees) for the amino acid residue’s backbone. ##### Method `samson.SBResidue.computeNucleicAcidAlphaAngle` Signature: `computeNucleicAcidAlphaAngle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the alpha (O3’(i-1)-P-O5’-C5’) dihedral angle (in degrees) for the nucleic acid’s backbone. ##### Method `samson.SBResidue.computeNucleicAcidBetaAngle` Signature: `computeNucleicAcidBetaAngle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the beta (P-O5’-C5’-C4’) dihedral angle (in degrees) for the nucleic acid’s backbone. ##### Method `samson.SBResidue.computeNucleicAcidChiAngle` Signature: `computeNucleicAcidChiAngle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the chi dihedral angle (in degrees) for the nucleic acid’s backbone. ##### Method `samson.SBResidue.computeNucleicAcidDeltaAngle` Signature: `computeNucleicAcidDeltaAngle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the delta (C5’-C4’-C3’-O3’) dihedral angle (in degrees) for the nucleic acid’s backbone. ##### Method `samson.SBResidue.computeNucleicAcidEpsilonAngle` Signature: `computeNucleicAcidEpsilonAngle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the epsilon (C4’-C3’-O3’-P(i+1)) dihedral angle (in degrees) for the nucleic acid’s backbone. ##### Method `samson.SBResidue.computeNucleicAcidGammaAngle` Signature: `computeNucleicAcidGammaAngle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the gamma (O5’-C5’-C4’-C3’) dihedral angle (in degrees) for the nucleic acid’s backbone. ##### Method `samson.SBResidue.computeNucleicAcidZetaAngle` Signature: `computeNucleicAcidZetaAngle(self: samson.SBResidue) -> samson.SBQuantity.unitsSI` Computes the zeta (C3’-O3’-P(i+1)-O5’(i+1)) dihedral angle (in degrees) for the nucleic acid’s backbone. ##### Method `samson.SBResidue.createCovalentBondsByResidueType` Signature: `createCovalentBondsByResidueType(self: samson.SBResidue) -> int` Sets the order of covalent bonds for the atoms belonging to the residue according to the residue type, regardless of inter-atomic distances. ##### Method `samson.SBResidue.fixTerminal` Signature: `fixTerminal(self: samson.SBResidue, addMissingTerminalAtoms: bool = True) -> bool` Fixes positions of terminal atoms in a terminal amino acid residue. ##### Method `samson.SBResidue.getAminoAcidOneLetterCode` Signature: `static getAminoAcidOneLetterCode(residueType: samson.SBResidue.ResidueType) -> str` Returns one letter code of the amino acid residue *residueType*. ##### Method `samson.SBResidue.getBackbone` Signature: `getBackbone(self: samson.SBResidue) -> samson.SBBackbone` Returns the residue’s backbone. ##### Method `samson.SBResidue.getDissociationConstant1` Signature: `static getDissociationConstant1(residueType: samson.SBResidue.ResidueType) -> float` Returns the pKa1 value (the negative of the logarithm of the dissociation constant for the carboxyl functional group, -COOH) for the residue *residueType*. ##### Method `samson.SBResidue.getDissociationConstant2` Signature: `static getDissociationConstant2(residueType: samson.SBResidue.ResidueType) -> float` Returns the pKa2 value (the negative of the logarithm of the dissociation constant for the amino functional group, -NH3) for the residue *residueType*. ##### Method `samson.SBResidue.getHydrophobicity` Signature: `getHydrophobicity(*args, **kwargs)` Overloaded function. 1. getHydrophobicity(self: samson.SBResidue) -> float Returns the residue’s hydrophobicity in the current hydrophobicity scale. 2. getHydrophobicity(self: samson.SBResidue, hydrophobicityScale: samson.SBResidue.HydrophobicityScale) -> float Returns the residue’s hydrophobicity in the given hydrophobicity scale *hydrophobicityScale*. ##### Method `samson.SBResidue.getHydrophobicityForResidueType` Signature: `static getHydrophobicityForResidueType(residueType: samson.SBResidue.ResidueType, hydrophobicityScale: samson.SBResidue.HydrophobicityScale) -> float` Returns the hydrophobicity value for the residue *residueType* in the hydrophobicity scale *hydrophobicityScale*. ##### Method `samson.SBResidue.getHydrophobicityScaleString` Signature: `static getHydrophobicityScaleString(hydrophobicityScale: samson.SBResidue.HydrophobicityScale) -> str` Returns the hydrophobicity scale *hydrophobicityScale* as a string. ##### Method `samson.SBResidue.getIsoelectricPointPH` Signature: `static getIsoelectricPointPH(residueType: samson.SBResidue.ResidueType) -> float` Returns the pI value (the pH at the isoelectric point) for the residue *residueType*. ##### Method `samson.SBResidue.getNextAminoAcid` Signature: `getNextAminoAcid(self: samson.SBResidue) -> samson.SBResidue` Returns the next amino-acid residue in sequence. ##### Method `samson.SBResidue.getNextNucleicAcid` Signature: `getNextNucleicAcid(self: samson.SBResidue) -> samson.SBResidue` Returns the next nucleic-acid residue in sequence. ##### Method `samson.SBResidue.getNextResidue` Signature: `getNextResidue(self: samson.SBResidue) -> samson.SBResidue` Returns the next residue in sequence. ##### Method `samson.SBResidue.getPreviousAminoAcid` Signature: `getPreviousAminoAcid(self: samson.SBResidue) -> samson.SBResidue` Returns the previous amino-acid residue in sequence. ##### Method `samson.SBResidue.getPreviousNucleicAcid` Signature: `getPreviousNucleicAcid(self: samson.SBResidue) -> samson.SBResidue` Returns the previous nucleic-acid residue in sequence. ##### Method `samson.SBResidue.getPreviousResidue` Signature: `getPreviousResidue(self: samson.SBResidue) -> samson.SBResidue` Returns the previous residue in sequence. ##### Method `samson.SBResidue.getResidueTypeFromAminoAcidOneLetterCode` Signature: `static getResidueTypeFromAminoAcidOneLetterCode(code: str) -> samson.SBResidue.ResidueType` Returns the amino acid residue type from the one letter code, *code*, of an amino acid residue. ##### Method `samson.SBResidue.getResidueTypeFromString` Signature: `static getResidueTypeFromString(residueTypeString: str) -> samson.SBResidue.ResidueType` Returns the residue’s type based on the given string. ##### Method `samson.SBResidue.getResidueTypeFullName` Signature: `static getResidueTypeFullName(residueType: samson.SBResidue.ResidueType) -> str` Returns the full name of the residue type *residueType*. ##### Method `samson.SBResidue.getResidueTypeString` Signature: `static getResidueTypeString(residueType: samson.SBResidue.ResidueType) -> str` Returns the string representation of the residue type *residueType*. ##### Method `samson.SBResidue.getSecondaryStructureTypeString` Signature: `getSecondaryStructureTypeString(self: samson.SBResidue, secondaryStructureType: samson.SBResidue.SecondaryStructureType) -> str` Returns the secondary structure type *secondaryStructureType* as a string. ##### Method `samson.SBResidue.getSideChain` Signature: `getSideChain(self: samson.SBResidue) -> SBMStructuralModelNodeSideChain` Returns the residue’s side chain. ##### Method `samson.SBResidue.getSideChainCharge` Signature: `static getSideChainCharge(residueType: samson.SBResidue.ResidueType) -> samson.SBResidue.SideChainCharge` Returns the residue’s side chain charge for the residue *residueType*. ##### Method `samson.SBResidue.getSideChainChargeString` Signature: `static getSideChainChargeString(sideChainCharge: samson.SBResidue.SideChainCharge) -> str` Returns the side chain charge *sideChainCharge* as a string. ##### Method `samson.SBResidue.getSideChainPolarity` Signature: `static getSideChainPolarity(residueType: samson.SBResidue.ResidueType) -> samson.SBResidue.SideChainPolarity` Returns the residue’s side chain polarity for the residue *residueType*. ##### Method `samson.SBResidue.getSideChainPolarityString` Signature: `static getSideChainPolarityString(sideChainPolarity: samson.SBResidue.SideChainPolarity) -> str` Returns the side chain polarity *sideChainPolarity* as a string. ##### Method `samson.SBResidue.hasAminoAcidChi1Angle` Signature: `hasAminoAcidChi1Angle(self: samson.SBResidue) -> bool` Returns *True* if it is an amino acid and has *chi1* angle. ##### Method `samson.SBResidue.hasAminoAcidChi1AngleForResidueType` Signature: `static hasAminoAcidChi1AngleForResidueType(residueType: samson.SBResidue.ResidueType) -> bool` Returns *True* if the residue type *residueType* is an amino acid and has *chi1* angle. ##### Method `samson.SBResidue.hasAminoAcidChi2Angle` Signature: `hasAminoAcidChi2Angle(self: samson.SBResidue) -> bool` Returns *True* if it is an amino acid and has *chi2* angle. ##### Method `samson.SBResidue.hasAminoAcidChi2AngleForResidueType` Signature: `static hasAminoAcidChi2AngleForResidueType(residueType: samson.SBResidue.ResidueType) -> bool` Returns *True* if the residue type *residueType* is an amino acid and has *chi2* angle. ##### Method `samson.SBResidue.hasAminoAcidChi3Angle` Signature: `hasAminoAcidChi3Angle(self: samson.SBResidue) -> bool` Returns *True* if it is an amino acid and has *chi3* angle. ##### Method `samson.SBResidue.hasAminoAcidChi3AngleForResidueType` Signature: `static hasAminoAcidChi3AngleForResidueType(residueType: samson.SBResidue.ResidueType) -> bool` Returns *True* if the residue type *residueType* is an amino acid and has *chi3* angle. ##### Method `samson.SBResidue.hasAminoAcidChi4Angle` Signature: `hasAminoAcidChi4Angle(self: samson.SBResidue) -> bool` Returns *True* if it is an amino acid and has *chi4* angle. ##### Method `samson.SBResidue.hasAminoAcidChi4AngleForResidueType` Signature: `static hasAminoAcidChi4AngleForResidueType(residueType: samson.SBResidue.ResidueType) -> bool` Returns *True* if the residue type *residueType* is an amino acid and has *chi4* angle. ##### Method `samson.SBResidue.hasAminoAcidChi5Angle` Signature: `hasAminoAcidChi5Angle(self: samson.SBResidue) -> bool` Returns *True* if it is an amino acid and has *chi5* angle. ##### Method `samson.SBResidue.hasAminoAcidChi5AngleForResidueType` Signature: `static hasAminoAcidChi5AngleForResidueType(residueType: samson.SBResidue.ResidueType) -> bool` Returns *True* if the residue type *residueType* is an amino acid and has *chi5* angle. ##### Method `samson.SBResidue.hasDissociationConstantForResidueType` Signature: `static hasDissociationConstantForResidueType(residueType: samson.SBResidue.ResidueType) -> bool` Returns *True* if the dissociation constants (pKa1, pKa2) and isoelectric point are defined for the residue *residueType*. ##### Method `samson.SBResidue.hasHydrophobicityForResidueType` Signature: `static hasHydrophobicityForResidueType(residueType: samson.SBResidue.ResidueType) -> bool` Returns *True* if for the residue type *residueType* the hydrophobicity is defined ##### Method `samson.SBResidue.hasSideChainChargeForResidueType` Signature: `static hasSideChainChargeForResidueType(residueType: samson.SBResidue.ResidueType) -> bool` Returns *True* if for the residue type *residueType* the side chain charge is defined. ##### Method `samson.SBResidue.hasSideChainPolarityForResidueType` Signature: `static hasSideChainPolarityForResidueType(residueType: samson.SBResidue.ResidueType) -> bool` Returns *True* if for the residue type *residueType* the side chain polarity is defined. ##### Method `samson.SBResidue.hasStandardResidueName` Signature: `hasStandardResidueName(self: samson.SBResidue) -> bool` Returns *True* if and only if the residue name corresponds to one of the standard PDB residue names. ##### Method `samson.SBResidue.isAminoAcidResidueType` Signature: `static isAminoAcidResidueType(residueType: samson.SBResidue.ResidueType) -> bool` Returns *True* if and only if the given residue type is of amino acid. ##### Method `samson.SBResidue.isNucleicAcidResidueType` Signature: `static isNucleicAcidResidueType(residueType: samson.SBResidue.ResidueType) -> bool` Returns *True* if and only if the given residue type is of nucleic acid. ##### Method `samson.SBResidue.isStandardAminoAcidName` Signature: `static isStandardAminoAcidName(name: str) -> bool` Returns *True* if and only if the name *name* corresponds to one of the standard PDB amino acid residue names. ##### Method `samson.SBResidue.isStandardNucleicAcidName` Signature: `static isStandardNucleicAcidName(name: str) -> bool` Returns *True* if and only if the name *name* corresponds to one of the standard PDB nucleic acid residue names. ##### Method `samson.SBResidue.isStandardResidueName` Signature: `static isStandardResidueName(name: str) -> bool` Returns *True* if and only if the name *name* corresponds to one of the standard PDB amino or nucleic acid residue names. ##### Method `samson.SBResidue.moveBackboneAtomsFromSideChains` Signature: `moveBackboneAtomsFromSideChains(self: samson.SBResidue) -> None` Moves atoms that should be in the backbone from the side chain. ##### Method `samson.SBResidue.orientAminoAcidSideChain` Signature: `orientAminoAcidSideChain(self: samson.SBResidue, chi1: samson.SBQuantity.unitsSI, chi2: samson.SBQuantity.unitsSI = 0(dimensionless), chi3: samson.SBQuantity.unitsSI = 0(dimensionless), chi4: samson.SBQuantity.unitsSI = 0(dimensionless), chi5: samson.SBQuantity.unitsSI = 0(dimensionless)) -> bool` Rotates the amino acid’s side chain to orient it according to given dihedral angles *chi1*, *chi2*, *chi3*, *chi4*, *chi5* (in degrees). Returns *True* if at least the *chi1* rotation was performed. ##### Method `samson.SBResidue.setName` Signature: `setName(self: samson.SBResidue, arg0: str) -> None` Sets the name of the residue, and updates accordingly names for its backbone and side chain, if any. ##### Attribute `samson.SBResidue.A` Signature: `A = ` ##### Attribute `samson.SBResidue.ALA` Signature: `ALA = ` ##### Attribute `samson.SBResidue.ARG` Signature: `ARG = ` ##### Attribute `samson.SBResidue.ASN` Signature: `ASN = ` ##### Attribute `samson.SBResidue.ASP` Signature: `ASP = ` ##### Attribute `samson.SBResidue.ASX` Signature: `ASX = ` ##### Attribute `samson.SBResidue.AcidicPolar` Signature: `AcidicPolar = ` ##### Attribute `samson.SBResidue.Alpha` Signature: `Alpha = ` ##### Attribute `samson.SBResidue.BasicPolar` Signature: `BasicPolar = ` ##### Attribute `samson.SBResidue.Beta` Signature: `Beta = ` ##### Attribute `samson.SBResidue.C` Signature: `C = ` ##### Attribute `samson.SBResidue.CYS` Signature: `CYS = ` ##### Attribute `samson.SBResidue.DA` Signature: `DA = ` ##### Attribute `samson.SBResidue.DC` Signature: `DC = ` ##### Attribute `samson.SBResidue.DG` Signature: `DG = ` ##### Attribute `samson.SBResidue.DI` Signature: `DI = ` ##### Attribute `samson.SBResidue.DT` Signature: `DT = ` ##### Attribute `samson.SBResidue.G` Signature: `G = ` ##### Attribute `samson.SBResidue.GLN` Signature: `GLN = ` ##### Attribute `samson.SBResidue.GLU` Signature: `GLU = ` ##### Attribute `samson.SBResidue.GLX` Signature: `GLX = ` ##### Attribute `samson.SBResidue.GLY` Signature: `GLY = ` ##### Attribute `samson.SBResidue.HIS` Signature: `HIS = ` ##### Attribute `samson.SBResidue.HessaEtAl2005` Signature: `HessaEtAl2005 = ` ##### Attribute `samson.SBResidue.I` Signature: `I = ` ##### Attribute `samson.SBResidue.ILE` Signature: `ILE = ` ##### Attribute `samson.SBResidue.KyteDoolittle1982` Signature: `KyteDoolittle1982 = ` ##### Attribute `samson.SBResidue.LEU` Signature: `LEU = ` ##### Attribute `samson.SBResidue.LYS` Signature: `LYS = ` ##### Attribute `samson.SBResidue.MET` Signature: `MET = ` ##### Attribute `samson.SBResidue.MoneraEtAl1995` Signature: `MoneraEtAl1995 = ` ##### Attribute `samson.SBResidue.MoonFleming2011` Signature: `MoonFleming2011 = ` ##### Attribute `samson.SBResidue.Negative` Signature: `Negative = ` ##### Attribute `samson.SBResidue.Neutral` Signature: `Neutral = ` ##### Attribute `samson.SBResidue.Nonpolar` Signature: `Nonpolar = ` ##### Attribute `samson.SBResidue.PHE` Signature: `PHE = ` ##### Attribute `samson.SBResidue.PRO` Signature: `PRO = ` ##### Attribute `samson.SBResidue.PYL` Signature: `PYL = ` ##### Attribute `samson.SBResidue.Polar` Signature: `Polar = ` ##### Attribute `samson.SBResidue.Positive` Signature: `Positive = ` ##### Attribute `samson.SBResidue.SEC` Signature: `SEC = ` ##### Attribute `samson.SBResidue.SER` Signature: `SER = ` ##### Attribute `samson.SBResidue.SeredaEtAl1994` Signature: `SeredaEtAl1994 = ` ##### Attribute `samson.SBResidue.THR` Signature: `THR = ` ##### Attribute `samson.SBResidue.TRP` Signature: `TRP = ` ##### Attribute `samson.SBResidue.TYR` Signature: `TYR = ` ##### Attribute `samson.SBResidue.U` Signature: `U = ` ##### Attribute `samson.SBResidue.Undefined` Signature: `Undefined = ` ##### Attribute `samson.SBResidue.UndefinedSideChainCharge` Signature: `UndefinedSideChainCharge = ` ##### Attribute `samson.SBResidue.UndefinedSideChainPolarity` Signature: `UndefinedSideChainPolarity = ` ##### Attribute `samson.SBResidue.Unstructured` Signature: `Unstructured = ` ##### Attribute `samson.SBResidue.VAL` Signature: `VAL = ` ##### Attribute `samson.SBResidue.WimleyWhite1996` Signature: `WimleyWhite1996 = ` ##### Attribute `samson.SBResidue.XAA` Signature: `XAA = ` ##### Attribute `samson.SBResidue.XLE` Signature: `XLE = ` ##### Attribute `samson.SBResidue.ZhaoLondon2006` Signature: `ZhaoLondon2006 = ` ##### Property `samson.SBResidue.aminoAcidOneLetterCode` Signature: `property aminoAcidOneLetterCode` Returns one letter code of the amino acid residue. A read-only property. ##### Property `samson.SBResidue.dissociationConstant1` Signature: `property dissociationConstant1` Returns the pKa1 value (the negative of the logarithm of the dissociation constant for the carboxyl functional group, -COOH) for this residue. A read-only property. ##### Property `samson.SBResidue.dissociationConstant2` Signature: `property dissociationConstant2` Returns the pKa2 value (the negative of the logarithm of the dissociation constant for the amino functional group, -NH3) for this residue. A read-only property. ##### Property `samson.SBResidue.hasCompleteAminoAcidBackbone` Signature: `property hasCompleteAminoAcidBackbone` Returns *True* if and only if the residue has a complete amino acid backbone. A read-only property. ##### Property `samson.SBResidue.hasDissociationConstant` Signature: `property hasDissociationConstant` Returns *True* if the dissociation constants (pKa1, pKa2) and isoelectric point are defined for this residue. A read-only property. ##### Property `samson.SBResidue.hasHydrophobicity` Signature: `property hasHydrophobicity` Returns *True* if the residue’s hydrophobicity is defined. A read-only property. ##### Property `samson.SBResidue.hasSideChainCharge` Signature: `property hasSideChainCharge` Returns *True* if the residue’s side chain charge is defined. A read-only property. ##### Property `samson.SBResidue.hasSideChainPolarity` Signature: `property hasSideChainPolarity` Returns *True* if the residue’s side chain polarity is defined. A read-only property. ##### Property `samson.SBResidue.hydrophobicityScale` Signature: `property hydrophobicityScale` The current residue’s hydrophobicity scale ##### Property `samson.SBResidue.hydrophobicityScaleString` Signature: `property hydrophobicityScaleString` Returns the current hydrophobicity scale as a string. A read-only property. ##### Property `samson.SBResidue.isAminoAcid` Signature: `property isAminoAcid` Returns *True* if and only if the residue is an amino acid. A read-only property. ##### Property `samson.SBResidue.isNucleicAcid` Signature: `property isNucleicAcid` Returns *True* if and only if the residue is a nucleic acid. A read-only property. ##### Property `samson.SBResidue.isTerminal` Signature: `property isTerminal` Returns *True* if and only if the residue is terminal. A read-only property. ##### Property `samson.SBResidue.isoelectricPointPH` Signature: `property isoelectricPointPH` Returns the pI value (the pH at the isoelectric point) for this residue. A read-only property. ##### Property `samson.SBResidue.residueType` Signature: `property residueType` The residue type enum. ##### Property `samson.SBResidue.residueTypeFullName` Signature: `property residueTypeFullName` Returns the full name of the residue’s type. A read-only property. ##### Property `samson.SBResidue.residueTypeString` Signature: `property residueTypeString` Residue type as a short string. ##### Property `samson.SBResidue.secondaryStructureType` Signature: `property secondaryStructureType` Returns the most probable secondary structure based on bonds parameters and residue geometry ##### Property `samson.SBResidue.secondaryStructureTypeString` Signature: `property secondaryStructureTypeString` The secondary structure type as a string. A read-only property. ##### Property `samson.SBResidue.sideChainCharge` Signature: `property sideChainCharge` Returns the residue’s side chain charge. A read-only property. ##### Property `samson.SBResidue.sideChainChargeString` Signature: `property sideChainChargeString` Returns the residue’s side chain charge as a string. A read-only property. ##### Property `samson.SBResidue.sideChainPolarity` Signature: `property sideChainPolarity` Returns the residue’s side chain polarity. A read-only property. ##### Property `samson.SBResidue.sideChainPolarityString` Signature: `property sideChainPolarityString` Returns the residue’s side chain polarity as a string. A read-only property. --- # SBStructuralRoot Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeRoot.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeRoot.md This is an internal structural root node of the [`structural model node`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModel.md#samson.SBStructuralModel). It is created and used internally. !!! note "See also" SAMSON SDK: [SBMStructuralModelNodeRoot](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNodeRoot/#) ## API Reference #### Class `samson.SBStructuralRoot` Signature: `class samson.SBStructuralRoot` Bases: [`SBStructuralGroup`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeGroup.md#samson.SBStructuralGroup) This class describes the root of a structural model. It is an internal node in the structural model. --- # SBSegment Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeSegment.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeSegment.md !!! note "See also" SAMSON SDK: [SBMStructuralModelNodeSegment](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNodeSegment/#) ## API Reference #### Class `samson.SBSegment` Signature: `class samson.SBSegment(*args, **kwargs)` Bases: [`SBStructuralGroup`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeGroup.md#samson.SBStructuralGroup) This class describes a segment in a structural model. Overloaded function. 1. __init__(self: samson.SBSegment) -> None Constructs a segment. 2. __init__(self: samson.SBSegment, name: str) -> None Constructs a segment with the given name. --- # SBSideChain Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeSideChain.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeSideChain.md !!! note "See also" SAMSON SDK: [SBMStructuralModelNodeSideChain](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelNodeSideChain/#) ## API Reference #### Class `samson.SBSideChain` Signature: `class samson.SBSideChain(*args, **kwargs)` Bases: [`SBStructuralGroup`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeGroup.md#samson.SBStructuralGroup) This class describes a residue side chain. Overloaded function. 1. __init__(self: samson.SBSideChain) -> None Constructs a residue side chain. 2. __init__(self: samson.SBSideChain, name: str) -> None Constructs a residue side chain. ##### Method `samson.SBSideChain.getBetaCarbon` Signature: `getBetaCarbon(self: samson.SBSideChain) -> samson.SBAtom` Returns the beta carbon of an amino acid side chain or *None* if no such atom found. ##### Method `samson.SBSideChain.getDeltaAtom` Signature: `getDeltaAtom(self: samson.SBSideChain) -> samson.SBAtom` Returns the delta atom of an amino acid side chain or *None* if no such atom found. ##### Method `samson.SBSideChain.getEpsilonAtom` Signature: `getEpsilonAtom(self: samson.SBSideChain) -> samson.SBAtom` Returns the epsilon atom of an amino acid side chain or *None* if no such atom found. ##### Method `samson.SBSideChain.getEtaAtom` Signature: `getEtaAtom(self: samson.SBSideChain) -> samson.SBAtom` Returns the eta atom of an amino acid side chain or *None* if no such atom found. ##### Method `samson.SBSideChain.getGammaAtom` Signature: `getGammaAtom(self: samson.SBSideChain) -> samson.SBAtom` Returns the gamma atom of an amino acid side chain or *None* if no such atom found. ##### Method `samson.SBSideChain.getZetaAtom` Signature: `getZetaAtom(self: samson.SBSideChain) -> samson.SBAtom` Returns the zeta atom of an amino acid side chain or *None* if no such atom found. --- # SBPath Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelPath.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelPath.md This class describes a structural path, i.e. a trajectory of atoms ([`samson.SBAtom`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/StructuralModel/SBMStructuralModelNodeAtom.md#samson.SBAtom)). You can add, insert, and remove a conformation and parts of a path using `samson.SBPath.add()`, `samson.SBPath.insert()`, and `samson.SBPath.remove()` functions respectively. You can also add, insert, and remove atoms using `samson.SBPath.addAtom()`, `samson.SBPath.insertAtom()`, and `samson.SBPath.removeAtom()` functions respectively. You can also get and set position, velocity, and force data for all atoms in a path or for a particular atom. You can get a node indexer of atoms in the conformation: ```python # get all paths in the active document pathIndexer = SAMSON.getNodes('node.type path') if len(pathIndexer): # get the first conformation path = pathIndexer[0] # get an indexer of atoms in the path atomIndexer = path.getAtomIndexer() ``` You can create a conformation from a path for a particular step: ```python # create a conformation from the first step in the path conformationIndexer = path.createConformation(0) conformation = conformationIndexer[0] # name the conformation conformation.name = "Initial state" # turn the undo system on with SAMSON.holding("Add new conformation"): # hold the cloned folder instance SAMSON.hold(conformation) # create the cloned folder conformation.create() # add the conformation to the active document SAMSON.getActiveDocument().addChild(conformation) ``` You can set the current step in a path: ```python # make the operation undoable with SAMSON.holding("Change path step"): # set the current step of the path to 10 path.currentStep = 10 ``` You can go through a path to visualize it in SAMSON’s viewport as follows: ```python # make the operation undoable with SAMSON.holding("Change path steps"): # set the step duration in seconds path.stepDuration = SBQuantity.second(0.05) # go through all the steps in the path for step in range(path.numberOfSteps): path.currentStep = step # request SAMSON to process events SAMSON.processEvents() ``` !!! note "See also" SAMSON SDK: [SBMStructuralModelPath](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMStructuralModelPath/#) ## API Reference #### Class `samson.SBPath` Signature: `class samson.SBPath(*args, **kwargs)` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) This class describes a structural path. Overloaded function. 1. __init__(self: samson.SBPath) -> None Constructs a structural model path 2. __init__(self: samson.SBPath, name: str, nodeIndexer: samson.SBNodeIndexer) -> None Constructs a structural model path with the given name from the conformations in `nodeIndexer`. **Parameters** - **name** (*str*) – A name of the path - **nodeIndexer** ([*samson.SBNodeIndexer*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer)) – An indexer with conformations. ##### Class `samson.SBPath.AnimationType` Signature: `class AnimationType(self: samson.SBPath.AnimationType, value: int)` Bases: `pybind11_object` **Members** - `Once`: Animate once - `Loop`: Animate in loops - `Bounce`: Animate in bouncing loops ##### Method `samson.SBPath.add` Signature: `add(*args, **kwargs)` Overloaded function. 1. add(self: samson.SBPath, conformation: samson.SBConformation) -> bool Adds a frame to the path 2. add(self: samson.SBPath, path: samson.SBPath) -> bool Adds frames to the path 3. add(self: samson.SBPath, positionData: list[samson.SBPhysicalVector3], energy: samson.SBQuantity.unitsSI = 0 (dimensionless), time: samson.SBQuantity.unitsSI = 0 (dimensionless), velocityData: list[samson.SBPhysicalVector3] = [], forceData: list[samson.SBPhysicalVector3] = []) -> bool Adds a frame to the path 4. add(self: samson.SBPath, positionData: list[list[samson.SBPhysicalVector3]], energyData: list[samson.SBQuantity.unitsSI] = [], timeData: list[samson.SBQuantity.unitsSI] = [], velocityData: list[list[samson.SBPhysicalVector3]] = [], forceData: list[list[samson.SBPhysicalVector3]] = []) -> bool Adds frames to the path ##### Method `samson.SBPath.addAtom` Signature: `addAtom(self: samson.SBPath, atom: SBMStructuralModelNodeAtom, atomPositionVector: list[samson.SBPhysicalVector3] = [], atomVelocityVector: list[samson.SBPhysicalVector3] = [], atomForceVector: list[samson.SBPhysicalVector3] = []) -> bool` Adds an atom to the path ##### Method `samson.SBPath.clearSourceFileName` Signature: `clearSourceFileName(self: samson.SBPath) -> None` Clears the source file name. ##### Method `samson.SBPath.copy` Signature: `copy(self: samson.SBPath, firstStep: int, lastStep: int) -> samson.SBPath` Copies frames from the path to create a new path ##### Method `samson.SBPath.createConformation` Signature: `createConformation(self: samson.SBPath, step: int) -> samson.SBNodeIndexer` Create a conformation corresponding to a specific step ##### Method `samson.SBPath.createConformations` Signature: `createConformations(self: samson.SBPath) -> samson.SBNodeIndexer` Create conformations corresponding to all steps ##### Method `samson.SBPath.createStructuralModels` Signature: `createStructuralModels(*args, **kwargs)` Overloaded function. 1. createStructuralModels(self: samson.SBPath, step: int) -> samson.SBNodeIndexer Create structural models corresponding to a specific step 2. createStructuralModels(self: samson.SBPath) -> samson.SBNodeIndexer Create structural models corresponding to all steps ##### Method `samson.SBPath.getAtomIndexer` Signature: `getAtomIndexer(self: samson.SBPath) -> samson.SBNodeIndexer` Returns the indexer of atoms for which a position is saved. **Returns** - A node indexer with the associated atoms. **Return type** - [samson.SBNodeIndexer](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNodeIndexer.md#samson.SBNodeIndexer) ##### Method `samson.SBPath.getEnergy` Signature: `getEnergy(self: samson.SBPath, step: int) -> samson.SBQuantity.unitsSI` Returns the energy for a specific step ##### Method `samson.SBPath.getEnergyData` Signature: `getEnergyData(self: samson.SBPath) -> list[samson.SBQuantity.unitsSI]` Returns the energy data: 1D array, size = (number of timesteps) ##### Method `samson.SBPath.getForce` Signature: `getForce(*args, **kwargs)` Overloaded function. 1. getForce(self: samson.SBPath, step: int, atomIndex: int) -> samson.SBPhysicalVector3 Returns force of atom with `atomIndex` for a specific step 2. getForce(self: samson.SBPath, step: int, atom: SBMStructuralModelNodeAtom) -> samson.SBPhysicalVector3 Returns force of atom for a specific step ##### Method `samson.SBPath.getForceData` Signature: `getForceData(self: samson.SBPath) -> list[list[samson.SBPhysicalVector3]]` Returns force data: 2D array, size = (number of timesteps) x (number of atoms) ##### Method `samson.SBPath.getMass` Signature: `getMass(*args, **kwargs)` Overloaded function. 1. getMass(self: samson.SBPath, atomIndex: int) -> samson.SBQuantity.unitsSI Returns mass of atom with `atomIndex`. 2. getMass(self: samson.SBPath, atom: SBMStructuralModelNodeAtom) -> samson.SBQuantity.unitsSI Returns mass of `atom`. ##### Method `samson.SBPath.getMassData` Signature: `getMassData(self: samson.SBPath) -> list[samson.SBQuantity.unitsSI]` Returns mass data for all atoms: 1D array, size = (number of atoms). ##### Method `samson.SBPath.getNextPath` Signature: `getNextPath(self: samson.SBPath) -> samson.SBPath` Returns the next path in the document ##### Method `samson.SBPath.getPosition` Signature: `getPosition(*args, **kwargs)` Overloaded function. 1. getPosition(self: samson.SBPath, step: int, atomIndex: int) -> samson.SBPhysicalVector3 Returns position of atom with `atomIndex` for a specific step 2. getPosition(self: samson.SBPath, step: int, atom: SBMStructuralModelNodeAtom) -> samson.SBPhysicalVector3 Returns position of atom for a specific step ##### Method `samson.SBPath.getPositionData` Signature: `getPositionData(self: samson.SBPath) -> list[list[samson.SBPhysicalVector3]]` Returns position data: 2D array, size = (number of timesteps) x (number of atoms) ##### Method `samson.SBPath.getPreviousPath` Signature: `getPreviousPath(self: samson.SBPath) -> samson.SBPath` Returns the previous path in the document ##### Method `samson.SBPath.getTime` Signature: `getTime(self: samson.SBPath, step: int) -> samson.SBQuantity.unitsSI` Returns the time for a specific step ##### Method `samson.SBPath.getTimeData` Signature: `getTimeData(self: samson.SBPath) -> list[samson.SBQuantity.unitsSI]` Returns the time data: 1D array, size = (number of timesteps) ##### Method `samson.SBPath.getUnitCell` Signature: `getUnitCell(self: samson.SBPath, step: int) -> samson.SBUnitCell` Returns unit-cell data for a specific step. ##### Method `samson.SBPath.getUnitCellData` Signature: `getUnitCellData(self: samson.SBPath) -> list[samson.SBUnitCell]` Returns unit-cell data for all steps: 1D array, size = (number of timesteps). ##### Method `samson.SBPath.getUnwrappedPosition` Signature: `getUnwrappedPosition(*args, **kwargs)` Overloaded function. 1. getUnwrappedPosition(self: samson.SBPath, step: int, atomIndex: int) -> samson.SBPhysicalVector3 Returns the unwrapped position of atom with `atomIndex` for a specific step. 2. getUnwrappedPosition(self: samson.SBPath, step: int, atom: SBMStructuralModelNodeAtom) -> samson.SBPhysicalVector3 Returns the unwrapped position of atom for a specific step. ##### Method `samson.SBPath.getVelocity` Signature: `getVelocity(*args, **kwargs)` Overloaded function. 1. getVelocity(self: samson.SBPath, step: int, atomIndex: int) -> samson.SBPhysicalVector3 Returns velocity of atom with `atomIndex` for a specific step 2. getVelocity(self: samson.SBPath, step: int, atom: SBMStructuralModelNodeAtom) -> samson.SBPhysicalVector3 Returns velocity of atom for a specific step ##### Method `samson.SBPath.getVelocityData` Signature: `getVelocityData(self: samson.SBPath) -> list[list[samson.SBPhysicalVector3]]` Returns velocity data: 2D array, size = (number of timesteps) x (number of atoms) ##### Method `samson.SBPath.hasEnergyData` Signature: `hasEnergyData(self: samson.SBPath) -> bool` Returns whether the path has energy data ##### Method `samson.SBPath.hasForceData` Signature: `hasForceData(self: samson.SBPath) -> bool` Returns whether the path has force data ##### Method `samson.SBPath.hasMassData` Signature: `hasMassData(self: samson.SBPath) -> bool` Returns whether the path has mass data ##### Method `samson.SBPath.hasPositionData` Signature: `hasPositionData(self: samson.SBPath) -> bool` Returns whether the path has position data ##### Method `samson.SBPath.hasTimeData` Signature: `hasTimeData(self: samson.SBPath) -> bool` Returns whether the path has time data ##### Method `samson.SBPath.hasUnitCellData` Signature: `hasUnitCellData(self: samson.SBPath) -> bool` Returns whether the path has unit cell data ##### Method `samson.SBPath.hasVelocityData` Signature: `hasVelocityData(self: samson.SBPath) -> bool` Returns whether the path has velocity data ##### Method `samson.SBPath.insert` Signature: `insert(*args, **kwargs)` Overloaded function. 1. insert(self: samson.SBPath, step: int, conformation: samson.SBConformation) -> bool Inserts a frame to the path at the step 2. insert(self: samson.SBPath, step: int, path: samson.SBPath) -> bool Inserts frames to the path starting from the step 3. insert(self: samson.SBPath, step: int, positionData: list[samson.SBPhysicalVector3], energy: samson.SBQuantity.unitsSI = 0 (dimensionless), time: samson.SBQuantity.unitsSI = 0 (dimensionless), velocityData: list[samson.SBPhysicalVector3] = [], forceData: list[samson.SBPhysicalVector3] = []) -> bool Inserts a frame in the path at position step 4. insert(self: samson.SBPath, step: int, positionData: list[list[samson.SBPhysicalVector3]], energyData: list[samson.SBQuantity.unitsSI] = [], timeData: list[samson.SBQuantity.unitsSI] = [], velocityData: list[list[samson.SBPhysicalVector3]] = [], forceData: list[list[samson.SBPhysicalVector3]] = []) -> bool Inserts frames in the path at position step ##### Method `samson.SBPath.insertAtom` Signature: `insertAtom(self: samson.SBPath, atomIndex: int, atom: SBMStructuralModelNodeAtom, atomPositionVector: list[samson.SBPhysicalVector3] = [], atomVelocityVector: list[samson.SBPhysicalVector3] = [], atomForceVector: list[samson.SBPhysicalVector3] = []) -> bool` Inserts an atom at index `atomIndex` to the path ##### Method `samson.SBPath.makeWholeAllSteps` Signature: `makeWholeAllSteps(self: samson.SBPath) -> bool` Reconstructs bond-connected components across periodic boundaries for all steps. ##### Method `samson.SBPath.makeWholeStep` Signature: `makeWholeStep(self: samson.SBPath, step: int) -> bool` Reconstructs bond-connected components across periodic boundaries for one step. ##### Method `samson.SBPath.remove` Signature: `remove(*args, **kwargs)` Overloaded function. 1. remove(self: samson.SBPath, step: int) -> samson.SBConformation Remove a frame from the path to create a conformation 2. remove(self: samson.SBPath, firstStep: int, lastStep: int) -> samson.SBPath Removes frames from the path to create a new path ##### Method `samson.SBPath.removeAtom` Signature: `removeAtom(self: samson.SBPath, atom: SBMStructuralModelNodeAtom) -> bool` Removes an atom from the path ##### Method `samson.SBPath.setEnergy` Signature: `setEnergy(self: samson.SBPath, step: int, energy: samson.SBQuantity.unitsSI) -> None` Sets the energy for a specific step ##### Method `samson.SBPath.setEnergyData` Signature: `setEnergyData(self: samson.SBPath, energyData: list[samson.SBQuantity.unitsSI]) -> None` Sets the energy data: 1D array, size = (number of timesteps) ##### Method `samson.SBPath.setForce` Signature: `setForce(*args, **kwargs)` Overloaded function. 1. setForce(self: samson.SBPath, step: int, atomIndex: int, force: samson.SBPhysicalVector3) -> None Sets force of atom with `atomIndex` for a specific step 2. setForce(self: samson.SBPath, step: int, atom: SBMStructuralModelNodeAtom, force: samson.SBPhysicalVector3) -> None Sets force of atom for a specific step ##### Method `samson.SBPath.setForceData` Signature: `setForceData(self: samson.SBPath, forceData: list[list[samson.SBPhysicalVector3]]) -> None` Sets force data: 2D array, size = (number of timesteps) x (number of atoms) ##### Method `samson.SBPath.setMass` Signature: `setMass(*args, **kwargs)` Overloaded function. 1. setMass(self: samson.SBPath, atomIndex: int, mass: samson.SBQuantity.unitsSI) -> None Sets mass of atom with `atomIndex`. 2. setMass(self: samson.SBPath, atom: SBMStructuralModelNodeAtom, mass: samson.SBQuantity.unitsSI) -> None Sets mass of `atom`. ##### Method `samson.SBPath.setMassData` Signature: `setMassData(self: samson.SBPath, massData: list[samson.SBQuantity.unitsSI]) -> None` Sets mass data for all atoms: 1D array, size = (number of atoms). ##### Method `samson.SBPath.setPosition` Signature: `setPosition(*args, **kwargs)` Overloaded function. 1. setPosition(self: samson.SBPath, step: int, atomIndex: int, position: samson.SBPhysicalVector3) -> None Sets position of atom with `atomIndex` for a specific step 2. setPosition(self: samson.SBPath, step: int, atom: SBMStructuralModelNodeAtom, position: samson.SBPhysicalVector3) -> None Sets position of atom for a specific step ##### Method `samson.SBPath.setPositionData` Signature: `setPositionData(self: samson.SBPath, positionData: list[list[samson.SBPhysicalVector3]]) -> None` Sets position data: 2D array, size = (number of timesteps) x (number of atoms) ##### Method `samson.SBPath.setTime` Signature: `setTime(self: samson.SBPath, step: int, time: samson.SBQuantity.unitsSI) -> None` Sets the time for a specific step ##### Method `samson.SBPath.setTimeData` Signature: `setTimeData(self: samson.SBPath, timeData: list[samson.SBQuantity.unitsSI]) -> None` Sets the time data: 1D array, size = (number of timesteps) ##### Method `samson.SBPath.setUnitCell` Signature: `setUnitCell(self: samson.SBPath, step: int, unitCell: samson.SBUnitCell) -> None` Sets unit-cell data for a specific step. ##### Method `samson.SBPath.setUnitCellData` Signature: `setUnitCellData(self: samson.SBPath, unitCellData: list[samson.SBUnitCell]) -> None` Sets unit-cell data for all steps: 1D array, size = (number of timesteps). ##### Method `samson.SBPath.setVelocity` Signature: `setVelocity(*args, **kwargs)` Overloaded function. 1. setVelocity(self: samson.SBPath, step: int, atomIndex: int, velocity: samson.SBPhysicalVector3) -> None Sets velocity of atom with `atomIndex` for a specific step 2. setVelocity(self: samson.SBPath, step: int, atom: SBMStructuralModelNodeAtom, velocity: samson.SBPhysicalVector3) -> None Sets velocity of `atom` for a specific step ##### Method `samson.SBPath.setVelocityData` Signature: `setVelocityData(self: samson.SBPath, velocityData: list[list[samson.SBPhysicalVector3]]) -> None` Sets velocity data: 2D array, size = (number of timesteps) x (number of atoms) ##### Method `samson.SBPath.unwrap` Signature: `unwrap(self: samson.SBPath) -> bool` Unwraps the trajectory over time using successive minimum-image displacements. ##### Method `samson.SBPath.updateState` Signature: `updateState(self: samson.SBPath) -> None` Updates the state along the path according to the animation parameters ##### Method `samson.SBPath.wrapAllSteps` Signature: `wrapAllSteps(self: samson.SBPath, keepConnectedComponentsWhole: bool = True) -> bool` Wraps positions of all steps into primary unit cells. ##### Method `samson.SBPath.wrapStep` Signature: `wrapStep(self: samson.SBPath, step: int, keepConnectedComponentsWhole: bool = True) -> bool` Wraps positions of one step into the primary unit cell. ##### Attribute `samson.SBPath.Bounce` Signature: `Bounce = ` ##### Attribute `samson.SBPath.Loop` Signature: `Loop = ` ##### Attribute `samson.SBPath.Once` Signature: `Once = ` ##### Property `samson.SBPath.animationFlag` Signature: `property animationFlag` The animation flag ##### Property `samson.SBPath.animationType` Signature: `property animationType` The animation type ##### Property `samson.SBPath.currentEnergy` Signature: `property currentEnergy` The current energy ##### Property `samson.SBPath.currentStep` Signature: `property currentStep` The current step along the path ##### Property `samson.SBPath.currentTime` Signature: `property currentTime` The current time ##### Property `samson.SBPath.forwardFlag` Signature: `property forwardFlag` The forward flag, which indicates when the animation is moving forward ##### Property `samson.SBPath.hasSourceFileName` Signature: `property hasSourceFileName` Returns whether the source file name is set. ##### Property `samson.SBPath.numberOfAtoms` Signature: `property numberOfAtoms` The number of atoms for which a position is saved ##### Property `samson.SBPath.numberOfFrames` Signature: `property numberOfFrames` `numberOfSteps` **Type** - The number of steps/frames in the path. Alias ##### Property `samson.SBPath.numberOfSteps` Signature: `property numberOfSteps` `numberOfFrames` **Type** - The number of steps/frames in the path. Alias ##### Property `samson.SBPath.smoothingWindowSize` Signature: `property smoothingWindowSize` The size of the smoothing window ##### Property `samson.SBPath.sourceFileName` Signature: `property sourceFileName` The source file name ##### Property `samson.SBPath.stepDuration` Signature: `property stepDuration` The step duration ##### Property `samson.SBPath.stride` Signature: `property stride` The animation stride --- # Visual Model Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel.md This group defines visual models and the geometry objects they use for rendering. In practice, a visual model is the document node you apply to a system, while meshes, surfaces, and textures describe the rendered geometry and appearance. !!! note "See also" SAMSON SDK: [The SBMVisualModel Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Modeling/VisualModel/#) - [SBVisualModel](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md) - [SBMesh](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelMesh.md) - [SBSurface](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelSurface.md) - [SBTexture](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelTexture.md) --- # SBVisualModel Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md Visual models in SAMSON are document nodes that control how molecular systems are rendered in the viewport. Please refer to the [Applying visual models](https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.md#ps-apply-visual-models) section to learn how to create and apply visual models from Python. !!! note "See also" [Applying visual models](https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.md#ps-apply-visual-models) [`samson.SBMesh`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelMesh.md#samson.SBMesh) SAMSON SDK: [SBMVisualModel](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMVisualModel/#) ## API Reference #### Class `samson.SBVisualModel` Signature: `class samson.SBVisualModel` Bases: [`SBModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/Model/SBMModel.md#samson.SBModel) Base class for visual models. !!! note "See also" [`SAMSON.makeVisualModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.makeVisualModel), [`SAMSON.runCommand`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#samson.SAMSON.runCommand) ##### Method `samson.SBVisualModel.canCreateMesh` Signature: `canCreateMesh(self: samson.SBVisualModel) -> bool` Returns *True* if the visual model can create a mesh. ##### Method `samson.SBVisualModel.createMesh` Signature: `createMesh(self: samson.SBVisualModel) -> SBMVisualModelMesh` Returns a mesh constructed from this visual model if possible, else return *None*. **Returns** - Returns samson.SBMesh if it is possible to create it from this visual model, else returns *None*. **Return type** - [samson.SBMesh](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelMesh.md#samson.SBMesh) --- # SBMesh Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelMesh.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelMesh.md This class describes a mesh, that is, a collection of one or more [`surfaces`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelSurface.md#samson.SBSurface) belonging to a [`visual model`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel). Meshes expose geometry and transform-related functionality, while individual surfaces store the triangle and texture data used for rendering. !!! note "See also" [`samson.SBVisualModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel) [`samson.SBSurface`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelSurface.md#samson.SBSurface) [`samson.SBTexture`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelTexture.md#samson.SBTexture) SAMSON SDK: [SBMVisualModelMesh](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMVisualModelMesh/#) ## API Reference #### Class `samson.SBMesh` Signature: `class samson.SBMesh(*args, **kwargs)` Bases: [`SBVisualModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModel.md#samson.SBVisualModel) This class describes a mesh, i.e. a group of surfaces. Overloaded function. 1. __init__(self: samson.SBMesh) -> None Constructs a mesh 2. __init__(self: samson.SBMesh, surfaceVector: list[samson.SBSurface]) -> None Constructs a mesh from a vector of surfaces. **Parameters** - **surfaceVector** (*list**[*[*samson.SBSurface*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelSurface.md#samson.SBSurface)*]*) – The vector of surfaces used to initialize the mesh. ##### Method `samson.SBMesh.getDefaultDiffuseColorReplacement` Signature: `getDefaultDiffuseColorReplacement(self: samson.SBMesh) -> int` Returns the default diffuse color replacement of the mesh ##### Method `samson.SBMesh.getDefaultScale` Signature: `getDefaultScale(self: samson.SBMesh) -> samson.SBPhysicalVector3` Returns the default scale of the mesh ##### Method `samson.SBMesh.getMaximumDiffuseColorReplacement` Signature: `getMaximumDiffuseColorReplacement(self: samson.SBMesh) -> int` Returns the maximum diffuse color replacement of the mesh ##### Method `samson.SBMesh.getMinimumDiffuseColorReplacement` Signature: `getMinimumDiffuseColorReplacement(self: samson.SBMesh) -> int` Returns the minimum diffuse color replacement of the mesh ##### Method `samson.SBMesh.getNextMesh` Signature: `getNextMesh(self: samson.SBMesh) -> samson.SBMesh` Returns the next mesh in the parent. ##### Method `samson.SBMesh.getOrientation` Signature: `getOrientation(self: samson.SBMesh) -> samson.SBPhysicalMatrix33` Returns the orientation of the mesh ##### Method `samson.SBMesh.getPosition` Signature: `getPosition(self: samson.SBMesh) -> samson.SBPhysicalVector3` Returns the position of the mesh ##### Method `samson.SBMesh.getPreviousMesh` Signature: `getPreviousMesh(self: samson.SBMesh) -> samson.SBMesh` Returns the previous mesh in the parent. ##### Method `samson.SBMesh.getScale` Signature: `getScale(self: samson.SBMesh) -> samson.SBPhysicalVector3` Returns the scale of the mesh ##### Method `samson.SBMesh.getSurfaces` Signature: `getSurfaces(self: samson.SBMesh) -> list[samson.SBSurface]` Returns the list of surfaces ##### Method `samson.SBMesh.getTransform` Signature: `getTransform(self: samson.SBMesh) -> samson.SBSpatialTransform` Returns the spatial transform of the mesh ##### Method `samson.SBMesh.hasDiffuseColorReplacementRange` Signature: `hasDiffuseColorReplacementRange(self: samson.SBMesh) -> bool` Returns whether the mesh has a [min, max] range for the diffuse color replacement value ##### Method `samson.SBMesh.rotate` Signature: `rotate(self: samson.SBMesh, axis: samson.SBPhysicalVector3, angle: samson.SBQuantity.unitsSI) -> None` Rotates the mesh ##### Method `samson.SBMesh.scale` Signature: `scale(self: samson.SBMesh, scale: samson.SBPhysicalVector3) -> None` Scales the mesh ##### Method `samson.SBMesh.setOrientation` Signature: `setOrientation(self: samson.SBMesh, orientation: samson.SBPhysicalMatrix33) -> None` Sets the orientation of the mesh ##### Method `samson.SBMesh.setPosition` Signature: `setPosition(self: samson.SBMesh, position: samson.SBPhysicalVector3) -> None` Sets the position of the mesh ##### Method `samson.SBMesh.setScale` Signature: `setScale(self: samson.SBMesh, scale: samson.SBPhysicalVector3) -> None` Sets the scale of the mesh ##### Method `samson.SBMesh.setTransform` Signature: `setTransform(self: samson.SBMesh, transform: samson.SBSpatialTransform) -> None` Sets the spatial transform of the mesh ##### Method `samson.SBMesh.transform` Signature: `transform(self: samson.SBMesh, transform: samson.SBSpatialTransform) -> None` Applies a spatial transform to the mesh ##### Method `samson.SBMesh.translate` Signature: `translate(self: samson.SBMesh, translation: samson.SBPhysicalVector3) -> None` Translates the mesh ##### Property `samson.SBMesh.diffuseColorReplacement` Signature: `property diffuseColorReplacement` Diffuse color replacement value used for rendering. --- # SBSurface Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelSurface.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelSurface.md This class describes a renderable surface that stores the triangle geometry of a mesh. Surfaces are typically obtained from a [`mesh`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelMesh.md#samson.SBMesh), but they can also be constructed explicitly from geometry arrays when building custom visual data in Python. !!! note "See also" [`samson.SBMesh`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelMesh.md#samson.SBMesh) [`samson.SBTexture`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelTexture.md#samson.SBTexture) [Applying visual models](https://documentation.samson-connect.net/scripting/latest/docs/Visualizing.md#ps-apply-visual-models) SAMSON SDK: [SBMVisualModelSurface](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMVisualModelSurface/#) ## API Reference #### Class `samson.SBSurface` Signature: `class samson.SBSurface(self: samson.SBSurface, numberOfTriangles: int, numberOfPositions: int, indexData: list[int], positionData: list[float], normalData: list[float], colorData: list[float], flagData: list[int], nodeIndexData: list[int], textureCoordinateData: list[float], diffuseTexture: SBMVisualModelTexture = None)` Bases: `pybind11_object` This class describes a surface. Constructs a surface from explicit geometry arrays. Array sizes must match: - *indexData*: *3 * numberOfTriangles* - *positionData*: *3 * numberOfPositions* - *normalData*: *3 * numberOfPositions* - *colorData*: *4 * numberOfPositions* - *flagData*: *numberOfPositions* - *nodeIndexData*: *numberOfPositions* - *textureCoordinateData*: *2 * numberOfPositions* ##### Method `samson.SBSurface.getColorData` Signature: `getColorData(self: samson.SBSurface) -> list[float]` Returns the color data; size: 4 * numberOfPositions ##### Method `samson.SBSurface.getDiffuseTexture` Signature: `getDiffuseTexture(self: samson.SBSurface) -> SBMVisualModelTexture` Returns the diffuse texture ##### Method `samson.SBSurface.getFlagData` Signature: `getFlagData(self: samson.SBSurface) -> list[int]` Returns the flag data; size: numberOfPositions ##### Method `samson.SBSurface.getIndexData` Signature: `getIndexData(self: samson.SBSurface) -> list[int]` Returns the index data; size: 3 * numberOfTriangles ##### Method `samson.SBSurface.getNodeIndexData` Signature: `getNodeIndexData(self: samson.SBSurface) -> list[int]` Returns the node index data; size: numberOfPositions ##### Method `samson.SBSurface.getNormalData` Signature: `getNormalData(self: samson.SBSurface) -> list[float]` Returns the normal data; size: 3 * numberOfPositions ##### Method `samson.SBSurface.getPositionData` Signature: `getPositionData(self: samson.SBSurface) -> list[float]` Returns the position data; size: 3 * numberOfPositions ##### Method `samson.SBSurface.getTextureCoordinateData` Signature: `getTextureCoordinateData(self: samson.SBSurface) -> list[float]` Returns the texture coordinate data; size: 2 * numberOfPositions ##### Method `samson.SBSurface.setColorData` Signature: `setColorData(self: samson.SBSurface, data: list[float]) -> None` Sets the color data; size: 4 * numberOfPositions ##### Method `samson.SBSurface.setDiffuseTexture` Signature: `setDiffuseTexture(self: samson.SBSurface, texture: SBMVisualModelTexture) -> None` Sets the diffuse texture ##### Method `samson.SBSurface.setFlagData` Signature: `setFlagData(self: samson.SBSurface, data: list[int]) -> None` Sets the flag data; size: numberOfPositions ##### Method `samson.SBSurface.setIndexData` Signature: `setIndexData(self: samson.SBSurface, data: list[int]) -> None` Sets the index data; size: 3 * numberOfTriangles ##### Method `samson.SBSurface.setNodeIndexData` Signature: `setNodeIndexData(self: samson.SBSurface, data: list[int]) -> None` Sets the node index data; size: numberOfPositions ##### Method `samson.SBSurface.setNormalData` Signature: `setNormalData(self: samson.SBSurface, data: list[float]) -> None` Sets the normal data; size: 3 * numberOfPositions ##### Method `samson.SBSurface.setPositionData` Signature: `setPositionData(self: samson.SBSurface, data: list[float]) -> None` Sets the position data; size: 3 * numberOfPositions ##### Method `samson.SBSurface.setTextureCoordinateData` Signature: `setTextureCoordinateData(self: samson.SBSurface, data: list[float]) -> None` Sets the texture coordinate data; size: 2 * numberOfPositions ##### Property `samson.SBSurface.numberOfPositions` Signature: `property numberOfPositions` Number of vertex positions in the surface. ##### Property `samson.SBSurface.numberOfTriangles` Signature: `property numberOfTriangles` Number of triangles in the surface. --- # SBTexture Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelTexture.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelTexture.md This class describes a texture that can be attached to a [`surface`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelSurface.md#samson.SBSurface) for rendering. Textures in the Python API are represented by RGBA byte data together with their width and height, which makes them convenient for building or inspecting custom textured meshes. !!! note "See also" [`samson.SBSurface`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelSurface.md#samson.SBSurface) [`samson.SBMesh`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/VisualModel/SBMVisualModelMesh.md#samson.SBMesh) SAMSON SDK: [SBMVisualModelTexture](https://documentation.samson-connect.net/developers/11.0.0/api/classSBMVisualModelTexture/#) ## API Reference #### Class `samson.SBTexture` Signature: `class samson.SBTexture(self: samson.SBTexture, width: int, height: int, textureData: list[int])` Bases: `pybind11_object` This class describes a texture. Constructs a texture from RGBA byte data. *textureData* must contain exactly *4 * width * height* values. ##### Method `samson.SBTexture.getTextureData` Signature: `getTextureData(self: samson.SBTexture) -> list[int]` Returns the texture data; size: 4 * width * height ##### Method `samson.SBTexture.setTextureData` Signature: `setTextureData(self: samson.SBTexture, data: list[int]) -> None` Sets the texture data; size: 4 * width * height ##### Property `samson.SBTexture.height` Signature: `property height` Texture height in pixels. ##### Property `samson.SBTexture.width` Signature: `property width` Texture width in pixels. --- # Simulation Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation.md This group contains classes used to run or support simulations, including neighbor searches, simulators, and state updaters. !!! note "See also" SAMSON SDK: [The Simulation Library Group](https://documentation.samson-connect.net/developers/11.0.0/sdk/Simulation/#) - [Neighbor Search](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch.md) - [Simulator](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator.md) - [State Updater](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater.md) --- # Neighbor Search Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch.md The classes below define neighbor-search algorithms that efficiently query nearby atoms or particles, which is especially useful in simulation and analysis workflows. !!! note "See also" SAMSON SDK: [The SBSNeighborSearch Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Simulation/NeighborSearch/#) - [SBNeighborSearch](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearch.md) - [SBNeighborSearchParticleSystem](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystem.md) - [SBNeighborSearchParticleSystemGrid](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystemGrid.md) - [SBNeighborSearchParticleSystemGridPBC](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystemGridPBC.md) - [SBNeighborSearchParticleSystemPBC](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystemPBC.md) --- # SBNeighborSearch Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearch.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearch.md This class describes the base interface for neighbor-search algorithms in SAMSON. Neighbor-search objects are used to query nearby atoms or particles efficiently and are commonly used in simulation and geometry-processing workflows. !!! note "See also" SAMSON SDK: [SBSNeighborSearch](https://documentation.samson-connect.net/developers/11.0.0/api/classSBSNeighborSearch/#) ## API Reference #### Class `samson.SBNeighborSearch` Signature: `class samson.SBNeighborSearch` Bases: [`SBReferenceTarget`](https://documentation.samson-connect.net/scripting/latest/docs/api/Core/Reference/SBCReferenceTarget.md#samson.SBReferenceTarget) Base class for neighbor-search algorithms. Neighbor-search classes provide data structures and queries to retrieve neighboring particles/atoms efficiently. ##### Method `samson.SBNeighborSearch.print` Signature: `print(self: samson.SBNeighborSearch, offset: int = 0) -> None` Prints debugging information in stdout --- # SBNeighborSearchParticleSystem Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystem.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystem.md !!! note "See also" SAMSON SDK: [SBSNeighborSearchParticleSystem](https://documentation.samson-connect.net/developers/11.0.0/api/classSBSNeighborSearchParticleSystem/#) ## API Reference #### Class `samson.SBNeighborSearchParticleSystem` Signature: `class samson.SBNeighborSearchParticleSystem` Bases: [`SBNeighborSearch`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearch.md#samson.SBNeighborSearch) Base class for neighbor-search algorithms operating on particle systems. This class supports neighbor-list management and neighborhood queries by atom index, atom pointer, spherical region, or axis-aligned interval box. ##### Method `samson.SBNeighborSearchParticleSystem.areNeighbors` Signature: `areNeighbors(*args, **kwargs)` Overloaded function. 1. areNeighbors(self: samson.SBNeighborSearchParticleSystem, i: int, j: int) -> bool Returns *True* if particles with indices *i* and *j* are neighbors. 2. areNeighbors(self: samson.SBNeighborSearchParticleSystem, atomI: samson.SBAtom, atomJ: samson.SBAtom) -> bool Returns *True* if *atomI* and *atomJ* are neighbors. ##### Method `samson.SBNeighborSearchParticleSystem.getNeighborVector` Signature: `getNeighborVector(self: samson.SBNeighborSearchParticleSystem, i: int) -> list[samson.SBAtom]` Returns neighbors of the *i*-th particle as a Python list of atoms. ##### Method `samson.SBNeighborSearchParticleSystem.getNeighbors` Signature: `getNeighbors(*args, **kwargs)` Overloaded function. 1. getNeighbors(self: samson.SBNeighborSearchParticleSystem, position: samson.SBPhysicalVector3, radius: samson.SBQuantity.unitsSI) -> list[samson.SBAtom] Returns atoms within *radius* of *position*. 2. getNeighbors(self: samson.SBNeighborSearchParticleSystem, box: samson.SBPhysicalIAVector3) -> list[samson.SBAtom] Returns atoms inside an axis-aligned interval box. ##### Method `samson.SBNeighborSearchParticleSystem.initializeNeighborLists` Signature: `initializeNeighborLists(self: samson.SBNeighborSearchParticleSystem) -> None` Initializes neighbor lists. ##### Method `samson.SBNeighborSearchParticleSystem.updateNeighborLists` Signature: `updateNeighborLists(self: samson.SBNeighborSearchParticleSystem) -> None` Updates neighbor lists. --- # SBNeighborSearchParticleSystemGrid Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystemGrid.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystemGrid.md !!! note "See also" SAMSON SDK: [SBSNeighborSearchParticleSystemGrid](https://documentation.samson-connect.net/developers/11.0.0/api/classSBSNeighborSearchParticleSystemGrid/#) ## API Reference #### Class `samson.SBNeighborSearchParticleSystemGrid` Signature: `class samson.SBNeighborSearchParticleSystemGrid(self: samson.SBNeighborSearchParticleSystemGrid, particleSystem: samson.SBParticleSystem, cutoffDistance: samson.SBQuantity.unitsSI)` Bases: [`SBNeighborSearchParticleSystem`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystem.md#samson.SBNeighborSearchParticleSystem) Grid-based neighbor-search algorithm for particle systems. This implementation accelerates neighbor-list and neighbor-query operations using a spatial grid and optional parallel update. Constructs a grid neighbor-search object. **Parameters** - **particleSystem** ([*SBParticleSystem*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModelParticleSystem.md#samson.SBParticleSystem)) – Particle system to attach to. - **cutoffDistance** ([*SBQuantity.length*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.length)) – Neighbor cutoff radius. ##### Property `samson.SBNeighborSearchParticleSystemGrid.parallelizationEnabled` Signature: `property parallelizationEnabled` The flag whether the parallelization is enabled. If set to *True* then the parallel implementation will be used, if some criteria (e.g. the minimum number of atoms) are met, else the serial implementation will be used. By default, it is enabled and will be used, if some criteria (e.g. the minimum number of atoms) are met. --- # SBNeighborSearchParticleSystemGridPBC Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystemGridPBC.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystemGridPBC.md !!! note "See also" SAMSON SDK: [SBSNeighborSearchParticleSystemGridPBC](https://documentation.samson-connect.net/developers/11.0.0/api/classSBSNeighborSearchParticleSystemGridPBC/#) ## API Reference #### Class `samson.SBNeighborSearchParticleSystemGridPBC` Signature: `class samson.SBNeighborSearchParticleSystemGridPBC(self: samson.SBNeighborSearchParticleSystemGridPBC, particleSystem: samson.SBParticleSystem, cutoffDistance: samson.SBQuantity.unitsSI)` Bases: [`SBNeighborSearchParticleSystemPBC`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystemPBC.md#samson.SBNeighborSearchParticleSystemPBC) Grid-based neighbor-search algorithm for particle systems with periodic boundary conditions. This variant accounts for periodic images during neighbor-list maintenance and query operations. Constructs a periodic grid neighbor-search object. **Parameters** - **particleSystem** ([*SBParticleSystem*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModelParticleSystem.md#samson.SBParticleSystem)) – Particle system with periodic boundary conditions. - **cutoffDistance** ([*SBQuantity.length*](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/Quantity/unitsSIConvenienceConstructors.md#samson.SBQuantity.length)) – Neighbor cutoff radius. --- # SBNeighborSearchParticleSystemPBC Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystemPBC.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearchParticleSystemPBC.md !!! note "See also" SAMSON SDK: [SBSNeighborSearchParticleSystemPBC](https://documentation.samson-connect.net/developers/11.0.0/api/classSBSNeighborSearchParticleSystemPBC/#) ## API Reference #### Class `samson.SBNeighborSearchParticleSystemPBC` Signature: `class samson.SBNeighborSearchParticleSystemPBC` Bases: [`SBNeighborSearch`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/NeighborSearch/SBSNeighborSearch.md#samson.SBNeighborSearch) Base class for neighbor-search algorithms on particle systems with periodic boundary conditions. Neighborhood queries account for periodic-image corrections. ##### Method `samson.SBNeighborSearchParticleSystemPBC.getNeighborVector` Signature: `getNeighborVector(self: samson.SBNeighborSearchParticleSystemPBC, i: int) -> list[samson.SBAtom]` Returns neighbors of the *i*-th particle as a Python list of atoms. ##### Method `samson.SBNeighborSearchParticleSystemPBC.getNeighbors` Signature: `getNeighbors(*args, **kwargs)` Overloaded function. 1. getNeighbors(self: samson.SBNeighborSearchParticleSystemPBC, position: samson.SBPhysicalVector3, radius: samson.SBQuantity.unitsSI) -> list[samson.SBAtom] Returns atoms within *radius* of *position* with periodic correction. 2. getNeighbors(self: samson.SBNeighborSearchParticleSystemPBC, box: samson.SBPhysicalIAVector3) -> list[samson.SBAtom] Returns atoms inside an axis-aligned interval box. ##### Method `samson.SBNeighborSearchParticleSystemPBC.initializeNeighborLists` Signature: `initializeNeighborLists(self: samson.SBNeighborSearchParticleSystemPBC) -> None` Initializes neighbor lists. ##### Method `samson.SBNeighborSearchParticleSystemPBC.updateNeighborLists` Signature: `updateNeighborLists(self: samson.SBNeighborSearchParticleSystemPBC) -> None` Updates neighbor lists. --- # Simulator Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator.md The classes below define simulators, which coordinate a dynamical model, an interaction model, and a state updater to run a simulation. !!! note "See also" SAMSON SDK: [The SBSSimulator Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Simulation/Simulator/#) - [SBSimulator](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulator.md) - [SBSimulatorParticleSystem](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulatorParticleSystem.md) --- # SBSimulator Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulator.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulator.md This class describes a simulator, which combines a dynamical model, an interaction model, and a state updater into a runnable simulation workflow. ### Initialize and add simulator in the active document To add a simulator in SAMSON you need to create and add a dynamical model, an interaction model, and a state updater. In the following example we will apply a simulator to a molecular system in the active document using the Brenner interaction model and the Interactive modeling state updater. ```python # Apply a simulator to a molecule in the active document # get a node indexer of all structural models in the active document nodeIndexer = SAMSON.getNodes('n.t sm') # make an instance of a simulator by providing class names of an interaction model and a state updater simulator = SAMSON.makeSimulator( nodeIndexer = nodeIndexer, # the name of the interaction model class interactionModelClassName = 'SMMBrennerInteractionModel', # the UUID of the Brenner SAMSON Extension interactionModelExtensionUUID = SBUUID('AD608CB6-6971-7CD4-6FCC-34531998E743'), # no parameters for the Brenner interaction model interactionModelParameterMap = SBValueMap(), # the name of the state updater class stateUpdaterClassName = 'SESInteractiveModelingUpdater', # the UUID of the State Updater pack SAMSON Extension stateUpdaterExtensionUUID = SBUUID('F912F119-7CBB-B5BD-972A-0A02DFCF683D') ) # now we need to create a dynamical model, an interaction model, and a state updater # get the dynamical model from the simulator dynamicalModel = simulator.getDynamicalModel() # create the dynamical model dynamicalModel.create() # get the interaction model from the simulator interactionModel = simulator.getInteractionModel() # create the interaction model interactionModel.create() # show a window with interaction model properties SAMSON.showProperties(interactionModel) # initialize interaction model interactionModel.initializeInteractions() # get the state updater from the simulator stateUpdater = simulator.getStateUpdater() # create the state updater stateUpdater.create() # show a window with state updater properties SAMSON.showProperties(stateUpdater) # create the simulator simulator.create() # get the active document document = SAMSON.getActiveDocument() # turn the undo system on with SAMSON.holding('Add simulator'): # hold an object for undo/redo SAMSON.hold(dynamicalModel) # add the dynamical model to the active document document.addChild(dynamicalModel) # hold an object for undo/redo SAMSON.hold(interactionModel) # add the interaction model to the active document in SAMSON document.addChild(interactionModel) # hold an object for undo/redo SAMSON.hold(simulator) # add the simulator to the active document document.addChild(simulator) ``` You can start and stop simulation using the SAMSON Facade ([`samson.SAMSON`](https://documentation.samson-connect.net/scripting/latest/docs/api/Facade/SAMSON.md#module-samson.SAMSON)): ```python # start simulation SAMSON.startSimulation() # check until the simulation is done # ... # stop simulation SAMSON.stopSimulation() ``` !!! note "See also" [`samson.SBDynamicalModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModel.md#samson.SBDynamicalModel) [`samson.SBInteractionModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModel.md#samson.SBInteractionModel) [`samson.SBStateUpdater`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater/SBSStateUpdater.md#samson.SBStateUpdater) SAMSON SDK: [SBSSimulator](https://documentation.samson-connect.net/developers/11.0.0/api/classSBSSimulator/#) ## API Reference #### Class `samson.SBSimulator` Signature: `class samson.SBSimulator` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) Base class for simulators. A simulator orchestrates a dynamical model, an interaction model, and a state updater to advance simulation state. ##### Method `samson.SBSimulator.getDynamicalModel` Signature: `getDynamicalModel(self: samson.SBSimulator) -> samson.SBDynamicalModel` Returns the associated dynamical model. ##### Method `samson.SBSimulator.getInteractionModel` Signature: `getInteractionModel(self: samson.SBSimulator) -> samson.SBInteractionModel` Returns the associated interaction model. ##### Method `samson.SBSimulator.getNextSimulator` Signature: `getNextSimulator(self: samson.SBSimulator) -> samson.SBSimulator` Returns the next simulator in document order. ##### Method `samson.SBSimulator.getPreviousSimulator` Signature: `getPreviousSimulator(self: samson.SBSimulator) -> samson.SBSimulator` Returns the previous simulator in document order. ##### Method `samson.SBSimulator.getStateUpdater` Signature: `getStateUpdater(self: samson.SBSimulator) -> samson.SBStateUpdater` Returns the associated state updater. ##### Method `samson.SBSimulator.updateState` Signature: `updateState(self: samson.SBSimulator) -> None` Updates simulation state. ##### Property `samson.SBSimulator.activityFlag` Signature: `property activityFlag` Simulation activity flag. ##### Property `samson.SBSimulator.simulatorType` Signature: `property simulatorType` Returns the specific simulator type. --- # SBSimulatorParticleSystem Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulatorParticleSystem.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulatorParticleSystem.md !!! note "See also" SAMSON SDK: [SBSSimulatorParticleSystem](https://documentation.samson-connect.net/developers/11.0.0/api/classSBSSimulatorParticleSystem/#) ## API Reference #### Class `samson.SBSimulatorParticleSystem` Signature: `class samson.SBSimulatorParticleSystem(self: samson.SBSimulatorParticleSystem, dynamicalModel: samson.SBParticleSystem, interactionModel: samson.SBInteractionModelParticleSystem, stateUpdater: samson.SBStateUpdaterParticleSystem, name: str)` Bases: [`SBSimulator`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulator.md#samson.SBSimulator) Simulator implementation for particle systems. This simulator combines a particle-system dynamical model, interaction model, and state updater. Constructs a particle-system simulator. **Parameters** - **dynamicalModel** ([*samson.SBParticleSystem*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModelParticleSystem.md#samson.SBParticleSystem)) – Particle system, should contain atomic structures. - **interactionModel** ([*samson.SBInteractionModelParticleSystem*](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModelParticleSystem.md#samson.SBInteractionModelParticleSystem)) – Interaction model. - **stateUpdater** ([*samson.SBStateUpdaterParticleSystem*](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater/SBSStateUpdaterParticleSystem.md#samson.SBStateUpdaterParticleSystem)) – State updater. - **name** (*str*) – Simulator name. ##### Method `samson.SBSimulatorParticleSystem.getDynamicalModel` Signature: `getDynamicalModel(self: samson.SBSimulatorParticleSystem) -> samson.SBParticleSystem` Returns the associated particle-system dynamical model. ##### Method `samson.SBSimulatorParticleSystem.getInteractionModel` Signature: `getInteractionModel(self: samson.SBSimulatorParticleSystem) -> samson.SBInteractionModelParticleSystem` Returns the associated particle-system interaction model. ##### Method `samson.SBSimulatorParticleSystem.getStateUpdater` Signature: `getStateUpdater(self: samson.SBSimulatorParticleSystem) -> samson.SBStateUpdaterParticleSystem` Returns the associated particle-system state updater. --- # State Updater Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater.md The classes below define state updaters, which advance or relax the simulated state during a simulation. !!! note "See also" SAMSON SDK: [The SBSStateUpdater Library](https://documentation.samson-connect.net/developers/11.0.0/sdk/Simulation/StateUpdater/#) - [SBStateUpdater](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater/SBSStateUpdater.md) - [SBStateUpdaterParticleSystem](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater/SBSStateUpdaterParticleSystem.md) --- # SBStateUpdater Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater/SBSStateUpdater.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater/SBSStateUpdater.md This class describes the base class for state updaters. State updaters define how the state of a dynamical model is advanced, minimized, or otherwise updated during a simulation. !!! note "See also" [`samson.SBDynamicalModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/DynamicalModel/SBMDynamicalModel.md#samson.SBDynamicalModel) [`samson.SBInteractionModel`](https://documentation.samson-connect.net/scripting/latest/docs/api/Modeling/InteractionModel/SBMInteractionModel.md#samson.SBInteractionModel) [`samson.SBSimulator`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/Simulator/SBSSimulator.md#samson.SBSimulator) SAMSON SDK: [SBSStateUpdater](https://documentation.samson-connect.net/developers/11.0.0/api/classSBSStateUpdater/#) ## API Reference #### Class `samson.SBStateUpdater` Signature: `class samson.SBStateUpdater` Bases: [`SBNode`](https://documentation.samson-connect.net/scripting/latest/docs/api/DataModel/DataGraph/SBDNode.md#samson.SBNode) Base class for simulation state updaters. A state updater advances the simulation state, typically by updating associated dynamical and interaction models over one or several integration steps. ##### Method `samson.SBStateUpdater.getDynamicalModel` Signature: `getDynamicalModel(self: samson.SBStateUpdater) -> samson.SBDynamicalModel` Returns the associated dynamical model or *None*. ##### Method `samson.SBStateUpdater.getInteractionModel` Signature: `getInteractionModel(self: samson.SBStateUpdater) -> samson.SBInteractionModel` Returns the associated interaction model or *None*. ##### Method `samson.SBStateUpdater.updateState` Signature: `updateState(self: samson.SBStateUpdater) -> None` Updates the simulation state. ##### Property `samson.SBStateUpdater.numberOfSteps` Signature: `property numberOfSteps` Number of integration sub-steps. ##### Property `samson.SBStateUpdater.stateUpdaterType` Signature: `property stateUpdaterType` Returns the specific state updater type. ##### Property `samson.SBStateUpdater.stepSize` Signature: `property stepSize` Time step size. --- # SBStateUpdaterParticleSystem Source: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater/SBSStateUpdaterParticleSystem.html Markdown: https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater/SBSStateUpdaterParticleSystem.md !!! note "See also" SAMSON SDK: [SBSStateUpdaterParticleSystem](https://documentation.samson-connect.net/developers/11.0.0/api/classSBSStateUpdaterParticleSystem/#) ## API Reference #### Class `samson.SBStateUpdaterParticleSystem` Signature: `class samson.SBStateUpdaterParticleSystem` Bases: [`SBStateUpdater`](https://documentation.samson-connect.net/scripting/latest/docs/api/Simulation/StateUpdater/SBSStateUpdater.md#samson.SBStateUpdater) Base class for state updaters operating on particle-system simulators. This specialization links a particle-system dynamical model and interaction model.