VisualModelΒΆ

This library defines visual models.

SAMSON API: The SBMVisualModel Library

class samson.Modeling.VisualModel.VisualModel(*args, **kwargs)ΒΆ

Bases: samson.Modeling.Model.SBMModel

This class is the base class to describe a visual model.

SAMSON API: SBMVisualModel

Overloaded function.

  1. __init__(self: samson.Modeling.VisualModel.VisualModel) -> None

Builds a visual model

  1. __init__(self: samson.Modeling.VisualModel.VisualModel, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer) -> None

Builds a visual model based on the nodeIndexer.

class NodeType(self: samson.DataModel.DataGraph.Node.NodeType, arg0: int) → NoneΒΆ

Bases: pybind11_builtins.pybind11_object

__eq__(*args, **kwargs)ΒΆ

Overloaded function.

  1. __eq__(self: samson.DataModel.DataGraph.Node.NodeType, arg0: samson.DataModel.DataGraph.Node.NodeType) -> bool
  2. __eq__(self: samson.DataModel.DataGraph.Node.NodeType, arg0: int) -> bool
__ne__(*args, **kwargs)ΒΆ

Overloaded function.

  1. __ne__(self: samson.DataModel.DataGraph.Node.NodeType, arg0: samson.DataModel.DataGraph.Node.NodeType) -> bool
  2. __ne__(self: samson.DataModel.DataGraph.Node.NodeType, arg0: int) -> bool
