Skip to content

MoleculeToRepresentation ​

Introduction ​

vtkMoleculeToRepresentation - convert a molecule into renderable polydata

vtkMoleculeToRepresentation takes a molecule as input and produces two outputs: a polydata whose points are the atoms, carrying a scale and a color array, and a polydata whose points are the bonds, carrying a scale, an orientation and a color array. Bonds absent from the input are deduced from the distance between the atoms and their covalent radii.

Methods ​

extend ​

Method used to decorate a given object (publicAPI+model) with vtkMoleculeToRepresentation characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIMoleculeToRepresentationInitialValuesNo(default: {})

getAtomicRadiusScaleFactor ​

Get the factor applied to the tabulated atomic radius.

getBondRadius ​

Get the radius of the sticks representing the bonds.

getDeltaBondFactor ​

Get the extra spacing inserted between the sticks of a multiple bond.

getHideElements ​

Get the elements, identified by their id, that are not represented.

getRadiusType ​

Get which tabulated radius is used to size the atom spheres.

getSphereScaleArrayName ​

Get the name given to the sphere scale array of the first output.

getTolerance ​

Get the extra distance allowed when deducing bonds from atom positions.

newInstance ​

Method used to create a new instance of vtkMoleculeToRepresentation

ArgumentTypeRequiredDescription
initialValuesIMoleculeToRepresentationInitialValuesNofor pre-setting some of its content

requestData ​

Produce the sphere polydata on output 0 and the stick polydata on output 1.

ArgumentTypeRequiredDescription
inDataYes
outDataYes

setAtomicRadiusScaleFactor ​

Set the factor applied to the tabulated atomic radius.

ArgumentTypeRequiredDescription
atomicRadiusScaleFactorNumberYes

setBondRadius ​

Set the radius of the sticks representing the bonds.

ArgumentTypeRequiredDescription
bondRadiusNumberYes

setDeltaBondFactor ​

Set the extra spacing inserted between the sticks of a multiple bond.

ArgumentTypeRequiredDescription
deltaBondFactorNumberYes

setHideElements ​

Set the elements, identified by their id, that must not be represented.

ArgumentTypeRequiredDescription
hideElementsString or Array[String]Yes

setRadiusType ​

Set which tabulated radius is used to size the atom spheres.

ArgumentTypeRequiredDescription
radiusTypeRadiusTypeYes

setSphereScaleArrayName ​

Set the name given to the sphere scale array of the first output.

ArgumentTypeRequiredDescription
sphereScaleArrayNameStringYes

setTolerance ​

Set the extra distance allowed when deducing bonds from atom positions. Two atoms are bonded when their distance is below the sum of their covalent radii plus this tolerance.

ArgumentTypeRequiredDescription
toleranceNumberYes