Web Analytics Made Easy - Statcounter
Skip to content

Changelog for SDK 2021 (v.2.0.0)#

This release includes major changes in the SDK, various new features, and fixes of known and reported issues.

Below is the list of the changes in SAMSON SDK per library and per class.

One of the major changes visible to users is the introduction of Presentations and Animations. This includes new node types: SBAnimation, SBPresentation. Other new node types: SBPseudoBond, SBHydrogenBondGroup, SBHydrogenBond.

Core library group#

Class#

SBClass#

New types:

  • SBClass::AnimationFactory, SBClass::EntranceAnimation, SBClass::HighlightAnimation, SBClass::MotionAnimation, SBClass::ExitAnimation, SBClass::CameraAnimation, SBClass::OtherAnimation,
  • SBClass::ColorScheme,
  • SBClass::ColorPalette,
  • SBClass::Selector

SBProxy#

New functions that can be used via class proxies: SBProxy::getShortcut, SBProxy::getToolTip, SBProxy::getPublicName, SBProxy::getIconFileName, SBProxy::getMinimumUserPlan

Container#

Performance and other various improvements in the following classes: SBCContainerBuffer (SBBuffer), SBCContainerHashMap (SBHashMap), SBCContainerIndexer (SBIndexer), SBCContainerList (SBList), SBCContainerVector (SBVector)

A new class describing the user plan: SBCContainerUserPlan (SBUserPlan)

Signal#

Internal performance improvements of the signal management.

DataModel library group#

Color library#

Small changes in SBDColorPalette base and child classes: virtual and static functions.

DataGraph library#

A new class: SBNodeSelector. This class describes and implements selectors that might be used accross SAMSON and in SAMSON Extensions. It is used, for example, in visual presets.

SBNode#

Major changes that might affect other classes that are based on SBNode:

Functions SBDDataGraphNode::getNodes(SBNodeIndexer& nodeIndexer, const SBNodePredicate& selectionPredicate, const SBNodePredicate& visitPredicate, bool includeDependencies) and SBDDataGraphNode::countNodes(const SBNodePredicate& selectionPredicate, const SBNodePredicate& visitPredicate, bool includeDependencies) are now const. If you have implemented a class based on the SBNode class and overridden one of those functions, you need to add the const specifier.

New functions that might need to be implemented by a class based on SBNode:

  • SBDDataGraphNode::canHaveDescendantType(SBDDataGraphNode::Type). It returns whether this node can have a node with given type as a descendant.
  • new versions of the above mentioned functions that improve performance for special but very frequent cases when getting just nodes of a single node type (with no other predicates): SBDDataGraphNode::getNodes(SBNodeIndexer& nodeIndexer, SBDDataGraphNode::Type nodeType, bool selectedNodesOnly, const SBNodePredicate& visitPredicate, bool includeDependencies), SBDDataGraphNode::countNodes(SBNodeIndexer& nodeIndexer, SBDDataGraphNode::Type nodeType, bool selectedNodesOnly, const SBNodePredicate& visitPredicate, bool includeDependencies). So if you used a functions
SBNodeIndexer nodeIndexer;
node->getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom));

Now, you can use the new functions that improve performance when using a single SBNode::IsType predicate as follows:

SBNodeIndexer nodeIndexer;
node->getNodes(nodeIndexer, SBNode::Atom);

These changes affect the following classes:

New node types: SBNode::Animation, SBNode::Presentation, SBNode::PseudoBond, SBNode::HydrogenBondGroup, SBNode::HydrogenBond.

Now nodes in the data graph can be locked to prevent operations with them, e.g. when performing a simulation. New functions: SBNode::isLocked, SBNode::getLockedFlag, SBNode::setLockedFlag, and associated predicates SBDDataGraphNode::IsLocked, SBDDataGraphNode::GetLockedFlag

Now nodes can have transparency/opacity and inherited transparency. There is a set of associated functions, e.g.: SBNode::getTransparency, SBNode::setTransparency, SBNode::getInheritedTransparency.

A new rendering pass for nodes: SBNode::RenderingPass::Setup.

SBBaseEvent#

New events: SBBaseEvent::LockedFlagChanged, SBBaseEvent::TransparencyChanged

SBNodeIndexer#

SBNodeIndexer now has copy and move assignment operators.

Document library#

New classes: SBAnimation, SBPresentation.

SBDocument#

New functions:

  • SBDocument::getActivePresentation, SBDocument::setActivePresentation
  • SBDocument::clearHighlighting

