Loading...
Searching...
No Matches
SBMStructuralModel Class Reference

This class describes a structural model.

Constructors and destructors

 SBMStructuralModel ()
 Builds a base model.
 
virtual ~SBMStructuralModel ()
 Deletes the model.
 

Serialization

virtual bool isSerializable () const override
 Returns true.
 
virtual void serialize (SBCSerializer *serializer, const SBNodeIndexer &nodeIndexer, const SBVersionNumber &sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber &classVersionNumber=SBVersionNumber(1, 0, 0)) const override
 Serializes the node.
 
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.
 

Rendering

virtual void expandBounds (SBIAPosition3 &bounds) const
 Expands the bounds to make sure the visual model fits inside them.
 
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.
 

Geometry

void centerTransform ()
 Centers the pivot of the transform on the center of mass of the atoms contained in the structural model.
 
SBSpatialTransform const & getTransform () const
 Returns the spatial transform of the structural model.
 
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 the oldTransform of the structural model.
 
SBMatrix33 const & getOrientation () const
 Returns the orientation of the structural model.
 
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 the oldOrientation of the structural model.
 
SBPosition3 const & getPosition () const
 Returns the position 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 the oldPosition of the structural model.
 
void transform (const SBSpatialTransform &transform)
 Applies a spatial transform to the structural model.
 
void rotate (const SBVector3 &axis, const SBQuantity::dimensionless &angle)
 Rotates the structural model.
 
void translate (const SBLength3 &translation)
 Translates the structural model.
 

Topology

virtual bool canAddChild (const SBNode *node, const SBNode *nextNode=nullptr) const override
 Returns whether this node can add node as a child.
 
virtual bool canAddChildType (SBNode::Type nodeType) const override
 Returns whether this node can add a node with type nodeType as a child.
 
virtual bool canHaveDescendantType (SBNode::Type nodeType) const override
 Returns whether this node can have a node with type nodeType as a descendant.
 
virtual bool addChild (SBNode *node, SBNode *nextNode=nullptr) override
 Adds a child to the node.
 
virtual bool removeChild (SBNode *node) override
 Removes a child from the node.
 
virtual SBPointerList< SBMStructuralModelNode > const * getChildren () const
 This function is a convenience function equivalent to getStructuralRoot()->getChildren
 
SBMStructuralModelNodeRootgetStructuralRoot () const
 
virtual SBMStructuralModelclone () override
 Returns a copy of the node and its descendants.
 
static bool extractStructuralNodes (SBNodeIndexer &structuralModelIndexer, const SBNodeIndexer &structuralNodeIndexer)
 Adds in structuralModelIndexer the structural models resulting from extracting the structural nodes in structuralNodeIndexer.
 
static bool cloneStructuralNodes (SBNodeIndexer &structuralModelIndexer, const SBNodeIndexer &structuralNodeIndexer)
 Adds in structuralModelIndexer the structural models resulting from cloning the structural nodes in structuralNodeIndexer.
 
static SBSpatialDomain computeDomain (const SBNodeIndexer &nodeIndexer)
 Computes the domain containing the atoms and bond atoms in the node indexer.
 

Locking

virtual bool isLocked () const override
 Returns whether the model is locked.
 
virtual bool getLockedFlag () const override
 Returns the locked flag.
 
virtual void setLockedFlag (bool flag) override
 Sets the locked flag.
 

Identity

virtual SBDDataGraphNode::Type getType () const override
 Returns the type of the data graph node.
 
virtual SBDDataGraphNode::Type getModelType () const override
 Returns the model type.
 

Bonds

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.
 
static void replaceBond (SBMStructuralModelNodeBond *oldBond, SBMStructuralModelNodeBond *newBond, bool flipBond=false, bool preserveOldBondPosition=false)
 Replaces bond oldBond with bond newBond. All neighboring bonds from the old bond are transferred to the new bond.
 
static bool createBond (SBMStructuralModelNodeAtom *atom1, SBMStructuralModelNodeAtom *atom2, double bondOrder=1.0, SBBond::BondType bondType=SBBond::BondType::Undefined)
 Creates a bond between atom1 and atom2 if there is none; sets the bond order to bondOrder and the bond type to bondType.
 
static bool bondExists (SBMStructuralModelNodeAtom *atom1, SBMStructuralModelNodeAtom *atom2)
 Checks whether the bond between atoms atom1 and atom2 exists.
 
static 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.
 

Chains

bool populateChainIDs (bool forceRenumbering=false)
 Populates the chain IDs for all chains in the structural model.
 

Secondary structure

bool computeSecondaryStructure (bool &updated, bool forceUpdate=false)
 Computes the secondary structure for all residues in the structural model.
 

Messaging

bool getStructuralSignalFlag () const
 Returns true when the model can send structural signals.
 
void setStructuralSignalFlag (bool structuralSignalFlag)
 Sets whether the model can send structural signals.
 
void connectStructuralSignalToSlot (SBCReferenceTarget *referenceTarget, void(SBCReferenceTarget::*functionPointer)(SBStructuralEvent *), SBStructuralEvent::Type eventType=SBStructuralEvent::Type::Any, SBCReferenceTarget *nextReferenceTarget=0, void(SBCReferenceTarget::*nextFunctionPointer)(SBStructuralEvent *)=0)
 
bool structuralSignalIsConnectedToSlot (SBCReferenceTarget *referenceTarget, void(SBCReferenceTarget::*functionPointer)(SBStructuralEvent *), SBStructuralEvent::Type eventType=SBStructuralEvent::Type::Any) const
 
