Color

One can color the atoms using the following scheme:

  • Element

  • Random

  • Uniform

  • Index

  • Attribute

Color by element

Supported style are:

  1. JMOL: http://jmol.sourceforge.net/jscolors/#color_U

  2. VESTA: https://jp-minerals.org/vesta/en/

  3. CPK: https://en.wikipedia.org/wiki/CPK_coloring

Custom color for each species

Use can set custom color for each species. The color can be in the form of hex code or color name.

editor.avr.atomManager.settings["C"].color = "red";
editor.avr.atomManager.settings["H"].color = "#b434eb";
editor.avr.atomManager.settings["O"].color = "#34eb77";
editor.avr.atomManager.settings["S"].color = "#FFFF00";
editor.avr.drawModels()
../_images/example_color_by_species.png

Color by attribute

Coloring based on the attribute of the atoms. The attribute can be: charge, magmom, or any other attribute in the structure.

Here we show how to color the atoms by their forces.

editor.avr.colorBy = "Force"
editor.avr._colorRamp = ["red", "yellow", "blue"]
../_images/example_color_by_force.png