Web Analytics Made Easy - Statcounter
Skip to content

Changelog for SDK 2023 R1 (v.5.0.0)#

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

This release also includes the update of SAMSON SDK to C++17.

The version of OpenGL used in SAMSON has been increased to 4.1. Now you can include SBGRenderOpenGLFunctions.hpp which will include the used version of OpenGL and you can use SB_OPENGL_FUNCTIONS which automatically expands to the required one, e.g. to QOpenGLFunctions_4_1_Core.

Core library group#

Main changes:

  • Added a general way to expose class attributes via the introspection mechanism in the Inspector. Now, you can expose attributes in a general way using SB_ATTRIBUTE_BEGIN and SB_ATTRIBUTE_END. See the SBCClassInterface and its header file for more information and usage examples.
  • Images can now be exposed in the Inspector using the above-mentioned new mechanism via a path to an image or its Base64 encoding, see SBAttribute::Type::ImagePathReadWrite, SBAttribute::Type::ImageBase64ReadWriteClear, etc.
  • Improvements in hash maps and lists.

New classes:

  • SBCContainerFractionalKey

Improvements in the following classes:

  • SBCClassAttribute, SBCClassInterface - more functionality to expose attributes and work with them.
  • SBCContainerHashMap
  • SBCContainerListLink
  • SBCContainerUUID
  • SBCContainerVector
  • SBCReferencePointer
  • SBCReferencePointerList
  • SBCTime - updates for macOS arm64 architecture.

DataModel library group#

New libraries:

  • Assistant library - introduces base classes for assistants (e.g., AI assistants). See SBDAssistant.
  • ColorScheme library - color schemes were moved from the Color library.

DataGraph library#

SBDDataGraphNode#

  • New SBNode::hasNode virtual function to easily check whether a node has other nodes based on their node type or a node predicate. This function is overloaded in children classes were it is necessary.
  • Add more convenience functions to check if a node is of a certain type (and corresponding node predicates):
    • SBNode::isAtom
    • SBNode::isBond
    • SBNode::isLight
    • check if the node is of a certain visual model type:
      • SBNode::isBallAndStick
      • SBNode::isLicorice
      • SBNode::isVanDerWaals
      • SBNode::isCartoon
      • SBNode::isRibbon
      • SBNode::isTube
      • SBNode::isGaussianSurface
      • SBNode::isSolventAccessibleSurface
      • SBNode::isSolventExcludedSurface
  • Improvements in SBDDataGraphNodeMaterial usage, including new functions:
    • SBNode::canAddMaterial
    • SBNode::removeMaterialsFromDescendants
  • New function SBNode::getNumberOfCoarseGrainedAtoms due to the addition of coarse-grained atoms.

SBDDataGraphNodeColorScheme#

A generalization of color schemes - now all color schemes can have a color palette. New functions:

  • SBNodeColorScheme::canHavePalette
  • SBNodeColorScheme::hasPalette, SBNodeColorScheme::getPalette, SBNodeColorScheme::setPalette
  • SBNodeColorScheme::getDefaultPalette, SBNodeColorScheme::resetPalette
  • SBNodeColorScheme::requestUpdate

SBDDataGraphNodeMaterial#

SBDDataGraphNodeMaterial now has general material properties: metallic, roughness, transmission, emission, etc. Check out SBDDataGraphNodeMaterial to see the new functionality.

SBDDataGraphNodeSelector#

SBDDataGraphNodeSelector can now return its corresponding NSL strings via SBNodeSelector::getNSLExpression, if such expressions can be formulated.

Document library#

New libraries:

  • SBDPalette - color palettes moved from the Color library.

New classes:

  • SBDDocumentFile - describes any type of a file embedded in SBDDocument.
  • SBDDocumentLight - describes a light in the viewport and is used in rendering, e.g. using Cycles.
  • SBDDocumentRenderPreset - describes rendering settings.

SBDDocument#

You can now get from SBDDocument the selected nodes or their number by type or using a node predicate using these additional functions:

  • SBDocument::getSelectedNodes
  • SBDocument::getNumberOfSelectedNodes

You can check if the document is saved:

  • SBDocument::isSaved

SBDCamera#

Add new camera properties:

  • SBCamera::getDepthOfFieldFlag, SBCamera::setDepthOfFieldFlag
  • SBCamera::getFNumber, SBCamera::setFNumber
  • SBCamera::getAutofocusFlag, SBCamera::setAutofocusFlag
  • SBCamera::getFocalDistance, SBCamera::setFocalDistance

Quantity library#

Updates in constants:

  • Updated the definition of constants (see SBDTypeQuantityConstantDefines and SBDTypeQuantityConstant header files).
  • Updated values for physical constants in correspondence to 2018 CODATA internationally recommended values of the Fundamental Physical Constants.
  • Now conversions are defined explicitly through the combinations of the defined constants and not through the precomputed values of their relations.

New convenience quantities, e.g. SBQuantity::power, SBQuantity::inversePower, SBQuantity::megawatt, etc.

Type library#

Color conversion functions were moved to SBDTypeColor.

New classes:

  • SBDTypeDateTime
  • SBDTypeRay

