<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">The index of arrays used to store functions defined on 3D meshes is actually a shorthand for three indeces, following the FORTRAN convention ("leftmost index runs faster"). An example will explain this better. Suppose you have a 3D array of dimension (nr1,nr2,nr3), say psi(nr1,nr2,nr3). FORTRAN compilers store this array sequentially in the computer RAM in the following way: <DIV>psi(1,1,1)</DIV><DIV>psi(2,1,1)</DIV><DIV>...</DIV><DIV>psi(nr1,1,1)</DIV><DIV>psi(1,2,1)</DIV><DIV>psi(2,2,1)</DIV><DIV>...</DIV><DIV>psi(nr1,2,1)</DIV><DIV>...</DIV><DIV>psi(nr1,nr2,1)</DIV><DIV>psi(1,1,nr3)</DIV><DIV>etc</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Let "ind" be the position of the (i,j,k) element in the above list: the relation between ind and (i,j,k) is: </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>ind = i + (j-1)*nr1 + (k-1)*nr2*nr1</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>This should clarify the relation between 1D and 3D indexing. In real space, the (i,j,k) point of the mesh is</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>(i-1)*tau_1 + (j-1)*tau_2 + (k-1)* tau_3</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>where the tau's are the basis vectors of the Bravais lattice. The latter are stored row-wise in the "AT" array:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>tau_1 = at(1,*)</DIV><DIV>tau_2 = at(2,*)</DIV><DIV>tau_3 = at(3,*)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>(or at least so it was the last time I looked into the code ;-)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Hope this helps</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Stefano B.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On Feb 2, 2006, at 7:33 AM, Dmitry Korotin wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Dear pwscf users and authors,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space"> </SPAN>how can I get coordinates of points of FFT mesh in Bohr or Angstrom units?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">For example, I have an array psic(nrxxs) (which is FT of</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">evc(ik,ibnd)). How can I find point in real space for psic(3) or</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">psic(100)?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thank you in advance,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Dmitry Korotin.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Pw_forum mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.democritos.it/mailman/listinfo/pw_forum">http://www.democritos.it/mailman/listinfo/pw_forum</A></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><SPAN class="Apple-style-span" style="font-size: 12px; "><SPAN class="Apple-style-span" style="font-size: 12px; ">---</SPAN></SPAN></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><SPAN class="Apple-style-span" style="font-size: 12px; "><SPAN class="Apple-style-span" style="font-size: 12px; ">Stefano Baroni - SISSA</SPAN></SPAN></SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><SPAN class="Apple-style-span" style="font-size: 12px; "><SPAN class="Apple-style-span" style="font-size: 12px; "> </SPAN></SPAN></SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><SPAN class="Apple-style-span" style="font-size: 12px; "><SPAN class="Apple-style-span" style="font-size: 12px; ">&</SPAN></SPAN></SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><SPAN class="Apple-style-span" style="font-size: 12px; "><SPAN class="Apple-style-span" style="font-size: 12px; "> </SPAN></SPAN></SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><SPAN class="Apple-style-span" style="font-size: 12px; "><SPAN class="Apple-style-span" style="font-size: 12px; ">DEMOCRITOS National Simulation Center - Trieste</SPAN></SPAN></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><SPAN class="Apple-style-span" style="font-size: 12px; "><SPAN class="Apple-style-span" style="font-size: 12px; ">[+39] 040 3787 406 (tel) -528 (fax) / stefanobaroni (skype)</SPAN></SPAN></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; ; font-size: 12px; "><BR style="; font-size: 12px; "></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><SPAN class="Apple-style-span" style="font-size: 12px; "><SPAN class="Apple-style-span" style="font-size: 12px; ">Please, if possible, don't</SPAN></SPAN></SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><SPAN class="Apple-style-span" style="font-size: 12px; "><SPAN class="Apple-style-span" style="font-size: 12px; "> </SPAN></SPAN></SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><SPAN class="Apple-style-span" style="font-size: 12px; "><SPAN class="Apple-style-span" style="font-size: 12px; ">send me MS Word or PowerPoint attachments</SPAN></SPAN></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><SPAN class="Apple-style-span" style="font-size: 12px; "><SPAN class="Apple-style-span" style="font-size: 12px; ">Why? See:</SPAN></SPAN></SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;"><SPAN class="Apple-style-span" style="font-size: 12px; "><SPAN class="Apple-style-span" style="font-size: 12px; "> </SPAN></SPAN></SPAN></FONT><A href="http://www.gnu.org/philosophy/no-word-attachments.html"><FONT class="Apple-style-span" color="#0023E9" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;; color: rgb(0, 35, 233); -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 35, 233); font-size: 12px; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 35, 233); font-size: 12px; -khtml-text-decorations-in-effect: underline; ">http://www.gnu.org/philosophy/no-word-attachments.html</SPAN></SPAN></SPAN></FONT></A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN></SPAN></SPAN> </DIV><BR></DIV></BODY></HTML>