[xcrysden] How to change Ball/Stick ratio with scripting?
Dmitry Korotin
xcrysden@democritos.it
Thu, 31 May 2007 15:15:57 +0600
2007/5/31, Tone Kokalj <tone.kokalj@ijs.si>:
> On Thu, 2007-05-31 at 14:16 +0600, Dmitry Korotin wrote:
> > Well, thank you for your detailed answer, but
> >
> > I want to do the same things using tcl scripting!
>
> Here is a clever trick (which is due to Hande Ustunel) of how to achive
> an X feature with scripts. It involves three steps:
>
> 1. Open the file you are interested, but keep the X feature off. Then
> save the *.xcrysden script (File-->Save Current State and Structure).
>
> 2. Turn the X feature on, and again save the *.xcrysden script (under
> different filename of course)
>
> 3. compare the two files with you favorit "diff" program: you will see
> how they differ.
>
> Use this info in your script.
>
> Regards, Tone
>
> _______________________________________________
> XCrySDen mailing list
> XCrySDen@democritos.it
> http://www.democritos.it/mailman/listinfo/xcrysden
>
I had tried this method yesterday, but didn't achieve result I was looked.
Differents between two .xcrysden scripts are in line:
array set mode3D {space Off sticks On pipe Off balls On}
And there is my script:
#####################################
scripting::open --xsf $env(HOME)/work/wf/NiO/afm8/animation/in.xsf
scripting::lighting On
scripting::display on coordinate-system
scripting::displayMode3D Stick
array set mode3D {space Off sticks Off pipe Off balls Off}
scripting::zoom +0.02 5
scripting::scalarField3D::load
scripting::makeMovie::init \
-movieformat mpeg \
-dir tmp \
-frameformat PPM \
-firstframe 10 \
-lastframe 10 \
-delay 0 \
-save_to_file out.mpeg
scripting::makeMovie::begin
wm withdraw .iso
scripting::zoom +1 1
set il 9.5
repeat {50} {
scripting::scalarField3D::configure \
-isosurface 1 \
-interpolation_degree 2 \
-isolevel $il \
-plusminus 0
scripting::scalarField3D::render
scripting::rotate x +3 1
scripting::rotate y +3 1
set il [expr $il-0.02]
scripting::makeMovie::makeFrame
}
scripting::makeMovie::end
########################
But, sticks are still on!
Could you help me?