[xcrysden] plot automatically DataGrid

Max Bert max_bert at web.de
Thu Apr 18 18:43:29 CEST 2013


Hello,

I'm working on a xcrysden script which can plot any sufficient isosurface of a molecular wavefunction, organized in a *.xsf-file as one DATAGRID_3D_orbital. Therefore I followed roughly http://www.xcrysden.org/doc/prog/plot_all_MO.sh.html, which does the job for two fixed wavefunctions. The general problem I encountered is that the minmum, maximum as well as the rangevalue for the isosurface-plot are varying quite a lot for different wavefunctions. Therefore numerical values are not sufficient. The onliest hint I encountered was given by Tone Kokalj in http://qe-forge.org/pipermail/pw_forum/2005-June/077156.html. However still the lines appended, are not working as expected. One problem arises from the fact that tcl/tk doesn't interpret the variables as numerical values, if the listing is done with {}-brakets, i.e.
"
array set isoControl {1,curr...}
".
But with the change to quotation marks for the listing (then variables are interpreted correctly right away), I get the following error code, which I was unable to figure out:

"
...
Estimated number of bonds = 208
Estimated number of bonds = 208
Estimated number of bonds = 208
------------------------------> ColorSchemeUpdate
coordinate system orientation is left
Error in startup script: list must have an even number of elements
    while executing
"array set isosurf "type_of_isosurf solid 3Dinterpl_degree 1 isovalue_entry .iso.fb1.f.left.f1.f3.1.entry1 1,2Dexpand_X 1 transparency off rangevalue  ..."
    (file "/home/birnbaum/hiwi/xcrys-script/xcrysden.script" line 541)
    invoked from within
"source [gunzipFile $scriptFile]"
    ("uplevel" body line 4)
    invoked from within
"uplevel \#0 {	
	cd $system(PWD)
	SetWatchCursor
	source [gunzipFile $scriptFile]
	ResetCursor
    }"
    (procedure "scripting::source" line 7)
    invoked from within
"scripting::source $filedir		    "
    (procedure "parseComLinArg" line 247)
    invoked from within
"parseComLinArg [lrange $argv 2 end]"
    invoked from within
"if { [llength $argv] > 2 } {
    parseComLinArg [lrange $argv 2 end]
} else {
    ViewMol .
}"
    (file "/usr/local/share/xcrysden-1.5.53/Tcl/xcInit.tcl" line 615)
"

Is there anyone who can help me out with an idea about that?

Greetings Max

APPENDIX:
"
DataGridOK
set minvalue [xc_iso minvalue]
set maxvalue [xc_iso maxvalue]
puts "min: $minvalue"
puts "max: $maxvalue"
set rangevalue [expr [xc_iso maxvalue] - [xc_iso minvalue]]

