Thank's for the hint for angle.f in SRC_lapwdm. Yes, I think the same fix should be applied to this program. (Apparently both routines did not support a triclinic lattice).
The "logic" of these "if statements" should be such that the first case handles a monoclinic lattice with angle gamma .ne. 90 (and the others are 90) the second with beta.ne.90 the third case handles a triclinic lattice. And yes, you are absolutely right, in the fix is a stupid misstype. It should be: ELSE IF ((ABS(ALPHA(2)-PI/2.d0).GT.1.D-4).and.(ABS(ALPHA(1)-PI/2.d0).LT.1.D-4).and.(ABS(ALPHA(3)-PI/2.d0).LT.1.D-4)) THEN ^^^^^^^^^ PS: I'm not sure if all this is really necessary or one could stick to the last general formulae. PPS: I'd like to thank you explicitly for your many valuable comments to the mailing list in the last months. Thank you very much !!! Am 02.07.2012 00:56, schrieb Gavin Abo: > Dear Dr. Blaha and developers, > > Fixes to angle.f in SRC_qtl was reported: > > http://zeus.theochem.tuwien.ac.at/pipermail/wien/2012-June/017085.html > > It suggested changes to the if statements. > * > IF (ABS(ALPHA(3)-PI/2.d0).GT.1.D-4) THEN* > > to > > *IF > ((ABS(ALPHA(3)-PI/2.d0).GT.1.D-4).and.(ABS(ALPHA(2)-PI/2.d0).LT.1.D-4).and.(ABS(ALPHA(1)-PI/2.d0).LT.1.D-4)) > THEN* > > and > > *ELSE IF (ABS(ALPHA(2)-PI/2.d0).GT.1.D-4) THEN* > > to > > *ELSE IF > ((ABS(ALPHA(2)-PI/2.d0).GT.1.D-4).and.(ABS(ALPHA(1)-PI/2.d0).LT.1.D-4).and.(ABS(ALPHA(2)-PI/2.d0).LT.1.D-4)) > THEN* > > The angle.f in SRC_lapwdm is almost the same. Should these fixes be applied > to it too? > > Can you confirm that the absolute values such as on > "ABS(ALPHA(3)-PI/2.d0).GT.1.D-4" are correct? It may be correct, but it looks > suspicious to me. The left side argument will > always be positive because of the absolute value. Therefore, the if > statements may never have a different result (true or false) unless the left > argument is almost zero. > > P.S., Kateryna, your ORBxxx and SPIxxx results might change if a fix is > needed. However, that is only if the code needs to select a different set of > crystal geometry equations in > angle.f for your crystal structure instead of: > > IF (ABS(ALPHA(3)-PI/2.d0).GT.1.D-4) THEN > XA=XMS(1)*AA*SIN(ALPHA(3)) > XB=XMS(1)*AA*COS(ALPHA(3))+BB*XMS(2) > XC=CC*XMS(3) > > Kind Regards, > > Gavin Abo > > > _______________________________________________ > Wien mailing list > Wien at zeus.theochem.tuwien.ac.at > http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien > -- P.Blaha -------------------------------------------------------------------------- Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna Phone: +43-1-58801-165300 FAX: +43-1-58801-165982 Email: blaha at theochem.tuwien.ac.at WWW: http://info.tuwien.ac.at/theochem/ -------------------------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: angle.f Type: text/x-fortran Size: 2475 bytes Desc: not available URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20120716/f9621f75/attachment.f>