[xcrysden] Custom color bases?

Tone Kokalj tone.kokalj at ijs.si
Mon Oct 28 15:55:23 CET 2013


On Mon, 2013-10-28 at 15:03 +0100, Georg Wachter wrote:
> Dear XCrySDen users and developers, 
> 
> 
> 
> I frequently use XCrySDen to visualize charge difference densities on
> color planes. 
> 
> 
> 
> I usually use the color basis (cpl_basis) "BLUE-WHITE-RED" for this
> purpose.
> 
> 
> I would, however, like to increase the contrast of the visualization
> by using a different set of colors, i.e. a "custom" color basis /
> palette, either in addition to or as a substitute for the six standard
> options. 
> 
> 
> Is that achievable with XCrySDen? Would it be achievable by compiling
> a customized source?

Unfortunately, the color bases are hard-coded; it's really a mass!

If you want to do it anyway (i.e. to hardcode another color basis), you
will need to modify both the Tcl as well as the C source code (and
recompile). 

As for the C code, the main corresponding code is located in
C/colorplane.c file (definitions are in C/isosurf.h). Grep for the
"COLORBASE_" string!

As for the Tcl code, you will need to modify these files:
Tcl/isoRender.tcl, Tcl/propertyPlane.tcl, Tcl/isoControl.tcl
Tcl/thermometer.tcl (and optionally also Tcl/scriptingScalarField2D.tcl,
Tcl/scriptingScalarField3D.tcl).
Again, grep for the "COLORBASE_" and also, say, "RAINBOW" strings.

If you have a very good color basis and want to share it, consider to
post the colors.

Regards,

-- 
Anton Kokalj
J. Stefan Institute, Jamova 39, 1000 Ljubljana, Slovenia 
(tel: +386-1-477-3523 // fax:+386-1-477-3822)

Please, if possible, avoid sending me Word or PowerPoint attachments.
See:  http://www.gnu.org/philosophy/no-word-attachments.html



More information about the XCrySDen mailing list