Path¶
This class describes a structural path, i.e. a trajectory of structural particles (smason.Modeling.StructuralModel.Particle
).
You can add, insert, and remove conformation and parts of a path from a path using samson.Modeling.StructuralModel.Path.add()
, samson.Modeling.StructuralModel.Path.insert()
, and samson.Modeling.StructuralModel.Path.remove()
functions respectively.
You can also add, insert, and remove structural particles from a conformation using samson.Modeling.StructuralModel.Path.addStructuralParticle()
, samson.Modeling.StructuralModel.Path.insertStructuralParticle()
, and samson.Modeling.StructuralModel.Path.removeStructuralParticle()
functions respectively.
You can also get and set position, velocity, and force data for all structural particles in a path or for a particular structural particle.
You can get a node indexer of structural particles in the conformation:
# get all paths in the active document
pathIndexer = SAMSON.getNodes('node.type path')
# get the first conformation
path = pathIndexer[0]
# get an indexer of structural particles in the path
structuralParticleIndexer = path.getStructuralParticleIndexer()
You can create a conformation from a path for a particular step:
# 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
SAMSON.beginHolding("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)
# turn the undo system off
SAMSON.endHolding()
You can set the current step in a path:
# 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:
# set the step duration in seconds
path.stepDuration = Quantity.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()
See also
SAMSON API: sbmstructuralmodelpath
-
class
samson.Modeling.StructuralModel.
Path
(*args, **kwargs)¶ Bases:
samson.DataModel.DataGraph.Node
This class describes a structural path.
Overloaded function.
- __init__(self: samson.Modeling.StructuralModel.Path) -> None
Constructs a structural model path
- __init__(self: samson.Modeling.StructuralModel.Path, name: str, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer) -> None
Constructs a structural model path with name from the nodes in nodeIndexer
-
class
AnimationType
(self: samson.Modeling.StructuralModel.Path.AnimationType, arg0: int) → None¶ Bases:
pybind11_builtins.pybind11_object
Members:
Once
Loop
Bounce
-
Bounce
= AnimationType.Bounce¶
-
Loop
= AnimationType.Loop¶
-
Once
= AnimationType.Once¶
-
name
¶ (self – handle) -> str
-
-
class
NodeType
(self: samson.DataModel.DataGraph.Node.NodeType, arg0: int) → None¶ Bases:
pybind11_builtins.pybind11_object
Members:
Undefined
StructuralModel
StructuralModelNode
StructuralModelConformation
Conformation
StructuralModelPath
Path
StructuralModelNodeGroup
StructuralGroup
StructuralModelNodeRoot
Root
StructuralModelNodeParticle
StructuralParticle
StructuralModelNodeAtom
Atom
StructuralModelNodePseudoAtom
PseudoAtom
StructuralModelNodeBond
Bond
StructuralModelNodeResidue
Residue
StructuralModelNodeSegment
Segment
StructuralModelNodeProtein
Protein
StructuralModelNodeChain
Chain
StructuralModelNodeMolecule
Molecule
StructuralModelNodeBackbone
Backbone
StructuralModelNodeSideChain
SideChain
VisualModel
VisualModelMesh
Mesh
DynamicalModel
DynamicalModelParticleSystem
ParticleSystem
DynamicalModelRigidBodySystem
RigidBodySystem
DynamicalModelArticulatedBodySystem
ArticulatedBodySystem
DynamicalModelNode
DynamicalNode
DynamicalModelNodeGroup
DynamicalGroup
DynamicalModelNodeRoot
DynamicalRoot
DynamicalModelNodeParticle
DynamicalParticle
DynamicalModelNodeRigidBody
RigidBody
DynamicalModelNodeArticulatedBody
ArticulatedBody
InteractionModel
InteractionModelParticleSystem
InteractionModelRigidBodySystem
InteractionModelArticulatedBodySystem
PropertyModel
PropertyModelFunction
Simulator
SimulatorParticleSystem
SimulatorRigidBodySystem
SimulatorArticulatedBodySystem
StateUpdater
StateUpdaterParticleSystem
StateUpdaterRigidBodySystem
StateUpdaterArticulatedBodySystem
DocumentManager
Document
Folder
Camera
Label
DataGraphNodeGroup
NodeGroup
Controller
ControllerNode
Asset
-
ArticulatedBody
= NodeType.DynamicalModelNodeArticulatedBody¶
-
ArticulatedBodySystem
= NodeType.DynamicalModelArticulatedBodySystem¶
-
Asset
= NodeType.Asset¶
-
Atom
= NodeType.StructuralModelNodeAtom¶
-
Backbone
= NodeType.StructuralModelNodeBackbone¶
-
Bond
= NodeType.StructuralModelNodeBond¶
-
Camera
= NodeType.Camera¶
-
Chain
= NodeType.StructuralModelNodeChain¶
-
Conformation
= NodeType.StructuralModelConformation¶
-
Controller
= NodeType.Controller¶
-
ControllerNode
= NodeType.ControllerNode¶
-
DataGraphNodeGroup
= NodeType.DataGraphNodeGroup¶
-
Document
= NodeType.Document¶
-
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¶
-
Folder
= NodeType.Folder¶
-
InteractionModel
= NodeType.InteractionModel¶
-
InteractionModelArticulatedBodySystem
= NodeType.InteractionModelArticulatedBodySystem¶
-
InteractionModelParticleSystem
= NodeType.InteractionModelParticleSystem¶
-
InteractionModelRigidBodySystem
= NodeType.InteractionModelRigidBodySystem¶
-
Label
= NodeType.Label¶
-
Mesh
= NodeType.VisualModelMesh¶
-
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.StructuralModelNodeAtom¶
-
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¶
-
VisualModelMesh
= NodeType.VisualModelMesh¶
-
name
¶ (self – handle) -> str
-
-
add
(*args, **kwargs)¶ Overloaded function.
- add(self: samson.Modeling.StructuralModel.Path, conformation: samson.Modeling.StructuralModel.Conformation) -> bool
Adds a frame to the path
- add(self: samson.Modeling.StructuralModel.Path, path: samson.Modeling.StructuralModel.Path) -> bool
Adds frames to the path
- add(self: samson.Modeling.StructuralModel.Path, positionData: List[samson.DataModel.Type.vector3], energy: samson.DataModel.Quantity.unitsSI = 0.000000 (dimensionless), time: samson.DataModel.Quantity.unitsSI = 0.000000 (dimensionless), velocityData: List[samson.DataModel.Type.vector3] = [], forceData: List[samson.DataModel.Type.vector3] = []) -> bool
Adds a frame to the path
- add(self: samson.Modeling.StructuralModel.Path, positionData: List[List[samson.DataModel.Type.vector3]], energyData: List[samson.DataModel.Quantity.unitsSI] = [], timeData: List[samson.DataModel.Quantity.unitsSI] = [], velocityData: List[List[samson.DataModel.Type.vector3]] = [], forceData: List[List[samson.DataModel.Type.vector3]] = []) -> bool
Adds frames to the path
-
addChild
(self: samson.DataModel.DataGraph.Node, node: samson.DataModel.DataGraph.Node, nextNode: samson.DataModel.DataGraph.Node = None) → bool¶ Adds a child to the node
-
addStructuralParticle
(self: samson.Modeling.StructuralModel.Path, structuralParticle: samson.Modeling.StructuralModel.Particle, structuralParticlePositionVector: List[samson.DataModel.Type.vector3] = [], structuralParticleVelocityVector: List[samson.DataModel.Type.vector3] = [], structuralParticleForceVector: List[samson.DataModel.Type.vector3] = []) → bool¶ Adds a structuralParticle to the path
-
canAddChild
(self: samson.DataModel.DataGraph.Node, node: samson.DataModel.DataGraph.Node, nextNode: samson.DataModel.DataGraph.Node = None) → bool¶ Returns whether this node can add node as a child
-
canAddChildType
(self: samson.DataModel.DataGraph.Node, nodeType: SBDDataGraphNode::Type) → bool¶ Returns whether this node can add a node with type nodeType as a child
-
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
-
castToMesh
(self: samson.DataModel.DataGraph.Node) → SBMVisualModelMesh¶ Casts (if possible) from SBDDataGraphNode to SBMVisualModelMesh
-
castToVisualModel
(self: samson.DataModel.DataGraph.Node) → SBMVisualModel¶ Casts (if possible) from SBDDataGraphNode to SBMVisualModel
-
clone
(self: samson.Modeling.StructuralModel.Path) → samson.Modeling.StructuralModel.Path¶ Returns a copy of the node and its descendants
-
copy
(self: samson.Modeling.StructuralModel.Path, firstStep: int, lastStep: int) → samson.Modeling.StructuralModel.Path¶ Copies frames from the path to create a new path
-
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: pagenodespecificationlanguage
-
create
(self: samson.DataModel.DataGraph.Node) → None¶ Creates the node
-
createConformation
(self: samson.Modeling.StructuralModel.Path, step: int) → samson.DataModel.DataGraph.NodeIndexer¶ Create a conformation corresponding to a specific step
-
createConformations
(self: samson.Modeling.StructuralModel.Path) → samson.DataModel.DataGraph.NodeIndexer¶ Create conformations corresponding to all steps
-
createStructuralModels
(*args, **kwargs)¶ Overloaded function.
- createStructuralModels(self: samson.Modeling.StructuralModel.Path, step: int) -> samson.DataModel.DataGraph.NodeIndexer
Create structural models corresponding to a specific step
- createStructuralModels(self: samson.Modeling.StructuralModel.Path) -> samson.DataModel.DataGraph.NodeIndexer
Create structural models corresponding to all steps
-
erase
(self: samson.DataModel.DataGraph.Node) → None¶ Erases the node
-
getDocument
(self: samson.DataModel.DataGraph.Node) → SBDDocument¶ Returns the document the node belongs to
-
getEnergy
(self: samson.Modeling.StructuralModel.Path, step: int) → samson.DataModel.Quantity.unitsSI¶ Returnes the energy for a specific step
-
getEnergyData
(self: samson.Modeling.StructuralModel.Path) → List[samson.DataModel.Quantity.unitsSI]¶ Returnes the energy data
-
getFlags
(self: samson.DataModel.DataGraph.Node) → int¶ Returns the flags
-
getForce
(*args, **kwargs)¶ Overloaded function.
- getForce(self: samson.Modeling.StructuralModel.Path, step: int, structuralParticleIndex: int) -> samson.DataModel.Type.vector3
Returnes the force of structural particle structuralParticleIndex for a specific step
- getForce(self: samson.Modeling.StructuralModel.Path, step: int, structuralParticle: samson.Modeling.StructuralModel.Particle) -> samson.DataModel.Type.vector3
Returnes the force of structural particle structuralParticle for a specific step
-
getForceData
(self: samson.Modeling.StructuralModel.Path) → List[List[samson.DataModel.Type.vector3]]¶ Returns the force array: 2D array, (number of timesteps) x (number of structural nodes)
-
getHierarchyString
(self: samson.DataModel.DataGraph.Node, separator: str = '/', includeNodeType: bool = False) → str¶ Returns a string with hierarchical information on the node and its parents names
-
getInheritedFlags
(self: samson.DataModel.DataGraph.Node) → int¶ Returns the inherited flags
-
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.ReferenceTarget) → int¶ Returns the memory footprint
-
getNextNode
(*args, **kwargs)¶ Overloaded function.
- getNextNode(self: samson.DataModel.DataGraph.Node) -> samson.DataModel.DataGraph.Node
Returns the pointer to the next node in the children of the node’s parent
- getNextNode(self: samson.DataModel.DataGraph.Node, nodeType: SBDDataGraphNode::Type) -> samson.DataModel.DataGraph.Node
Returns the pointer to the next node with type nodeType in the children of the node’s parent
-
getNextPath
(self: samson.Modeling.StructuralModel.Path) → samson.Modeling.StructuralModel.Path¶ Returns the next path in the document
-
getNode
(self: int) → samson.DataModel.DataGraph.Node¶ Returns the unique node corresponding to the node index nodeIndex
-
getNodes
(self: samson.Modeling.StructuralModel.Path, selectionString: str = '*', visitString: str = '*', includeDependencies: bool = False) → samson.DataModel.DataGraph.NodeIndexer¶ - Returns nodes (in a node indexer), based on a selectionString and a visitString, with our without dependencies).
- For selectionString and visitString use the Node Specification Language (SAMSON API: pagenodespecificationlanguage
-
getParent
(self: samson.DataModel.DataGraph.Node) → samson.DataModel.DataGraph.Node¶ Returns the parent of the node
-
getPosition
(*args, **kwargs)¶ Overloaded function.
- getPosition(self: samson.Modeling.StructuralModel.Path, step: int, structuralParticleIndex: int) -> samson.DataModel.Type.vector3
Returnes the position of structural particle structuralParticleIndex for a specific step
- getPosition(self: samson.Modeling.StructuralModel.Path, step: int, structuralParticle: samson.Modeling.StructuralModel.Particle) -> samson.DataModel.Type.vector3
Returnes the position of structural particle structuralParticle for a specific step
-
getPositionData
(self: samson.Modeling.StructuralModel.Path) → List[List[samson.DataModel.Type.vector3]]¶ Returns the position array: 2D array, (number of timesteps) x (number of structural nodes)
-
getPreviousNode
(*args, **kwargs)¶ Overloaded function.
- getPreviousNode(self: samson.DataModel.DataGraph.Node) -> samson.DataModel.DataGraph.Node
Returns the pointer to the previous node in the children of the node’s parent
- getPreviousNode(self: samson.DataModel.DataGraph.Node, nodeType: SBDDataGraphNode::Type) -> samson.DataModel.DataGraph.Node
Returns the pointer to the previous node with type nodeType in the children of the node’s parent
-
getPreviousPath
(self: samson.Modeling.StructuralModel.Path) → samson.Modeling.StructuralModel.Path¶ Returns the previous path in the document
-
getRoot
(self: samson.DataModel.DataGraph.Node) → samson.DataModel.DataGraph.Node¶ Returns the root of the hierarchy the node belongs to
-
getStructuralParticleIndexer
(self: samson.Modeling.StructuralModel.Path) → samson.DataModel.DataGraph.NodeIndexer¶ Returns the indexer of structural particles for which a position is saved
-
getThisNode
(self: samson.DataModel.DataGraph.Node) → samson.DataModel.DataGraph.Node¶ Returns the pointer to this node
-
getTime
(self: samson.Modeling.StructuralModel.Path, step: int) → samson.DataModel.Quantity.unitsSI¶ Returnes the time for a specific step
-
getTimeData
(self: samson.Modeling.StructuralModel.Path) → List[samson.DataModel.Quantity.unitsSI]¶ Returnes the time data
-
getTypeString
(type: SBDDataGraphNode::Type) → str¶ Returns a string describing the type of the data graph node
-
getVelocity
(*args, **kwargs)¶ Overloaded function.
- getVelocity(self: samson.Modeling.StructuralModel.Path, step: int, structuralParticleIndex: int) -> samson.DataModel.Type.vector3
Returnes the velocity of structural particle structuralParticleIndex for a specific step
- getVelocity(self: samson.Modeling.StructuralModel.Path, step: int, structuralParticle: samson.Modeling.StructuralModel.Particle) -> samson.DataModel.Type.vector3
Returnes the velocity of structural particle structuralParticle for a specific step
-
getVelocityData
(self: samson.Modeling.StructuralModel.Path) → List[List[samson.DataModel.Type.vector3]]¶ Returns the velocity array: 2D array, (number of timesteps) x (number of structural nodes)
-
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
-
insert
(*args, **kwargs)¶ Overloaded function.
- insert(self: samson.Modeling.StructuralModel.Path, step: int, conformation: samson.Modeling.StructuralModel.Conformation) -> bool
Inserts a frame to the path at the step
- insert(self: samson.Modeling.StructuralModel.Path, step: int, path: samson.Modeling.StructuralModel.Path) -> bool
Inserts frames to the path starting from the step
- insert(self: samson.Modeling.StructuralModel.Path, step: int, positionData: List[samson.DataModel.Type.vector3], energy: samson.DataModel.Quantity.unitsSI = 0.000000 (dimensionless), time: samson.DataModel.Quantity.unitsSI = 0.000000 (dimensionless), velocityData: List[samson.DataModel.Type.vector3] = [], forceData: List[samson.DataModel.Type.vector3] = []) -> bool
Inserts a frame in the path at position step
- insert(self: samson.Modeling.StructuralModel.Path, step: int, positionData: List[List[samson.DataModel.Type.vector3]], energyData: List[samson.DataModel.Quantity.unitsSI] = [], timeData: List[samson.DataModel.Quantity.unitsSI] = [], velocityData: List[List[samson.DataModel.Type.vector3]] = [], forceData: List[List[samson.DataModel.Type.vector3]] = []) -> bool
Inserts frames in the path at position step
-
insertStructuralParticle
(self: samson.Modeling.StructuralModel.Path, structuralParticleIndex: int, structuralParticle: samson.Modeling.StructuralModel.Particle, structuralParticlePositionVector: List[samson.DataModel.Type.vector3] = [], structuralParticleVelocityVector: List[samson.DataModel.Type.vector3] = [], structuralParticleForceVector: List[samson.DataModel.Type.vector3] = []) → bool¶ Inserts a structuralParticle at index structuralParticleIndex to the path
-
isDynamicalModel
(self: samson.DataModel.DataGraph.Node) → bool¶ Returns true when the node is a dynamical model
-
isIn
(*args, **kwargs)¶ Overloaded function.
- 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
- 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
-
isInteractionModel
(self: samson.DataModel.DataGraph.Node) → bool¶ Returns true when the node is a interaction model
-
isMesh
(self: samson.DataModel.DataGraph.Node) → bool¶ Returns true when the node is a mesh
-
isModel
(self: samson.DataModel.DataGraph.Node) → bool¶ Returns true when the node is a model
-
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
-
isPropertyModel
(self: samson.DataModel.DataGraph.Node) → bool¶ Returns true when the node is a property model
-
isSimulator
(self: samson.DataModel.DataGraph.Node) → bool¶ Returns true when the node is a simulator
-
isStructuralModel
(self: samson.DataModel.DataGraph.Node) → bool¶ Returns true when the node is a structural model
-
isStructuralParticle
(self: samson.DataModel.DataGraph.Node) → bool¶ Returns true when the node is a structural particle (an atom or a pseudo-atom)
-
isType
(self: samson.DataModel.DataGraph.Node, type: SBDDataGraphNode::Type) → bool¶ Returns true when the type of the node corresponds to type
-
isVisualModel
(self: samson.DataModel.DataGraph.Node) → bool¶ Returns true when the node is a visual model
-
printDebugInfo
(self: samson.Modeling.StructuralModel.Path, offset: int = 0) → None¶ Prints some debugging information in stdout
-
remove
(*args, **kwargs)¶ Overloaded function.
- remove(self: samson.Modeling.StructuralModel.Path, step: int) -> samson.Modeling.StructuralModel.Conformation
Remove a frame from the path to create a conformation
- remove(self: samson.Modeling.StructuralModel.Path, firstStep: int, lastStep: int) -> samson.Modeling.StructuralModel.Path
Removes frames from the path to create a new path
-
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
-
removeStructuralParticle
(self: samson.Modeling.StructuralModel.Path, structuralParticle: samson.Modeling.StructuralModel.Particle) → bool¶ Removes a structural particle from the path
-
setColor
(self: samson.DataModel.DataGraph.Node, color: SBDTypeColor) → bool¶ Sets the color for the node (modifies an existing material of the node or adds a material with a given color)
- Args:
- color (Color): color to set
-
setColorScheme
(self: samson.DataModel.DataGraph.Node, colorScheme: SBDDataGraphNodeColorScheme) → bool¶ Sets the color scheme for the node (modifies an existing material of the node or adds a material with a given color scheme)
Args: colorScheme (ColorScheme): color scheme to set
-
setEnergy
(self: samson.Modeling.StructuralModel.Path, step: int, energy: samson.DataModel.Quantity.unitsSI) → None¶ Sets the energy for a specific step
-
setEnergyData
(self: samson.Modeling.StructuralModel.Path, energyData: List[samson.DataModel.Quantity.unitsSI]) → None¶ Sets the energy data
-
setForce
(*args, **kwargs)¶ Overloaded function.
- setForce(self: samson.Modeling.StructuralModel.Path, step: int, structuralParticleIndex: int, force: samson.DataModel.Type.vector3) -> None
Sets the force of structural particle structuralParticleIndex to position for a specific step
- setForce(self: samson.Modeling.StructuralModel.Path, step: int, structuralParticle: samson.Modeling.StructuralModel.Particle, force: samson.DataModel.Type.vector3) -> None
Sets the force of structural particle structuralParticle to position for a specific step
-
setForceData
(self: samson.Modeling.StructuralModel.Path, forceData: List[List[samson.DataModel.Type.vector3]]) → None¶ Sets the force array: 2D array, (number of timesteps) x (number of structural nodes)
-
setMaterial
(self: samson.DataModel.DataGraph.Node, material: SBDDataGraphNodeMaterial) → bool¶ Sets the material for the node.
- Args:
- material (Material): material to set
-
setPosition
(*args, **kwargs)¶ Overloaded function.
- setPosition(self: samson.Modeling.StructuralModel.Path, step: int, structuralParticleIndex: int, position: samson.DataModel.Type.vector3) -> None
Sets the position of structural particle structuralParticleIndex to position for a specific step
- setPosition(self: samson.Modeling.StructuralModel.Path, step: int, structuralParticle: samson.Modeling.StructuralModel.Particle, position: samson.DataModel.Type.vector3) -> None
Sets the position of structural particle structuralParticle to position for a specific step
-
setPositionData
(self: samson.Modeling.StructuralModel.Path, positionData: List[List[samson.DataModel.Type.vector3]]) → None¶ Sets the position array: 2D array, (number of timesteps) x (number of structural nodes)
-
setTime
(self: samson.Modeling.StructuralModel.Path, step: int, time: samson.DataModel.Quantity.unitsSI) → None¶ Sets the time for a specific step
-
setTimeData
(self: samson.Modeling.StructuralModel.Path, timeData: List[samson.DataModel.Quantity.unitsSI]) → None¶ Sets the time data
-
setVelocity
(*args, **kwargs)¶ Overloaded function.
- setVelocity(self: samson.Modeling.StructuralModel.Path, step: int, structuralParticleIndex: int, velocity: samson.DataModel.Type.vector3) -> None
Sets the velocity of structural particle structuralParticleIndex to position for a specific step
- setVelocity(self: samson.Modeling.StructuralModel.Path, step: int, structuralParticle: samson.Modeling.StructuralModel.Particle, velocity: samson.DataModel.Type.vector3) -> None
Sets the velocity of structural particle structuralParticle to position for a specific step
-
setVelocityData
(self: samson.Modeling.StructuralModel.Path, velocityData: List[List[samson.DataModel.Type.vector3]]) → None¶ Sets the velocity array: 2D array, (number of timesteps) x (number of structural nodes)
-
toString
(self: samson.Modeling.StructuralModel.Path) → str¶ A string representation
-
updateState
(self: samson.Modeling.StructuralModel.Path) → None¶ Updates the state along the path according to the animation parameters
-
ArticulatedBody
= NodeType.DynamicalModelNodeArticulatedBody¶
-
ArticulatedBodySystem
= NodeType.DynamicalModelArticulatedBodySystem¶
-
Asset
= NodeType.Asset¶
-
Atom
= NodeType.StructuralModelNodeAtom¶
-
Backbone
= NodeType.StructuralModelNodeBackbone¶
-
Bond
= NodeType.StructuralModelNodeBond¶
-
Bounce
= AnimationType.Bounce¶
-
Camera
= NodeType.Camera¶
-
Chain
= NodeType.StructuralModelNodeChain¶
-
Conformation
= NodeType.StructuralModelConformation¶
-
Controller
= NodeType.Controller¶
-
ControllerNode
= NodeType.ControllerNode¶
-
DataGraphNodeGroup
= NodeType.DataGraphNodeGroup¶
-
Document
= NodeType.Document¶
-
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¶
-
Folder
= NodeType.Folder¶
-
InteractionModel
= NodeType.InteractionModel¶
-
InteractionModelArticulatedBodySystem
= NodeType.InteractionModelArticulatedBodySystem¶
-
InteractionModelParticleSystem
= NodeType.InteractionModelParticleSystem¶
-
InteractionModelRigidBodySystem
= NodeType.InteractionModelRigidBodySystem¶
-
Label
= NodeType.Label¶
-
Loop
= AnimationType.Loop¶
-
Mesh
= NodeType.VisualModelMesh¶
-
Molecule
= NodeType.StructuralModelNodeMolecule¶
-
NodeGroup
= NodeType.DataGraphNodeGroup¶
-
Once
= AnimationType.Once¶
-
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.StructuralModelNodeAtom¶
-
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¶
-
VisualModelMesh
= NodeType.VisualModelMesh¶
-
animationFlag
¶ The animation flag
-
animationType
¶ The animation type
-
currentEnergy
¶ The current energy
-
currentStep
¶ The current step along the path
-
currentTime
¶ The current time
-
forwardFlag
¶ The forward flag, which indicates when the animation is moving forward
-
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
-
name
¶ The name of the path
-
nodeIndex
¶ Returns the node index (unique in the whole data graph, but non-persistent)
-
numberOfSteps
¶ The number of steps in the path
-
numberOfStructuralParticles
¶ The number of structural particles for which a position is saved
-
selectionFlag
¶
-
smoothingWindowSize
¶ The size of the smoothing window
-
stepDuration
¶ The step duration
-
stride
¶ The animation stride
-
type
¶ The type of the data graph node
-
typeString
¶ Returns a string describing the type of this data graph node
-
visibilityFlag
¶