void disconnectStructuralSignalFromSlot (SBCReferenceTarget *referenceTarget, void(SBCReferenceTarget::*functionPointer)(SBStructuralEvent *), SBStructuralEvent::Type eventType=SBStructuralEvent::Type::Any)
 

Selection functions

virtual void getNodes (SBNodeIndexer &nodeIndexer, SBNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate &visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const override
 Collects nodes into nodeIndexer, based on a nodeType, a selection status and a visitPredicate, with or without dependencies.
 
virtual void getNodes (SBNodeIndexer &nodeIndexer, const SBNodePredicate &selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate &visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const override
 Collects nodes into nodeIndexer, based on a selectionPredicate and a visitPredicate, with or without dependencies.
 
virtual bool hasNode (SBNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate &visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const override
 Checks for nodes based on a nodeType, a selection status and a visitPredicate, with or without dependencies.
 
virtual bool hasNode (const SBNodePredicate &selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate &visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const override
 Checks for nodes based on a selectionPredicate and a visitPredicate, with or without dependencies.
 

Utility functions

void getWater (SBNodeIndexer &resultNodeIndexer) const
 Finds water nodes in the structural model.
 
static void getWater (SBNodeIndexer &resultNodeIndexer, const SBNodeIndexer &nodeIndexer)
 Finds water nodes in the nodeIndexer.
 
static SBQuantity::mass getMolecularWeight (const SBNodeIndexer &nodeIndexer)
 Returns the cumulative molecular weight of nodes in nodeIndexer.
 
static int getSumOfFormalCharges (const SBNodeIndexer &nodeIndexer)
 Returns the sum of formal charges of nodes in nodeIndexer.
 
static float getSumOfPartialCharges (const SBNodeIndexer &nodeIndexer)
 Returns the sum of partial charges of nodes in nodeIndexer.
 
static SBPosition3 getCentroid (const SBNodeIndexer &nodeIndexer)
 Returns the centroid (the geometric center) of atoms in nodeIndexer.
 
static SBPosition3 getCenterOfMass (const SBNodeIndexer &nodeIndexer)
 Returns the center of mass of atoms in nodeIndexer.
 
static SBPosition3 getCenterOfFormalCharge (const SBNodeIndexer &nodeIndexer)
 Returns the center of formal charge of atoms in nodeIndexer.
 
static SBPosition3 getCenterOfPartialCharge (const SBNodeIndexer &nodeIndexer)
 Returns the center of partial charge of atoms in nodeIndexer.
 
static SBPosition3 getDipoleVectorAtCenterOfMass (const SBNodeIndexer &nodeIndexer)
 Returns the dipole vector of atoms in nodeIndexer at their center of mass (based on partial charge)
 
static SBPosition3 getDipoleVectorAtCenterOfCharge (const SBNodeIndexer &nodeIndexer)
 Returns the dipole vector of atoms in nodeIndexer at their center of charge (based on partial charge)
 
static SBQuantity::length getDipoleMomentAtCenterOfMass (const SBNodeIndexer &nodeIndexer)
 Returns the dipole moment of atoms in nodeIndexer at their center of mass (based on partial charge)
 
static SBQuantity::length getDipoleMomentAtCenterOfCharge (const SBNodeIndexer &nodeIndexer)
 Returns the dipole moment of atoms in nodeIndexer at their center of charge (based on partial charge)
 
static 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.
 
static 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.
 
static SBQuantity::length getRadiusOfGyration (const SBNodeIndexer &nodeIndexer)
 Returns the radius of gyration of the system of atoms (based on their positions and masses) in nodeIndexer.
 
static SBInertiaTensor33 getInertiaTensor (const SBNodeIndexer &nodeIndexer)
 Returns the inertia tensor of the system of atoms (based on their positions and masses) in nodeIndexer.
 
static 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.
 
static 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.
 
static 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 radius probeRadius, and the number of points on a sphere numberOfPointsOnSphere.
 
static bool isPlanar (const SBNodeIndexer &nodeIndexer)
 Returns true if all atoms in nodeIndexer are in the same plane.
 

Visitor functions

virtual void forEachNodeDepthFirst (void(*action)(SBDDataGraphNode *node)) override
 Performs an action on each node.
 
virtual void forEachNodeDepthFirst (SBCClass *object, void(SBCClass::*action)(SBDDataGraphNode *node)) override
 Performs an action on each node.
 

Properties

bool hasTitleInformation () const
 Returns true when the model's title information is set.
 
std::string const & getTitleInformation () const
 Returns the model's title information.
 
void setTitleInformation (const std::string &info)
 Sets the model's title information.
 
void clearTitleInformation ()
 Clears the model's title information.
 
bool hasPrimaryStructureInformation () const
 Returns true when the model's primary structure information is set.
 
std::string const & getPrimaryStructureInformation () const
 Returns the model's primary structure information.
 
void setPrimaryStructureInformation (const std::string &info)
 Sets the model's primary structure information.
 
void clearPrimaryStructureInformation ()
 Clears the model's primary structure information.
 
bool hasHeterogenInformation () const
 Returns true when the model's heterogen information is set.
 
std::string const & getHeterogenInformation () const
 Returns the model's heterogen information.
 
void setHeterogenInformation (const std::string &info)
 Sets the model's heterogen information.
 
void clearHeterogenInformation ()
 Clears the model's heterogen information.
 
bool hasSecondaryStructureInformation () const
 Returns true when the model's secondary structure information is set.
 
std::string const & getSecondaryStructureInformation () const
 Returns the model's secondary structure information.
 
void setSecondaryStructureInformation (const std::string &info)
 Sets the model's secondary structure information.
 
void clearSecondaryStructureInformation ()
 Clears the model's secondary structure information.
 
bool hasConnectivityAnnotationInformation () const
 Returns true when the model's connectivity annotation information is set.
 
std::string const & getConnectivityAnnotationInformation () const
 Returns the model's connectivity annotation information.
 
void setConnectivityAnnotationInformation (const std::string &info)
 Sets the model's connectivity annotation information.
 
void clearConnectivityAnnotationInformation ()
 Clears the model's connectivity annotation information.
 
bool hasMiscellaneousInformation () const
 Returns true when the model's miscellaneous information is set.
 
std::string const & getMiscellaneousInformation () const
 Returns the model's miscellaneous information.
 
void setMiscellaneousInformation (const std::string &info)
 Sets the model's miscellaneous information.
 
void clearMiscellaneousInformation ()
 Clears the model's miscellaneous information.
 
bool hasCrystallographicAndTransformationInformation () const
 Returns true when the model's crystallographic and transformation information is set.
 
std::string const & getCrystallographicAndTransformationInformation () const
 Returns the model's crystallographic and transformation information.
 
void setCrystallographicAndTransformationInformation (const std::string &info)
 Sets the model's crystallographic and transformation information.
 
void clearCrystallographicAndTransformationInformation ()
 Clears the model's crystallographic and transformation information.
 

Statistics

virtual unsigned int getNumberOfChains () override
 Returns the number of chains.
 
virtual unsigned int getNumberOfMolecules () override
 Returns the number of molecules.
 
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 getNumberOfAtoms () override
 Returns the number of atoms.
 
virtual unsigned int getNumberOfCarbons () override
 Returns the number of carbons.
 
virtual unsigned int getNumberOfHydrogens () override
 Returns the number of hydrogens.
 
virtual unsigned int getNumberOfNitrogens () override
 Returns the number of nitrogens.
 
virtual unsigned int getNumberOfOxygens () override
 Returns the number of oxygens.
 
virtual unsigned int getNumberOfSulfurs () override
 Returns the number of sulfurs.
 
virtual unsigned int getNumberOfCoarseGrainedAtoms () override
 Returns the number of coarse-grained atoms.
 
virtual unsigned int getNumberOfOtherAtoms () override
 Returns the number of other atoms.
 
virtual int getSumOfFormalCharges () override
 Returns the sum of formal charges.
 
virtual float getSumOfPartialCharges () override
 Returns the sum of partial charges.
 
virtual SBQuantity::mass getMolecularWeight () override
 Returns the molecular weight.
 

Debugging

virtual void print (unsigned int offset=0) const override
 Prints debugging information.
 
 SB_NODE_GETTER_0 (, std::string, GetTitleInformation)
 
 SB_NODE_GETTER_0 (, std::string, GetPrimaryStructureInformation)
 
 SB_NODE_GETTER_0 (, std::string, GetHeterogenInformation)
 
 SB_NODE_GETTER_0 (, std::string, GetSecondaryStructureInformation)
 
 SB_NODE_GETTER_0 (, std::string, GetConnectivityAnnotationInformation)
 
 SB_NODE_GETTER_0 (, std::string, GetMiscellaneousInformation)
 
 SB_NODE_GETTER_0 (, std::string, GetCrystallographicAndTransformationInformation)
 
 SB_NODE_PREDICATE_0 (, HasTitleInformation)
 
 SB_NODE_PREDICATE_0 (, HasPrimaryStructureInformation)
 
 SB_NODE_PREDICATE_0 (, HasHeterogenInformation)
 
 SB_NODE_PREDICATE_0 (, HasSecondaryStructureInformation)
 
 SB_NODE_PREDICATE_0 (, HasConnectivityAnnotationInformation)
 
 SB_NODE_PREDICATE_0 (, HasMiscellaneousInformation)
 
 SB_NODE_PREDICATE_0 (, HasCrystallographicAndTransformationInformation)
 
 SB_DECLARE_DATA (SBMStructuralModel)
 

Atoms

static void replaceAtom (SBMStructuralModelNodeAtom *oldAtom, SBMStructuralModelNodeAtom *newAtom, bool preserveOldAtomPosition=false)
 Replaces atom oldAtom with atom newAtom. All bonds from the old atom are transferred to the new atom.
 
static std::set< char > getAltLocations (const SBNodeIndexer &nodeIndexer)
 Returns a set of all alternate locations for atoms that belong to nodes present in nodeIndexer.
 
static std::set< char > getAltLocations (const SBIndexer< SBMStructuralModelNodeAtom * > &atomIndexer)
 Returns a set of all alternate locations of atoms present in the atomIndexer.
 
static SBMStructuralModelNodeAtomfindAtom (const SBNodeIndexer &nodeIndexer, SBElement::Type type, const std::string &name)
 Returns, if found, an atom from a node indexer nodeIndexer with the type type and name name; else returns 0.
 
static SBMStructuralModelNodeAtomfindAtom (const SBIndexer< SBMStructuralModelNodeAtom * > &atomIndexer, SBElement::Type type, const std::string &name)
 Returns, if found, an atom from an atom node indexer atomIndexer with the type type and name name; else returns 0.
 
static SBMStructuralModelNodeAtomfindAtom (const SBNodeIndexer &nodeIndexer, SBElement::Type type, const std::string &name, char altLoc)
 Returns, if found, an atom from a node indexer nodeIndexer with the type type, name name, and an alternate location altLoc (if the atom has an alternate location); else returns 0.
 
static SBMStructuralModelNodeAtomfindAtom (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 type type, name name, and an alternate location altLoc (if the atom has an alternate location); else returns 0.
 

Additional Inherited Members

- Public Types inherited from SBDDataGraphNode
enum  Type {
  Undefined ,
  StructuralModel ,
  StructuralModelNode ,
  StructuralModelConformation ,
  Conformation ,
  StructuralModelPath ,
  Path ,
  StructuralModelNodeGroup ,
  StructuralGroup ,
  StructuralModelNodeRoot ,
  Root ,
  StructuralModelNodeAtom ,
  Atom ,
  StructuralModelNodeBond ,
  Bond ,
  StructuralModelNodeHydrogenBond ,
  HydrogenBond ,
  StructuralModelNodeHydrogenBondGroup ,
  HydrogenBondGroup ,
  StructuralModelNodeResidue ,
  Residue ,
  StructuralModelNodeSegment ,
  Segment ,
  StructuralModelNodeChain ,
  Chain ,
  StructuralModelNodeMolecule ,
  Molecule ,
  StructuralModelNodeBackbone ,
  Backbone ,
  StructuralModelNodeSideChain ,
  SideChain ,
  VisualModel ,
  VisualModelMesh ,
  Mesh ,
  DynamicalModel ,
  DynamicalModelParticleSystem ,
  ParticleSystem ,
  DynamicalModelRigidBodySystem ,
  RigidBodySystem ,
  DynamicalModelArticulatedBodySystem ,
  ArticulatedBodySystem ,
  DynamicalModelNode ,
  DynamicalNode ,
  DynamicalModelNodeGroup ,
  DynamicalGroup ,
  DynamicalModelNodeRoot ,
  DynamicalRoot ,
  DynamicalModelNodeParticle ,
  Particle ,
  DynamicalModelNodeRigidBody ,
  RigidBody ,
  DynamicalModelNodeArticulatedBody ,
  ArticulatedBody ,
  InteractionModel ,
  InteractionModelParticleSystem ,
  InteractionModelRigidBodySystem ,
  InteractionModelArticulatedBodySystem ,
  PropertyModel ,
  PropertyModelFunction ,
  Simulator ,
  SimulatorParticleSystem ,
  SimulatorRigidBodySystem ,
  SimulatorArticulatedBodySystem ,
  StateUpdater ,
  StateUpdaterParticleSystem ,
  StateUpdaterRigidBodySystem ,
  StateUpdaterArticulatedBodySystem ,
  Animation ,
  Camera ,
  Document ,
  DocumentManager ,
  File ,
  Folder ,
  Label ,
  Light ,
  Note ,
  Presentation ,
  RenderPreset ,
  DataGraphNodeGroup ,
  NodeGroup ,
  Controller ,
  ControllerNode ,
  Asset
}
 The type of the data graph node. More...
 
enum class  RenderingPass {
  Setup ,
  OpaqueGeometry ,
  SelectableGeometry ,
  ShadowingGeometry ,
  TransparentGeometry ,
  Interface ,
  Text
}
 The rendering pass. More...
 
- Public Member Functions inherited from SBMModel
virtual ~SBMModel ()
 Delete the model.
 
SBMModelgetNextModel () const
 Returns the next model in the parent.
 
SBMModelgetPreviousModel () const
 Returns the previous model in the parent.
 
virtual unsigned int getOpacity () const override
 Returns the opacity.
 
virtual void setOpacity (unsigned int opacity) override
 Sets the opacity.
 
virtual unsigned int getMinimumOpacity () const override
 Returns the minimum opacity.
 
virtual unsigned int getTransparency () const override
 Returns the transparency.
 
virtual void setTransparency (unsigned int transparency) override
 Sets the transparency.
 
virtual unsigned int getMaximumTransparency () const override
 Returns the maximum transparency.
 
bool getShadowingFlag () const
 Returns whether the model casts shadows.
 
void setShadowingFlag (bool shadowingFlag)
 Sets whether the model casts shadows.
 
 SB_NODE_GETTER_0 (, SBDDataGraphNode::Type, GetModelType)
 
 SB_NODE_PREDICATE_1 (, IsModelType, SBDDataGraphNode::Type)
 
 SB_DECLARE_DATA (SBMModel)
 
- Public Member Functions inherited from SBDDataGraphNode
SBDDataGraphNodegetParent () const
 Returns the parent of the node.
 
SBDDataGraphNodegetThisNode () const
 Returns the pointer to this node.
 
SBDDataGraphNodegetNextNode () const
 Returns the pointer to the next node in the children of the node's parent.
 
SBDDataGraphNodegetPreviousNode () const
 Returns the pointer to the previous node in the children of the node's parent.
 
SBDDataGraphNodegetNextNode (SBDDataGraphNode::Type nodeType) const
 Returns the pointer to the next node with type nodeType in the children of the node's parent.
 
SBDDataGraphNodegetPreviousNode (SBDDataGraphNode::Type nodeType) const
 Returns the pointer to the previous node with type nodeType in the children of the node's parent.
 
SBDDocumentgetDocument () const
 Returns the document the node belongs to.
 
virtual bool canAddChild (const SBDDataGraphNode *node, const SBDDataGraphNode *nextNode=nullptr) const
 Returns whether this node can add node as a child.
 
virtual bool addChild (SBDDataGraphNode *node, SBDDataGraphNode *nextNode=nullptr)
 Adds a child to the node.
 
virtual bool removeChild (SBDDataGraphNode *node)
 Removes a child from the node.
 
bool hasOneOf (const SBNodeIndexer &nodeIndexer) const
 Returns true if and only if this node is one of the nodes of the nodeIndexer, or is the ancestor of one of them, or is a group that stores one of them.
 
bool descendsFrom (const SBDDataGraphNode *node) const
 Returns true if and only if this node is node, or descends from it.
 
bool descendsFrom (const SBNodeIndexer &nodeIndexer) const
 Returns true if and only if this node is one of the nodes of the nodeIndexer, 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 the nodePointerIndexer, or descends from one of them.
 
bool isIn (const SBDDataGraphNode *node) const
 Returns true if and only if this node is node, or descends from it, or belongs to a group stored in node.
 
bool isIn (const SBNodeIndexer &nodeIndexer) const
 Returns true if and only if this node is one of the nodes of the nodeIndexer, or descends from one of them, or belongs to a group stored in one of the nodes of the nodeIndexer.
 
bool isIn (SBPointerIndexer< SBDDataGraphNode > *nodePointerIndexer) const
 Returns true if and only if this node is one of the nodes of the nodePointerIndexer, or descends from one of them, or belongs to a group stored in of the nodes of the nodePointerIndexer.
 
bool isOneOf (const SBNodeIndexer &nodeIndexer) const
 Returns true if and only if this node is one of the nodes of the nodeIndexer.
 
bool isOneOf (SBPointerIndexer< SBDDataGraphNode > *nodePointerIndexer) const
 Returns true if and only if this node is one of the nodes of the nodePointerIndexer.
 
SBDDataGraphNodegetRoot () const
 Returns the root of the hierarchy the node belongs to.
 
unsigned int getNodeIndex () const
 Returns the node index (unique in the whole data graph, but non-persistent)
 
std::string getTypeString (bool humanReadable=false) const
 Returns a string describing the type of the data graph node.
 
virtual std::string const & getName () const
 Returns the name of the node.
 
virtual void setName (const std::string &name)
 Sets the name of the node.
 
bool isType (Type type) const
 Returns true when the type of the node corresponds to type.
 
bool isModel () const
 Returns true when the node is a model.
 
bool isAtom () const
 Returns true when the node is an atom.
 
bool isBond () const
 Returns true when the node is a bond.
 
bool isStructuralNode () const
 Returns true when the node is a structural node.
 
bool isStructuralModel () const
 Returns true when the node is a structural model.
 
bool isVisualModel () const
 Returns true when the node is a visual model.
 
bool isDynamicalModel () const
 Returns true when the node is a dynamical model.
 
bool isInteractionModel () const
 Returns true when the node is a interaction model.
 
bool isPropertyModel () const
 Returns true when the node is a property model.
 
bool isMesh () const
 Returns true when the node is a mesh.
 
bool isLight () const
 Returns true when the node is a light.
 
bool isSimulator () const
 Returns true when the node is a simulator.
 
bool isBallAndStick () const
 Returns true when the node is the default ball-and-stick visual model.
 
bool isLicorice () const
 Returns true when the node is the default licorice visual model.
 
bool isVanDerWaals () const
 Returns true when the node is the default van der Waals visual model.
 
bool isCartoon () const
 Returns true when the node is the default cartoon visual model.
 
bool isRibbon () const
 Returns true when the node is the default ribbon visual model.
 
bool isTube () const
 Returns true when the node is the default tube visual model.
 
bool isGaussianSurface () const
 Returns true when the node is the default Gaussian surface visual model.
 
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 isCreated () const
 Returns true if and only if the node is created.
 
void create ()
 Creates the node.
 
bool isErased () const
 Returns true if and only if the node is erased.
 
void erase ()
 Erases the node.
 
virtual unsigned int getFlags () const
 Returns the flags.
 
virtual unsigned int getInheritedFlags () const
 Returns the inherited flags.
 
bool isSelected () const
 Returns whether the node is selected.
 
bool getSelected () const
 Returns whether the node is selected.
 
bool getSelectionFlag () const
 Returns the selection flag.
 
void setSelectionFlag (bool flag)
 Sets the selection flag.
 
bool isVisible () const
 Returns whether the node is visible.
 
bool getVisible () const
 Returns whether the node is visible.
 
bool getVisibilityFlag () const
 Returns the visibility flag.
 
void setVisibilityFlag (bool flag)
 Sets the visibility flag.
 
bool isHighlighted () const
 Returns whether the node is highlighted.
 
bool getHighlightingFlag () const
 Returns the highlighting flag.
 
void setHighlightingFlag (bool flag)
 Sets the highlighting flag.
 
virtual void display (RenderingPass renderingPass)
 Displays the node.
 
virtual void display ()
 Displays the node (deprecated)
 
virtual void displayForShadow ()
 Displays the node for shadowing purposes (deprecated)
 
virtual void displayForSelection ()
 Displays the node for selection purposes (deprecated)
 
virtual bool hasOpacityRange () const
 Returns whether the node has the opacity range.
 
virtual unsigned int getDefaultOpacity () const
 Returns the default opacity.
 
virtual unsigned int getMaximumOpacity () const
 Returns the maximum opacity.
 
virtual unsigned int getOpacitySingleStep () const
 Returns the opacity single step.
 
virtual std::string getOpacitySuffix () const
 Returns the opacity suffix.
 
virtual bool hasTransparencyRange () const
 Returns whether the node has the transparency range.
 
virtual unsigned int getDefaultTransparency () const
 Returns the default transparency.
 
virtual unsigned int getMinimumTransparency () const
 Returns the minimum transparency.
 
virtual unsigned int getTransparencySingleStep () const
 Returns the transparency single step.
 
virtual std::string getTransparencySuffix () const
 Returns the transparency suffix.
 
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.
 
bool canAddMaterial () const
 Returns whether can add a material to the node based on its type.
 
bool addMaterial (SBDDataGraphNodeMaterial *material)
 Adds a material.
 
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.
 
bool hasMaterial () const
 Returns whether the node has a material (by itself, or inherited)
 
bool ownsMaterial () const
 Returns whether the node owns a material.
 
SBDDataGraphNodeMaterialgetMaterial () const
 Returns the material.
 
SBDDataGraphNodegetMaterialOwner () const
 Returns the node whose material is inherited.
 
void connectBaseSignalToSlot (SBCReferenceTarget *referenceTarget, void(SBCReferenceTarget::*functionPointer)(SBBaseEvent *), SBCReferenceTarget *nextReferenceTarget=0, void(SBCReferenceTarget::*nextFunctionPointer)(SBBaseEvent *)=0)
 Connects the base signal to a slot.
 
bool baseSignalIsConnectedToSlot (SBCReferenceTarget *referenceTarget, void(SBCReferenceTarget::*functionPointer)(SBBaseEvent *)) const
 Returns true when the base signal is connected to a slot.
 
void disconnectBaseSignalFromSlot (SBCReferenceTarget *referenceTarget, void(SBCReferenceTarget::*functionPointer)(SBBaseEvent *))
 Disconnects the base signal from 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 a visitPredicate, 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 a visitPredicate, with or without dependencies.
 
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.
 
 SB_DECLARE_DATA (SBDDataGraphNode)
 
- Public Member Functions inherited from SBCReferenceTarget
unsigned int getMemoryFootprint () const
 
void printReferencesToOwners () const
 
 SBCReferenceTarget ()
 
virtual ~SBCReferenceTarget ()
 
- Static Public Member Functions inherited from SBDDataGraphNode
static void clone (const SBNodeIndexer &sourceNodeIndexer, SBNodeIndexer &destinationNodeIndexer)
 Clones the nodes in sourceNodeIndexer (treated as a whole) and places the clones in destinationNodeIndexer.
 
static SBDDataGraphNodegetNode (unsigned int nodeIndex)
 Returns the unique node corresponding to the node index nodeIndex.
 
static std::string getTypeString (Type type, bool humanReadable=false)
 Returns a string describing the type of the data graph node.
 
static bool canAddMaterial (SBDDataGraphNode::Type nodeType)
 Returns whether can add a material to a node of type nodeType.
 
static void forEachNodeInSelection (SBNodeIndexer &nodeIndexer, void(*action)(SBDDataGraphNode *node))
 Performs an action for each node in a selection.
 
static void forEachNodeInSelection (SBNodeIndexer &nodeIndexer, SBCClass *object, void(SBCClass::*action)(SBDDataGraphNode *node))
 Performs an action for each node in a selection.
 
- Protected Member Functions inherited from SBMModel
 SBMModel ()
 Builds a model.
 
 SBMModel (SBMModelData *dataPointer)
 Builds a model.
 
- Protected Member Functions inherited from SBDDataGraphNode
 SBDDataGraphNode ()
 Builds a data graph node.
 
 SBDDataGraphNode (SBDDataGraphNodeData *dataPointer)
 Builds a data graph node.
 
virtual ~SBDDataGraphNode ()
 Destroys the node.
 
- Protected Member Functions inherited from SBCReferenceTarget
void removeAllReferenceOwners ()
 
 SBCReferenceTarget (SBCReferenceTargetData *dataPointer)
 
- Protected Attributes inherited from SBCReferenceTarget
SBCReferenceTargetData * dataPointer
 

Member Function Documentation

◆ addChild()

bool SBMStructuralModel::addChild ( SBNode node,
SBNode nextNode = nullptr 
)
overridevirtual

This function is a convenience function equivalent to getStructuralRoot()->addChild(node, nextNode)

◆ bondExists()

bool SBMStructuralModel::bondExists ( SBMStructuralModelNodeAtom atom1,
SBMStructuralModelNodeAtom atom2 
)
static

This function checks whether the bond between atoms atom1 and atom2 exists: it returns true if the bond exists and false otherwise.

◆ canAddChild()

bool SBMStructuralModel::canAddChild ( const SBNode node,
const SBNode nextNode = nullptr 
) const
overridevirtual

This function is a convenience function equivalent to getStructuralRoot()->canAddChild(node, nextNode)

◆ canAddChildType()

bool SBMStructuralModel::canAddChildType ( SBNode::Type  nodeType) const
overridevirtual

This function is a convenience function equivalent to getStructuralRoot()->canAddChildType(nodeType)

Reimplemented from SBDDataGraphNode.

◆ canHaveDescendantType()

bool SBMStructuralModel::canHaveDescendantType ( SBNode::Type  nodeType) const
overridevirtual

This function is a convenience function equivalent to getStructuralRoot()->canHaveDescendantType(nodeType)

Reimplemented from SBDDataGraphNode.

◆ centerTransform()

void SBMStructuralModel::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.

◆ clone()

SBMStructuralModel * SBMStructuralModel::clone ( )
overridevirtual

Reimplemented from SBMModel.

◆ computeSecondaryStructure()

bool SBMStructuralModel::computeSecondaryStructure ( bool &  secondaryStructureChanged,
bool  forceUpdate = false 
)

This functions 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.

◆ forEachNodeDepthFirst() [1/2]

void SBMStructuralModel::forEachNodeDepthFirst ( SBCClass object,
void(SBCClass::*)(SBDDataGraphNode *node)  action 
)
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ forEachNodeDepthFirst() [2/2]

void SBMStructuralModel::forEachNodeDepthFirst ( void(*)(SBDDataGraphNode *node)  action)
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getAsphericity()

double SBMStructuralModel::getAsphericity ( const SBNodeIndexer nodeIndexer)
static

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.

◆ getCenterOfFormalCharge()

SBPosition3 SBMStructuralModel::getCenterOfFormalCharge ( const SBNodeIndexer nodeIndexer)
static

This function 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).

◆ getCenterOfMass()

SBPosition3 SBMStructuralModel::getCenterOfMass ( const SBNodeIndexer nodeIndexer)
static

This function 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).

◆ getCenterOfPartialCharge()

SBPosition3 SBMStructuralModel::getCenterOfPartialCharge ( const SBNodeIndexer nodeIndexer)
static

This function 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).

◆ getCentroid()

SBPosition3 SBMStructuralModel::getCentroid ( const SBNodeIndexer nodeIndexer)
static

This function returns the centroid (the 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).

◆ getDipoleMomentAtCenterOfCharge()

SBQuantity::length SBMStructuralModel::getDipoleMomentAtCenterOfCharge ( const SBNodeIndexer nodeIndexer)
static

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).

◆ getDipoleMomentAtCenterOfMass()

SBQuantity::length SBMStructuralModel::getDipoleMomentAtCenterOfMass ( const SBNodeIndexer nodeIndexer)
static

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).

