Changelog for SDK v.0.9.0#
Starting from SAMSON 0.9.0, SAMSON uses Qt 5.12.5.
There are many changes, new features that this version of SAMSON SDK brings to you.
See the list of main changes for users: What's new in SAMSON 2020.
Here is a list of some main changes accross the API:
- We introduced a new type of a SAMSON Extension: Assets (see
SBDAsset
) for distributing libraries of assets. Thanks to this SAMSON Extension type, you can now distribute to users libraries of molecules, fragments both together with a SAMSON Extension as a library of files and as an online resource. - Tips: we added a new functionality to show tips. Now, you can provide tips for users with some text and an image or a gif. You can show them either in the Viewport (the default option) or anywhere else inluding in your SAMSON Extensions by defining the position. See
SAMSON::showTip
. - We slightly modified the way hierarchical data is stored in the SAMSON data graph to improve the user experience and consistency on drag-n-drop actions and other modifications done to the hierarchical information. Before atoms stored some information on the hierarchy (molecule name, chain name, chain ID, residue or substructure sequence number), now this information is stored only in the respective nodes (molecules, chains, residues, structural groups). This changes also decrease the size of files saved in .sam or .samx formats by approx. 10-15%. Also, now when setting a residue's name it automatically sets mames of its backbone and side chain accordingly.
- Data graph nodes: added many new functionalities for atoms, bonds, residues, chains, structural groups, structural models, see the list below.
- Periodic table elements: we included the new names of periodic table elements with numbers 113-118 and added some new functionality.
- Colors: We added color palettes which can be provided to color schemes to modify the colorization. We added some functionality to convert colors between different color spaces (e.g., RGB, HCL). For consitency, we also moved
SBColor
from the Color library to the Type library. - Types: we added a new type
SBDTypeSpatialDomain
. - Camera: we added more functionality to the camera's positioning.
- Updates in rendering: removed display, displayForShadow, displayForSelection functions in favor of a single display function which gets a
SBNode::RenderingPass
. - We added new ways to expose SAMSON Extensions functionality in the inspector using ranged spin boxes, sliders, and combo boxes with lists of values.
Below is the list of the changes in SAMSON SDK per library and per class.
Facade library group#
SAMSON#
New functionality:
SAMSON::setActiveEditor
(const SBUUID& classUUID, const SBUUID& elementUUID)- Snapping functionality (see e.g.
SAMSON::snap
, etc) that snaps displacement (translation, rotation), rotation matrix, and spatial transform based on current snapping preferences set by the user. - Viewport:
SAMSON::showContextMenu
,SAMSON::getHighlightingColor
,SAMSON::getHighlightingOpacity
,SAMSON::getSelectionColor
,SAMSON::getSelectionOpacity
, SAMSON::getSelectionOutlineColor,SAMSON::getSelectionOutlineOpacity
,SAMSON::getViewportFont
. - Now, you can show tips in the viewport or anywhere else, see:
SAMSON::showTip
,SAMSON::hideTip
. - Get node's GUI:
SAMSON::getGUI
.
Modifications:
SAMSON::getNodes
functions - add a new deepSelectionFlag flag to enable/disable deep selections. See alsoSAMSON::getDeepSelectionFlag
.
DataModel library group#
SBDAsset library#
New library has been added to deal with assets, fragments, and libraries of assets and fragments.
Please, see SBDAsset
.
SBDColor library#
SBDColor class has been moved from SBDColorLibrary to SBDTypeLibrary and renamed to SBDTypeColor
class.
To improve colorization, we added color palettes: SBDColorPalette
. The color palettes can be used in some color schemes to manage the colorization. You can use the pre-defined default ones SBDColorPaletteDefaultPalette
or create your own based on the following classes: SBDColorPaletteDiverging
, SBDColorPaletteDivergingHCL
, SBDColorPaletteQualitative
, SBDColorPaletteQualitativeHCL
, SBDColorPaletteSequential
, SBDColorPaletteSequentialHCL
.
You can specify a color palette for some color schemes now, e.g. for color schemes based on SBDColorSchemePerAttribute
.
Added some new color schemes: SBDColorSchemePerSideChainCharge
, SBDColorSchemePerSideChainPolarity
, SBDColorSchemePerResidueHydrophobicity
.
SBDType library#
SBDColor class has been moved from SBDColorLibrary to SBDTypeLibrary and renamed to SBDTypeColor
class.
Added SBDTypeColorConversion
for converting colors between different color spaces.
Added SBDTypeSpatialDomain
.
Add new type: SBDTypeSpatialDomain
.
SBDColor class has been moved from SBDColorLibrary to SBDTypeLibrary and renamed to SBDTypeColor
class.
SBDTypeColor#
New functions: SBDTypeColor::fromHCL
.
SBDTypePhysicalMatrix33#
Fix in SBDTypePhysicalMatrix33::diagonalize
function.
New functions: SBDTypePhysicalMatrix33::setE1
, SBDTypePhysicalMatrix33::setE2
, SBDTypePhysicalMatrix33::setE3
.
See SBDTypeLibrary.
Document library#
New event types:
SBDDocumentCamera#
New functionality for the camera positioning: SBDDocumentCamera::isMoving
, SBDDocumentCamera::rotateLeft
, SBDDocumentCamera::rotateRight
, SBDDocumentCamera::rotateUp
, SBDDocumentCamera::rotateDown
, SBDDocumentCamera::rotateClockwise
, SBDDocumentCamera::rotateCounterClockwise
, SBDDocumentCamera::alignWithAxis
, SBDDocumentCamera::alignWithPlane
, SBDDocumentCamera::leftBackBottomView
, SBDDocumentCamera::leftBackTopView
, SBDDocumentCamera::leftFrontBottomView
, SBDDocumentCamera::rightBackBottomView
, SBDDocumentCamera::rightBackTopView
, SBDDocumentCamera::rightFrontBottomView
, SBDDocumentCamera::rightFrontTopView
.
Modifed existing functionality for the camera positioning: SBDDocumentCamera::center
, etc.
SBDDocumentFolder#
Folders now have UUID (see SBDDocumentFolder::getUUID
, SBDDocumentFolder::setUUID
functions).
New functionality: SBDDocumentFolder::getAssetList
.
Data graph library#
New event types:
SBDController library#
Removed display, displayForShadow, displayForSelection functions in favor of a single SBDController::display
function which gets a SBNode::RenderingPass
.
Modeling library group#
Element library#
SBMElement#
Included the new names of periodic table elements with numbers 113-118.
Added information on the element's subcategory type in the metal–metalloid–nonmetal trend: SBMElement::getMetalSubcategory
, SBMElement::getMetalSubcategoryString, SBMElement::isMetal
.
Added information on element's possible oxidation states: SBMElement::hasOxidationState
.
SBMElementTable#
Added functions to access newly added to SBMElement
attributes: SBMElementTable::getMetalSubcategory
, SBMElementTable::getMetalSubcategoryString, SBMElementTable::isMetal
, SBMElementTable::hasOxidationState
.
Structural Model library#
The hierarchical representation of some structural model data has been modified to improve the user experience with biological data. Now atoms do not store the chain ID, residue sequence number, substructure sequence number - this data has been moved to the associated classes (SBChain
, SBResidue
, SBStructuralGroup
). SBAtom
now has some new and updated functionality to access this data. This changes improve the user experience when doing drag-n-drop operations in the data graph and it reduces the size of .sam and .samx files by up to 15% depending on the stored data.
Removed/added some structural model events (see SBMStructuralModelEvent
) according to these changes.
Note
This changes might affect some importers and exporters for biological data formats.
SBStructuralGroup#
Add new attribute for structural ID and associated functions and node predicates:
SBStructuralGroup::hasStructuralID
SBStructuralGroup::getStructuralID
SBStructuralGroup::setStructuralID
SBStructuralGroup::clearStructuralID
This structural ID is used as a chain ID, a residue sequence number, and a substructure sequence number.
SBChain#
Now the chain ID can be stored using SBStructuralGroup::getStructuralID
and SBStructuralGroup::setStructuralID
.
New node predicates were added: SBChain::GetChainID, SBChain::HasChainID.
SBResidue#
Now, the change in the residue name changes names of its backbone and side chain accordingly: SBResidue::setName
.
New functionality:
SBResidue::createCovalentBondsByResidueType
- create covalent bonds or update their bond order.
New data for common residues (with associated functions and node predicates):
- Hydrophobicity in different scales (see
SBResidue::HydrophobicityScale
,SBResidue::getHydrophobicity
). - Dissociation constants: pKa1, pKa2, pI (see
SBResidue::getDissociationConstant1
,SBResidue::getDissociationConstant2
,SBResidue::getIsoelectricPointPH
). - Some side chain properties: charge (see
SBResidue::SideChainCharge
,SBResidue::getSideChainCharge
) and polarity (seeSBResidue::SideChainPolarity
,SBResidue::getSideChainPolarity
).
SBAtom#
New functionality for topology: SBAtom::getCurrentValence
, SBAtom::getExpectedValence
, SBAtom::getBondedAtoms
, SBAtom::getHydrogens
, SBAtom::addHydrogens
, ref SBAtom::removeHydrogens, SBAtom::isCarboxylOxygen
, SBAtom::isNitroOxygen
, SBAtom::isHydrogenBondAcceptor
, SBAtom::isHydrogenBondDonor
, SBAtom::isAttachedToHydrogenBondDonor
, etc. Added some associated node getters and predicates.
New functionality for elements (see SBElement
): SBAtom::getMetalSubcategory
, SBAtom::isMetal
. Added some associated node predicates.
New functionality due to changes in hierarchical data representation:
SBAtom::isInMolecule
,SBAtom::getMolecule
,SBAtom::getMoleculeName
;SBAtom::isInChain
,SBAtom::getChain
,SBAtom::getChainName
,SBAtom::hasChainID
,SBAtom::getChainID
;SBAtom::isInSegment
,SBAtom::getSegment
,SBAtom::getSegmentName
;SBAtom::isInSubstructure
,SBAtom::getSubstructure
,SBAtom::getSubstructureName
,SBAtom::hasSubstructureSequenceNumber
,SBAtom::getSubstructureSequenceNumber
.;SBAtom::isInResidue
,SBAtom::getResidue
,SBAtom::getResidueName
,SBAtom::getResidueTypeString
,SBAtom::hasResidueSequenceNumber
,SBAtom::getResidueSequenceNumber
.
The associated node getters and predicates have been added.
Functionality for the previous hierarchical data representation has been removed. The associated node getters and predicates have been removed.
New functionality to describe the atom hybridization: see SBMStructuralModelNodeAtom::Hybridization
and associated functions, node getters and predicates.
New functionality to describe the atomic structure geometry: see SBMStructuralModelNodeAtom::Geometry
and associated functions, node getters and predicates.
SBBond#
New functionality to check the type of a bond: SBBond::isAmideBond
, SBBond::isPrimaryAmideBond
, SBBond::isSecondaryAmideBond
, SBBond::isTertiaryAmideBond
, SBBond::isCarbonylBond
, SBBond::isEsterBond
.
SBMStructuralModel#
New functionality to transform, translate, rotate a structural model, e.g.: SBMStructuralModel::centerTransform
, SBMStructuralModel::getOrientation
, SBMStructuralModel::transform
, SBMStructuralModel::rotate
, SBMStructuralModel::translate
, SBMStructuralModel::computeDomain
, etc. See SBMStructuralModel
for all the functionality.
New functionality to modify structural models: SBMStructuralModel::replaceAtom
, SBMStructuralModel::replaceBond
.
Core library group#
Class library#
SBCClassInterface#
New attribute types that can be exposed to the Inspector:
SB_ATTRIBUTE_READ_WRITE_RANGE
- expose values with min and max limits in a spin box;SB_ATTRIBUTE_READ_WRITE_RANGE_SLIDER
- expose values with min and max limits in a slider;SB_ATTRIBUTE_READ_WRITE_LIST
- expose values that can be selected from a list in a combo box.
SBCClassProxy#
Added new virtual function SBCClassProxy::isDiscoverable
which can be used to define whether this class can be discovered by the user or not. By default it returns true.