SBDynamicalModel#

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.

class samson.SBDynamicalModel#

Bases: 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.

enforcePeriodicBoundaryConditions(self: samson.SBDynamicalModel) bool#

Applies periodic boundary conditions to the model state.

flushPositionBuffer(self: samson.SBDynamicalModel) None#

Clears the position-change buffer.

getChangedPositionIndex(self: samson.SBDynamicalModel, i: int) int#

Returns the index of a changed position

getNumberOfChangedPositions(self: samson.SBDynamicalModel) int#

Returns the number of changed positions

getPeriodicBoundaryConditions(self: samson.SBDynamicalModel) samson.SBPhysicalIAVector3#

Returns the periodic boundary conditions

getPositionChanged(self: samson.SBDynamicalModel, i: int) bool#

Returns whether position i has been changed since the last flush

setPeriodicBoundaryConditions(self: samson.SBDynamicalModel, v: samson.SBPhysicalIAVector3) None#

Sets the periodic boundary conditions

updateStructuralNodes(self: samson.SBDynamicalModel) None#

Updates structural nodes from the current dynamical state.

property dynamicalModelType#

Dynamical model type (read-only).

property periodicBoundaryConditionsFlag#

Enables or disables periodic boundary conditions.