NGL@0.10.4 Home Manual Reference Source GalleryRepository
import ElectrostaticColormaker from 'ngl/src/color/electrostatic-colormaker.js'
public class | source

ElectrostaticColormaker

Extends:

Colormaker → ElectrostaticColormaker

Color a surface by electrostatic charge. This is a highly approximate calculation! The partial charges are CHARMM with hydrogens added to heavy atoms and hydrogen positions generated for amides.

Name: electrostatic

Example:

stage.loadFile( "rcsb://3dqb" ).then( function( o ){
    o.addRepresentation( "surface", { colorScheme: "electrostatic" } );
    o.autoView();
} );

Inherited Summary

From class Colormaker
public

safe a atom color to an array

public

bondColor(bond: BondProxy, fromTo: Boolean): Integer

return the color for an bond

public

bondColorToArray(bond: BondProxy, fromTo: Boolean, array: Array | TypedArray, offset: Integer): Array

safe a bond color to an array

public

colorToArray(color: Integer, array: Array | TypedArray, offset: Integer): Array

safe a color to an array

public

positionColorToArray(coords: Vector3, array: Array | TypedArray, offset: Integer): Array

safe a color for coordinates in space to an array

public

volumeColorToArray(index: Integer, array: Array | TypedArray, offset: Integer): Array

safe a volume cell color to an array