# AtomImage

## lib/model.js~ AtomImage

An 'image' of a single atom from a model. This represents a specific periodic copy of that atom (if applicable).

## 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

Source:
  - model.js, line 32

### Members

#### # (readonly) aura :AuraMesh

Aura used to highlight this atom image

Type:

- AuraMesh

Source:
  - model.js, line 364

#### # baseRadius :float

Starting radius of the atom

Type:

- float

Source:
  - model.js, line 418

#### # (readonly) bondedAtoms :Array.<AtomImage>

All atoms bonded to this atom

Type:

- Array.<AtomImage>

Source:
  - model.js, line 282

#### # (readonly) bonds :Array.<BondImage>

All bonds connected to this atom

Type:

- Array.<BondImage>

Source:
  - model.js, line 273

#### # (readonly) bondsFrom :Array.<BondImage>

Bonds from this atom

Type:

- Array.<BondImage>

Source:
  - model.js, line 255

#### # (readonly) bondsTo :Array.<BondImage>

Bonds to this atom

Type:

- Array.<BondImage>

Source:
  - model.js, line 264

#### # color :int

Color of the atom

Type:

- int

Source:
  - model.js, line 467

#### # (readonly) cpkColor :int

Hex integer code of the conventional CPK color used for this element (altered in case of non-standard isotopes)

Type:

- int

Source:
  - model.js, line 237

#### # (readonly) crystLabel :String

Crystal site label of this atom

Type:

- String

Source:
  - model.js, line 162

#### # (readonly) element :String

Symbol of this atom's element

Type:

- String

Source:
  - model.js, line 153

#### # (readonly) elementData :Object

Periodic table information for this atom's element

Type:

- Object

Source:
  - model.js, line 171

#### # (readonly) fxyz :Array.<float>

Fractional coordinates of this atom image

Type:

- Array.<float>

Source:
  - model.js, line 332

#### # (readonly) fxyz0 :Array.<float>

Fractional coordinates of this atom's original

Type:

- Array.<float>

Source:
  - model.js, line 323

#### # highlighted :bool

Whether the atom is highlighted

Type:

- bool

Source:
  - model.js, line 524

#### # (readonly) id :String

String ID of the image

Type:

- String

Source:
  - model.js, line 126

#### # (readonly) ijk :Array.<int>

Cell indices of this atom image

Type:

- Array.<int>

Source:
  - model.js, line 296

#### # (readonly) imgIndex :int

Index of this image

Type:

- int

Source:
  - model.js, line 135

#### # (readonly) index :int

Index of the atom

Type:

- int

Source:
  - model.js, line 117

#### # isotope :int

Atomic mass of this atom's isotope

Type:

- int

Source:
  - model.js, line 191

#### # (readonly) isotopeData :Object

Information for this atom's isotope

Type:

- Object

Source:
  - model.js, line 180

#### # isotopeGlobal :int

Atomic mass of the global isotope set as default for this atom's species

Type:

- int

Source:
  - model.js, line 209

#### # (readonly) mesh :AtomMesh

Mesh corresponding to this atom image

Type:

- AtomMesh

Source:
  - model.js, line 350

#### # (readonly) model :Model

Model this atom belongs to

Type:

- Model

Source:
  - model.js, line 93

#### # (readonly) moleculeIndex :int

Index of the molecule this atom belongs to

Type:

- int

Source:
  - model.js, line 341

#### # (readonly) number :int

Atomic number of element

Type:

- int

Source:
  - model.js, line 226

#### # opacity :float

Opacity of the atom

Type:

- float

Source:
  - model.js, line 499

#### # radius :float

Final radius of the atom (starting radius * scale)

Type:

- float

Source:
  - model.js, line 452

#### # (readonly) renderer :Renderer

Renderer used by this atom

Type:

- Renderer

Source:
  - model.js, line 102

#### # scale :float

Scale of the atom

Type:

- float

Source:
  - model.js, line 435

#### # (readonly) speciesIndex :int

Index of the species of this atom

Type:

- int

Source:
  - model.js, line 144

#### # (readonly) vdwRadius :float

Van dew Waals radius for this element

Type:

- float

Source:
  - model.js, line 246

#### # visible :bool

Whether the atom is visible

Type:

- bool

Source:
  - model.js, line 383

#### # (readonly) xyz :Array.<float>

Position of this atom image

Type:

- Array.<float>

Source:
  - model.js, line 314

#### # (readonly) xyz0 :Array.<float>

Position of this atom's original

Type:

- Array.<float>

Source:
  - model.js, line 305

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

Source:
  - model.js, line 612

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

Source:
  - model.js, line 548

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

Source:
  - model.js, line 662

#### # getArrayValue(name) → {*}

Get the value for one array for this image

Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | Name of the array

Source:
  - model.js, line 676

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.

Source:
  - model.js, line 590

#### # removeEllipsoid(name)

Remove the ellipsoid with a given name

Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | Name of the ellipsoid

Source:
  - model.js, line 647

#### # removeLabel(name)

Remove the label of a given name

Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | Name of the label

Source:
  - model.js, line 574