◆ getDipoleVectorAtCenterOfCharge()

SBPosition3 SBMStructuralModel::getDipoleVectorAtCenterOfCharge ( const SBNodeIndexer nodeIndexer)
static

This function 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).

◆ getDipoleVectorAtCenterOfMass()

SBPosition3 SBMStructuralModel::getDipoleVectorAtCenterOfMass ( const SBNodeIndexer nodeIndexer)
static

This function 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).

◆ getInertiaTensor()

SBInertiaTensor33 SBMStructuralModel::getInertiaTensor ( const SBNodeIndexer nodeIndexer)
static

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.

◆ getLockedFlag()

bool SBMStructuralModel::getLockedFlag ( ) const
overridevirtual

This function 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

Reimplemented from SBDDataGraphNode.

◆ getModelType()

SBDDataGraphNode::Type SBMStructuralModel::getModelType ( ) const
overridevirtual

Reimplemented from SBMModel.

◆ getMolecularWeight() [1/2]

SBQuantity::mass SBMStructuralModel::getMolecularWeight ( )
overridevirtual

This function returns the cumulative molecular weight of atoms in the structural model.

If the structural model doesn't contain any atoms then the function returns zero.

Reimplemented from SBDDataGraphNode.

◆ getMolecularWeight() [2/2]

