cannot script k-Point parameters

Dear MS Users,

i want to test covergence of a system in CASTEP with the number of k-Points.

I can well run the calculations separately and select different k-point separations, but when I tried doing something like

eval {
                \\\$dat = \\\$castep->Energy->Run(\\\$doc, Settings(Quality => "Medium", TheoryLevel => "GGA", SpinPolarized => "Yes", UseInsulatorDerivation => "Yes", UseCustomEnergyCutoff => "Yes", EnergyCutoff => "800", KPointDerivation => "Separation", KPointSeparation => 1.0/(\\\$size*\\\$q)) );
        };

in a script i always get Server process has died unexpectedly in CASTEP.Energy (function/property "Run")

Using the same structure document.

has anyone noticed this before?

is there a way to work around this?

Also there are Options ParameterABC to set the k-Point grid parameter but KPointDerivation does only allow "Quality, Separation, Gamma"; not "Custom" as in the k-points tab of the castep dialog. Why is this?

Why does CASTEP use only the gamma point by default for insulators?

thanks in advance!

Martin