- Source
Example
var setStyles = function(volumedata){
var data = new $3Dmol.VolumeData(volumedata, "cube");
viewer.addSurface("VDW", {opacity:0.85, voldata: data, volscheme: new $3Dmol.Gradient.RWB(-10,10)},{chain:'A'});
viewer.mapAtomProperties($3Dmol.applyPartialCharges);
viewer.addSurface($3Dmol.SurfaceType.SAS, {map:{prop:'partialCharge',scheme:new $3Dmol.Gradient.RWB(-.05,.05)}, opacity:1.0},{chain:'B'});
viewer.addSurface($3Dmol.SurfaceType.VDW, {opacity:0.85,voldata: data, color:'red'},{chain:'C'});
viewer.addSurface($3Dmol.SurfaceType.SAS, {opacity:0.85,voldata: data, colorscheme:'greenCarbon'},{chain:'D'});
viewer.render();
};
$3Dmol.download("pdb:4DLN",viewer,{},function(){
$.get("data/1fas.cube",setStyles);
});
Members
color :ColorSpec
fixed coloring, overrides colorscheme
Type:
- Source
colorscheme :ColorschemeSpec
element based coloring
Type:
- Source
onesided :boolean
one sided material - back is transparent
Type:
- boolean
- Source
opacity :number
sets the transparency: 0 to hide, 1 for fully opaque
Type:
- number
- Source
voldata :VolumeData
volumetric data for vertex coloring, can be VolumeData object or raw data if volformat is specified
Type:
- Source
volformat :string
format of voldata if not a {VolumeData} object
Type:
- string
- Source
volscheme :Gradient
coloring scheme for mapping volumetric data to vertex color, if not a Gradient object, show describe a builtin gradient one by providing an object with gradient, min, max, and (optionally) mid fields.
Type:
- Gradient
- Source