Changelog¶
Mostly changes in the Python Scripting API reflect the changes in SAMSON SDK.
Below is the list of changes for each version.
0.8.4¶
Modeling¶
Modeling.Model¶
- Class
SBMModel
renamed to Model module - Class
SBMModelNode
renamed to ModelNode module
Core¶
Core.Reference¶
- Class
SBCReferenceTarget
renamed to ReferenceTarget
0.8.3¶
No changes in public API.
0.8.1¶
0.8.0¶
Major changes according to changes in SAMSON SDK 0.8.0. The SAMSON 0.8.0 release brings major changes in SAMSON and SAMSON SDK. It also improves stability and fixes known issues.
Below are listed the main changes in the Python Scripting API per sub-module.
Facade¶
Facade.SAMSON¶
Class: samson.Facade.SAMSON
(SAMSON).
The getActiveModel
function has been renamed to getActiveStructuralModel
.
New/updated functions:
SAMSON.importFromFile
function now receives apreferredFolder
instead of apreferredLayer
;setActiveStructuralModel
- get node at a particular (x, y) position (
getAtom
,getBond
,getNode
); - get nodes in a rectangle
getNodes
.
DataModel¶
DataModel.Document¶
Folder
Class: samson.DataModel.Document.Folder
(Folder)
samson.DataModel.Document.Layer
has been changed to samson.DataModel.Document.Folder
(Folder).
Layer
has been changed to a more general Folder. A Folder object can contain almost any node types, including other folders. Any usage of an active layer (SAMSON.getActiveLayer
) should be modified to e.g. an active document (SAMSON.getActiveDocument`). Any other usages of an Layer
should be modified to use either a Folder or an active document.
Folder has parts of the Layer
functionality and some new functionality e.g. get lists of nodes of different types.
Document
Class: samson.DataModel.Document.Document
(Document).
New functionality:
getActiveCamera
setActiveCamera
getActiveStructuralModel
setActiveStructuralModel
createGroup
groupSelection
selectGroupNodes
addGroupNodesToSelection
removeGroupNodesFromSelection
intersectGroupNodesWithSelection
Camera
Class: samson.DataModel.Document.Camera
(Camera).
New/updated functionality:
transform
;center
- centers the camera around nodes in the provided NodeIndexer.
DataModel.DataGraph¶
Node
Class: samson.DataModel.DataGraph.Node
(Node).
New/updated functionality:
getNextNode
getPreviousNode
getDocument
canAddChild
canAddChildType
isOneOf
isType
isModel
isStructuralModel
isVisualModel
isDynamicalModel
isInteractionModel
isPropertyModel
isSimulator
isStructuralParticle
These changes also affect all classes derived from the Node class i.e.: Folder, StructuralModel, Group, Molecule, Residue, Backbone, Particle, Atom, etc.
NodeIndexer
Class: samson.DataModel.DataGraph.NodeIndexer
(NodeIndexer).
New functionality:
getRootNodes
Modeling¶
Modeling.StructuralModel¶
Root
Class: samson.Modeling.StructuralModel.Root
(Root).
The structural root is now hidden and implicit. When creating a structural model it is not necessary anymore to add it to the Root of a Document, it will be done implicitly.
Path
Class: samson.Modeling.StructuralModel.Path
(Path).
Major changes in the Path class:
Setter and getter functions for position, velocity, and force data have been changed from 1d arrays to 2d arrays; functions have been updated accordingly:
setPositionArray
modified and renamed tosetPositionData
getPositionArray
modified and renamed togetPositionData
setVelocityArray
modified and renamed tosetVelocityData
getVelocityArray
modified and renamed togetVelocityData
setForceArray
modified and renamed tosetForceData
getForceArray
modified and renamed togetForceData
setEnergyArray
modified and renamed tosetEnergyData
getEnergyArray
modified and renamed togetEnergyData
setTimeArray
modified and renamed tosetTimeData
getTimeArray
modified and renamed togetTimeData
New functionality:
- add, insert, and remove Particle:
addStructuralParticle
,insertStructuralParticle
,removeStructuralParticle
; - add, insert, remove, and copy frames:
add
,insert
,remove
,copy
; - create Conformation from Path:
createConformation
,createConformations
; - create StructuralModel from Path:
createStructuralModels
; - change the stride of the Path animation:
stride
attribute.
Conformation
Class: samson.Modeling.StructuralModel.Conformation
(Conformation).
Renamings:
getNumberOfPositions
renamed togetNumberOfStructuralParticles
;getAtomIndexer
renamed togetStructuralParticleIndexer
.
New/updated functionality:
createStructuralModels
- create structural models from this conformation;- getter and setter functions for position data:
getPositionData
andsetPositionData
; - getter and setter functions for velocity data:
getVelocityData
andsetVelocityData
; - getter and setter functions for force data:
getForceData
andsetForceData
; - getter and setter functions for energy:
getEnergy
andsetEnergy
; - getter and setter functions for time:
getTime
andsetTime
; - getter and setter functions for position of a structural particle:
getPosition
andsetPosition
; - getter and setter functions for velocity of a structural particle:
getVelocity
andsetVelocity
; - getter and setter functions for force of a structural particle:
getForce
andsetForce
.
Residue
Class: samson.Modeling.StructuralModel.Residue
(Residue).
New functionality:
setSecondaryStructureType
- allows you to set the secondary structure type.