array set isoControl "1,current_slide 1 isoline_color monocolor datagridDim 3 3,cpl_thermoFont font17 1,cpl_thermoNTics 6 3,time_delay 100 2,cpl_thermoNTics 6 3,cpl_thermoNTics 6 3,2Dnisoline 15 cpl_thermoNTics 6 3,anim_step 1 3,cpl_basis MONOCHROME 1,isoline_monocolor #000000 1,isoline_width 2 2,cpl_thermoFont font17 3,cpl_thermoFmt %+8.4f 2,2Dlowvalue [xc_iso minvalue] 2,current_text_slide {Current slide:  1 / 89} 1,cpl_transparency 0 3,colorplane 0 blend_button .iso.fb1.f.right.f5.b3 3,isoline_color monocolor cbfn_apply_to_all 0 1,cpl_thermoFont font17 2,cpl_function LINEAR 1,time_delay 100 current_slide 1 revert_button1 .iso.fb1.f.right.f5.b12 1,2Dnisoline 15 revert_button2 .iso.fb1.f.right.f5.b10a 2Dlowvalue_entry .iso.fb2.f1.1.mf.r.f3.1.entry1 2,cpl_transparency 0 2Dnisoline_entry .iso.fb2.f1.1.mf.r.f5.1.entry1 2,isoline_monocolor #000000 1,2Dhighvalue [xc_iso maxvalue] cpl_basis MONOCHROME anim_step 1 1,isoline 0 2,isoline 0 3,2Dhighvalue [xc_iso maxvalue] 3,isoline 0 2,cpl_thermoFmt %+8.4f 2,colorplane_lighting 0 isoline_width 2 1,cpl_thermoLabel { Scale:   ? n(r)} 2,cpl_thermoLabel { Scale:   ? n(r)} isoline 0 3,cpl_thermoLabel { Scale:   ? n(r)} colorplane_lighting 0 cpl_thermoTplw 0 1,colorplane 0 cpl_thermoLabel { Scale:   ? n(r)} time_delay 100 3,cpl_transparency 0 2,isoline_color monocolor 2Dnisoline 15 3,current_slide 1 3,cpl_thermoTplw 0 max_allowed_2Dnisoline 100 3,2Dlowvalue [xc_iso minvalue] cpl_function LINEAR anim_apply_to_all 0 1,anim_step 1 1,cpl_basis MONOCHROME 3,current_text_slide {Current slide:  1 / 41} 3,nslide 41 colorplane 0 cpl_transparency 0 3,isoline_monocolor #000000 3,isoline_width 2 1,cpl_function LINEAR 1,cpl_thermoFmt %+8.4f 2Disolinewidth_entry .iso.fb2.f1.1.mf.i.3.f1.1.entry1 2,cpl_thermoTplw 0 2,time_delay 100 smooth_button .iso.fb1.f.right.f5.b2a 2,2Dnisoline 15 2,nslide 89 1,isoline_color monocolor disp_apply_to_all 0 plane {} 1,isoline_stipple {no stipple} 3Dinterpl_degree 1 2,isoline_stipple {no stipple} 2,current_slide 1 1,cpl_thermoTplw 0 3,isoline_stipple {no stipple} 1,2Dlowvalue [xc_iso minvalue] isoline_stipple {no stipple} 2Dhighvalue_entry .iso.fb2.f1.1.mf.r.f4.1.entry1 1,current_text_slide {Current slide:  1 / 93} 1,nslide 93 2,colorplane 0 2,anim_step 1 2,cpl_basis MONOCHROME 1,cpl_thermometer 0 2,isoline_width 2 2,cpl_thermometer 0 3,cpl_thermometer 0 2,2Dhighvalue [xc_iso maxvalue] 1,colorplane_lighting 0 bmc .iso.fb2.f1.1.mf.i.1.b color_button .iso.fb1.f.right.f5.b2 cpl_thermometer 0 isoline_monocolor #000000 isosurf 1 3,colorplane_lighting 0 3,cpl_function LINEAR 2Dhighvalue [xc_iso maxvalue] cpl_thermoFmt %+8.4f cpl_thermoFont font17 2Dlowvalue [xc_iso minvalue] current_text_slide {}"
array set prop {datagridDim 0 type_of_run RHF pm_isolevel 1 isolevel 0.2}
array set isosurf "type_of_isosurf solid 3Dinterpl_degree 1 isovalue_entry .iso.fb1.f.left.f1.f3.1.entry1 1,2Dexpand_X 1 transparency off rangevalue $rangevalue 1,2Dexpand_Y 1 1,2Dexpand none res_type angstroms 3,2Dexpand_X 1 1,2Dexpand_Z 1 twoside_lighting off 3,2Dexpand_Y 1 3,2Dexpand none 3,2Dexpand_Z 1 3Dinterpl_degree_old 1 space_sel whole_cell expand_X 1 tessellation_type cubes expand_Y 1 expand none expand_Z 1 minvalue [xc_iso minvalue] mb_angs/bohr Angstroms old_twoside_lighting off spin {} 2,2Dexpand_X 1 maxvalue [xc_iso maxvalue] 2,2Dexpand_Y 1 2,2Dexpand none Y_Sel centered 2,2Dexpand_Z 1 2Dexpand_X 1 normals_type gradient shade_model smooth Z_Sel centered 2Dexpand_Y 1 2Dexpand none 2Dexpand_Z 1"
"


More information about the XCrySDen mailing list