Closed ghutchis closed 9 years ago
Okay, I've committed this fix. You can color by the partialCharge property like so:
m.setColorByProperty({}, 'charge', new $3Dmol.Gradient.RWB(-0.5,0.5)); //this sets the default color of each atom based on the charge
//you can specify a mapping for a surface (or you can just let it pick up the set atom colors, but this let's you keep the atom colors at their default)
glviewer.addSurface($3Dmol.SurfaceType.VDW, {map:{prop:'partialCharge',scheme:new $3Dmol.Gradient.RWB(-.5,.5)}, opacity:0.8});
Most mol2 files include atomic partial charges. It would be awesome to use the potentials defined by the file rather than residue-based charges, e.g.:
The last column is always the partial charge. Open Babel's parser looks like this:
This would imply that there's always(?) a token[8] entry with the floating-point partial charge.