AtomSpec

Source: specs.ts

Atom representation. Coordinates are in angstroms. Depending on the input file
format, not all fields may be defined. Use index for positions in a model atom
array; serial is an input identifier and need not be contiguous or unique.


Instance Fields

atom: string

Atom name; may be more specific than 'elem' (e.g 'CA' for alpha carbon)

b: number

Atom b factor data

bondOrder: Array

Array of this atom's bond orders, corresponding to the atom indices in 'bonds'

bondStyles: Array

custom bond styling by position in bonds

bonds: Array

Indices of bonded atoms in this model's atom array (not input-file serial numbers).

callback: function

Click handler receiving the atom, viewer, mouse or touch event, viewer container, and intersections sorted nearest first.

chain: string

Chain this atom belongs to, if specified in input file (e.g 'A' for chain A)

clickable: boolean

Set this flag to true to enable click selection handling for this atom

color: ColorSpec

Atom's color, as hex code or built-in color string

elem: string

Element abbreviation (e.g. 'H', 'Ca', etc)

hetflag: boolean

Set to true if atom is a heteroatom

hover_callback: function

Hover handler receiving the atom, viewer, mouse or touch event, viewer container, and intersections sorted nearest first.

hoverable: boolean

Set this flag to true to enable hover selection handling for this atom

index: number

Zero-based index in the model atom array; may change when atoms are removed.

invert: boolean

for selection, inverts the meaning of the selection

lchain: string

Label chain (not author)

lresi: number

Label residues number (not author)

lresn: string

Residue label name

pdbline: string

If applicable, this atom's record entry from the input PDB file (used to output new PDB from models)

properties: Record.<string, any>

Additional data such as charge or custom numeric properties. Property coloring checks this mapping before top-level atom fields.

resi: number

Residue number

resn: string

Parent residue name

serial: number

Atom's serial id number

singleBonds: boolean

true if this atom forms only single bonds or no bonds at all

ss: string

Secondary structure identifier (for cartoon render; e.g. 'h' for helix)

style: AtomStyleSpec

style of atom

surfaceColor: ColorSpec

Hex code for color to be used for surface patch over this atom

unhover_callback: function

Unhover handler with the same arguments as the hover handler.
The event and intersections can be undefined when hover is cleared.

x: number

Atom's x coordinate

y: number

Atom's y coordinate

z: number

Atom's z coordinate