[Wien] R0 to big

Maurits W. Haverkort M.W.Haverkort at fkf.mpg.de
Tue Aug 2 09:20:10 CEST 2011


Dear Martin

Thanks for the help and showing me in which routines I can find the problem.

Your suggestion solves the problems with R0, but introduces a new problem...

Solution, indeed R0 was NOT set when Z was entered manually the first
time structgen is run! removing (if $s_zz[$i]==0) from line 309 in
struct.pl solves this problem.

newly introduced problem, if one wants to calculate a virtual crystal
approximation one would like to change the value of Z at some point.
This now does not work any-more as the value of Z is set back to the
nominal value whatever one does.

Possible solution:

Leave line 309 in struc.pl as it is. Could one add the Element() routine
to the "button" [ set automatically RMT and continue editing ], which is
only called once in the beginning? Or find an other way to only call
Element the first time a struct file is created?

Best wishes
Maurits


On 08/02/2011 08:47 AM, Martin Kroeker wrote:
> Maurits et al.,
>
> as far as I can tell, the wrong R0 value appears to be creeping in from
> SRC_w2web/htdocs/util/structask.pl , which gets called by SRC_w2web/lib/struct.pl 
> when one starts the structure editor in w2web without a case.struct
> file. First, it copies the case.struct template from SRC_templates,
> and then it does a loop (in line 41 of structask.pl) that sets
> s_r0[$i]=0.0001
> for all atoms ($i) that the user wants to enter. 
>
> Much later in struct.pl is a point where these s_r0 values (there called 
> s_ro) are used to set the "ro" variable that it prints to the "R0=" line 
> in the struct file. 
> (This is in SRC_w2web/lib/struct.pl starting from line 308). Here we see
> a check if "Z" has been set by the user - if it is empty, the code calls
> the "Element()" function that sets Z according to the atomic symbol.
> More importantly, Element() then goes ahead and sets R0 to the correct
> value - which it takes to be 0.0001 for light, 0.00005 for medium and
> 0.00001 for heavy elements.
> Only if you entered the Z number yourself when preparing the struct file
> in the editor, the Element() routine is never called and you end up
> with the 0.0001 value for all atoms. I have not tried this yet as I am
> travelling, but it should be sufficient to remove the "if $s_zz[$i]==0)"
> condition in line 309 of struct.pl so that this line reads just
> "&Element() ;" and Element() is called regardless of Z being already set.
>
> Martin
>   



More information about the Wien mailing list