Add more constructors, operators, and functions in various classes, e.g.:

  • SBDTypePhysicalInterval::contains
  • SBDTypePhysicalVector3::setOne, SBDTypePhysicalVector3::computeAngle

SBDTypeSpatialTransform now includes scale (SBSpatialTransform::scale) which can be accessed via SBSpatialTransform::getE5, SBSpatialTransform::setE5.

New convenience types were defined:

  • SBIAEnergy3
  • SBLengthMass33, SBInverseLengthInverseMass33
  • SBSquareLength3, SBAngularVelocity3, SBAngularAcceleration3, SBMass3, SBInverseMass3, SBLengthMass3, SBInverseLengthInverseMass3, SBMomentOfInertia3, SBInverseMomentOfInertia3

VisualPreset library#

SBDVisualPreset can now define selections using a selection filter string instead of SBDDataGraphNodeSelector.

Facade library group#

New functions (the list is not full):

  • SAMSON::getNextNodeName
  • SAMSON::getActiveSelectionFilterName, SAMSON::getActiveSelectionFilterNSL, SAMSON::setActiveSelectionFilterByName
  • SAMSON::isAppInitialized
  • SAMSON::getViewportPixelRatio
  • SAMSON::renderViewport - renders the viewport into an image; and other functions related to path-tracing.
  • SAMSON::createRenderPreset, and other functions related to rendering options.
  • SAMSON::getChoiceFromUser, SAMSON::getPromptFromUser, SAMSON::getCredentialsFromUser, SAMSON::getReplyFromUser, SAMSON::getLikeFromUser
  • SAMSON::getActionByText - returns and action by its name in the menu.
  • SAMSON::runPythonFile, SAMSON::runPythonCode
  • SAMSON::canImportFromFile
  • SAMSON::getOpenGLFunctions - a convenience function that initializes and returns an OpenGL functions.
  • SAMSON::hasNode

Renamed SAMSON::getColorPaletteFromUser into SAMSON::getPaletteFromUser.

GUI library group#

New libraries:

  • SBGAssistant. See SBDAssistant.
  • Render - a new library that describes SAMSON's render graph.

Better handling of docked windows (e.g., added new class SBGWindowDock, etc.).

Removed the RenderingPass enum from SBGEditor in favor of unification with the RenderingPass enum from SBDDataGraphNode - simply replace by SBNode::RenderingPass.

IO library group#

Changes in attributed of the following functions (parameters are now provided via std::unordered_map instead of using SBList):

  • SBExporter::exportToFile
  • SBImporter::importFromFile

New functions:

  • SBImporter::canImportFromFile - a virtual function that can be overloaded in importers which returns whether the importer can import the specified file corresponding to its format.