SBQuantity::mass SBMStructuralModel::getMolecularWeight ( const SBNodeIndexer nodeIndexer)
static

This function returns the cumulative molecular weight of nodes in nodeIndexer.

◆ getNodes() [1/2]

void SBMStructuralModel::getNodes ( SBNodeIndexer nodeIndexer,
const SBNodePredicate selectionPredicate = SBDDataGraphNode::All(),
const SBNodePredicate visitPredicate = SBDDataGraphNode::All(),
bool  includeDependencies = false 
) const
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNodes() [2/2]

void SBMStructuralModel::getNodes ( SBNodeIndexer nodeIndexer,
SBNode::Type  nodeType,
bool  selectedNodesOnly = false,
const SBNodePredicate visitPredicate = SBDDataGraphNode::All(),
bool  includeDependencies = false 
) const
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfAtoms()

unsigned int SBMStructuralModel::getNumberOfAtoms ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfCarbons()

unsigned int SBMStructuralModel::getNumberOfCarbons ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfChains()

unsigned int SBMStructuralModel::getNumberOfChains ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfCoarseGrainedAtoms()

unsigned int SBMStructuralModel::getNumberOfCoarseGrainedAtoms ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfHydrogens()

unsigned int SBMStructuralModel::getNumberOfHydrogens ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfMolecules()