ArticulatedBody = NodeType.DynamicalModelNodeArticulatedBodyΒΆ
ArticulatedBodySystem = NodeType.DynamicalModelArticulatedBodySystemΒΆ
Atom = NodeType.AtomΒΆ
Backbone = NodeType.StructuralModelNodeBackboneΒΆ
Bond = NodeType.StructuralModelNodeBondΒΆ
Camera = NodeType.DocumentCameraΒΆ
Chain = NodeType.StructuralModelNodeChainΒΆ
Conformation = NodeType.StructuralModelConformationΒΆ
Controller = NodeType.ControllerΒΆ
ControllerNode = NodeType.ControllerNodeΒΆ
DataGraphNodeGroup = NodeType.DataGraphNodeGroupΒΆ
Document = NodeType.DocumentΒΆ
DocumentCamera = NodeType.DocumentCameraΒΆ
DocumentLabel = NodeType.DocumentLabelΒΆ
DocumentLayer = NodeType.DocumentLayerΒΆ
DocumentManager = NodeType.DocumentManagerΒΆ
DynamicalGroup = NodeType.DynamicalModelNodeGroupΒΆ
DynamicalModel = NodeType.DynamicalModelΒΆ
DynamicalModelArticulatedBodySystem = NodeType.DynamicalModelArticulatedBodySystemΒΆ
DynamicalModelNode = NodeType.DynamicalModelNodeΒΆ
DynamicalModelNodeArticulatedBody = NodeType.DynamicalModelNodeArticulatedBodyΒΆ
DynamicalModelNodeGroup = NodeType.DynamicalModelNodeGroupΒΆ
DynamicalModelNodeParticle = NodeType.DynamicalModelNodeParticleΒΆ
DynamicalModelNodeRigidBody = NodeType.DynamicalModelNodeRigidBodyΒΆ
DynamicalModelNodeRoot = NodeType.DynamicalModelNodeRootΒΆ
DynamicalModelParticleSystem = NodeType.DynamicalModelParticleSystemΒΆ
DynamicalModelRigidBodySystem = NodeType.DynamicalModelRigidBodySystemΒΆ
DynamicalNode = NodeType.DynamicalModelNodeΒΆ
DynamicalParticle = NodeType.DynamicalModelNodeParticleΒΆ
DynamicalRoot = NodeType.DynamicalModelNodeRootΒΆ
InteractionModel = NodeType.InteractionModelΒΆ
InteractionModelArticulatedBodySystem = NodeType.InteractionModelArticulatedBodySystemΒΆ
InteractionModelParticleSystem = NodeType.InteractionModelParticleSystemΒΆ
InteractionModelRigidBodySystem = NodeType.InteractionModelRigidBodySystemΒΆ
Label = NodeType.DocumentLabelΒΆ
Layer = NodeType.DocumentLayerΒΆ
Molecule = NodeType.StructuralModelNodeMoleculeΒΆ
NodeGroup = NodeType.DataGraphNodeGroupΒΆ
ParticleSystem = NodeType.DynamicalModelParticleSystemΒΆ
Path = NodeType.StructuralModelPathΒΆ
PropertyModel = NodeType.PropertyModelΒΆ
PropertyModelFunction = NodeType.PropertyModelFunctionΒΆ
Protein = NodeType.StructuralModelNodeProteinΒΆ
PseudoAtom = NodeType.StructuralModelNodePseudoAtomΒΆ
Residue = NodeType.StructuralModelNodeResidueΒΆ
RigidBody = NodeType.DynamicalModelNodeRigidBodyΒΆ
RigidBodySystem = NodeType.DynamicalModelRigidBodySystemΒΆ
Root = NodeType.StructuralModelNodeRootΒΆ
Segment = NodeType.StructuralModelNodeSegmentΒΆ
SideChain = NodeType.StructuralModelNodeSideChainΒΆ
Simulator = NodeType.SimulatorΒΆ
SimulatorArticulatedBodySystem = NodeType.SimulatorArticulatedBodySystemΒΆ
SimulatorParticleSystem = NodeType.SimulatorParticleSystemΒΆ
SimulatorRigidBodySystem = NodeType.SimulatorRigidBodySystemΒΆ
StateUpdater = NodeType.StateUpdaterΒΆ
StateUpdaterArticulatedBodySystem = NodeType.StateUpdaterArticulatedBodySystemΒΆ
StateUpdaterParticleSystem = NodeType.StateUpdaterParticleSystemΒΆ
StateUpdaterRigidBodySystem = NodeType.StateUpdaterRigidBodySystemΒΆ
StructuralGroup = NodeType.StructuralModelNodeGroupΒΆ
StructuralModel = NodeType.StructuralModelΒΆ
StructuralModelConformation = NodeType.StructuralModelConformationΒΆ
StructuralModelNode = NodeType.StructuralModelNodeΒΆ
StructuralModelNodeAtom = NodeType.AtomΒΆ
StructuralModelNodeBackbone = NodeType.StructuralModelNodeBackboneΒΆ
StructuralModelNodeBond = NodeType.StructuralModelNodeBondΒΆ
StructuralModelNodeChain = NodeType.StructuralModelNodeChainΒΆ
StructuralModelNodeGroup = NodeType.StructuralModelNodeGroupΒΆ
StructuralModelNodeMolecule = NodeType.StructuralModelNodeMoleculeΒΆ
StructuralModelNodeParticle = NodeType.StructuralModelNodeParticleΒΆ
StructuralModelNodeProtein = NodeType.StructuralModelNodeProteinΒΆ
StructuralModelNodePseudoAtom = NodeType.StructuralModelNodePseudoAtomΒΆ
StructuralModelNodeResidue = NodeType.StructuralModelNodeResidueΒΆ
StructuralModelNodeRoot = NodeType.StructuralModelNodeRootΒΆ
StructuralModelNodeSegment = NodeType.StructuralModelNodeSegmentΒΆ
StructuralModelNodeSideChain = NodeType.StructuralModelNodeSideChainΒΆ
StructuralModelPath = NodeType.StructuralModelPathΒΆ
StructuralParticle = NodeType.StructuralModelNodeParticleΒΆ
Undefined = NodeType.UndefinedΒΆ
VisualModel = NodeType.VisualModelΒΆ
__ge__ΒΆ

Return self>=value.

__gt__ΒΆ

Return self>value.

__le__ΒΆ

Return self<=value.

__lt__ΒΆ

Return self<value.

addChild(self: samson.DataModel.DataGraph.Node, node: samson.DataModel.DataGraph.Node, nextNode: samson.DataModel.DataGraph.Node=None) → boolΒΆ

Adds a child to the node

addMaterial(self: samson.DataModel.DataGraph.Node, material: SBDDataGraphNodeMaterial) → boolΒΆ

Adds material to the node