SBFolder#

Changes due to changes in SBNode, see changes in SBNode.

New functions: SBFolder::getAnimationList, SBFolder::getPresentationList

SBDocumentEvent#

New document events:

  • SBDocumentEvent::DocumentCloseBegin, SBDocumentEvent::DocumentCloseEnd
  • new animation and presentation related document events

Quantity library#

SBDQuantityType#

New constructors, add serialization.

Type library#

New classes: SBCubicPolynomial, SBEasingCurve.

New copy and move constructors and operators for some existing types.

SBDTypeColor#

Changes in serialization. New default colors used in the interface, e.g. colors of axes.

SBVector3#

New functions:

  • SBDTypePhysicalVector3::fromLineProjection
  • SBDTypePhysicalVector3::fromLineSegmentProjection
  • SBDTypePhysicalVector3::fromPlaneProjection
  • SBDTypePhysicalVector3::sampledUnitSphere3

SBSpatialTransform#

A new function: SBSpatialTransform::fromAlignment that returns the best possible transform between the two given position vectors.

Visualization library#

A new library that introduces the following classes that describe visual presets: SBVisualPreset, SBVisualPresetGroup.

Facade library group#

New functions:

  • SAMSON::getUserPlan - return the user plan
  • SAMSON::getActiveDocumentFilter, SAMSON::setActiveDocumentFilter
  • SAMSON::getAddWatermarkFlag, SAMSON::getDarkWatermark, SAMSON::getLightWatermark
  • SAMSON::setCustomViewport - replaces the viewport with a custom widget
  • SAMSON::getMultiSampleFactor
  • SAMSON::getMaximumTextureSize, SAMSON::getMaximum3DTextureSize, SAMSON::getMaximumRectangleTextureSize
  • SAMSON::informUser(const QString& dialogTitle, const QString& labelText, const QString& text, bool monospaceFont), SAMSON::informUser(QWidget*)
  • SAMSON::askUser(const QString& dialogTitle, const QString& labelText, const QString& text, bool monospaceFont, QDialogButtonBox* buttonBox)
  • SAMSON::importFromFile(const QStringList& fileNameList, const SBList<std::string>* parameters, SBDDocumentFolder* preferredFolder, SBIFileImporter* importer) - import a list of files
  • SAMSON::makeAnimation, SAMSON::makeSelector

Changes in functions:

  • SAMSON::getWorldPositionFromViewportPosition(double, double) and SAMSON::getWorldPositionFromViewportPosition(double, double, const SBPosition3&)
  • SAMSON::createJob

GUI library group#

DataGraph library#

New functions:

  • SBGDataGraphNode::isSelectionDependent - returns true when the node's context menu actions depend on the current selection
  • SBGDataGraphNodeFactory::hasGUI

Editor library#

A new rendering pass for editors: SBGEditor::RenderingPass::Setup.

A new function: SBGEditor::isSelectionDependent - returns true when the node's context menu actions depend on the current selection

Window library#

New functions:

  • SBGWindowDialog::informUser(const QString& dialogTitle, const QString& labelText, const QString& text, bool monospaceFont), SAMSON::informUser(QWidget*)
  • SBGWindowDialog::askUser(const QString& dialogTitle, const QString& labelText, const QString& text, bool monospaceFont, QDialogButtonBox* buttonBox)
  • SBGWindowDialog::getColorSchemeFromUser

Modeling library group#

Changes accross various classes of this library due to changes in SBNode, see changes in SBNode.

StructuralModel library#

New classes: SBPseudoBond, SBHydrogenBondGroup, SBHydrogenBond

SBStructuralEvent#

New events associated with new structural node types.

SBStructuralModel#

New utility functions:

  • SBStructuralModel::getWater(SBNodeIndexer&) const, SBStructuralModel::getWater(SBNodeIndexer&, const SBNodeIndexer&)
  • SBStructuralModel::getMolecularWeight(), SBStructuralModel::getMolecularWeight(const SBNodeIndexer&)
  • SBStructuralModel::getCentroid
  • SBStructuralModel::getCenterOfMass
  • SBStructuralModel::getAsphericity
  • SBStructuralModel::getRadiusOfGyration
  • SBStructuralModel::getSolventAccessibleSurfaceArea
  • SBStructuralModel::isPlanar

SBStructuralModelGrid#

Performance improvements: changes from SBIndexer to SBVector when storing neighbor vectors.