unsigned int SBMStructuralModel::getNumberOfMolecules ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfNitrogens()

unsigned int SBMStructuralModel::getNumberOfNitrogens ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfOtherAtoms()

unsigned int SBMStructuralModel::getNumberOfOtherAtoms ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfOxygens()

unsigned int SBMStructuralModel::getNumberOfOxygens ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfResidues()

unsigned int SBMStructuralModel::getNumberOfResidues ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfSegments()

unsigned int SBMStructuralModel::getNumberOfSegments ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfStructuralGroups()

unsigned int SBMStructuralModel::getNumberOfStructuralGroups ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfStructuralModels()

unsigned int SBMStructuralModel::getNumberOfStructuralModels ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getNumberOfSulfurs()

unsigned int SBMStructuralModel::getNumberOfSulfurs ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getPrincipalAxes()

SBMatrix33 SBMStructuralModel::getPrincipalAxes ( const SBNodeIndexer nodeIndexer)
static

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.

◆ getRadiusOfGyration()

SBQuantity::length SBMStructuralModel::getRadiusOfGyration ( const SBNodeIndexer nodeIndexer)
static

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.

◆ getShapeParameter()

double SBMStructuralModel::getShapeParameter ( const SBNodeIndexer nodeIndexer)
static

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.

◆ getSolventAccessibleSurfaceArea()