castToInteractionModelParticleSystem(self: samson.DataModel.DataGraph.Node) → SBMInteractionModelParticleSystemΒΆ

Casts (if possible) from SBDDataGraphNode to SBMInteractionModelParticleSystem

castToLabel(self: samson.DataModel.DataGraph.Node) → SBDDocumentLabelΒΆ

Casts (if possible) from SBDDataGraphNode to SBDDocumentLabel

castToVisualModel(self: samson.DataModel.DataGraph.Node) → SBMVisualModelΒΆ

Casts (if possible) from SBDDataGraphNode to SBMVisualModel

changed(self: samson.Modeling.VisualModel.VisualModel) → NoneΒΆ

Emits the VisualModelChanged event

clone(self: samson.Modeling.Model.SBMModel) → samson.Modeling.Model.SBMModelΒΆ

Returns a copy of the node and its descendants

countNodes(self: samson.DataModel.DataGraph.Node, selectionString: str='*', visitString: str='*', includeDependencies: bool=False) → intΒΆ
Count nodes into nodeIndexer, based on a selectionPredicate and a visitPredicate, with our without dependencies).
For selectionString and visitString use Node Specification Language (SAMSON API: Node Specification Language
create(self: samson.DataModel.DataGraph.Node) → NoneΒΆ

Creates the node

display(self: samson.Modeling.VisualModel.VisualModel) → NoneΒΆ

Displays the visual model

displayForSelection(self: samson.Modeling.VisualModel.VisualModel) → NoneΒΆ

Displays the visual model for selection purposes

displayForShadow(self: samson.Modeling.VisualModel.VisualModel) → NoneΒΆ

Displays the visual model for shadow purposes

erase(self: samson.DataModel.DataGraph.Node) → NoneΒΆ

Erases the node

getFlags(self: samson.DataModel.DataGraph.Node) → intΒΆ

Returns the flags

getInheritedFlags(self: samson.DataModel.DataGraph.Node) → intΒΆ

Returns the inherited flags

getLayer(self: samson.Modeling.Model.SBMModel) → samson.DataModel.Document.LayerΒΆ

Returns the owning document layer

getMaterial(self: samson.DataModel.DataGraph.Node) → SBDDataGraphNodeMaterialΒΆ

Returns the material of the node

getMaterialOwner(self: samson.DataModel.DataGraph.Node) → samson.DataModel.DataGraph.NodeΒΆ

Returns the node whose material is inherited

getMemoryFootprint(self: samson.Core.Reference.SBCReferenceTarget) → intΒΆ

Returns the memory footprint

getNextModel(self: samson.Modeling.Model.SBMModel) → samson.Modeling.Model.SBMModelΒΆ

Returns the next model in the document layer

getNode(self: int) → samson.DataModel.DataGraph.NodeΒΆ

Returns the unique node corresponding to the node index nodeIndex

getNodes(self: samson.DataModel.DataGraph.Node, selectionString: str='*', visitString: str='*', includeDependencies: bool=False) → SBDDataGraphNodeIndexerΒΆ
Returns nodes (in a node indexer), based on a selectionString and a visitString, with our without dependencies).
For selectionString and visitString use Node Specification Language (SAMSON API: Node Specification Language
getParent(self: samson.Modeling.Model.SBMModel) → samson.DataModel.DataGraph.NodeΒΆ

Returns the parent node

getPreviousModel(self: samson.Modeling.Model.SBMModel) → samson.Modeling.Model.SBMModelΒΆ

Returns the previous model in the document layer

getRoot(self: samson.DataModel.DataGraph.Node) → samson.DataModel.DataGraph.NodeΒΆ

Returns the root of the hierarchy the node belongs to

hasOneOf(self: samson.DataModel.DataGraph.Node, 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

isIn(*args, **kwargs)ΒΆ

Overloaded function.

  1. isIn(self: samson.DataModel.DataGraph.Node, node: samson.DataModel.DataGraph.Node) -> bool

Returns true if and only if this node is node, or descends from it

  1. isIn(self: samson.DataModel.DataGraph.Node, 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

isOneOf(self: samson.DataModel.DataGraph.Node, nodeIndexer: SBDDataGraphNodeIndexer) → boolΒΆ

Returns true if and only if this node is one of the nodes of the nodeIndexer

removeChild(self: samson.DataModel.DataGraph.Node, node: samson.DataModel.DataGraph.Node) → boolΒΆ

Removes a child from the node

removeMaterial(self: samson.DataModel.DataGraph.Node) → boolΒΆ

Removes material from the node

setColor(self: samson.DataModel.DataGraph.Node, color: SBDColor, applyToChildren: bool=False) → NoneΒΆ

Sets the color for the node (removes an existing material from the node and adds a given material based on a given color)

Args:

color (Color): material to set

applyToChildren (boolean): if set to True goes through child nodes (default value: False)

setMaterial(self: samson.DataModel.DataGraph.Node, material: SBDDataGraphNodeMaterial, applyToChildren: bool=False) → NoneΒΆ

Sets the material for the node (removes an existing material from the node and adds a given material)

Args:

material (Material): material to set

applyToChildren (boolean): if set to True goes through child nodes (default value: False)

sprint(self: samson.Modeling.VisualModel.VisualModel, offset: int=0) → NoneΒΆ

Prints some debugging information

ArticulatedBody = NodeType.DynamicalModelNodeArticulatedBodyΒΆ
ArticulatedBodySystem = NodeType.DynamicalModelArticulatedBodySystemΒΆ
Atom = NodeType.AtomΒΆ
Backbone = NodeType.StructuralModelNodeBackboneΒΆ
Bond = NodeType.StructuralModelNodeBondΒΆ
Camera = NodeType.DocumentCameraΒΆ
Chain = NodeType.StructuralModelNodeChainΒΆ
Conformation = NodeType.StructuralModelConformationΒΆ
Controller = NodeType.ControllerΒΆ
ControllerNode = NodeType.ControllerNodeΒΆ
DataGraphNodeGroup = NodeType.DataGraphNodeGroupΒΆ
Document = NodeType.DocumentΒΆ
DocumentCamera = NodeType.DocumentCameraΒΆ
DocumentLabel = NodeType.DocumentLabelΒΆ
DocumentLayer = NodeType.DocumentLayerΒΆ
DocumentManager = NodeType.DocumentManagerΒΆ
DynamicalGroup = NodeType.DynamicalModelNodeGroupΒΆ
DynamicalModel = NodeType.DynamicalModelΒΆ
DynamicalModelArticulatedBodySystem = NodeType.DynamicalModelArticulatedBodySystemΒΆ
DynamicalModelNode = NodeType.DynamicalModelNodeΒΆ
DynamicalModelNodeArticulatedBody = NodeType.DynamicalModelNodeArticulatedBodyΒΆ
DynamicalModelNodeGroup = NodeType.DynamicalModelNodeGroupΒΆ
DynamicalModelNodeParticle = NodeType.DynamicalModelNodeParticleΒΆ
DynamicalModelNodeRigidBody = NodeType.DynamicalModelNodeRigidBodyΒΆ
DynamicalModelNodeRoot = NodeType.DynamicalModelNodeRootΒΆ
DynamicalModelParticleSystem = NodeType.DynamicalModelParticleSystemΒΆ
DynamicalModelRigidBodySystem = NodeType.DynamicalModelRigidBodySystemΒΆ
DynamicalNode = NodeType.DynamicalModelNodeΒΆ
DynamicalParticle = NodeType.DynamicalModelNodeParticleΒΆ
DynamicalRoot = NodeType.DynamicalModelNodeRootΒΆ
InteractionModel = NodeType.InteractionModelΒΆ
InteractionModelArticulatedBodySystem = NodeType.InteractionModelArticulatedBodySystemΒΆ
InteractionModelParticleSystem = NodeType.InteractionModelParticleSystemΒΆ
InteractionModelRigidBodySystem = NodeType.InteractionModelRigidBodySystemΒΆ
Label = NodeType.DocumentLabelΒΆ
Layer = NodeType.DocumentLayerΒΆ
Molecule = NodeType.StructuralModelNodeMoleculeΒΆ
NodeGroup = NodeType.DataGraphNodeGroupΒΆ
ParticleSystem = NodeType.DynamicalModelParticleSystemΒΆ
Path = NodeType.StructuralModelPathΒΆ
PropertyModel = NodeType.PropertyModelΒΆ
PropertyModelFunction = NodeType.PropertyModelFunctionΒΆ
Protein = NodeType.StructuralModelNodeProteinΒΆ
PseudoAtom = NodeType.StructuralModelNodePseudoAtomΒΆ
Residue = NodeType.StructuralModelNodeResidueΒΆ
RigidBody = NodeType.DynamicalModelNodeRigidBodyΒΆ
RigidBodySystem = NodeType.DynamicalModelRigidBodySystemΒΆ
Root = NodeType.StructuralModelNodeRootΒΆ
Segment = NodeType.StructuralModelNodeSegmentΒΆ
SideChain = NodeType.StructuralModelNodeSideChainΒΆ
Simulator = NodeType.SimulatorΒΆ
SimulatorArticulatedBodySystem = NodeType.SimulatorArticulatedBodySystemΒΆ
SimulatorParticleSystem = NodeType.SimulatorParticleSystemΒΆ
SimulatorRigidBodySystem = NodeType.SimulatorRigidBodySystemΒΆ
StateUpdater = NodeType.StateUpdaterΒΆ
StateUpdaterArticulatedBodySystem = NodeType.StateUpdaterArticulatedBodySystemΒΆ
StateUpdaterParticleSystem = NodeType.StateUpdaterParticleSystemΒΆ
StateUpdaterRigidBodySystem = NodeType.StateUpdaterRigidBodySystemΒΆ
StructuralGroup = NodeType.StructuralModelNodeGroupΒΆ
StructuralModel = NodeType.StructuralModelΒΆ
StructuralModelConformation = NodeType.StructuralModelConformationΒΆ
StructuralModelNode = NodeType.StructuralModelNodeΒΆ
StructuralModelNodeAtom = NodeType.AtomΒΆ
StructuralModelNodeBackbone = NodeType.StructuralModelNodeBackboneΒΆ
StructuralModelNodeBond = NodeType.StructuralModelNodeBondΒΆ
StructuralModelNodeChain = NodeType.StructuralModelNodeChainΒΆ
StructuralModelNodeGroup = NodeType.StructuralModelNodeGroupΒΆ
StructuralModelNodeMolecule = NodeType.StructuralModelNodeMoleculeΒΆ
StructuralModelNodeParticle = NodeType.StructuralModelNodeParticleΒΆ
StructuralModelNodeProtein = NodeType.StructuralModelNodeProteinΒΆ
StructuralModelNodePseudoAtom = NodeType.StructuralModelNodePseudoAtomΒΆ
StructuralModelNodeResidue = NodeType.StructuralModelNodeResidueΒΆ
StructuralModelNodeRoot = NodeType.StructuralModelNodeRootΒΆ
StructuralModelNodeSegment = NodeType.StructuralModelNodeSegmentΒΆ
StructuralModelNodeSideChain = NodeType.StructuralModelNodeSideChainΒΆ
StructuralModelPath = NodeType.StructuralModelPathΒΆ
StructuralParticle = NodeType.StructuralModelNodeParticleΒΆ
Undefined = NodeType.UndefinedΒΆ
VisualModel = NodeType.VisualModelΒΆ
__eq__ΒΆ

Return self==value.

__ge__ΒΆ

Return self>=value.

__gt__ΒΆ

Return self>value.

__le__ΒΆ

Return self<=value.

__lt__ΒΆ

Return self<value.

__ne__ΒΆ

Return self!=value.

highlightingFlagΒΆ
isCreatedΒΆ

Returns true if and only if the node is created

isErasedΒΆ

Returns true if and only if the node is erased

isHighlightedΒΆ

Returns whether the node is highlighted

isSelectedΒΆ

Returns whether the node is selected

isSerializableΒΆ

Returns true when the class is serializable

isVisibleΒΆ

Returns whether the node is visible

modelTypeΒΆ
nameΒΆ
nodeIndexΒΆ

Returns the node index (unique in the whole data graph, but non-persistent)

selectionFlagΒΆ
typeΒΆ
typeStringΒΆ

Returns a string describing the type of the data graph node

visibilityFlagΒΆ