Changed functions:

  • getNeighbors
  • getNeighborVector

New functions:

  • SBMStructuralModelGrid::areNeighbors(unsigned int i, unsigned int j), SBMStructuralModelGrid::areNeighbors(SBStructuralParticle, SBStructuralParticle)

SBAtom#

New functions:

  • SBAtom::getBondedAtoms(SBNodeIndexer&), SBAtom::getBondedAtoms(SBNodeIndexer&, const SBElement::Type)
  • SBAtom::getBondedHeavyAtoms
  • SBAtom::getHydrogens
  • SBAtom::getNumberOfBondedAtoms(), SBAtom::getNumberOfBondedAtoms(const SBElement::Type)
  • SBAtom::getNumberOfBondedHeavyAtoms, SBAtom::getNumberOfBondedCarbons, SBAtom::getNumberOfBondedHydrogens, SBAtom::getNumberOfBondedOxygens, SBAtom::getNumberOfBondedNitrogens, SBAtom::getNumberOfBondedSulfurs
  • SBAtom::getConnectedComponent
  • SBAtom::isPlanar

New predicates associated with the new functions:

  • SBAtom::GetNumberOfBondedAtoms, SBAtom::GetNumberOfBondedHeavyAtoms, SBAtom::GetNumberOfBondedCarbons, SBAtom::GetNumberOfBondedHydrogens, SBAtom::GetNumberOfBondedOxygens, SBAtom::GetNumberOfBondedNitrogens, SBAtom::GetNumberOfBondedSulfurs
  • SBAtom::IsPlanar

SBBackbone#

New functions for nucleic acid topology:

  • SBBackbone::getCarbon1p, SBBackbone::getCarbon3p, SBBackbone::getCarbon4p, SBBackbone::getCarbon5p, SBBackbone::getOxygen3p, SBBackbone::getOxygen4p, SBBackbone::getOxygen5p, SBBackbone::getPhosphorus

SBStructuralGroup#

New functions:

  • SBStructuralGroup::isWater
  • SBStructuralGroup::getMolecularWeight

SBResidue#

Changed function names:

  • SBResidue::computeAminoAcidPhiAngle, SBResidue::computeAminoAcidPsiAngle

New functions for nucleic acid geometry:

  • SBResidue::computeNucleicAcidAlphaAngle, SBResidue::computeNucleicAcidBetaAngle, SBResidue::computeNucleicAcidGammaAngle, SBResidue::computeNucleicAcidDeltaAngle, SBResidue::computeNucleicAcidEpsilonAngle, SBResidue::computeNucleicAcidZetaAngle, SBResidue::computeNucleicAcidChiAngle

New predicates associated with dissociation constants (pKa1, pKa2, pI):

  • SBResidue::HasDissociationConstant, SBResidue::GetDissociationConstant1, SBResidue::GetDissociationConstant2, SBResidue::GetIsoelectricPointPH

VisualModel library#

New class: SBTexture

SBMesh#

Changed functions: SBMesh::getSurfaceIndexer

SBSurface#

New functions using SBTexture: SBSurface::getDiffuseTexture, SBSurface::setDiffuseTexture

Simulation library group#

Changes due to changes in SBNode, see changes in SBNode.

NeighborSearch library#

Performance improvements: changes from SBIndexer to SBVector when storing neighbor vectors.

SBNeighborSearchParticleSystem#

Changed functions:

  • SBSNeighborSearchParticleSystem::getNeighborVector
  • getNeighbors

New functions:

  • SBSNeighborSearchParticleSystem::areNeighbors(unsigned int, unsigned int), SSBNeighborSearchParticleSystem::areNeighbors(SBStructuralParticle, SBStructuralParticle)

SBNeighborSearchParticleSystemPBC#

Changed functions:

  • SBSNeighborSearchParticleSystemPBC::getNeighborVector
  • getNeighbors

SBNeighborSearchParticleSystemGrid#

Changed functions:

  • getNeighbors

New functions:

  • SBSNeighborSearchParticleSystemGrid::areNeighbors(unsigned int, unsigned int), SBSNeighborSearchParticleSystemGrid::areNeighbors(SBStructuralParticle, SBStructuralParticle)

SBNeighborSearchParticleSystemGridPBC#

Changed functions:

  • getNeighbors

SBPositionGrid#

Changed functions:

  • SBPositionGrid::getNeighbors

New functions:

  • SBPositionGrid::hasNeighbors