<br><br>On Wednesday, 7 September 2016, Laurence Marks <<a href="mailto:L-marks@northwestern.edu">L-marks@northwestern.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">One of my students noticed an inconsistency in basdiv.f which might be<br>
a source of a problem she has (or not), see below. For certain the<br>
code and comments appear to be inconsistent:<br>
<br>
        read(*,*) n<br>
        if((iarb(1).eq.1).and.(n(1).<wbr>ne.n(2))) then<br>
              write(*,*) 'Lattice symmetry requires equal mesh in x<br>
and y direction'<br>
              goto 123<br>
        endif<br>
        if((iarb(2).eq.1).and.(n(1).<wbr>ne.n(3))) then<br>
              write(*,*) 'Lattice symmetry requires equal mesh in x<br>
and z direction'<br>
              goto 123<br>
        endif<br>
        if((iarb(3).eq.1).and.(n(1).<wbr>ne.n(3))) then<br>
              write(*,*) 'Lattice symmetry requires equal mesh in y<br>
and z direction'<br>
              goto 123<br>
        endif<br>
      endif<br>
<br>
Suggestions?<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: Tassie Andersen <<a href="javascript:;" onclick="_e(event, 'cvml', 'tasskanders@gmail.com')">tasskanders@gmail.com</a>><br>
Date: Tue, Sep 6, 2016 at 12:21 PM<br>
Subject: Likely source/s of stupid kgen error<br>
To: Laurence Marks <<a href="javascript:;" onclick="_e(event, 'cvml', 'l-marks@northwestern.edu')">l-marks@northwestern.edu</a>><br>
<br>
<br>
Hello Laurie,<br>
<br>
I think I may have found the source/s of the kgen error I described. I<br>
searched for the exact error message in $WIENROOT/SRC_kgen and found<br>
something helpful in basdiv.f . From what I can tell this file takes<br>
in some variables, one of which describes whether the unit cell has<br>
any equal length dimensions (x ,y , z), this is described in the<br>
heading info by 'IARB' .<br>
<br>
The problem is that later, when it checks the values of IARB (and can<br>
generate a subsequent error message) it uses the following routine<br>
with cases to check against :<br>
<br>
      if(NMSHP.le.0) then<br>
 123    write(*,*) " Specify 3 mesh-divisions (n1,n2,n3):"<br>
        read(*,*) n<br>
        if((iarb(1).eq.1).and.(n(1).<wbr>ne.n(2))) then<br>
              write(*,*) 'Lattice symmetry requires equal mesh in x<br>
and y direction'<br>
              goto 123<br>
        endif<br>
        if((iarb(2).eq.1).and.(n(1).<wbr>ne.n(3))) then<br>
              write(*,*) 'Lattice symmetry requires equal mesh in x<br>
and z direction'<br>
              goto 123<br>
        endif<br>
        if((iarb(3).eq.1).and.(n(1).<wbr>ne.n(3))) then<br>
              write(*,*) 'Lattice symmetry requires equal mesh in y<br>
and z direction'<br>
              goto 123<br>
        endif<br>
      endif<br>
      NMSHP=(N(1)+1)*(N(2)+1)*(N(3)+<wbr>1)<br>
      RETURN<br>
      END<br>
<br>
Notice that case 'if((iarb(2).eq.1).and.(n(1).<wbr>ne.n(3))) then' and<br>
'if((iarb(3).eq.1).and.(n(1).<wbr>ne.n(3))) then' have the same<br>
requirements for variable n. This should probably be the following<br>
instead (if I'm reading correctly):<br>
<br>
      if(NMSHP.le.0) then<br>
 123    write(*,*) " Specify 3 mesh-divisions (n1,n2,n3):"<br>
        read(*,*) n<br>
        if((iarb(1).eq.1).and.(n(1).<wbr>ne.n(2))) then<br>
              write(*,*) 'Lattice symmetry requires equal mesh in x<br>
and y direction'<br>
              goto 123<br>
        endif<br>
        if((iarb(2).eq.1).and.(n(2).<wbr>ne.n(3))) then<br>
              write(*,*) 'Lattice symmetry requires equal mesh in x<br>
and z direction'<br>
              goto 123<br>
        endif<br>
        if((iarb(3).eq.1).and.(n(1).<wbr>ne.n(3))) then<br>
              write(*,*) 'Lattice symmetry requires equal mesh in y<br>
and z direction'<br>
              goto 123<br>
        endif<br>
      endif<br>
      NMSHP=(N(1)+1)*(N(2)+1)*(N(3)+<wbr>1)<br>
      RETURN<br>
      END<br>
<br>
However, in the intro commented text there's a note saying '2 and 3<br>
are reversed?' so I'm not sure is IARB(2)=1 specifies if y = z or if x<br>
= z (vice versa with IARB(3) = 1). So either the fix I propose or the<br>
corresponding one for the iarb(3) condition needs to be altered.<br>
However, this doesn't solve the root of the problem (though it is<br>
annoying and keeps you from entering the proper values).<br>
<br>
The real issue is that my structure, where x=y=/=z should have<br>
iarb(1)=1 and iarb(2), iarb(3) =/= 1. Somehow iarb(2) is being set to<br>
1 in this particular case (but not others with a different symmetry<br>
group). The only file I can find that sets IARB values is bravai.f (or<br>
birken.f or bravai_bla, but these two don't seem to be called ever). I<br>
can't figure out where it's messing it up though. It'd be good to<br>
print all three IARB values after bravai.f runs to check it but I'm<br>
not sure how to do that. Any suggestions are appreciated.<br>
<br>
So it seems there are at least 2 issues.<br>
<br>
Regards,<br>
Tassie<br>
<br>
<br>
--<br>
Professor Laurence Marks<br>
"Research is to see what everybody else has seen, and to think what<br>
nobody else has thought", Albert Szent-Gyorgi<br>
<a href="http://www.numis.northwestern.edu" target="_blank">www.numis.northwestern.edu</a> ; Corrosion in 4D: <a href="http://MURI4D.numis.northwestern.edu" target="_blank">MURI4D.numis.northwestern.edu</a><br>
Partner of the CFW 100% program for gender equity, <a href="http://www.cfw.org/100-percent
Co-Editor" target="_blank">www.cfw.org/100-percent<br>
Co-Editor</a>, Acta Cryst A<br>
______________________________<wbr>_________________<br>
Wien mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'Wien@zeus.theochem.tuwien.ac.at')">Wien@zeus.theochem.tuwien.ac.at</a><br>
<a href="http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien" target="_blank">http://zeus.theochem.tuwien.<wbr>ac.at/mailman/listinfo/wien</a><br>
SEARCH the MAILING-LIST at:  <a href="http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html" target="_blank">http://www.mail-archive.com/<wbr>wien@zeus.theochem.tuwien.ac.<wbr>at/index.html</a><br>
</blockquote>