SBQuantity::squareLength SBMStructuralModel::getSolventAccessibleSurfaceArea ( const SBNodeIndexer nodeIndexer,
const SBQuantity::length probeRadius,
const unsigned int  numberOfPointsOnSphere 
)
static

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.

◆ getSpatialTransform()

SBDTypeSpatialTransform SBMStructuralModel::getSpatialTransform ( const SBNodeIndexer nodeIndexer)
static

Returns the spatial transform based on 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 transform.

◆ getStructuralRoot()

SBMStructuralModelNodeRoot * SBMStructuralModel::getStructuralRoot ( ) const

This function returns a pointer to the structural root of the structural model. This root is a structural node, and can be used as a convenience root for e.g. recursive algorithms that operate on structural nodes (such algorithms could not work on the structural model itself, since the SBMStructuralModel class does not derive from SBMStructuralModelNode).

◆ getSumOfFormalCharges() [1/2]

int SBMStructuralModel::getSumOfFormalCharges ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getSumOfFormalCharges() [2/2]

int SBMStructuralModel::getSumOfFormalCharges ( const SBNodeIndexer nodeIndexer)
static

This function returns the sum of formal charges of nodes in nodeIndexer.

◆ getSumOfPartialCharges() [1/2]

float SBMStructuralModel::getSumOfPartialCharges ( )
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ getSumOfPartialCharges() [2/2]

