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¶

GUI¶

Class Action was moved from samson.GUI to samson.GUI.Action sub-module.

Modeling¶

Modeling.Model¶

Modeling.StructuralModel¶

  • Class NodeParticle renamed to Particle

Core¶

Core.Class¶

  • Class SBCClass renamed to Class

Core.Reference¶

0.8.3¶

No changes in public API.

0.8.2¶

Fixes in some docstrings.

No changes in public API.

0.8.1¶

DataModel¶

DataModel.Type¶

samson.DataModel.Type (Type): fixed some issues with unit types.

DataModel.Quantity¶

samson.DataModel.Quantity (Quantity): exposed mathematical functions for units.

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 a preferredFolder instead of a preferredLayer;
  • setActiveStructuralModel
  • get node at a particular (x, y) position (getAtom, getBond, getNode);
  • get nodes in a rectangle getNodes.

DataModel¶

DataModel.Type¶

samson.DataModel.Type (Type):

Small changes and issue fixes.

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 to setPositionData
  • getPositionArray modified and renamed to getPositionData
  • setVelocityArray modified and renamed to setVelocityData
  • getVelocityArray modified and renamed to getVelocityData
  • setForceArray modified and renamed to setForceData
  • getForceArray modified and renamed to getForceData
  • setEnergyArray modified and renamed to setEnergyData
  • getEnergyArray modified and renamed to getEnergyData
  • setTimeArray modified and renamed to setTimeData
  • getTimeArray modified and renamed to getTimeData

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 to getNumberOfStructuralParticles;
  • getAtomIndexer renamed to getStructuralParticleIndexer.

New/updated functionality:

  • createStructuralModels - create structural models from this conformation;
  • getter and setter functions for position data: getPositionData and setPositionData;
  • getter and setter functions for velocity data: getVelocityData and setVelocityData;
  • getter and setter functions for force data: getForceData and setForceData;
  • getter and setter functions for energy: getEnergy and setEnergy;
  • getter and setter functions for time: getTime and setTime ;
  • getter and setter functions for position of a structural particle: getPosition and setPosition;
  • getter and setter functions for velocity of a structural particle: getVelocity and setVelocity;
  • getter and setter functions for force of a structural particle: getForce and setForce.

Residue

Class: samson.Modeling.StructuralModel.Residue (Residue).

New functionality:

  • setSecondaryStructureType - allows you to set the secondary structure type.