<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16825" name=GENERATOR></HEAD>
<BODY>
<DIV><PRE><SPAN class=199094919-26052009><FONT face=Arial color=#0000ff size=2>Thanks everyone!</FONT></SPAN></PRE><PRE><SPAN class=199094919-26052009><FONT face=Arial color=#0000ff size=2>Indeed, I was wrong about transposing the product of matrix and vector. Silly mistake on my part. </FONT></SPAN></PRE><PRE><SPAN class=199094919-26052009><FONT face=Arial color=#0000ff size=2>Like I said in my previous message, I finally was able to reproduce the expressions in those two subroutines. </FONT></SPAN></PRE><PRE><SPAN class=199094919-26052009><FONT face=Arial color=#0000ff size=2>What I didn't understand at first is that if a matrix element depends on wave vectors k and q (like in our case: <k+q|dV|k>) ,</FONT></SPAN></PRE><PRE><SPAN class=199094919-26052009><FONT face=Arial color=#0000ff size=2>the transition between cartesian and crystal coordinates actually refers to transition between basis of Cartesian unit vectors and the basis of unit vectors in reciprocal lattice. </FONT></SPAN></PRE><PRE><SPAN class=199094919-26052009><FONT face=Arial color=#0000ff size=2>So it is a crystal - but in reciprocal space! Thanks again for your help.</FONT></SPAN></PRE><PRE><SPAN class=199094919-26052009><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </PRE><PRE><SPAN class=199094919-26052009><FONT face=Arial color=#0000ff size=2>Best,</FONT></SPAN></PRE><PRE><SPAN class=199094919-26052009><FONT face=Arial color=#0000ff size=2>Kostyantyn Borysenko</FONT></SPAN></PRE><PRE><SPAN class=199094919-26052009><FONT face=Arial color=#0000ff size=2>Department of Electrical and Computer Engineering</FONT></SPAN></PRE><PRE><SPAN class=199094919-26052009><FONT face=Arial color=#0000ff size=2>NCSU</FONT></SPAN></PRE><PRE>><I> </I>all in all, a "N vector" is nothing but a [Nx1] matrix. Its transpose
><I> </I>(YES! it is well defined) is a [1xN] matrix. SB
><I> </I>On May 26, 2009, at 6:58 AM, Huiqun Zhou wrote:
><EM> Kostyantyn</EM><SPAN class=199094919-26052009><FONT face=Arial color=#0000ff size=2> , </FONT></SPAN>
><I>
</I>><I> The rule for transpose operation applies to not only the product of
</I>><I> matrices, but also the
</I>><I> product of a matrix and a vector.
</I>><I>
</I>><I> I believe Gabriele is right.
</I>><I>
</I>><I>
</I>><I> Huiqun Zhou
</I>><I> @Earth Sciences, Nanjing University, China
</I>><I>
</I>><I> 2Gabriele: I beleive there is a mistake in your first step. When you
</I>><I> start with v_cart = A*v_cryst, you try to use the property (C*D)' =
</I>><I> D' * C', which is true for the product of two matrices. In our case
</I>><I> we have a product of matrix A and vector v_cryst. So you will get
</I>><I> v_cart' = v_cryst' * A
</I>><I>
</I>><I> _______________________________________________
</I>><I> Pw_forum mailing list
</I>><I> <A href="http://www.democritos.it/mailman/listinfo/pw_forum">Pw_forum at pwscf.org</A>
</I>><I> <A href="http://www.democritos.it/mailman/listinfo/pw_forum">http://www.democritos.it/mailman/listinfo/pw_forum</A>
</I>
</PRE></DIV></BODY></HTML>