float SBMStructuralModel::getSumOfPartialCharges ( const SBNodeIndexer nodeIndexer)
static

This function returns the sum of partial charges of nodes in nodeIndexer.

◆ getType()

SBDDataGraphNode::Type SBMStructuralModel::getType ( ) const
overridevirtual

Reimplemented from SBMModel.

◆ getWater() [1/2]

void SBMStructuralModel::getWater ( SBNodeIndexer resultNodeIndexer) const

This function finds water nodes in the structural model and adds them to resultNodeIndexer.

◆ getWater() [2/2]

void SBMStructuralModel::getWater ( SBNodeIndexer resultNodeIndexer,
const SBNodeIndexer nodeIndexer 
)
static

This function finds water nodes in the nodeIndexer and adds them to resultNodeIndexer The resulting water nodes might include water structural groups and water atoms.

◆ hasNode() [1/2]

bool SBMStructuralModel::hasNode ( const SBNodePredicate selectionPredicate = SBDDataGraphNode::All(),
const SBNodePredicate visitPredicate = SBDDataGraphNode::All(),
bool  includeDependencies = false 
) const
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ hasNode() [2/2]

bool SBMStructuralModel::hasNode ( SBNode::Type  nodeType,
bool  selectedNodesOnly = false,
const SBNodePredicate visitPredicate = SBDDataGraphNode::All(),
bool  includeDependencies = false 
) const
overridevirtual