Modeling library group#

  • [Breaking change] Removed SBStructuralParticle base class and SBPseudoAtom class, leaving only SBMStructuralModelNodeAtom. Removed SBPseudoBond class leaving only SBMStructuralModelNodeBond.

    • SBMDynamicalModelEvent::StructuralParticleAddBegin, SBMDynamicalModelEvent::StructuralParticleAddEnd, SBMDynamicalModelEvent::StructuralParticleRemoveBegin, SBMDynamicalModelEvent::StructuralParticleRemoveEnd, event types were renamed into SBMDynamicalModelEvent::AtomAddBegin, SBMDynamicalModelEvent::AtomAddEnd, SBMDynamicalModelEvent::AtomRemoveBegin, SBMDynamicalModelEvent::AtomRemoveEnd, accordingly.
    • SBStructuralEvent::AtomPositionChanged and SBStructuralEvent::AtomMassChanged instead of SBStructuralEvent::ParticlePositionChanged and SBStructuralEvent::ParticleMassChanged, accordingly.
    • The short name SBDynamicalParticle for SBMDynamicalModelNodeParticle has been modified into SBParticle.
    • Functions in SBMStructuralModelPath, SBMStructuralModelConformation, SBMDynamicalModelParticleSystem that had StructuralParticle or Particle in their name were renamed to have Atom in their name, for example, SBPath::getStructuralParticleIndexer is now SBPath::getAtomIndexer and returns SBPointerIndexer instead of SBPointerIndexer.
    • Functions in SBMStructuralModelGrid, SBMStructuralModelPath, SBMStructuralModelConformation, SBSNeighborSearchParticleSystem, SBSNeighborSearchParticleSystemPBC, SBSNeighborSearchParticleSystemGrid, SBSNeighborSearchParticleSystemGridPBC that were operating with SBStructuralParticle are now operating with SBMStructuralModelNodeAtom.
  • New type of SBMElement and SBMStructuralModelNodeAtom: coarse-grained:

    • SBElement::Type::CoarseGrained
  • New functions SBElement::getCovalentRadius, SBMElementTable::getCovalentRadius, SBAtom::getCovalentRadius that return the covalent radius for a specific bond type.

  • New functions in SBMStructuralModel:

    • SBStructuralModel::createCovalentBonds to create covalent bonds with some margin
    • SBStructuralModel::getStructuralSignalFlag, SBStructuralModel::setStructuralSignalFlag
    • SBStructuralModel::getSumOfFormalCharges
    • SBStructuralModel::getSumOfPartialCharges
    • SBStructuralModel::getCenterOfFormalCharge
    • SBStructuralModel::getCenterOfPartialCharge
    • SBStructuralModel::getDipoleVectorAtCenterOfMass
    • SBStructuralModel::getDipoleVectorAtCenterOfCharge
    • SBStructuralModel::getDipoleMomentAtCenterOfMass
    • SBStructuralModel::getDipoleMomentAtCenterOfCharge
    • SBStructuralModel::getSolventAccessibleSurfaceArea
  • New functions in SBMStructuralModelNodeResidue:

    • SBResidue::hasStandardResidueName and corresponding node predicate SBResidue::HasStandardResidueName
    • SBResidue::isStandardResidueName
    • SBResidue::isStandardAminoAcidName
    • SBResidue::isStandardNucleicAcidName
    • SBResidue::getResidueTypeFromAminoAcidOneLetterCode
  • New functions in SBMStructuralModelNodeGroup:

    • SBStructuralGroup::isMonatomicIon
    • SBStructuralGroup::getNumberOfCoarseGrainedAtoms
  • Changes in SBMStructuralModelNode:

    • The mobility flag has been moved to SBMStructuralModelNodeAtom (see below).
  • Changes in SBMStructuralModelNodeAtom:

    • [Breaking change] Renamed SBAtom::Hybridization::None to SBAtom::Hybridization::NoHybridization
    • The mobility flag has been moved from SBMStructuralModelNode to SBMStructuralModelNodeAtom and is now called the fixed flag and the previous name with the corresponding functions in SBMStructuralModelNodeAtom will be deprecated in one of the future releases. The following functions are marked as deprecated:
      • SBAtom::isMobile - use SBAtom::isFixed
      • SBAtom::getMobilityFlag - use SBAtom::getFixedFlag with the corresponding node predicate SBAtom::GetFixedFlag instead of SBStructuralNode::GetMobilityFlag
      • SBAtom::setMobilityFlag - use SBAtom::setFixedFlag
      • SBStructuralEvent::FixedFlagChanged instead of SBStructuralEvent::MobilityFlagChanged
    • New functions to get and set positions and coordinates. These functions give the possibility to obtain the current position, and set the position based on a vector of atom positions. New node predicates:
      • SBAtom::GetX, SBAtom::GetY, SBAtom::GetZ
      • SBAtom::GetPositions
      • SBAtom::IsBeyond
      • SBAtom::IsWithin
    • New function SBAtom::getConnectedComponent to get the connected component up to the specified number of atoms.
    • New convenience functions:
      • SBAtom::isCarbon with the corresponding node predicate SBAtom::IsCarbon
      • SBAtom::isHydrogen with the corresponding node predicate SBAtom::IsHydrogen
      • SBAtom::isNitrogen with the corresponding node predicate SBAtom::IsNitrogen
      • SBAtom::isOxygen with the corresponding node predicate SBAtom::IsOxygen
      • SBAtom::isSulfur with the corresponding node predicate SBAtom::IsSulfur
      • SBAtom::isUnknown with the corresponding node predicate SBAtom::IsUnknown
    • New functions related to coarse-graining:
      • SBAtom::isCoarseGrained with the corresponding node predicate SBAtom::IsCoarseGrained
      • SBAtom::getCoarseGrainedType with the corresponding node predicate SBAtom::GetCoarseGrainedType
      • SBAtom::setCoarseGrainedType
      • SBAtom::getCoarseGrainedRadius with the corresponding node predicate SBAtom::GetCoarseGrainedRadius
      • SBAtom::setCoarseGrainedRadius
      • SBAtom::getCoarseGrainedMass with the corresponding node predicate SBAtom::GetCoarseGrainedMass
      • SBAtom::setCoarseGrainedMass
      • SBAtom::getCoarseGrainedColor with the corresponding node predicate SBAtom::GetCoarseGrainedColor
      • SBAtom::setCoarseGrainedColor
      • SBNode::getNumberOfCoarseGrainedAtoms
    • New function SBAtom::getColor
  • New events in SBMStructuralModelEvent:

    • SBStructuralEvent::Any
    • SBStructuralEvent::AtomPositionChanged instead of SBStructuralEvent::ParticlePositionChanged
    • SBStructuralEvent::AtomMassChanged instead of SBStructuralEvent::ParticleMassChanged
    • SBStructuralEvent::FixedFlagChanged instead of SBStructuralEvent::MobilityFlagChanged
    • SBStructuralEvent::CoarseGrainedTypeChanged
    • SBStructuralEvent::CoarseGrainedRadiusChanged
    • SBStructuralEvent::CoarseGrainedMassChanged
    • SBStructuralEvent::CoarseGrainedColorChanged
  • Visual models and meshes can now be defined using the arrays of the following new classes: SBMVisualModelCylinderArray, SBMVisualModelLineArray, SBMVisualModelSphereArray, SBMVisualModelTriangleArray, SBMVisualModelTubeArray. Added functions that return these arrays from visual models. This is, for example, used for path-tracing of visual models using Cycles.