Class SBMStructuralModel#
ClassList > SBMStructuralModel
This class describes a structural model. More...
#include <SBMStructuralModel.hpp>
Inherits the following classes: SBMModel
Public Types inherited from SBDDataGraphNode#
See SBDDataGraphNode
| Type | Name |
|---|---|
| enum | RenderingPass The rendering pass. |
| enum | Type The type of the data graph node. |
Public Functions#
| Type | Name |
|---|---|
| SBMStructuralModel () Builds a structural model. |
|
| SB_NODE_GETTER_0 (SB_SBMSTRUCTURALMODEL_EXPORT, std::string, GetTitleInformation) |
|
| SB_NODE_GETTER_0 (SB_SBMSTRUCTURALMODEL_EXPORT, std::string, GetPrimaryStructureInformation) |
|
| SB_NODE_GETTER_0 (SB_SBMSTRUCTURALMODEL_EXPORT, std::string, GetHeterogenInformation) |
|
| SB_NODE_GETTER_0 (SB_SBMSTRUCTURALMODEL_EXPORT, std::string, GetSecondaryStructureInformation) |
|
| SB_NODE_GETTER_0 (SB_SBMSTRUCTURALMODEL_EXPORT, std::string, GetConnectivityAnnotationInformation) |
|
| SB_NODE_GETTER_0 (SB_SBMSTRUCTURALMODEL_EXPORT, std::string, GetMiscellaneousInformation) |
|
| SB_NODE_GETTER_0 (SB_SBMSTRUCTURALMODEL_EXPORT, std::string, GetCrystallographicAndTransformationInformation) |
|
| SB_NODE_PREDICATE_0 (SB_SBMSTRUCTURALMODEL_EXPORT, HasTitleInformation) |
|
| SB_NODE_PREDICATE_0 (SB_SBMSTRUCTURALMODEL_EXPORT, HasPrimaryStructureInformation) |
|
| SB_NODE_PREDICATE_0 (SB_SBMSTRUCTURALMODEL_EXPORT, HasHeterogenInformation) |
|
| SB_NODE_PREDICATE_0 (SB_SBMSTRUCTURALMODEL_EXPORT, HasSecondaryStructureInformation) |
|
| SB_NODE_PREDICATE_0 (SB_SBMSTRUCTURALMODEL_EXPORT, HasConnectivityAnnotationInformation) |
|
| SB_NODE_PREDICATE_0 (SB_SBMSTRUCTURALMODEL_EXPORT, HasMiscellaneousInformation) |
|
| SB_NODE_PREDICATE_0 (SB_SBMSTRUCTURALMODEL_EXPORT, HasCrystallographicAndTransformationInformation) |
|
| virtual bool | addChild (SBNode * node, SBNode * nextNode=nullptr) override Adds a child to the node. |
| virtual bool | canAddChild (const SBNode * node, const SBNode * nextNode=nullptr) override const Returns whether this node can add node as a child. |
| virtual bool | canAddChildType (SBNode::Type nodeType) override const Returns whether this node can add a node with type nodeType as a child. |
| virtual bool | canHaveDescendantType (SBNode::Type nodeType) override const Returns whether this node can have a node with type nodeType as a descendant. |
| bool | centerInUnitCell () Centers the structural model inside its unit cell. |
| void | centerTransform () Centers the pivot of the transform on the center of mass of the atoms contained in the structural model. |
| void | clearConnectivityAnnotationInformation () Clears the model's connectivity annotation information. |
| void | clearCrystallographicAndTransformationInformation () Clears the model's crystallographic and transformation information. |
| void | clearHeterogenInformation () Clears the model's heterogen information. |
| void | clearMiscellaneousInformation () Clears the model's miscellaneous information. |
| void | clearPrimaryStructureInformation () Clears the model's primary structure information. |
| void | clearSecondaryStructureInformation () Clears the model's secondary structure information. |
| void | clearTitleInformation () Clears the model's title information. |
| virtual SBMStructuralModel * | clone () override Returns a copy of the node and its descendants. |
| virtual void | collectAmbientOcclusion (const SBPosition3 & boxOrigin, const SBPosition3 & boxSize, unsigned int nCellsX, unsigned int nCellsY, unsigned int nCellsZ, float * ambientOcclusionData) To collect ambient occlusion data. |
| bool | computeSecondaryStructure (bool & updated, bool forceUpdate=false) Computes the secondary structure for all residues in the structural model. |
| void | connectStructuralSignalToSlot (SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)(SBStructuralEvent *) functionPointer, SBStructuralEvent::Type eventType=SBStructuralEvent::Type::Any, SBCReferenceTarget * nextReferenceTarget=nullptr, void(SBCReferenceTarget::*)(SBStructuralEvent *) nextFunctionPointer=nullptr) Connects the structural signal to a slot. |
| void | createCovalentBonds () Builds covalent bonds for the atoms belonging to the structural model according to the inter-atomic distances. |
| void | createCovalentBonds (SBQuantity::length additionalMargin) Builds covalent bonds for the atoms belonging to the structural model according to the inter-atomic distances with the additional margin additionalMargin . |
| int | createCovalentBondsByResidueType () Builds covalent bonds for the atoms belonging to the structural model according to the residue types, regardless of inter-atomic distances. If the bonds are already present, it sets the order of covalent bonds for the atoms belonging to the structural model according to the residue types. |
| virtual SBMStructuralModel * | createSupercell (unsigned int nA, unsigned int nB, unsigned int nC) const Creates a supercell by replicating the structural model along the lattice vectors. |
| void | disconnectStructuralSignalFromSlot (SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)(SBStructuralEvent *) functionPointer, SBStructuralEvent::Type eventType=SBStructuralEvent::Type::Any) Disconnects the structural signal from a slot. |
| virtual void | expandBounds (SBIAPosition3 & bounds) const Expands the bounds to make sure the visual model fits inside them. |
| virtual void | forEachNodeDepthFirst (void(*)(SBDDataGraphNode *node) action) override Performs the action on each node (this structural model and all its children), depth-first. |
| virtual void | forEachNodeDepthFirst (SBCClass * object, void(SBCClass::*)(SBDDataGraphNode *node) action) override Performs the object 'saction on each node (this structural model and all its children), depth-first. |
| virtual SBPointerList< SBMStructuralModelNode > const * | getChildren () const Returns a list of children. |
| std::string const & | getConnectivityAnnotationInformation () const Returns the model's connectivity annotation information. |
| std::string const & | getCrystallographicAndTransformationInformation () const Returns the model's crystallographic and transformation information. |
| std::string const & | getHeterogenInformation () const Returns the model's heterogen information. |
| virtual bool | getLockedFlag () override const Returns the locked flag. |
| SBLength3 | getMinimumImageDisplacement (const SBPosition3 & position1, const SBPosition3 & position2) const Returns the minimum-image displacement from position1 toposition2 using the structural model unit cell. |
| SBLength3 | getMinimumImageDisplacement (const SBMStructuralModelNodeAtom * atom1, const SBMStructuralModelNodeAtom * atom2) const Returns the minimum-image displacement from atom1 toatom2 using the structural model unit cell. |
| SBQuantity::length | getMinimumImageDistance (const SBPosition3 & position1, const SBPosition3 & position2) const Returns the minimum-image distance between position1 andposition2 using the structural model unit cell. |
| SBQuantity::length | getMinimumImageDistance (const SBMStructuralModelNodeAtom * atom1, const SBMStructuralModelNodeAtom * atom2) const Returns the minimum-image distance between atom1 andatom2 using the structural model unit cell. |
| std::string const & | getMiscellaneousInformation () const Returns the model's miscellaneous information. |
| virtual SBDDataGraphNode::Type | getModelType () override const Returns the model type. |
| virtual SBQuantity::mass | getMolecularWeight () override Returns the molecular weight. |
| virtual void | getNodes (SBNodeIndexer & nodeIndexer, SBNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const Collects nodes into nodeIndexer , based on anodeType , a selection status and avisitPredicate , with or without dependencies. |
| virtual void | getNodes (SBNodeIndexer & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const Collects nodes into nodeIndexer , based on aselectionPredicate and avisitPredicate , with or without dependencies. |
| virtual unsigned int | getNumberOfAtoms () override Returns the number of atoms. |
| virtual unsigned int | getNumberOfCarbons () override Returns the number of carbons. |
| virtual unsigned int | getNumberOfChains () override Returns the number of chains. |
| virtual unsigned int | getNumberOfCoarseGrainedAtoms () override Returns the number of coarse-grained atoms. |
| virtual unsigned int | getNumberOfHydrogens () override Returns the number of hydrogens. |
| virtual unsigned int | getNumberOfMolecules () override Returns the number of molecules. |
| virtual unsigned int | getNumberOfNitrogens () override Returns the number of nitrogens. |
| virtual unsigned int | getNumberOfOtherAtoms () override Returns the number of other atoms. |
| virtual unsigned int | getNumberOfOxygens () override Returns the number of oxygens. |
| virtual unsigned int | getNumberOfResidues () override Returns the number of residues. |
| virtual unsigned int | getNumberOfSegments () override Returns the number of segments. |
| virtual unsigned int | getNumberOfStructuralGroups () override Returns the number of structural groups. |
| virtual unsigned int | getNumberOfStructuralModels () override Returns the number of structural models. |
| virtual unsigned int | getNumberOfSulfurs () override Returns the number of sulfurs. |
| SBMatrix33 const & | getOrientation () const Returns the orientation of the structural model. |
| SBPosition3 const & | getPosition () const Returns the position of the structural model. |
| std::string const & | getPrimaryStructureInformation () const Returns the model's primary structure information. |
| std::string const & | getSecondaryStructureInformation () const Returns the model's secondary structure information. |
| SBMStructuralModelNodeRoot * | getStructuralRoot () const Returns the structural root node of the structural model. |
| bool | getStructuralSignalFlag () const Returns true when the model can send structural signals. |
| virtual int | getSumOfFormalCharges () override Returns the sum of formal charges. |
| virtual float | getSumOfPartialCharges () override Returns the sum of partial charges. |
| std::string const & | getTitleInformation () const Returns the model's title information. |
| SBSpatialTransform const & | getTransform () const Returns the spatial transform of the structural model. |
| virtual SBDDataGraphNode::Type | getType () override const Returns the type of the data graph node. |
| SBUnitCell const & | getUnitCell () const Returns the unit cell of the structural model. |
| void | getWater (SBNodeIndexer & resultNodeIndexer) const Finds water nodes in the structural model. |
| bool | hasConnectivityAnnotationInformation () const Returns true when the model's connectivity annotation information is set. |
| bool | hasCrystallographicAndTransformationInformation () const Returns true when the model's crystallographic and transformation information is set. |
| bool | hasFiniteUnitCell () const Returns true if and only if the structural model has a finite unit cell. |
| bool | hasHeterogenInformation () const Returns true when the model's heterogen information is set. |
| bool | hasMiscellaneousInformation () const Returns true when the model's miscellaneous information is set. |
| virtual bool | hasNode (SBNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const Checks for nodes based on a nodeType , a selection status and avisitPredicate , with or without dependencies. |
| virtual bool | hasNode (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const Checks for nodes based on a selectionPredicate and avisitPredicate , with or without dependencies. |
| bool | hasPrimaryStructureInformation () const Returns true when the model's primary structure information is set. |
| bool | hasSecondaryStructureInformation () const Returns true when the model's secondary structure information is set. |
| bool | hasTitleInformation () const Returns true when the model's title information is set. |
| virtual bool | isLocked () override const Returns whether the model is locked. |
| bool | isPeriodic () const Returns true if and only if the structural model is periodic along at least one axis. |
| virtual bool | isSerializable () override const Returns true __ |
| bool | makeWhole () Reconstructs the bond-connected components of the structural model across periodic boundaries. |
| bool | populateChainIDs (bool forceRenumbering=false) Populates the chain IDs for all chains in the structural model. |
| virtual void | print (unsigned int offset=0) override const Prints debugging information. |
| virtual bool | removeChild (SBNode * node) override Removes a child from the node. |
| void | rotate (const SBVector3 & axis, const SBQuantity::dimensionless & angle) Rotates the structural model. |
| virtual void | serialize (SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) override const Serializes the node. |
| void | setConnectivityAnnotationInformation (const std::string & info) Sets the model's connectivity annotation information. |
| void | setCrystallographicAndTransformationInformation (const std::string & info) Sets the model's crystallographic and transformation information. |
| void | setHeterogenInformation (const std::string & info) Sets the model's heterogen information. |
| virtual void | setLockedFlag (bool flag) override Sets the locked flag. |
| void | setMiscellaneousInformation (const std::string & info) Sets the model's miscellaneous information. |
| void | setOrientation (const SBMatrix33 & orientation) Sets the orientation of the structural model. |
| void | setOrientation (const SBMatrix33 & orientation, bool transformParticles) Sets the orientation of the structural model. |
| void | setOrientation (SBMatrix33 const & newOrientation, SBMatrix33 const & oldOrientation, bool transformParticles=true) Sets the newOrientation and theoldOrientation of the structural model. |
| void | setPosition (const SBPosition3 & position) Sets the position of the structural model. |
| void | setPosition (const SBPosition3 & position, bool transformParticles) Sets the position of the structural model. |
| void | setPosition (SBPosition3 const & newPosition, SBPosition3 const & oldPosition, bool transformParticles=true) Sets the newPosition and theoldPosition of the structural model. |
| void | setPrimaryStructureInformation (const std::string & info) Sets the model's primary structure information. |
| void | setSecondaryStructureInformation (const std::string & info) Sets the model's secondary structure information. |
| void | setStructuralSignalFlag (bool structuralSignalFlag) Sets whether the model can send structural signals. |
| void | setTitleInformation (const std::string & info) Sets the model's title information. |
| void | setTransform (const SBSpatialTransform & transform) Sets the spatial transform of the structural model. |
| void | setTransform (const SBSpatialTransform & transform, bool transformParticles) Sets the spatial transform of the structural model. |
| void | setTransform (SBSpatialTransform const & newTransform, SBSpatialTransform const & oldTransform, bool transformParticles=true) Sets the newTransform and theoldTransform of the structural model. |
| void | setUnitCell (const SBUnitCell & unitCell) Sets the unit cell of the structural model. |
| bool | structuralSignalIsConnectedToSlot (SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)(SBStructuralEvent *) functionPointer, SBStructuralEvent::Type eventType=SBStructuralEvent::Type::Any) const Returns true if and only if the structural signal is connected to a given slot. |
| std::optional< std::string > | toSMILES () const Converts the structural model into a SMILES string. |
| std::optional< std::string > | toSVG () const Converts the structural model into a 2D SVG representation. |
| void | transform (const SBSpatialTransform & transform) Applies a spatial transform to the structural model. |
| void | transformNonHierarchicalModel () Transforms a non-hierarchical, single level, structural model by placing connected components into separate structural groups and combininig similar groups into chains. |
| void | translate (const SBLength3 & translation) Translates the structural model. |
| virtual void | unserialize (SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) override Unserializes the node. |
| bool | wrapToUnitCell (bool keepConnectedComponentsWhole=true) Wraps the atoms of the structural model into the primary unit cell. |
| virtual | ~SBMStructuralModel () Destructor. |
Public Functions inherited from SBMModel#
See SBMModel
| Type | Name |
|---|---|
| SB_NODE_GETTER_0 (SB_SBMMODEL_EXPORT, SBDDataGraphNode::Type, GetModelType) |
|
| SB_NODE_PREDICATE_1 (SB_SBMMODEL_EXPORT, IsModelType, SBDDataGraphNode::Type) |
|
| void | clearSourceFileName () Clears the name of the file associated to the model. |
| virtual SBMModel * | clone () override Returns a copy of the node and its descendants. |
| virtual SBDDataGraphNode::Type | getModelType () const Returns the model type. |
| SBMModel * | getNextModel () const Returns the next model in the parent. |
| virtual unsigned int | getOpacity () override const Returns the opacity. |
| SBMModel * | getPreviousModel () const Returns the previous model in the parent. |
| bool | getShadowingFlag () const Returns whether the model casts shadows. |
| const std::string & | getSourceFileName () const Returns the name of the file associated to the model. |
| virtual unsigned int | getTransparency () override const Returns the transparency. |
| virtual SBDDataGraphNode::Type | getType () override const Returns the type of the data graph node. |
| bool | hasSourceFileName () const Returns true when the model has the source file name set. |
| virtual bool | isSerializable () override const Returns true __ |
| virtual void | print (unsigned int offset=0) override const Prints debugging information. |
| virtual void | serialize (SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) override const Serializes the node. |
| virtual void | setOpacity (unsigned int opacity) override Sets the opacity. |
| void | setShadowingFlag (bool shadowingFlag) Sets whether the model casts shadows. |
| void | setSourceFileName (const std::string & fileName) Sets the name of the file associated to the model. |
| virtual void | setTransparency (unsigned int transparency) override Sets the transparency. |
| virtual void | unserialize (SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) override Unserializes the node. |
| virtual | ~SBMModel () Delete the model. |
Public Functions inherited from SBDDataGraphNode#
See SBDDataGraphNode
| Type | Name |
|---|---|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBCClassProxy *, GetProxy) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, This) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetParent) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetThis) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetNextNode) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetPreviousNode) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDocument *, GetDocument) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetRoot) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetNodeIndex) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode::Type, GetType) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, bool, GetSelectionFlag) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, bool, GetLockedFlag) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, bool, GetVisibilityFlag) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, bool, GetHighlightingFlag) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetFlags) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, std::string, GetName) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, std::string, GetClass) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, std::string, GetElement) |
|
| SB_NODE_GETTER_0 (SB_SBDDATAGRAPH_EXPORT, SBCContainerUUID, GetElementUUID) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, All) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, None) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsModel) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsAtom) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsBond) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsStructuralNode) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsStructuralModel) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsVisualModel) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsMesh) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsLight) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsInteractionModel) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsDynamicalModel) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsPropertyModel) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsSimulator) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsBallAndStick) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsLicorice) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsVanDerWaals) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsCartoon) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsRibbon) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsTube) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsGaussianSurface) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsSolventAccessibleSurface) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsSolventExcludedSurface) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, HasMaterial) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, OwnsMaterial) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsLocked) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsSerializable) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsCreated) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsErased) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsSelected) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsVisible) |
|
| SB_NODE_PREDICATE_0 (SB_SBDDATAGRAPH_EXPORT, IsHighlighted) |
|
| SB_NODE_PREDICATE_1 (SB_SBDDATAGRAPH_EXPORT, IsType, SBDDataGraphNode::Type) |
|
| SB_NODE_PREDICATE_1 (SB_SBDDATAGRAPH_EXPORT, HasOneOf, SBNodeIndexer) |
|
| virtual bool | addChild (SBDDataGraphNode * node, SBDDataGraphNode * nextNode=nullptr) Adds a child to the node. |
| bool | addMaterial (SBDDataGraphNodeMaterial * material) Adds a material. |
| bool | baseSignalIsConnectedToSlot (SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)(SBBaseEvent *) functionPointer) const Returns true when the base signal is connected to a slot. |
| virtual bool | canAddChild (const SBDDataGraphNode * node, const SBDDataGraphNode * nextNode=nullptr) const Returns whether this node can add node as a child. |
| virtual bool | canAddChildType (SBDDataGraphNode::Type nodeType) const Returns whether this node can add a node with type nodeType as a child. |
| bool | canAddMaterial () const Returns whether can add a material to the node based on its type. |
| virtual bool | canHaveDescendantType (SBDDataGraphNode::Type nodeType) const Returns whether this node can have a node with type nodeType as a descendant. |
| virtual SBDDataGraphNode * | clone () Returns a copy of the node and its descendants. |
| void | connectBaseSignalToSlot (SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)(SBBaseEvent *) functionPointer, SBCReferenceTarget * nextReferenceTarget=0, void(SBCReferenceTarget::*)(SBBaseEvent *) nextFunctionPointer=0) Connects the base signal to a slot. |
| unsigned int | countNodes (SBDDataGraphNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const Counts nodes based on a nodeType , a selection status and avisitPredicate , with or without dependencies. |
| unsigned int | countNodes (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const Counts nodes based on a selectionPredicate and avisitPredicate , with or without dependencies. |
| void | create () Creates the node. |
| bool | descendsFrom (const SBDDataGraphNode * node) const Returns true if and only if this node isnode , or descends from it. |
| bool | descendsFrom (const SBNodeIndexer & nodeIndexer) const Returns true if and only if this node is one of the nodes of thenodeIndexer , or descends from one of them. |
| bool | descendsFrom (SBPointerIndexer< SBDDataGraphNode > * nodePointerIndexer) const Returns true if and only if this node is one of the nodes of thenodePointerIndexer , or descends from one of them. |
| void | disconnectBaseSignalFromSlot (SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)(SBBaseEvent *) functionPointer) Disconnects the base signal from a slot. |
| virtual void | display (RenderingPass renderingPass) Displays the node. |
| virtual void | display () Displays the node (deprecated) |
| virtual void | displayForSelection () Displays the node for selection purposes (deprecated) |
| virtual void | displayForShadow () Displays the node for shadowing purposes (deprecated) |
| void | erase () Erases the node. |
| virtual void | forEachNodeDepthFirst (void(*)(SBDDataGraphNode *node) action) Performs the action on this node. |
| virtual void | forEachNodeDepthFirst (SBCClass * object, void(SBCClass::*)(SBDDataGraphNode *node) action) Performs the objects 'saction on this node. |
| unsigned int | getDefaultOpacity () const Returns the default opacity. |
| unsigned int | getDefaultTransparency () const Returns the default transparency. |
| SBDDocument * | getDocument () const Returns the document the node belongs to. |
| virtual unsigned int | getFlags () const Returns the flags. |
| virtual std::string | getHierarchyString (const std::string & separator=" / ", bool includeNodeType=false) const Returns a string with hierarchical information on the node and its parents names. |
| bool | getHighlightingFlag () const Returns the highlighting flag. |
| virtual unsigned int | getInheritedFlags () const Returns the inherited flags. |
| float | getInheritedOpacity () const Returns the cumulative opacity, when taking into account the ascendants. |
| float | getInheritedTransparency () const Returns the cumulative transparency, when taking into account the ascendants. |
| virtual bool | getLockedFlag () const Returns the locked flag. |
| SBDDataGraphNodeMaterial * | getMaterial () const Returns the material. |
| SBDDataGraphNode * | getMaterialOwner () const Returns the node whose material is inherited. |
| unsigned int | getMaximumOpacity () const Returns the maximum opacity. |
| unsigned int | getMaximumTransparency () const Returns the maximum transparency. |
| unsigned int | getMinimumOpacity () const Returns the minimum opacity. |
| unsigned int | getMinimumTransparency () const Returns the minimum transparency. |
| virtual SBQuantity::mass | getMolecularWeight () Returns the molecular weight. |
| virtual std::string const & | getName () const Returns the name of the node. |
| SBDDataGraphNode * | getNextNode () const Returns the pointer to the next node in the children of the node's parent. |
| SBDDataGraphNode * | getNextNode (SBDDataGraphNode::Type nodeType) const Returns the pointer to the next node with type nodeType in the children of the node's parent. |
| unsigned int | getNodeIndex () const Returns the node index (unique in the whole data graph, but non-persistent) |
| SBUUID | getNodeUUID () const Returns the node UUID. |
| virtual void | getNodes (SBNodeIndexer & nodeIndexer, SBDDataGraphNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const Collects nodes into nodeIndexer , based on anodeType , a selection status and avisitPredicate , with or without dependencies. |
| virtual void | getNodes (SBNodeIndexer & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const Collects nodes into nodeIndexer , based on aselectionPredicate and avisitPredicate , with or without dependencies. |
| virtual unsigned int | getNumberOfAtoms () Returns the number of atoms. |
| virtual unsigned int | getNumberOfCarbons () Returns the number of carbons. |
| virtual unsigned int | getNumberOfChains () Returns the number of chains. |
| virtual unsigned int | getNumberOfCoarseGrainedAtoms () Returns the number of coarse-grained atoms. |
| virtual unsigned int | getNumberOfHydrogens () Returns the number of hydrogens. |
| virtual unsigned int | getNumberOfMolecules () Returns the number of molecules. |
| virtual unsigned int | getNumberOfNitrogens () Returns the number of nitrogens. |
| virtual unsigned int | getNumberOfOtherAtoms () Returns the number of other atoms. |
| virtual unsigned int | getNumberOfOxygens () Returns the number of oxygens. |
| virtual unsigned int | getNumberOfResidues () Returns the number of residues. |
| virtual unsigned int | getNumberOfSegments () Returns the number of segments. |
| virtual unsigned int | getNumberOfStructuralGroups () Returns the number of structural groups. |
| virtual unsigned int | getNumberOfStructuralModels () Returns the number of structural models. |
| virtual unsigned int | getNumberOfSulfurs () Returns the number of sulfurs. |
| virtual unsigned int | getOpacity () const Returns the opacity. |
| unsigned int | getOpacitySingleStep () const Returns the opacity single step. |
| std::string | getOpacitySuffix () const Returns the opacity suffix. |
| SBDDataGraphNode * | getParent () const Returns the parent of the node. |
| SBDDataGraphNode * | getPreviousNode () const Returns the pointer to the previous node in the children of the node's parent. |
| SBDDataGraphNode * | getPreviousNode (SBDDataGraphNode::Type nodeType) const Returns the pointer to the previous node with type nodeType in the children of the node's parent. |
| SBDDataGraphNode * | getRoot () const Returns the root of the hierarchy the node belongs to. |
| bool | getSelected () const Returns whether the node is selected. |
| bool | getSelectionFlag () const Returns the selection flag. |
| virtual int | getSumOfFormalCharges () Returns the sum of formal charges. |
| virtual float | getSumOfPartialCharges () Returns the sum of partial charges. |
| SBDDataGraphNode * | getThisNode () const Returns the pointer to this node. |
| virtual unsigned int | getTransparency () const Returns the transparency. |
| unsigned int | getTransparencySingleStep () const Returns the transparency single step. |
| std::string | getTransparencySuffix () const Returns the transparency suffix. |
| virtual Type | getType () const Returns the type of the data graph node. |
| std::string | getTypeString (bool humanReadable=false) const Returns a string describing the type of the data graph node. |
| bool | getVisibilityFlag () const Returns the visibility flag. |
| bool | getVisible () const Returns whether the node is visible. |
| bool | hasMaterial () const Returns whether the node has a material (by itself, or inherited) |
| virtual bool | hasNode (SBDDataGraphNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const Returns whether the node has nodes based on a nodeType , a selection status and avisitPredicate , with or without dependencies. |
| virtual bool | hasNode (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const Returns whether the node has nodes based on a selectionPredicate and avisitPredicate , with or without dependencies. |
| bool | hasOneOf (const SBNodeIndexer & nodeIndexer) const Returns true if and only if this node is one of the nodes of thenodeIndexer , or is the ancestor of one of them, or is a group that stores one of them. |
| bool | hasOpacityRange () const Returns whether the node has the opacity range. |
| bool | hasTransparencyRange () const Returns whether the node has the transparency range. |
| bool | isAtom () const Returns true when the node is an atom. |
| bool | isBallAndStick () const Returns true when the node is the default ball-and-stick visual model. |
| bool | isBond () const Returns true when the node is a bond. |
| bool | isCartoon () const Returns true when the node is the default cartoon visual model. |
| bool | isCreated () const Returns true if and only if the node is created. |
| bool | isDynamicalModel () const Returns true when the node is a dynamical model. |
| bool | isErased () const Returns true if and only if the node is erased. |
| bool | isGaussianSurface () const Returns true when the node is the default Gaussian surface visual model. |
| bool | isHighlighted () const Returns whether the node is highlighted. |
| bool | isIn (const SBDDataGraphNode * node) const Returns true if and only if this node isnode , or descends from it, or belongs to a group stored innode . |
| bool | isIn (const SBNodeIndexer & nodeIndexer) const Returns true if and only if this node is one of the nodes of thenodeIndexer , or descends from one of them, or belongs to a group stored in one of the nodes of thenodeIndexer . |
| bool | isIn (SBPointerIndexer< SBDDataGraphNode > * nodePointerIndexer) const Returns true if and only if this node is one of the nodes of thenodePointerIndexer , or descends from one of them, or belongs to a group stored in of the nodes of thenodePointerIndexer . |
| bool | isInteractionModel () const Returns true when the node is a interaction model. |
| bool | isLicorice () const Returns true when the node is the default licorice visual model. |
| bool | isLight () const Returns true when the node is a light. |
| virtual bool | isLocked () const Returns whether the node is locked. |
| bool | isMesh () const Returns true when the node is a mesh. |
| bool | isModel () const Returns true when the node is a model. |
| bool | isOneOf (const SBNodeIndexer & nodeIndexer) const Returns true if and only if this node is one of the nodes of thenodeIndexer . |
| bool | isOneOf (SBPointerIndexer< SBDDataGraphNode > * nodePointerIndexer) const Returns true if and only if this node is one of the nodes of thenodePointerIndexer . |
| bool | isPropertyModel () const Returns true when the node is a property model. |
| bool | isRibbon () const Returns true when the node is the default ribbon visual model. |
| bool | isSelected () const Returns whether the node is selected. |
| virtual bool | isSerializable () const Returns true when the class is serializable. |
| bool | isSimulator () const Returns true when the node is a simulator. |
| bool | isSolventAccessibleSurface () const Returns true when the node is the default solvent accessible surface visual model. |
| bool | isSolventExcludedSurface () const Returns true when the node is the default solvent excluded surface visual model. |
| bool | isStructuralModel () const Returns true when the node is a structural model. |
| bool | isStructuralNode () const Returns true when the node is a structural node. |
| bool | isTube () const Returns true when the node is the default tube visual model. |
| bool | isType (Type type) const Returns true when the type of the node corresponds totype . |
| bool | isVanDerWaals () const Returns true when the node is the default van der Waals visual model. |
| bool | isVisible () const Returns whether the node is visible. |
| bool | isVisualModel () const Returns true when the node is a visual model. |
| bool | ownsMaterial () const Returns whether the node owns a material. |
| virtual void | print (unsigned int offset=0) const Prints some debugging information. |
| virtual bool | removeChild (SBDDataGraphNode * node) Removes a child from the node. |
| bool | removeMaterial () Removes the material. |
| void | removeMaterialsFromDescendants () Removes materials from all nodes that descend from this node, but it does not remove the material from the node itself. |
| virtual void | serialize (SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) const Serializes the node. |
| void | setHighlightingFlag (bool flag) Sets the highlighting flag. |
| virtual void | setLockedFlag (bool flag) Sets the locked flag. |
| virtual void | setName (const std::string & name) Sets the name of the node. |
| virtual void | setOpacity (unsigned int opacity) Sets the opacity. |
| void | setSelectionFlag (bool flag) Sets the selection flag. |
| virtual void | setTransparency (unsigned int transparency) Sets the transparency. |
| void | setVisibilityFlag (bool flag) Sets the visibility flag. |
| virtual void | unserialize (SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) Unserializes the node. |
Public Functions inherited from SBCReferenceTarget#
| Type | Name |
|---|---|
| SBCReferenceTarget () Builds the reference target. |
|
| unsigned int | getMemoryFootprint () const Returns the memory footprint. |
| void | printReferencesToOwners () const Prints the references to the owners of this reference target. |
| virtual | ~SBCReferenceTarget () Destructor. |
Public Static Functions#
| Type | Name |
|---|---|
| bool | bondExists (SBMStructuralModelNodeAtom * atom1, SBMStructuralModelNodeAtom * atom2) Checks whether the bond between atoms atom1 andatom2 exists. |
| bool | centerInUnitCell (const SBNodeIndexer & nodeIndexer) Centers the atoms from nodeIndexer using their common unit cell. |
| bool | centerInUnitCell (const SBNodeIndexer & nodeIndexer, const SBUnitCell & unitCell) Centers the atoms from nodeIndexer usingunitCell . |
| bool | cloneStructuralNodes (SBNodeIndexer & structuralModelIndexer, const SBNodeIndexer & structuralNodeIndexer) Adds in structuralModelIndexer the structural models resulting from cloning the structural nodes instructuralNodeIndexer . |
| SBSpatialDomain | computeDomain (const SBNodeIndexer & nodeIndexer) Computes the domain containing the atoms and bond atoms in the node indexer. |
| bool | createBond (SBMStructuralModelNodeAtom * atom1, SBMStructuralModelNodeAtom * atom2, double bondOrder=1.0, SBBond::BondType bondType=SBBond::BondType::Undefined) Creates a bond between atom1 andatom2 if there is none; sets the bond order tobondOrder and the bond type tobondType . |
| int | createCovalentBondsByResidueType (const SBNodeIndexer & nodeIndexer) Builds covalent bonds for the atoms belonging to the given residues of the structural model according to the residue types, regardless of inter-atomic distances. If the bonds are already present, it sets the order of covalent bonds for the atoms belonging to the structural model according to the residue types. |
| SBMStructuralModel * | createModel (const std::string & smiles, const std::string & name, bool addHydrogens=true, bool addExplicitHydrogenOnly=false, bool kekulize=true, bool runUFF=true, int uffMaxIters=500, double uffVdwThreshold=10.0, int uffConfId=0) Creates a structural model from a SMILES string. |
| bool | exportImage (const std::string & smiles, const std::string & outputFile, int widthPx=600, int marginPx=10, double lineWidth=3.0, const std::string & fontFamily="Sans Serif Collection") Exports a molecular structure (SMILES) as an image file (png, jpg, svg). |
| bool | extractStructuralNodes (SBNodeIndexer & structuralModelIndexer, const SBNodeIndexer & structuralNodeIndexer) Adds in structuralModelIndexer the structural models resulting from extracting the structural nodes instructuralNodeIndexer . |
| SBMStructuralModelNodeAtom * | findAtom (const SBNodeIndexer & nodeIndexer, SBElement::Type type, const std::string & name) Returns, if found, an atom from a node indexer nodeIndexer with the typetype and namename ; else returns 0. |
| SBMStructuralModelNodeAtom * | findAtom (const SBIndexer< SBMStructuralModelNodeAtom * > & atomIndexer, SBElement::Type type, const std::string & name) Returns, if found, an atom from an atom node indexer atomIndexer with the typetype and namename ; else returns 0. |
| SBMStructuralModelNodeAtom * | findAtom (const SBNodeIndexer & nodeIndexer, SBElement::Type type, const std::string & name, char altLoc) Returns, if found, an atom from a node indexer nodeIndexer with the typetype , namename , and an alternate locationaltLoc (if the atom has an alternate location); else returns 0. |
| SBMStructuralModelNodeAtom * | findAtom (const SBIndexer< SBMStructuralModelNodeAtom * > & atomIndexer, SBElement::Type type, const std::string & name, char altLoc) Returns, if found, an atom from an atom node indexer atomIndexer with the typetype , namename , and an alternate locationaltLoc (if the atom has an alternate location); else returns 0. |
| int | findSubstructureMatchesWithSMARTS (std::vector< SBNodeIndexer > & resultNodeIndexerVector, const SBNodeIndexer & inputNodeIndexer, const std::string & smarts, const SBValueMap & parameterMap=SBValueMap{}) Finds substructure matches in inputNodeIndexer based on the given SMARTS stringsmarts and given parameters. |
| std::set< char > | getAltLocations (const SBNodeIndexer & nodeIndexer) Returns a set of all alternate locations for atoms that belong to nodes present in nodeIndexer . |
| std::set< char > | getAltLocations (const SBIndexer< SBMStructuralModelNodeAtom * > & atomIndexer) Returns a set of all alternate locations of atoms present in the atomIndexer . |
| double | getAsphericity (const SBNodeIndexer & nodeIndexer) Returns the asphericity parameter of the system of atoms (based on their positions and masses) in nodeIndexer . The asphericity parameter changes in the [0, 1] interval: 0 - a sphere, 1 - a rod. |
| SBPosition3 | getCenterOfFormalCharge (const SBNodeIndexer & nodeIndexer) Returns the center of formal charge of atoms in nodeIndexer . |
| SBPosition3 | getCenterOfMass (const SBNodeIndexer & nodeIndexer) Returns the center of mass of atoms in nodeIndexer . |
| SBPosition3 | getCenterOfPartialCharge (const SBNodeIndexer & nodeIndexer) Returns the center of partial charge of atoms in nodeIndexer . |
| SBPosition3 | getCentroid (const SBNodeIndexer & nodeIndexer) Returns the centroid (the geometric center) of atoms in nodeIndexer . |
| SBMStructuralModel * | getCommonStructuralModel (const SBNodeIndexer & nodeIndexer) Returns the common structural model for nodeIndexer , ornullptr if there is none. |
| bool | getCommonUnitCell (const SBNodeIndexer & nodeIndexer, SBUnitCell & unitCell) Retrieves the common unit cell for nodeIndexer . |
| SBQuantity::length | getDipoleMomentAtCenterOfCharge (const SBNodeIndexer & nodeIndexer) Returns the dipole moment of atoms in nodeIndexer at their center of charge (based on partial charge) |
| SBQuantity::length | getDipoleMomentAtCenterOfMass (const SBNodeIndexer & nodeIndexer) Returns the dipole moment of atoms in nodeIndexer at their center of mass. |
| SBPosition3 | getDipoleVectorAtCenterOfCharge (const SBNodeIndexer & nodeIndexer) Returns the dipole vector of atoms in nodeIndexer at their center of charge (based on partial charge) |
| SBPosition3 | getDipoleVectorAtCenterOfMass (const SBNodeIndexer & nodeIndexer) Returns the dipole vector of atoms in nodeIndexer at their center of mass. |
| SBInertiaTensor33 | getInertiaTensor (const SBNodeIndexer & nodeIndexer) Returns the inertia tensor of the system of atoms (based on their positions and masses) in nodeIndexer . |
| SBLength3 | getMinimumImageDisplacement (const SBPosition3 & position1, const SBPosition3 & position2, const SBUnitCell & unitCell) Returns the minimum-image displacement from position1 toposition2 usingunitCell . |
| SBLength3 | getMinimumImageDisplacement (const SBMStructuralModelNodeAtom * atom1, const SBMStructuralModelNodeAtom * atom2, const SBUnitCell & unitCell) Returns the minimum-image displacement from atom1 toatom2 usingunitCell . |
| SBQuantity::length | getMinimumImageDistance (const SBPosition3 & position1, const SBPosition3 & position2, const SBUnitCell & unitCell) Returns the minimum-image distance between position1 andposition2 usingunitCell . |
| SBQuantity::length | getMinimumImageDistance (const SBMStructuralModelNodeAtom * atom1, const SBMStructuralModelNodeAtom * atom2, const SBUnitCell & unitCell) Returns the minimum-image distance between atom1 andatom2 usingunitCell . |
| SBQuantity::mass | getMolecularWeight (const SBNodeIndexer & nodeIndexer) Returns the cumulative molecular weight of nodes in nodeIndexer . |
| SBMatrix33 | getPrincipalAxes (const SBNodeIndexer & nodeIndexer) Returns the principal axes of the inertia tensor of the system of atoms (based on their positions and masses) in nodeIndexer . |
| SBQuantity::length | getRadiusOfGyration (const SBNodeIndexer & nodeIndexer) Returns the radius of gyration of the system of atoms (based on their positions and masses) in nodeIndexer . |
| double | getShapeParameter (const SBNodeIndexer & nodeIndexer) Returns the shape parameter of the system of atoms (based on their positions and masses) in nodeIndexer . The shape parameter, S, changes in the [-0.25, 2] interval, where 0 corresponds to a sphere, negative values correspond to oblate ellipsoid, positive values correspond to prolate ellipsoid. |
| SBQuantity::squareLength | getSolventAccessibleSurfaceArea (const SBNodeIndexer & nodeIndexer, const SBQuantity::length & probeRadius, const unsigned int numberOfPointsOnSphere) Returns the solvent-accessible surface area (SASA) of the system of atoms in nodeIndexer with the probe radiusprobeRadius , and the number of points on a spherenumberOfPointsOnSphere . |
| SBDTypeSpatialTransform | getSpatialTransform (const SBNodeIndexer & nodeIndexer) Returns the spatial transform based on the inertia tensor of the system of atoms (based on their positions and masses) in nodeIndexer . |
| int | getSumOfFormalCharges (const SBNodeIndexer & nodeIndexer) Returns the sum of formal charges of nodes in nodeIndexer . |
| float | getSumOfPartialCharges (const SBNodeIndexer & nodeIndexer) Returns the sum of partial charges of nodes in nodeIndexer . |
| void | getWater (SBNodeIndexer & resultNodeIndexer, const SBNodeIndexer & nodeIndexer) Finds water nodes in the nodeIndexer . |
| bool | isPlanar (const SBNodeIndexer & nodeIndexer) Returns true if all atoms innodeIndexer are in the same plane. |
| bool | isValidSMARTS (const std::string & smarts) Checks if the given SMARTS string is valid. |
| bool | isValidSMILES (const std::string & smiles) Checks if the given SMILES string represents a valid molecular structure. |
| bool | makeWhole (const SBNodeIndexer & nodeIndexer) Reconstructs the bond-connected components from nodeIndexer using their common unit cell. |
| bool | makeWhole (const SBNodeIndexer & nodeIndexer, const SBUnitCell & unitCell) Reconstructs the bond-connected components from nodeIndexer usingunitCell . |
| void | replaceAtom (SBMStructuralModelNodeAtom * oldAtom, SBMStructuralModelNodeAtom * newAtom, bool preserveOldAtomPosition=false) Replaces atom oldAtom with atomnewAtom . All bonds from the old atom are transferred to the new atom. |
| void | replaceBond (SBMStructuralModelNodeBond * oldBond, SBMStructuralModelNodeBond * newBond, bool flipBond=false, bool preserveOldBondPosition=false) Replaces bond oldBond with bondnewBond . All neighboring bonds from the old bond are transferred to the new bond. |
| std::optional< std::string > | smilesToSVG (const std::string & smiles, int widthPx=600) Converts a SMILES string into an SVG representation. |
| bool | wrapToUnitCell (const SBNodeIndexer & nodeIndexer, bool keepConnectedComponentsWhole=true) Wraps the atoms from nodeIndexer into their common primary unit cell. |
| bool | wrapToUnitCell (const SBNodeIndexer & nodeIndexer, const SBUnitCell & unitCell, bool keepConnectedComponentsWhole=true) Wraps the atoms from nodeIndexer into the primary unit cellunitCell . |
Public Static Functions inherited from SBDDataGraphNode#
See SBDDataGraphNode
| Type | Name |
|---|---|
| bool | canAddMaterial (SBDDataGraphNode::Type nodeType) Returns whether can add a material to a node of type nodeType . |
| void | clone (const SBNodeIndexer & sourceNodeIndexer, SBNodeIndexer & destinationNodeIndexer) Clones the nodes in sourceNodeIndexer (treated as a whole) and places the clones indestinationNodeIndexer . |
| void | forEachNodeInSelection (SBNodeIndexer & nodeIndexer, void(*)(SBDDataGraphNode *node) action) Performs the action for each node innodeIndexer __ |
| void | forEachNodeInSelection (SBNodeIndexer & nodeIndexer, SBCClass * object, void(SBCClass::*)(SBDDataGraphNode *node) action) Performs the objects 'saction for each node innodeIndexer __ |
| SBDDataGraphNode * | getNode (unsigned int nodeIndex) Returns the unique node corresponding to the node index nodeIndex . |
| std::string | getTypeString (Type type, bool humanReadable=false) Returns a string describing the type of the data graph node. |
Protected Attributes inherited from SBCReferenceTarget#
| Type | Name |
|---|---|
| SBCReferenceTargetData * | dataPointer A pointer to the private data. |
Protected Functions inherited from SBMModel#
See SBMModel
| Type | Name |
|---|---|
| SBMModel () Builds a model. |
|
| SBMModel (SBMModelData * dataPointer) Builds a model. |
Protected Functions inherited from SBDDataGraphNode#
See SBDDataGraphNode
| Type | Name |
|---|---|
| SBDDataGraphNode () Builds a data graph node. |
|
| SBDDataGraphNode (SBDDataGraphNodeData * dataPointer) Builds a data graph node. |
|
| virtual | ~SBDDataGraphNode () Destroys the node. |
Protected Functions inherited from SBCReferenceTarget#
| Type | Name |
|---|---|
| SBCReferenceTarget (SBCReferenceTargetData * dataPointer) Protected constructor. |
|
| void | removeAllReferenceOwners () Stops all the reference owners from referencing this reference target. |
Detailed Description#
Short name: SBStructuralModel
Public Functions Documentation#
function SBMStructuralModel#
Builds a structural model.
Builds a base model.
function SB_NODE_GETTER_0 [1/7]#
SBMStructuralModel::SB_NODE_GETTER_0 (
SB_SBMSTRUCTURALMODEL_EXPORT,
std::string,
GetTitleInformation
)
function SB_NODE_GETTER_0 [2/7]#
SBMStructuralModel::SB_NODE_GETTER_0 (
SB_SBMSTRUCTURALMODEL_EXPORT,
std::string,
GetPrimaryStructureInformation
)
function SB_NODE_GETTER_0 [3/7]#
SBMStructuralModel::SB_NODE_GETTER_0 (
SB_SBMSTRUCTURALMODEL_EXPORT,
std::string,
GetHeterogenInformation
)
function SB_NODE_GETTER_0 [4/7]#
SBMStructuralModel::SB_NODE_GETTER_0 (
SB_SBMSTRUCTURALMODEL_EXPORT,
std::string,
GetSecondaryStructureInformation
)
function SB_NODE_GETTER_0 [5/7]#
SBMStructuralModel::SB_NODE_GETTER_0 (
SB_SBMSTRUCTURALMODEL_EXPORT,
std::string,
GetConnectivityAnnotationInformation
)
function SB_NODE_GETTER_0 [6/7]#
SBMStructuralModel::SB_NODE_GETTER_0 (
SB_SBMSTRUCTURALMODEL_EXPORT,
std::string,
GetMiscellaneousInformation
)
function SB_NODE_GETTER_0 [7/7]#
SBMStructuralModel::SB_NODE_GETTER_0 (
SB_SBMSTRUCTURALMODEL_EXPORT,
std::string,
GetCrystallographicAndTransformationInformation
)
function SB_NODE_PREDICATE_0 [1/7]#
function SB_NODE_PREDICATE_0 [2/7]#
SBMStructuralModel::SB_NODE_PREDICATE_0 (
SB_SBMSTRUCTURALMODEL_EXPORT,
HasPrimaryStructureInformation
)
function SB_NODE_PREDICATE_0 [3/7]#
function SB_NODE_PREDICATE_0 [4/7]#
SBMStructuralModel::SB_NODE_PREDICATE_0 (
SB_SBMSTRUCTURALMODEL_EXPORT,
HasSecondaryStructureInformation
)
function SB_NODE_PREDICATE_0 [5/7]#
SBMStructuralModel::SB_NODE_PREDICATE_0 (
SB_SBMSTRUCTURALMODEL_EXPORT,
HasConnectivityAnnotationInformation
)
function SB_NODE_PREDICATE_0 [6/7]#
SBMStructuralModel::SB_NODE_PREDICATE_0 (
SB_SBMSTRUCTURALMODEL_EXPORT,
HasMiscellaneousInformation
)
function SB_NODE_PREDICATE_0 [7/7]#
SBMStructuralModel::SB_NODE_PREDICATE_0 (
SB_SBMSTRUCTURALMODEL_EXPORT,
HasCrystallographicAndTransformationInformation
)
function addChild#
Adds a child to the node.
Adds a child node to the structural model.
This function is a convenience wrapper for getStructuralRoot() ->addChild(node, nextNode).
Parameters:
nodeThe node to add as a child.nextNodeThe node that will follow the new child, or nullptr if none.
Returns:
true if the child was added successfully; false otherwise.
function canAddChild#
Returns whether this node can add node as a child.
virtual bool SBMStructuralModel::canAddChild (
const SBNode * node,
const SBNode * nextNode=nullptr
) override const
Checks whether a node can be added as a child of the structural model.
This function is a convenience wrapper for getStructuralRoot() ->canAddChild(node, nextNode).
Parameters:
nodeThe node to test for addition.nextNodeThe node that would follow the new child, or nullptr if none.
Returns:
true if the node can be added as a child; false otherwise.
function canAddChildType#
Returns whether this node can add a node with type nodeType as a child.
Checks whether a child of a given type can be added to the structural model.
This function is a convenience wrapper for getStructuralRoot() ->canAddChildType(nodeType).
Parameters:
nodeTypeThe type of node to test for addition.
Returns:
true if a child of the specified type can be added; false otherwise.
Implements SBDDataGraphNode::canAddChildType
function canHaveDescendantType#
Returns whether this node can have a node with type nodeType as a descendant.
Checks whether the structural model can have a descendant of a given type.
This function is a convenience wrapper for getStructuralRoot() ->canHaveDescendantType(nodeType).
Parameters:
nodeTypeThe type of descendant to test for.
Returns:
true if a descendant of the specified type can exist; false otherwise.
Implements SBDDataGraphNode::canHaveDescendantType
function centerInUnitCell [1/3]#
Centers the structural model inside its unit cell.
Returns:
true if the operation completed; otherwise false.
function centerTransform#
Centers the pivot of the transform on the center of mass of the atoms contained in the structural model.
This changes the transform only, and does not move atoms belonging to the structural model.
function clearConnectivityAnnotationInformation#
Clears the model's connectivity annotation information.
function clearCrystallographicAndTransformationInformation#
Clears the model's crystallographic and transformation information.
function clearHeterogenInformation#
Clears the model's heterogen information.
function clearMiscellaneousInformation#
Clears the model's miscellaneous information.
function clearPrimaryStructureInformation#
Clears the model's primary structure information.
function clearSecondaryStructureInformation#
Clears the model's secondary structure information.
function clearTitleInformation#
Clears the model's title information.
function clone#
Returns a copy of the node and its descendants.
Creates a copy of the structural model.
The cloned model includes all descendants.
Returns:
A pointer to the newly cloned SBMStructuralModel instance.
Implements SBMModel::clone
function collectAmbientOcclusion#
To collect ambient occlusion data.
virtual void SBMStructuralModel::collectAmbientOcclusion (
const SBPosition3 & boxOrigin,
const SBPosition3 & boxSize,
unsigned int nCellsX,
unsigned int nCellsY,
unsigned int nCellsZ,
float * ambientOcclusionData
)
Collects ambient occlusion data for the model.
Parameters:
boxOriginOrigin of the bounding box for the occlusion calculation.boxSizeSize of the bounding box.nCellsXNumber of cells in the X direction.nCellsYNumber of cells in the Y direction.nCellsZNumber of cells in the Z direction.ambientOcclusionDataPointer to the output array where occlusion data will be stored.
function computeSecondaryStructure#
Computes the secondary structure for all residues in the structural model.
Incrementally computes the secondary structure of the structural model.
This function incrementally computes the secondary structure of the structural model, i.e. both the secondary structure types of residues and geometric descriptors. The function returns true if and only if everything went well. The boolean secondaryStructureChanged is modified by the function and is true if and only if the secondary structure was changed compared to the previous call. Since several objects may call this function, a SecondaryStructureChanged event is also sent when this is the case, so that all objects may be warned.
Parameters:
secondaryStructureChangedReference to a boolean that is set to true if the secondary structure changed compared to the previous call.forceUpdateIf true, forces recomputation of the secondary structure even if it appears up to date.
Returns:
true if the computation succeeded, false otherwise.
function connectStructuralSignalToSlot#
Connects the structural signal to a slot.
void SBMStructuralModel::connectStructuralSignalToSlot (
SBCReferenceTarget * referenceTarget,
void(SBCReferenceTarget::*)( SBStructuralEvent *) functionPointer,
SBStructuralEvent::Type eventType=SBStructuralEvent::Type::Any,
SBCReferenceTarget * nextReferenceTarget=nullptr,
void(SBCReferenceTarget::*)( SBStructuralEvent *) nextFunctionPointer=nullptr
)
Connects a structural signal to a slot on a target object.
Registers a slot (member function) on referenceTarget to be invoked when a structural event of type eventType occurs. An optional secondary slot can be provided via nextReferenceTarget and nextFunctionPointer to form a chain of callbacks.
Parameters:
referenceTargetPointer to the object that will receive the signal.functionPointerPointer to the member function ofreferenceTargetthat handles the event.eventTypeType of the structural event to listen for.nextReferenceTargetOptional pointer to a second target object for a chained slot; may be null.nextFunctionPointerOptional pointer to the member function ofnextReferenceTargetfor the chained slot; may be null.
function createCovalentBonds [1/2]#
Builds covalent bonds for the atoms belonging to the structural model according to the inter-atomic distances.
Creates covalent bonds for atoms in the structural model.
This function uses the Chemical Component Extension to generate covalent bonds based on atom distances. It does nothing if the model is locked.
function createCovalentBonds [2/2]#
Builds covalent bonds for the atoms belonging to the structural model according to the inter-atomic distances with the additional margin additionalMargin .
Creates covalent bonds for atoms in the structural model with an additional margin.
This function uses the Chemical Component Extension to generate covalent bonds based on atom distances, applying the specified additional margin to the distance criteria. It does nothing if the model is locked.
Parameters:
additionalMarginThe additional margin to apply to covalent bond distance thresholds.
function createCovalentBondsByResidueType [1/2]#
Builds covalent bonds for the atoms belonging to the structural model according to the residue types, regardless of inter-atomic distances. If the bonds are already present, it sets the order of covalent bonds for the atoms belonging to the structural model according to the residue types.
Creates covalent bonds based on residue types for the structural model.
The function invokes the Chemical Component Extension to generate covalent bonds according to the residue types, regardless of inter-atomic distances. It returns the number of bonds created, or 0 if the model is locked or an error occurs.
Returns:
The number of bonds created, or 0 on failure.
function createSupercell#
Creates a supercell by replicating the structural model along the lattice vectors.
virtual SBMStructuralModel * SBMStructuralModel::createSupercell (
unsigned int nA,
unsigned int nB,
unsigned int nC
) const
Parameters:
nANumber of replicas along the first lattice vector.nBNumber of replicas along the second lattice vector.nCNumber of replicas along the third lattice vector.
Returns:
A newly allocated structural model containing the replicated images, or nullptr on failure.
function disconnectStructuralSignalFromSlot#
Disconnects the structural signal from a slot.
void SBMStructuralModel::disconnectStructuralSignalFromSlot (
SBCReferenceTarget * referenceTarget,
void(SBCReferenceTarget::*)( SBStructuralEvent *) functionPointer,
SBStructuralEvent::Type eventType=SBStructuralEvent::Type::Any
)
Disconnects a structural signal from a slot.
Removes the connection between the structural signal for eventType and the specified member function functionPointer on referenceTarget, if such a connection exists.
Parameters:
referenceTargetPointer to the target object from which to disconnect the slot.functionPointerPointer to the member function onreferenceTargetthat was connected.eventTypeType of the structural event associated with the signal.
function expandBounds#
Expands the bounds to make sure the visual model fits inside them.
Expands the bounding box to encompass the model's visual representation.
Parameters:
boundsThe bounding box to be expanded.
function forEachNodeDepthFirst [1/2]#
Performs the action on each node (this structural model and all its children), depth-first.
virtual void SBMStructuralModel::forEachNodeDepthFirst (
void(*)( SBDDataGraphNode *node) action
) override
Performs the given action on each node in the structural model depth‑first.
The action is invoked for the structural model itself and then recursively for all its children.
Parameters:
actionFunction pointer to be called for each node.
Implements SBDDataGraphNode::forEachNodeDepthFirst
function forEachNodeDepthFirst [2/2]#
Performs the object 'saction on each node (this structural model and all its children), depth-first.
virtual void SBMStructuralModel::forEachNodeDepthFirst (
SBCClass * object,
void(SBCClass::*)( SBDDataGraphNode *node) action
) override
Performs the given member function on each node in the structural model depth‑first.
The member function is invoked on the provided object for the structural model and recursively for its children.
Parameters:
objectPointer to the object whose member function will be called.actionPointer to the member function to be invoked for each node.
Implements SBDDataGraphNode::forEachNodeDepthFirst
function getChildren#
Returns a list of children.
Retrieves the list of child nodes of the structural model.
This function is a convenience wrapper for getStructuralRoot() -> getChildren().
Returns:
A pointer to the list of child nodes, or nullptr if unavailable.
function getConnectivityAnnotationInformation#
Returns the model's connectivity annotation information.
function getCrystallographicAndTransformationInformation#
Returns the model's crystallographic and transformation information.
function getHeterogenInformation#
Returns the model's heterogen information.
function getLockedFlag#
Returns the locked flag.
Returns the locked flag of the structural model.
When the structural model is locked, its geometry (the atoms positions), topology (the bonds) and identities (node names and indices) cannot be edited by the user. However, other properties can still be edited. For example, secondary structure information can still be computed, and materials and color schemes can still be applied.
Note that some properties that cannot be edited by users can still be edited by developers.
See also: isLocked, setLockedFlag
Returns:
true if the model is locked; otherwise false.
Implements SBDDataGraphNode::getLockedFlag
function getMinimumImageDisplacement [1/4]#
Returns the minimum-image displacement from position1 toposition2 using the structural model unit cell.
SBLength3 SBMStructuralModel::getMinimumImageDisplacement (
const SBPosition3 & position1,
const SBPosition3 & position2
) const
Parameters:
position1The start position.position2The end position.
Returns:
The minimum-image displacement.
function getMinimumImageDisplacement [2/4]#
Returns the minimum-image displacement from atom1 toatom2 using the structural model unit cell.
SBLength3 SBMStructuralModel::getMinimumImageDisplacement (
const SBMStructuralModelNodeAtom * atom1,
const SBMStructuralModelNodeAtom * atom2
) const
Parameters:
atom1The first atom.atom2The second atom.
Returns:
The minimum-image displacement.
function getMinimumImageDistance [1/4]#
Returns the minimum-image distance between position1 andposition2 using the structural model unit cell.
SBQuantity::length SBMStructuralModel::getMinimumImageDistance (
const SBPosition3 & position1,
const SBPosition3 & position2
) const
Parameters:
position1The first position.position2The second position.
Returns:
The minimum-image distance.
function getMinimumImageDistance [2/4]#
Returns the minimum-image distance between atom1 andatom2 using the structural model unit cell.
SBQuantity::length SBMStructuralModel::getMinimumImageDistance (
const SBMStructuralModelNodeAtom * atom1,
const SBMStructuralModelNodeAtom * atom2
) const
Parameters:
atom1The first atom.atom2The second atom.
Returns:
The minimum-image distance.
function getMiscellaneousInformation#
Returns the model's miscellaneous information.
function getModelType#
Returns the model type.
Retrieves the model type identifier for this object.
Returns:
The model type identifier for a structural model.
Implements SBMModel::getModelType
function getMolecularWeight [2/2]#
Returns the molecular weight.
Returns the cumulative molecular weight of the structural model.
If the structural model contains no atoms, returns zero.
Returns:
Molecular weight.
Implements SBDDataGraphNode::getMolecularWeight
function getNodes [1/2]#
Collects nodes into nodeIndexer , based on anodeType , a selection status and avisitPredicate , with or without dependencies.
virtual void SBMStructuralModel::getNodes (
SBNodeIndexer & nodeIndexer,
SBNode::Type nodeType,
bool selectedNodesOnly=false,
const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(),
bool includeDependencies=false
) override const
Collects nodes of a specific type from the structural model.
Adds nodes of type nodeType (and optionally only those that are selected) from this structural model and its descendants to nodeIndexer. The collection can be filtered by visitPredicate and may optionally include dependent nodes.
Parameters:
nodeIndexerIndexer that will receive the collected nodes.nodeTypeType of nodes to collect.selectedNodesOnlyIftrue, only nodes that are selected are collected.visitPredicatePredicate used to decide whether to traverse a node.includeDependenciesIftrue, dependent nodes are also included in the collection.
Implements SBDDataGraphNode::getNodes
function getNodes [2/2]#
Collects nodes into nodeIndexer , based on aselectionPredicate and avisitPredicate , with or without dependencies.
virtual void SBMStructuralModel::getNodes (
SBNodeIndexer & nodeIndexer,
const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(),
const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(),
bool includeDependencies=false
) override const
Collects nodes into nodeIndexer based on selection and visit predicates.
Traverses the structural model hierarchy and adds nodes that satisfy the given predicates.
Parameters:
nodeIndexerContainer that will receive the collected nodes.selectionPredicatePredicate that determines whether a node should be included in the result.visitPredicatePredicate that determines whether a node should be visited during traversal.includeDependenciesIf true, includes dependent nodes in the collection.
Implements SBDDataGraphNode::getNodes
function getNumberOfAtoms#
Returns the number of atoms.
Returns the number of atoms in the structural model.
Returns:
Number of atoms.
Implements SBDDataGraphNode::getNumberOfAtoms
function getNumberOfCarbons#
Returns the number of carbons.
Returns the number of carbon atoms in the structural model.
Returns:
Number of carbon atoms.
Implements SBDDataGraphNode::getNumberOfCarbons
function getNumberOfChains#
Returns the number of chains.
Returns the number of chains in the structural model.
Returns:
Number of chains.
Implements SBDDataGraphNode::getNumberOfChains
function getNumberOfCoarseGrainedAtoms#
Returns the number of coarse-grained atoms.
Returns the number of coarse‑grained atoms in the structural model.
Returns:
Number of coarse‑grained atoms.
Implements SBDDataGraphNode::getNumberOfCoarseGrainedAtoms
function getNumberOfHydrogens#
Returns the number of hydrogens.
Returns the number of hydrogen atoms in the structural model.
Returns:
Number of hydrogen atoms.
Implements SBDDataGraphNode::getNumberOfHydrogens
function getNumberOfMolecules#
Returns the number of molecules.
Returns the number of molecules in the structural model.
Returns:
Number of molecules.
Implements SBDDataGraphNode::getNumberOfMolecules
function getNumberOfNitrogens#
Returns the number of nitrogens.
Returns the number of nitrogen atoms in the structural model.
Returns:
Number of nitrogen atoms.
Implements SBDDataGraphNode::getNumberOfNitrogens
function getNumberOfOtherAtoms#
Returns the number of other atoms.
Returns the number of other atoms in the structural model.
Returns:
Number of other atoms.
Implements SBDDataGraphNode::getNumberOfOtherAtoms
function getNumberOfOxygens#
Returns the number of oxygens.
Returns the number of oxygen atoms in the structural model.
Returns:
Number of oxygen atoms.
Implements SBDDataGraphNode::getNumberOfOxygens
function getNumberOfResidues#
Returns the number of residues.
Returns the number of residues in the structural model.
Returns:
Number of residues.
Implements SBDDataGraphNode::getNumberOfResidues
function getNumberOfSegments#
Returns the number of segments.
Returns the number of segments in the structural model.
Returns:
Number of segments.
Implements SBDDataGraphNode::getNumberOfSegments
function getNumberOfStructuralGroups#
Returns the number of structural groups.
Returns the number of structural groups in the structural model.
Returns:
Number of structural groups.
Implements SBDDataGraphNode::getNumberOfStructuralGroups
function getNumberOfStructuralModels#
Returns the number of structural models.
For a single model, this always returns 1.
Returns:
Number of structural models (always 1).
Implements SBDDataGraphNode::getNumberOfStructuralModels
function getNumberOfSulfurs#
Returns the number of sulfurs.
Returns the number of sulfur atoms in the structural model.
Returns:
Number of sulfur atoms.
Implements SBDDataGraphNode::getNumberOfSulfurs
function getOrientation#
Returns the orientation of the structural model.
Returns the orientation matrix of the structural model.
The orientation is part of the model's spatial transform.
Returns:
A reference to the orientation matrix.
function getPosition#
Returns the position of the structural model.
Returns the position vector of the structural model.
The position is part of the model's spatial transform.
Returns:
A reference to the position vector.
function getPrimaryStructureInformation#
Returns the model's primary structure information.
function getSecondaryStructureInformation#
Returns the model's secondary structure information.
function getStructuralRoot#
Returns the structural root node of the structural model.
The structural root is a structural node that can be used as a convenient entry point for algorithms operating on structural nodes.
Returns:
A pointer to the structural root node, or nullptr if not available.
function getStructuralSignalFlag#
Returns true when the model can send structural signals.
Returns the structural signal flag of the model.
Returns:
true if the model can send structural signals, false otherwise.
function getSumOfFormalCharges [2/2]#
Returns the sum of formal charges.
Returns the sum of formal charges of all atoms in the structural model.
Returns:
Sum of formal charges.
Implements SBDDataGraphNode::getSumOfFormalCharges
function getSumOfPartialCharges [2/2]#
Returns the sum of partial charges.
Returns the sum of partial charges of all atoms in the structural model.
Returns:
Sum of partial charges.
Implements SBDDataGraphNode::getSumOfPartialCharges
function getTitleInformation#
Returns the model's title information.
function getTransform#
Returns the spatial transform of the structural model.
Retrieves the spatial transform of the structural model.
Returns:
A constant reference to the model's spatial transform.
function getType#
Returns the type of the data graph node.
Retrieves the node type of this object.
Returns:
The type identifier for a structural model node.
Implements SBMModel::getType
function getUnitCell#
Returns the unit cell of the structural model.
Returns:
A constant reference to the unit cell.
function getWater [1/2]#
Finds water nodes in the structural model.
Finds water nodes in the structural model and adds them to resultNodeIndexer.
This function finds water nodes in the structural model and adds them to resultNodeIndexer.
Parameters:
resultNodeIndexerIndexer that will be populated with the water nodes found.
function hasConnectivityAnnotationInformation#
Returns true when the model's connectivity annotation information is set.
function hasCrystallographicAndTransformationInformation#
Returns true when the model's crystallographic and transformation information is set.
function hasFiniteUnitCell#
Returns true if and only if the structural model has a finite unit cell.
Returns whether the structural model has a finite unit cell.
Returns:
true if and only if the structural model has a finite unit cell.
function hasHeterogenInformation#
Returns true when the model's heterogen information is set.
function hasMiscellaneousInformation#
Returns true when the model's miscellaneous information is set.
function hasNode [1/2]#
Checks for nodes based on a nodeType , a selection status and avisitPredicate , with or without dependencies.
virtual bool SBMStructuralModel::hasNode (
SBNode::Type nodeType,
bool selectedNodesOnly=false,
const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(),
bool includeDependencies=false
) override const
Checks whether a node of the specified type exists in the structural model.
The check can be restricted to selected nodes and can be filtered by a visit predicate.
Parameters:
nodeTypeThe type of node to search for.selectedNodesOnlyIf true, only considers nodes that are selected.visitPredicatePredicate used to filter visited nodes.includeDependenciesIf true, includes dependent nodes in the search.
Returns:
true if a matching node exists, false otherwise.
Implements SBDDataGraphNode::hasNode
function hasNode [2/2]#
Checks for nodes based on a selectionPredicate and avisitPredicate , with or without dependencies.
virtual bool SBMStructuralModel::hasNode (
const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(),
const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(),
bool includeDependencies=false
) override const
Checks whether any node satisfying the selection predicate exists in the structural model.
Traverses the model hierarchy applying the selection and visit predicates.
Parameters:
selectionPredicatePredicate that selects nodes to check for existence.visitPredicatePredicate that determines whether a node should be visited during traversal.includeDependenciesIf true, includes dependent nodes in the search.
Returns:
true if a matching node exists, false otherwise.
Implements SBDDataGraphNode::hasNode
function hasPrimaryStructureInformation#
Returns true when the model's primary structure information is set.
function hasSecondaryStructureInformation#
Returns true when the model's secondary structure information is set.
function hasTitleInformation#
Returns true when the model's title information is set.
function isLocked#
Returns whether the model is locked.
Returns whether the structural model is locked (equivalent to getLockedFlag).
See also: getLockedFlag, setLockedFlag
Returns:
true if the model is locked; otherwise false.
Implements SBDDataGraphNode::isLocked
function isPeriodic#
Returns true if and only if the structural model is periodic along at least one axis.
Returns whether the structural model is periodic.
Returns:
true if and only if the structural model is periodic along at least one axis.
function isSerializable#
Returns true __
Indicates whether the model supports serialization.
Returns:
true if the model can be serialized.
Implements SBMModel::isSerializable
function makeWhole [1/3]#
Reconstructs the bond-connected components of the structural model across periodic boundaries.
Returns:
true if the operation completed; otherwise false.
function populateChainIDs#
Populates the chain IDs for all chains in the structural model.
This function populates the chain IDs for all chains in the structural model.
The numbering of chain IDs for the chains with missing IDs will start from the maximum chain ID present in the structural model, for example, if there are chains with IDs 0, 1, 4 then the numbering of other chains with missing IDs will commence from 5.
If some chains have the same IDs then the repetitions will be renumbered, for example, chain IDs 0, 2, 2 will become 0, 2, 3.
If forceRenumbering is set to true then it renumbers chains IDs starting from 0 iff at least on of the chains has a missing ID or has the same ID as another chain in the structural model.
Parameters:
forceRenumberingIf true, forces renumbering of all chain IDs starting from zero when necessary.
Returns:
true if any chain ID was updated, false otherwise.
function print#
Prints debugging information.
Prints debugging information for the structural model.
Outputs the model's name, source file name, and recursively prints its children with indentation.
Parameters:
offsetNumber of indentation levels to apply before printing.
Implements SBMModel::print
function removeChild#
Removes a child from the node.
Removes a child node from the structural model.
This function is a convenience wrapper for getStructuralRoot() ->removeChild(node).
Parameters:
nodeThe child node to remove.
Returns:
true if the child was removed successfully; false otherwise.
function rotate#
Rotates the structural model.
Rotates the structural model around a given axis.
The rotation is applied as a spatial transform. Atom positions are updated accordingly.
Parameters:
axisThe axis of rotation.angleThe rotation angle (dimensionless quantity).
function serialize#
Serializes the node.
virtual void SBMStructuralModel::serialize (
SBCSerializer * serializer,
const SBNodeIndexer & nodeIndexer,
const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER,
const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0)
) override const
Serializes the structural model to a serializer.
Parameters:
serializerThe serializer used to write data.nodeIndexerIndexer of nodes to be serialized.sdkVersionNumberThe SDK version number for compatibility.classVersionNumberThe class version number for compatibility.
Implements SBMModel::serialize
function setConnectivityAnnotationInformation#
Sets the model's connectivity annotation information.
function setCrystallographicAndTransformationInformation#
Sets the model's crystallographic and transformation information.
void SBMStructuralModel::setCrystallographicAndTransformationInformation (
const std::string & info
)
function setHeterogenInformation#
Sets the model's heterogen information.
function setLockedFlag#
Sets the locked flag.
Sets the locked flag of the structural model.
Parameters:
flagThe new locked flag value. "This function is <a href=\"../undo-and-redo.md">undoable.
See also: isLocked, getLockedFlag
Implements SBDDataGraphNode::setLockedFlag
function setMiscellaneousInformation#
Sets the model's miscellaneous information.
function setOrientation [1/3]#
Sets the orientation of the structural model.
Sets the orientation of the structural model and updates atom positions.
The position remains unchanged. Atom positions are transformed to reflect the new orientation.
Parameters:
orientationThe new orientation matrix.
function setOrientation [2/3]#
Sets the orientation of the structural model.
Sets the orientation of the structural model.
Optionally transforms atom positions according to the new orientation.
Parameters:
orientationThe new orientation matrix.transformAtomsIf true, atom positions are transformed.
function setOrientation [3/3]#
Sets the newOrientation and theoldOrientation of the structural model.
void SBMStructuralModel::setOrientation (
SBMatrix33 const & newOrientation,
SBMatrix33 const & oldOrientation,
bool transformParticles=true
)
Sets the orientation of the structural model, providing both new and old orientations.
Optionally transforms atom positions based on the change from the old orientation to the new orientation.
Parameters:
newOrientationThe new orientation matrix.oldOrientationThe previous orientation matrix.transformAtomsIf true, atom positions are transformed.
function setPosition [1/3]#
Sets the position of the structural model.
Sets the position of the structural model and updates atom positions.
The orientation remains unchanged. Atom positions are transformed to reflect the new position.
Parameters:
positionThe new position vector.
function setPosition [2/3]#
Sets the position of the structural model.
Sets the position of the structural model.
Optionally transforms atom positions according to the new position.
Parameters:
positionThe new position vector.transformAtomsIf true, atom positions are transformed.
function setPosition [3/3]#
Sets the newPosition and theoldPosition of the structural model.
void SBMStructuralModel::setPosition (
SBPosition3 const & newPosition,
SBPosition3 const & oldPosition,
bool transformParticles=true
)
Sets the position of the structural model, providing both new and old positions.
Optionally transforms atom positions based on the change from the old position to the new position.
Parameters:
newPositionThe new position vector.oldPositionThe previous position vector.transformAtomsIf true, atom positions are transformed.
function setPrimaryStructureInformation#
Sets the model's primary structure information.
function setSecondaryStructureInformation#
Sets the model's secondary structure information.
function setStructuralSignalFlag#
Sets whether the model can send structural signals.
Sets the structural signal flag of the model.
Parameters:
structuralSignalFlagThe new value for the structural signal flag.
function setTitleInformation#
Sets the model's title information.
function setTransform [1/3]#
Sets the spatial transform of the structural model.
Sets the spatial transform of the structural model.
Parameters:
transformThe new spatial transform to apply to the model.
function setTransform [2/3]#
Sets the spatial transform of the structural model.
void SBMStructuralModel::setTransform (
const SBSpatialTransform & transform,
bool transformParticles
)
Sets the spatial transform of the structural model.
Updates the model's transform and optionally applies the transform to all atom positions.
Parameters:
transformThe new spatial transform to set.transformAtomsIf true, atom positions are transformed according to the new transform.
function setTransform [3/3]#
Sets the newTransform and theoldTransform of the structural model.
void SBMStructuralModel::setTransform (
SBSpatialTransform const & newTransform,
SBSpatialTransform const & oldTransform,
bool transformParticles=true
)
Sets the spatial transform of the structural model, with knowledge of the previous transform.
Updates the model's transform and optionally transforms atom positions, using the provided old and new transforms.
Parameters:
newTransformThe new spatial transform to set.oldTransformThe previous spatial transform of the model.transformAtomsIf true, atom positions are transformed according to the new transform.
function setUnitCell#
Sets the unit cell of the structural model.
This updates the periodic boundary information associated with the structural model.
Parameters:
unitCellThe new unit cell.
function structuralSignalIsConnectedToSlot#
Returns true if and only if the structural signal is connected to a given slot.
bool SBMStructuralModel::structuralSignalIsConnectedToSlot (
SBCReferenceTarget * referenceTarget,
void(SBCReferenceTarget::*)( SBStructuralEvent *) functionPointer,
SBStructuralEvent::Type eventType=SBStructuralEvent::Type::Any
) const
Checks whether a specific slot is connected to a structural signal.
Determines if the structural signal for the given eventType has a connection to the specified member function functionPointer on referenceTarget.
Parameters:
referenceTargetPointer to the target object whose slot is being checked.functionPointerPointer to the member function onreferenceTarget.eventTypeType of the structural event associated with the signal.
Returns:
true if the slot is connected to the signal, otherwise false.
function toSMILES#
Converts the structural model into a SMILES string.
This function generates a SMILES representation of the current structural model using the RDKit library.
Returns:
An std::optional<std::string> containing the SMILES string, or std::nullopt if conversion failed.
function toSVG#
Converts the structural model into a 2D SVG representation.
Converts the structural model into an SVG representation.
Returns:
An std::optional<std::string> containing the SVG content, or std::nullopt if conversion failed.
This function uses the RDKit library.
function transform#
Applies a spatial transform to the structural model.
The current transform is multiplied by the provided transform. Atom positions are updated accordingly.
Parameters:
transformThe spatial transform to apply.
function transformNonHierarchicalModel#
Transforms a non-hierarchical, single level, structural model by placing connected components into separate structural groups and combininig similar groups into chains.
Transforms a non‑hierarchical structural model into a hierarchical representation.
Checks whether this structural model has multiple connected components and a flat, single level, structure (all atoms are in the same parent, e.g., in a model or in a molecule). If it is the case, then creates a hierarchy based on the connected components: * places connected components into separate structural groups with names based on their atomic compositions; * combines similar groups into chains.
Note that it might change the order of atoms in the model.
function translate#
Translates the structural model.
Translates the structural model by a given vector.
The translation is applied as a spatial transform. Atom positions are updated accordingly.
Parameters:
translationThe translation vector.
function unserialize#
Unserializes the node.
virtual void SBMStructuralModel::unserialize (
SBCSerializer * serializer,
const SBNodeIndexer & nodeIndexer,
const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER,
const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0)
) override
Unserializes the structural model from a serializer.
Parameters:
serializerThe serializer used to read data.nodeIndexerIndexer to resolve node references.sdkVersionNumberThe SDK version number for compatibility.classVersionNumberThe class version number for compatibility.
Implements SBMModel::unserialize
function wrapToUnitCell [1/3]#
Wraps the atoms of the structural model into the primary unit cell.
Parameters:
keepConnectedComponentsWholeWhether to keep bond-connected components whole while wrapping.
Returns:
true if the operation completed; otherwise false.
function ~SBMStructuralModel#
Destructor.
Deletes the model.
Public Static Functions Documentation#
function bondExists#
Checks whether the bond between atoms atom1 andatom2 exists.
static bool SBMStructuralModel::bondExists (
SBMStructuralModelNodeAtom * atom1,
SBMStructuralModelNodeAtom * atom2
)
Checks whether a bond exists between two atoms.
Parameters:
atom1The first atom.atom2The second atom.
Returns:
true if a bond exists between atom1 and atom2; false otherwise.
function centerInUnitCell [2/3]#
Centers the atoms from nodeIndexer using their common unit cell.
Parameters:
nodeIndexerThe nodes whose atoms will be centered.
Returns:
true if the operation completed; otherwise false.
function centerInUnitCell [3/3]#
Centers the atoms from nodeIndexer usingunitCell .
static bool SBMStructuralModel::centerInUnitCell (
const SBNodeIndexer & nodeIndexer,
const SBUnitCell & unitCell
)
Parameters:
nodeIndexerThe nodes whose atoms will be centered.unitCellThe unit cell to use.
Returns:
true if the operation completed; otherwise false.
function cloneStructuralNodes#
Adds in structuralModelIndexer the structural models resulting from cloning the structural nodes instructuralNodeIndexer .
static bool SBMStructuralModel::cloneStructuralNodes (
SBNodeIndexer & structuralModelIndexer,
const SBNodeIndexer & structuralNodeIndexer
)
Clones the specified structural nodes into new structural models.
Creates deep copies of the structural nodes and their ancestors, preserving the hierarchical relationships. The cloned structural models are added to structuralModelIndexer. The input nodes to be cloned are provided in structuralNodeIndexer.
Parameters:
structuralModelIndexerOutput indexer that will contain the cloned structural models.structuralNodeIndexerInput indexer containing the structural nodes to clone.
Returns:
true if cloning succeeded and at least one structural model was created; false otherwise.
function computeDomain#
Computes the domain containing the atoms and bond atoms in the node indexer.
Computes the spatial domain that encloses all atoms and bond atoms in the given node indexer.
The function gathers atoms and bond atoms from the provided nodes and determines the minimal bounding domain that contains them.
Parameters:
nodeIndexerIndexer containing nodes (atoms, bonds, etc.) from which the domain is computed.
Returns:
The computed SBSpatialDomain; if no atoms are present, an empty domain is returned.
function createBond#
Creates a bond between atom1 andatom2 if there is none; sets the bond order tobondOrder and the bond type tobondType .
static bool SBMStructuralModel::createBond (
SBMStructuralModelNodeAtom * atom1,
SBMStructuralModelNodeAtom * atom2,
double bondOrder=1.0,
SBBond::BondType bondType=SBBond::BondType::Undefined
)
Creates a bond between two atoms, or updates an existing bond's order and type.
If a bond already exists between the two atoms, its order and type are updated if they differ from the requested values. Otherwise, a new bond is created.
Parameters:
atom1The first atom.atom2The second atom.bondOrderThe desired bond order.bondTypeThe desired bond type.
Returns:
true if a new bond was created or an existing bond was updated; false otherwise.
function createCovalentBondsByResidueType [2/2]#
Builds covalent bonds for the atoms belonging to the given residues of the structural model according to the residue types, regardless of inter-atomic distances. If the bonds are already present, it sets the order of covalent bonds for the atoms belonging to the structural model according to the residue types.
static int SBMStructuralModel::createCovalentBondsByResidueType (
const SBNodeIndexer & nodeIndexer
)
Creates covalent bonds for the given residues by residue type.
This function creates covalent bonds for the atoms belonging to residues in nodeIndexer according to their residue types, ignoring inter‑atomic distances.
Parameters:
nodeIndexerNode indexer containing the residues for which covalent bonds should be created.
Returns:
The number of bonds created, or zero if the operation fails.
function createModel#
Creates a structural model from a SMILES string.
static SBMStructuralModel * SBMStructuralModel::createModel (
const std::string & smiles,
const std::string & name,
bool addHydrogens=true,
bool addExplicitHydrogenOnly=false,
bool kekulize=true,
bool runUFF=true,
int uffMaxIters=500,
double uffVdwThreshold=10.0,
int uffConfId=0
)
This function creates an SBMStructuralModel instance based on the provided SMILES string. It allows optional steps such as hydrogen addition, kekulization, and energy minimization using UFF.
Parameters:
smilesThe SMILES string representing the molecular structure.nameThe name to assign to the created model.addHydrogensWhether to add implicit hydrogen atoms (default: true).addExplicitHydrogenOnlyWhether to add only explicit hydrogens (default: false).kekulizeWhether to perform kekulization (default: true).runUFFWhether to run the Universal Force Field (UFF) minimization (default: true).uffMaxItersMaximum number of iterations for UFF minimization (default: 500).uffVdwThresholdVan der Waals threshold for UFF minimization (default: 10.0).uffConfIdUFF conformation ID (default: 0).
Returns:
A pointer to the created SBMStructuralModel, or nullptr if creation failed.
This function uses RDKit library.
function exportImage#
Exports a molecular structure (SMILES) as an image file (png, jpg, svg).
static bool SBMStructuralModel::exportImage (
const std::string & smiles,
const std::string & outputFile,
int widthPx=600,
int marginPx=10,
double lineWidth=3.0,
const std::string & fontFamily="Sans Serif Collection"
)
Exports a molecular structure as an image file.
This function generates an image of the molecular structure from a given SMILES string and saves it in the specified file format (.png, .jpg, .jpeg, or .svg).
Parameters:
smilesThe SMILES string representing the molecule.outputFileThe file path where the image should be saved.widthPxImage width in pixels (default: 600).marginPxMargin size in pixels around the structure (default: 10).lineWidthThickness of the molecular bonds (default: 3.0).fontFamilyFont family to use for text labels (default: "Sans Serif Collection").
Returns:
true if the export was successful, false otherwise.
This function uses RDKit library.
function extractStructuralNodes#
Adds in structuralModelIndexer the structural models resulting from extracting the structural nodes instructuralNodeIndexer .
static bool SBMStructuralModel::extractStructuralNodes (
SBNodeIndexer & structuralModelIndexer,
const SBNodeIndexer & structuralNodeIndexer
)
Extracts structural nodes from a given node indexer into a new structural model indexer.
The function identifies structural nodes and their ascendants, clones them, and populates the provided structuralModelIndexer.
Parameters:
structuralModelIndexerThe indexer that will receive the extracted structural model nodes.structuralNodeIndexerThe indexer containing the nodes to extract from.
Returns:
true if structural nodes were extracted; false otherwise.
function findAtom [1/4]#
Returns, if found, an atom from a node indexer nodeIndexer with the typetype and namename ; else returns 0.
static SBMStructuralModelNodeAtom * SBMStructuralModel::findAtom (
const SBNodeIndexer & nodeIndexer,
SBElement::Type type,
const std::string & name
)
Finds an atom with a given element type and name in a node indexer.
The function searches all atom nodes within the provided node indexer for an atom matching the specified element type and name.
Parameters:
nodeIndexerThe node indexer to search for atoms.typeThe element type of the atom to find.nameThe name of the atom to find.
Returns:
A pointer to the matching atom, or nullptr if no such atom exists.
function findAtom [2/4]#
Returns, if found, an atom from an atom node indexer atomIndexer with the typetype and namename ; else returns 0.
static SBMStructuralModelNodeAtom * SBMStructuralModel::findAtom (
const SBIndexer< SBMStructuralModelNodeAtom * > & atomIndexer,
SBElement::Type type,
const std::string & name
)
Finds an atom with a given element type and name in an atom indexer.
The function searches the provided atom indexer for an atom matching the specified element type and name.
Parameters:
atomIndexerThe atom indexer to search for atoms.typeThe element type of the atom to find.nameThe name of the atom to find.
Returns:
A pointer to the matching atom, or nullptr if no such atom exists.
function findAtom [3/4]#
Returns, if found, an atom from a node indexer nodeIndexer with the typetype , namename , and an alternate locationaltLoc (if the atom has an alternate location); else returns 0.
static SBMStructuralModelNodeAtom * SBMStructuralModel::findAtom (
const SBNodeIndexer & nodeIndexer,
SBElement::Type type,
const std::string & name,
char altLoc
)
Finds an atom with a given element type, name, and alternate location in a node indexer.
The function searches all atom nodes within the provided node indexer for an atom matching the specified element type, name, and alternate location. If the atom does not have an alternate location, it is considered a match.
Parameters:
nodeIndexerThe node indexer to search for atoms.typeThe element type of the atom to find.nameThe name of the atom to find.altLocThe alternate location character to match; a space or missing alternate location is also accepted.
Returns:
A pointer to the matching atom, or nullptr if no such atom exists.
function findAtom [4/4]#
Returns, if found, an atom from an atom node indexer atomIndexer with the typetype , namename , and an alternate locationaltLoc (if the atom has an alternate location); else returns 0.
static SBMStructuralModelNodeAtom * SBMStructuralModel::findAtom (
const SBIndexer< SBMStructuralModelNodeAtom * > & atomIndexer,
SBElement::Type type,
const std::string & name,
char altLoc
)
Finds an atom with a given element type, name, and alternate location in an atom indexer.
The function searches the provided atom indexer for an atom matching the specified element type, name, and alternate location. If the atom does not have an alternate location, it is considered a match.
Parameters:
atomIndexerThe atom indexer to search for atoms.typeThe element type of the atom to find.nameThe name of the atom to find.altLocThe alternate location character to match; a space or missing alternate location is also accepted.
Returns:
A pointer to the matching atom, or nullptr if no such atom exists.
function findSubstructureMatchesWithSMARTS#
Finds substructure matches in inputNodeIndexer based on the given SMARTS stringsmarts and given parameters.
static int SBMStructuralModel::findSubstructureMatchesWithSMARTS (
std::vector< SBNodeIndexer > & resultNodeIndexerVector,
const SBNodeIndexer & inputNodeIndexer,
const std::string & smarts,
const SBValueMap & parameterMap=SBValueMap {}
)
Finds substructure matches using a SMARTS pattern and returns the number of matches.
Filters atoms and bonds in the input node indexer based on the given SMARTS string and fills the result indexer vector with the filtered fragments.
Parameters:
resultNodeIndexerVectorThe output vector populated with node indexers, each containing a separate matched structure. This vector is not cleared inside the function.inputNodeIndexerThe input node indexer containing structures to search.smartsThe SMARTS pattern to match.parameterMapA value map with substructure match parameters (e.g., "maxMatches", "numThreads").
Returns:
The number of matches, or -1 if the SMARTS string is invalid or an error occurs.
This function uses RDKit library.
function getAltLocations [1/2]#
Returns a set of all alternate locations for atoms that belong to nodes present in nodeIndexer .
Returns the set of alternate location identifiers for atoms in a node indexer.
The function scans all atom nodes within the provided node indexer and collects the alternate location characters that are present.
Parameters:
nodeIndexerThe node indexer containing nodes to inspect for atom alternate locations.
Returns:
A set of characters representing the alternate locations found.
function getAltLocations [2/2]#
Returns a set of all alternate locations of atoms present in the atomIndexer .
static std::set< char > SBMStructuralModel::getAltLocations (
const SBIndexer< SBMStructuralModelNodeAtom * > & atomIndexer
)
Returns the set of alternate location identifiers for atoms in an atom indexer.
The function scans the given atom indexer and collects the alternate location characters that are present.
Parameters:
atomIndexerThe atom indexer containing atoms to inspect for alternate locations.
Returns:
A set of characters representing the alternate locations found.
function getAsphericity#
Returns the asphericity parameter of the system of atoms (based on their positions and masses) in nodeIndexer . The asphericity parameter changes in the [0, 1] interval: 0 - a sphere, 1 - a rod.
Returns the asphericity parameter of the system of atoms (based on their positions and masses) in nodeIndexer.
This function returns the asphericity parameter of the system of atoms (based on their positions and masses) in nodeIndexer.
The asphericity parameter changes in the [0, 1] range, where 0 corresponds to a sphere and 1 corresponds to a rod.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns zero.
Parameters:
nodeIndexerThe node indexer containing the atoms for which the asphericity is computed.
Returns:
The asphericity parameter in the range [0, 1].
function getCenterOfFormalCharge#
Returns the center of formal charge of atoms in nodeIndexer .
static SBPosition3 SBMStructuralModel::getCenterOfFormalCharge (
const SBNodeIndexer & nodeIndexer
)
Returns the center of formal charge of atoms from nodeIndexer.
The center of formal charge is computed as follows:
R = sum(q_i * r_i, i=1..N) / Q
where N is the number of atoms, q_i is the i-th atom's formal charge, r_i is the i-th atom's position, and Q is the total formal charge of all of the N atoms.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns the center of coordinates (SBPosition3::zero).
Parameters:
nodeIndexerNode indexer containing atoms (or their parent nodes) to compute the center of formal charge.
Returns:
The center of formal charge position.
function getCenterOfMass#
Returns the center of mass of atoms in nodeIndexer .
Returns the center of mass of atoms from nodeIndexer.
The center of mass is computed as follows:
R = sum(m_i * r_i, i=1..N) / M
where N is the number of atoms, m_i is the i-th atom's mass, r_i is the i-th atom's position, and M is the total mass of all of the N atoms.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns the center of coordinates (SBPosition3::zero).
Parameters:
nodeIndexerNode indexer containing atoms (or their parent nodes) to compute the center of mass.
Returns:
The center of mass position.
function getCenterOfPartialCharge#
Returns the center of partial charge of atoms in nodeIndexer .
static SBPosition3 SBMStructuralModel::getCenterOfPartialCharge (
const SBNodeIndexer & nodeIndexer
)
Returns the center of partial charge of atoms from nodeIndexer.
The center of partial charge is computed as follows:
R = sum(q_i * r_i, i=1..N) / Q
where N is the number of atoms, q_i is the i-th atom's partial charge, r_i is the i-th atom's position, and Q is the total partial charge of all of the N atoms.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns the center of coordinates (SBPosition3::zero).
Parameters:
nodeIndexerNode indexer containing atoms (or their parent nodes) to compute the center of partial charge.
Returns:
The center of partial charge position.
function getCentroid#
Returns the centroid (the geometric center) of atoms in nodeIndexer .
Returns the centroid (geometric center) of atoms from nodeIndexer.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns the center of coordinates (SBPosition3::zero).
Parameters:
nodeIndexerNode indexer containing atoms (or their parent nodes) to compute the centroid.
Returns:
The centroid position.
function getCommonStructuralModel#
Returns the common structural model for nodeIndexer , ornullptr if there is none.
static SBMStructuralModel * SBMStructuralModel::getCommonStructuralModel (
const SBNodeIndexer & nodeIndexer
)
Returns the common structural model for nodeIndexer.
Parameters:
nodeIndexerThe node indexer to inspect.
Returns:
The common structural model for nodeIndexer, or nullptr if there is none.
function getCommonUnitCell#
Retrieves the common unit cell for nodeIndexer .
static bool SBMStructuralModel::getCommonUnitCell (
const SBNodeIndexer & nodeIndexer,
SBUnitCell & unitCell
)
Parameters:
nodeIndexerThe node indexer to inspect.unitCellThe output unit cell.
Returns:
true if and only if a common unit cell was found.
function getDipoleMomentAtCenterOfCharge#
Returns the dipole moment of atoms in nodeIndexer at their center of charge (based on partial charge)
static SBQuantity::length SBMStructuralModel::getDipoleMomentAtCenterOfCharge (
const SBNodeIndexer & nodeIndexer
)
Returns the dipole moment of atoms from nodeIndexer at their center of charge.
This function returns the dipole moment of atoms from nodeIndexer at their center of charge.
The dipole moment at center of charge is computed as follows:
m = norm(mu)
where mu is the dipole vector of atoms from nodeIndexer at their center of partial charge.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns the center of coordinates (SBPosition3::zero).
Parameters:
nodeIndexerThe node indexer containing the atoms for which the dipole moment is computed.
Returns:
The magnitude of the dipole moment at the center of charge.
function getDipoleMomentAtCenterOfMass#
Returns the dipole moment of atoms in nodeIndexer at their center of mass.
static SBQuantity::length SBMStructuralModel::getDipoleMomentAtCenterOfMass (
const SBNodeIndexer & nodeIndexer
)
Returns the dipole moment of atoms from nodeIndexer at their center of mass.
This function returns the dipole moment of atoms from nodeIndexer at their center of mass. The dipole moment at center of mass is computed as follows:
m = norm(mu)
where mu is the dipole vector of atoms from nodeIndexer at their center of mass.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns the center of coordinates (SBPosition3::zero).
Parameters:
nodeIndexerThe node indexer containing the atoms for which the dipole moment is computed.
Returns:
The magnitude of the dipole moment at the center of mass.
function getDipoleVectorAtCenterOfCharge#
Returns the dipole vector of atoms in nodeIndexer at their center of charge (based on partial charge)
static SBPosition3 SBMStructuralModel::getDipoleVectorAtCenterOfCharge (
const SBNodeIndexer & nodeIndexer
)
Returns the dipole vector of atoms from nodeIndexer at their center of partial charge.
The dipole vector at center of charge is computed as follows:
mu = sum(q_i * (r_i - r_coc), i=1..N)
where N is the number of atoms, q_i is the i-th atom's partial charge, r_i is the i-th atom's position, and r_coc is the center of partial charge of these atoms.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns the center of coordinates (SBPosition3::zero).
Parameters:
nodeIndexerNode indexer containing atoms (or their parent nodes) to compute the dipole vector.
Returns:
The dipole vector at the center of partial charge.
function getDipoleVectorAtCenterOfMass#
Returns the dipole vector of atoms in nodeIndexer at their center of mass.
static SBPosition3 SBMStructuralModel::getDipoleVectorAtCenterOfMass (
const SBNodeIndexer & nodeIndexer
)
Returns the dipole vector of atoms from nodeIndexer at their center of mass.
The dipole vector at center of mass is computed as follows:
mu = sum(q_i * (r_i - r_com), i=1..N)
where N is the number of atoms, q_i is the i-th atom's partial charge, r_i is the i-th atom's position, and r_com is the center of mass of these atoms.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns the center of coordinates (SBPosition3::zero).
Parameters:
nodeIndexerNode indexer containing atoms (or their parent nodes) to compute the dipole vector.
Returns:
The dipole vector at the center of mass.
function getInertiaTensor#
Returns the inertia tensor of the system of atoms (based on their positions and masses) in nodeIndexer .
This function returns the moment of inertia tensor of the system of atoms (based on their positions and masses) in nodeIndexer relative to their center of mass.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns a zero tensor.
Parameters:
nodeIndexerThe node indexer containing the atoms for which the inertia tensor is computed.
Returns:
The inertia tensor of the atoms relative to their center of mass.
function getMinimumImageDisplacement [3/4]#
Returns the minimum-image displacement from position1 toposition2 usingunitCell .
static SBLength3 SBMStructuralModel::getMinimumImageDisplacement (
const SBPosition3 & position1,
const SBPosition3 & position2,
const SBUnitCell & unitCell
)
Parameters:
position1The start position.position2The end position.unitCellThe unit cell to use.
Returns:
The minimum-image displacement.
function getMinimumImageDisplacement [4/4]#
Returns the minimum-image displacement from atom1 toatom2 usingunitCell .
static SBLength3 SBMStructuralModel::getMinimumImageDisplacement (
const SBMStructuralModelNodeAtom * atom1,
const SBMStructuralModelNodeAtom * atom2,
const SBUnitCell & unitCell
)
Parameters:
atom1The first atom.atom2The second atom.unitCellThe unit cell to use.
Returns:
The minimum-image displacement.
function getMinimumImageDistance [3/4]#
Returns the minimum-image distance between position1 andposition2 usingunitCell .
static SBQuantity::length SBMStructuralModel::getMinimumImageDistance (
const SBPosition3 & position1,
const SBPosition3 & position2,
const SBUnitCell & unitCell
)
Parameters:
position1The first position.position2The second position.unitCellThe unit cell to use.
Returns:
The minimum-image distance.
function getMinimumImageDistance [4/4]#
Returns the minimum-image distance between atom1 andatom2 usingunitCell .
static SBQuantity::length SBMStructuralModel::getMinimumImageDistance (
const SBMStructuralModelNodeAtom * atom1,
const SBMStructuralModelNodeAtom * atom2,
const SBUnitCell & unitCell
)
Parameters:
atom1The first atom.atom2The second atom.unitCellThe unit cell to use.
Returns:
The minimum-image distance.
function getMolecularWeight [1/2]#
Returns the cumulative molecular weight of nodes in nodeIndexer .
static SBQuantity::mass SBMStructuralModel::getMolecularWeight (
const SBNodeIndexer & nodeIndexer
)
This function returns the cumulative molecular weight of nodes in nodeIndexer.
Parameters:
nodeIndexerNode indexer containing the nodes whose molecular weight is summed.
Returns:
The total molecular weight of the nodes.
function getPrincipalAxes#
Returns the principal axes of the inertia tensor of the system of atoms (based on their positions and masses) in nodeIndexer .
The eigen vectors are sorted by their eigen value in the descending order, i.e. the first one corresponds to the first principal axes. In other words: the first axis corresponds to the longest domain dimension, while the third axis corresponds to the smallest domain dimension.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns a zero matrix.
Parameters:
nodeIndexerThe node indexer containing the atoms for which the principal axes are computed.
Returns:
The principal axes matrix of the inertia tensor.
function getRadiusOfGyration#
Returns the radius of gyration of the system of atoms (based on their positions and masses) in nodeIndexer .
static SBQuantity::length SBMStructuralModel::getRadiusOfGyration (
const SBNodeIndexer & nodeIndexer
)
Returns the radius of gyration of the system of atoms (based on their positions and masses) from nodeIndexer.
This function returns the radius of gyration of the system of atoms (based on their positions and masses) from nodeIndexer.
The radius of gyration is computed as follows:
Rg = sqrt(sum(m_i * (r_i - r_c)^2, i=1..N) / M)
where N is the number of atoms, m_i is the mass of i-th atom, r_i is the i-th atom's position, r_c is the center of mass of all N atoms, M is the total mass of all of the N atoms.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns zero.
Parameters:
nodeIndexerThe node indexer containing the atoms for which the radius of gyration is computed.
Returns:
The radius of gyration.
function getShapeParameter#
Returns the shape parameter of the system of atoms (based on their positions and masses) in nodeIndexer . The shape parameter, S, changes in the [-0.25, 2] interval, where 0 corresponds to a sphere, negative values correspond to oblate ellipsoid, positive values correspond to prolate ellipsoid.
Returns the shape parameter of the system of atoms (based on their positions and masses) in nodeIndexer.
This function returns the shape parameter of the system of atoms (based on their positions and masses) in nodeIndexer. The shape parameter, S, changes in the [-0.25, 2] range, where 0 corresponds to a sphere, negative values correspond to oblate ellipsoid, positive values correspond to prolate ellipsoid.
It is computed as follows:
S = prod((lambda_i - lambda_mean), i=1..3) / (lambda_mean^3)
where lambda_i is the i-th eigen value of the inertia tensor, lambda_mean is the mean of eigen values and is equal to sum(lambda_i, i=1..3).
If the nodeIndexer doesn't contain any atoms or their parents then the function returns zero.
Parameters:
nodeIndexerThe node indexer containing the atoms for which the shape parameter is computed.
Returns:
The shape parameter S in the range [-0.25, 2].
function getSolventAccessibleSurfaceArea#
Returns the solvent-accessible surface area (SASA) of the system of atoms in nodeIndexer with the probe radiusprobeRadius , and the number of points on a spherenumberOfPointsOnSphere .
static SBQuantity::squareLength SBMStructuralModel::getSolventAccessibleSurfaceArea (
const SBNodeIndexer & nodeIndexer,
const SBQuantity::length & probeRadius,
const unsigned int numberOfPointsOnSphere
)
This function returns the solvent-accessible surface area (SASA) of the system of atoms in nodeIndexer with the probe radius probeRadius, and the number of points on a sphere numberOfPointsOnSphere.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns zero.
Parameters:
nodeIndexerThe node indexer containing the atoms for which the SASA is calculated.probeRadiusThe radius of the probe sphere used to compute the SASA.numberOfPointsOnSphereThe number of points sampled on a sphere for each atom.
Returns:
The solvent-accessible surface area of the atoms.
function getSpatialTransform#
Returns the spatial transform based on the inertia tensor of the system of atoms (based on their positions and masses) in nodeIndexer .
static SBDTypeSpatialTransform SBMStructuralModel::getSpatialTransform (
const SBNodeIndexer & nodeIndexer
)
The eigen vectors are sorted by their eigen value in the descending order, i.e. the first one corresponds to the first principal axes. In other words: the first axis corresponds to the longest domain dimension, while the third axis corresponds to the smallest domain dimension.
If the nodeIndexer doesn't contain any atoms or their parents then the function returns a zero transform.
Parameters:
nodeIndexerThe node indexer containing the atoms for which the spatial transform is computed.
Returns:
The spatial transform derived from the inertia tensor.
function getSumOfFormalCharges [1/2]#
Returns the sum of formal charges of nodes in nodeIndexer .
This function returns the sum of formal charges of nodes in nodeIndexer.
Parameters:
nodeIndexerNode indexer containing the nodes whose formal charges are summed.
Returns:
The sum of formal charges.
function getSumOfPartialCharges [1/2]#
Returns the sum of partial charges of nodes in nodeIndexer .
This function returns the sum of partial charges of nodes in nodeIndexer.
Parameters:
nodeIndexerNode indexer containing the nodes whose partial charges are summed.
Returns:
The sum of partial charges.
function getWater [2/2]#
Finds water nodes in the nodeIndexer .
static void SBMStructuralModel::getWater (
SBNodeIndexer & resultNodeIndexer,
const SBNodeIndexer & nodeIndexer
)
Finds water nodes in the given nodeIndexer and adds them to resultNodeIndexer.
The resulting water nodes might include water structural groups and water atoms.
Parameters:
resultNodeIndexerIndexer that will be populated with the water nodes found.nodeIndexerIndexer specifying the nodes to search for water nodes.
function isPlanar#
Returns true if all atoms innodeIndexer are in the same plane.
Note that for 3 atoms and less it will always return true.
Parameters:
nodeIndexerNode indexer containing the atoms to test.
Returns:
true if all atoms are planar, otherwise false.
function isValidSMARTS#
Checks if the given SMARTS string is valid.
Parameters:
smartsThe SMARTS string to validate.
Returns:
true if the SMARTS string is valid, false otherwise.
This function uses the RDKit library.
function isValidSMILES#
Checks if the given SMILES string represents a valid molecular structure.
Parameters:
smilesThe SMILES string to validate.
Returns:
true if the SMILES string is valid, false otherwise.
This function uses the RDKit library.
function makeWhole [2/3]#
Reconstructs the bond-connected components from nodeIndexer using their common unit cell.
Parameters:
nodeIndexerThe nodes whose atoms will be reconstructed.
Returns:
true if the operation completed; otherwise false.
function makeWhole [3/3]#
Reconstructs the bond-connected components from nodeIndexer usingunitCell .
static bool SBMStructuralModel::makeWhole (
const SBNodeIndexer & nodeIndexer,
const SBUnitCell & unitCell
)
Parameters:
nodeIndexerThe nodes whose atoms will be reconstructed.unitCellThe unit cell to use.
Returns:
true if the operation completed; otherwise false.
function replaceAtom#
Replaces atom oldAtom with atomnewAtom . All bonds from the old atom are transferred to the new atom.
static void SBMStructuralModel::replaceAtom (
SBMStructuralModelNodeAtom * oldAtom,
SBMStructuralModelNodeAtom * newAtom,
bool preserveOldAtomPosition=false
)
Replaces an atom in the structural model with another atom.
The function removes the old atom, transfers all its bonds to the new atom, and optionally preserves the old atom's position for the new atom.
Parameters:
oldAtomThe atom to be replaced.newAtomThe atom that will replace the old atom.preserveOldAtomPositionIf true, the new atom inherits the position of the old atom.
function replaceBond#
Replaces bond oldBond with bondnewBond . All neighboring bonds from the old bond are transferred to the new bond.
static void SBMStructuralModel::replaceBond (
SBMStructuralModelNodeBond * oldBond,
SBMStructuralModelNodeBond * newBond,
bool flipBond=false,
bool preserveOldBondPosition=false
)
Replaces a bond in the structural model with another bond.
The function erases the old bond and creates a new bond, optionally flipping the bond direction and preserving the positions of the original bond's atoms.
Parameters:
oldBondThe bond to be replaced.newBondThe new bond that will replace the old bond.flipBondIf true, the bond direction is flipped (left/right atoms are swapped).preserveOldBondPositionIf true, the new bond's atoms inherit the positions of the old bond's atoms.
function smilesToSVG#
Converts a SMILES string into an SVG representation.
static std::optional< std::string > SBMStructuralModel::smilesToSVG (
const std::string & smiles,
int widthPx=600
)
This function takes a molecular structure in SMILES format and returns its SVG representation.
Parameters:
smilesThe SMILES string to convert.widthPxThe width of the generated SVG image in pixels.
Returns:
An std::optional<std::string> containing the SVG content, or std::nullopt if conversion failed.
This function uses RDKit library.
function wrapToUnitCell [2/3]#
Wraps the atoms from nodeIndexer into their common primary unit cell.
static bool SBMStructuralModel::wrapToUnitCell (
const SBNodeIndexer & nodeIndexer,
bool keepConnectedComponentsWhole=true
)
Parameters:
nodeIndexerThe nodes whose atoms will be wrapped.keepConnectedComponentsWholeWhether to keep bond-connected components whole while wrapping.
Returns:
true if the operation completed; otherwise false.
function wrapToUnitCell [3/3]#
Wraps the atoms from nodeIndexer into the primary unit cellunitCell .
static bool SBMStructuralModel::wrapToUnitCell (
const SBNodeIndexer & nodeIndexer,
const SBUnitCell & unitCell,
bool keepConnectedComponentsWhole=true
)
Parameters:
nodeIndexerThe nodes whose atoms will be wrapped.unitCellThe unit cell to use.keepConnectedComponentsWholeWhether to keep bond-connected components whole while wrapping.
Returns:
true if the operation completed; otherwise false.