Reimplemented from SBDDataGraphNode.

◆ isLocked()

bool SBMStructuralModel::isLocked ( ) const
overridevirtual

This function is equivalent to getLockedFlag

See also
getLockedFlag
setLockedFlag

Reimplemented from SBDDataGraphNode.

◆ isPlanar()

bool SBMStructuralModel::isPlanar ( const SBNodeIndexer nodeIndexer)
static

This function returns true if all atoms in nodeIndexer are in the same plane Note that for 3 atoms and less it will always return true

◆ isSerializable()

bool SBMStructuralModel::isSerializable ( ) const
overridevirtual

Reimplemented from SBMModel.

◆ populateChainIDs()

bool SBMStructuralModel::populateChainIDs ( bool  forceRenumbering = false)

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.

◆ print()

void SBMStructuralModel::print ( unsigned int  offset = 0) const
overridevirtual

Reimplemented from SBMModel.

◆ removeChild()

bool SBMStructuralModel::removeChild ( SBNode node)
overridevirtual

This function is a convenience function equivalent to getStructuralRoot()->removeChild(node)

◆ serialize()

void SBMStructuralModel::serialize ( SBCSerializer serializer,
const SBNodeIndexer nodeIndexer,
const SBVersionNumber sdkVersionNumber = SB_SDK_VERSION_NUMBER,
const SBVersionNumber classVersionNumber = SBVersionNumber(1, 0, 0) 
) const
overridevirtual

Reimplemented from SBMModel.

◆ setLockedFlag()

void SBMStructuralModel::setLockedFlag ( bool  flag)
overridevirtual

This function sets the locked flag of the structural model.

This function is undoable

See also
isLocked
getLockedFlag

Reimplemented from SBDDataGraphNode.

◆ unserialize()

void SBMStructuralModel::unserialize ( SBCSerializer serializer,
const SBNodeIndexer nodeIndexer,
const SBVersionNumber sdkVersionNumber = SB_SDK_VERSION_NUMBER,
const SBVersionNumber classVersionNumber = SBVersionNumber(1, 0, 0) 
)
overridevirtual

Reimplemented from SBMModel.