Am 30.01.17 um 22:24 schrieb Angel Herráez:
> Dear Jmolers
>
> I'm trying to set an echo that will display after a minimization has finished.
> I prefer not to apply single thread "using set useMinimizationThread false",
> so I thought I could us the callback,
> but I am unable to make it work
>
> Does anyone have a working example?
>
> This is what I've tried, in the Jmol 14.6.4 application's console:
>
> set echo top;
> function mini(a,b,c,d,e,f) { if (b=='done') { echo "finished"; } }
> set minimizationCallback "jmolscript:mini";
> minimize steps 30;
>
> The minimization runs but there is no reporting.
>
> Or "print" instead of "echo" -- no diference
>
Angel, my experience with the 'hoverCallback' in combination with a
Jmolscript function is that it doesn't get any parameters assigned
during each callback like it is described for a Javascript function.
Instead your own values are assigned (e.g.: 'jmolscript:
hoverAction("start")').
As a workaround I use the '_atomhovered' variable to determine the
hovered atom.
It seems to be similar for the 'minimizationCallback'. Unfortunatley
there doesn't seem to be a similar system variable that could be used
here as a workaround. You might be able to use your own global variable
to count the minimization steps and use the counter to determine the
minimization end.
Regards,
Rolf
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users