Constructor
#
new AtomImage(model, index, ijk)
Parameters:
Name |
Type |
Description |
model |
Model
|
The model from which the image is from |
index |
int
|
Index of the atom in the model |
ijk |
Array
|
Indices of the cell in which the image is located |
Members
#
(readonly) aura :AuraMesh
Aura used to highlight this atom image
#
baseRadius :float
Starting radius of the atom
#
(readonly) bondedAtoms :Array.<AtomImage>
All atoms bonded to this atom
#
(readonly) bonds :Array.<BondImage>
All bonds connected to this atom
#
(readonly) bondsFrom :Array.<BondImage>
#
(readonly) bondsTo :Array.<BondImage>
#
color :int
#
(readonly) cpkColor :int
Hex integer code of the conventional CPK color used for this element
(altered in case of non-standard isotopes)
#
(readonly) crystLabel :String
Crystal site label of this atom
#
(readonly) element :String
Symbol of this atom's element
#
(readonly) elementData :Object
Periodic table information for this atom's element
#
(readonly) fxyz :Array.<float>
Fractional coordinates of this atom image
#
(readonly) fxyz0 :Array.<float>
Fractional coordinates of this atom's original
#
highlighted :bool
Whether the atom is highlighted
#
(readonly) id :String
#
(readonly) ijk :Array.<int>
Cell indices of this atom image
#
(readonly) imgIndex :int
#
(readonly) index :int
#
isotope :int
Atomic mass of this atom's isotope
#
(readonly) isotopeData :Object
Information for this atom's isotope
#
isotopeGlobal :int
Atomic mass of the global isotope set as default for this atom's species
#
(readonly) mesh :AtomMesh
Mesh corresponding to this atom image
#
(readonly) model :Model
Model this atom belongs to
#
(readonly) moleculeIndex :int
Index of the molecule this atom belongs to
#
(readonly) number :int
#
opacity :float
#
radius :float
Final radius of the atom (starting radius * scale)
#
(readonly) renderer :Renderer
Renderer used by this atom
#
scale :float
#
(readonly) speciesIndex :int
Index of the species of this atom
#
(readonly) vdwRadius :float
Van dew Waals radius for this element
#
visible :bool
Whether the atom is visible
#
(readonly) xyz :Array.<float>
Position of this atom image
#
(readonly) xyz0 :Array.<float>
Position of this atom's original
Methods
#
addEllipsoid(data, name, parameters)
Add an ellipsoid to the atom.
Parameters:
Name |
Type |
Description |
data |
TensorData
|
Object
|
Array
|
The data to base the
ellipsoid on. Can be:
- a TensorData object;
- an Object with 'eigenvalues'
and 'eigenvectors' members
- an Array of the form
[eigenvalues, eigenvectors] |
name |
String
|
Name of the ellipsoid |
parameters |
Object
|
Additional options to
pass (see EllipsoidMesh) |
#
addLabel(text, name, parameters)
Add a text label to the atom.
Parameters:
Name |
Type |
Description |
text |
String
|
Content of the label |
name |
String
|
Name to use to refer to the label (necessary to overwrite/erase later) |
parameters |
Object
|
Dictionary of other options (e.g. font family, text color, etc. See TextSprite) |
#
ellipsoidProperty(name, property, value)
Retrieve or set an ellipsoid's properties
Parameters:
Name |
Type |
Default |
Description |
name |
String
|
|
Name of the ellipsoid |
property |
String
|
|
Property to set |
value |
?
|
null
|
Value to set. If omitted, returns the current
value instead. |
#
getArrayValue(name) → {*}
Get the value for one array for this image
Parameters:
Name |
Type |
Description |
name |
String
|
Name of the array |
Returns:
Value of the array for this atom
-
Type
-
*
#
labelProperty(name, property, value)
Retrieve or set a label's properties
Parameters:
Name |
Type |
Default |
Description |
name |
String
|
|
Name of the label |
property |
String
|
|
Property to set |
value |
?
|
null
|
Value to set. If omitted, returns the current
value instead. |
#
removeEllipsoid(name)
Remove the ellipsoid with a given name
Parameters:
Name |
Type |
Description |
name |
String
|
Name of the ellipsoid |
#
removeLabel(name)
Remove the label of a given name
Parameters:
Name |
Type |
Description |
name |
String
|
Name of the label |