Hi, Juerg,<br><br>  I have figured out a way to build up the density matrix I need. But my density matrix is in the form of two dimensional array, i.e., REAL(KIND=dp), DIMENSION(N,N). <br><br>  Could you tell me how to convert the 2D array into dbscr_obj matrix that is needed by the subroutine "collocate_pgf_product_rspace"?<br>
<br>  Thanks<br>  <br>Hanning <br><br><br><div class="gmail_quote">On Wed, Sep 15, 2010 at 3:33 PM, Hanning Chen <span dir="ltr"><<a href="mailto:chenh...@gmail.com">chenh...@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Juerg,<br><br>  My density matrix is anti-symmetric (i.e., M_ij and M_ji are conjugate to each other) instead of symmetric because it is under an external perturbation. It turns out that what I really need is<br><br>   Summation_Over_n_m { (Rn * Im - Rm * In) * (phi_m) * (gradient(phi_n)) }<br>

<br> where Rn, Rm, In and Im are the Real and Imaginary parts of the orbital coefficients for the basis functions of phi_m and phi_n. Note that Rn, Rm, In and Im are all real numbers now. <br><br> How should I set up the parameters for the subroutine "collocate_pgf_product_rspace" ?<br>

<br>  Thanks.<br><font color="#888888"><br>Hanning</font><div><div></div><div class="h5"><br><br><br><br><br><div class="gmail_quote">On Wed, Sep 15, 2010 at 2:41 AM, Juerg Hutter <span dir="ltr"><<a href="mailto:hut...@pci.uzh.ch" target="_blank">hut...@pci.uzh.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br>
<br>
the routines work for real density matrices. You have to<br>
be carefull with symmetry, is your density matrix non-symmetric?<br>
If you have a complex density matrix you have to decompose<br>
it yourself and pass the appropriate part to the routine<br>
in order to get the real/imaginary part of the current<br>
back.<div><br>
<br>
regards<br>
<br>
Juerg<br>
<br>
----------------------------------------------------------<br>
Juerg Hutter                   Phone : ++41 44 635 4491<br>
Physical Chemistry Institute   FAX   : ++41 44 635 6838<br>
University of Zurich           E-mail: <a href="mailto:hut...@pci.uzh.ch" target="_blank">hut...@pci.uzh.ch</a><br>
Winterthurerstrasse 190<br>
CH-8057 Zurich, Switzerland<br>
----------------------------------------------------------<br>
<br>
<br></div><div><div></div><div>
On Wed, 15 Sep 2010, Hanning Chen wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
Juerg,<br>
<br>
 Using calculate_drho_elec as the template, I ought to change the parameter<br>
of ga_gb_function from "FUNC_DABpADB" to "FUNC_ADBmDAB" as you suggested.<br>
Then, what I am supposed to get is the real part of the following<br>
expression:<br>
<br>
                                                     (phi*) x gradient(phi)<br>
- (gradient(phi))* x (phi)<br>
<br>
instead of the imaginary part that I really need.<br>
<br>
I guess there should exist an easy way to access the imaginary part of the<br>
product, but the output pw_grid seems to have the real part only....<br>
<br>
 Thanks for your kind help.<br>
<br>
Hanning<br>
<br>
<br>
On Tue, Sep 14, 2010 at 12:38 PM, Hanning Chen <<a href="mailto:chenh...@gmail.com" target="_blank">chenh...@gmail.com</a>>wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
Juerg,<br>
<br>
  Awesome. Your comments make my life much easier.<br>
<br>
  Thanks.<br>
<br>
Hanning<br>
<br>
<br>
On Tue, Sep 14, 2010 at 11:19 AM, Juerg Hutter <<a href="mailto:hut...@pci.uzh.ch" target="_blank">hut...@pci.uzh.ch</a>> wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
Hi<br>
<br>
there is currently only the calculation of the response current<br>
density within the NMR code. To calculate the current<br>
density you have to call the routine<br>
calculate_rho_elec<br>
and then use ga_gb_function=FUNC_ADBmDAB<br>
in the call to<br>
collocate_pgf_product_rspace.<br>
<br>
For a template see calculate_drho_elec<br>
<br>
regards<br>
<br>
Juerg<br>
<br>
----------------------------------------------------------<br>
Juerg Hutter                   Phone : ++41 44 635 4491<br>
Physical Chemistry Institute   FAX   : ++41 44 635 6838<br>
University of Zurich           E-mail: <a href="mailto:hut...@pci.uzh.ch" target="_blank">hut...@pci.uzh.ch</a><br>
Winterthurerstrasse 190<br>
CH-8057 Zurich, Switzerland<br>
----------------------------------------------------------<br>
<br>
<br>
<br>
On Tue, 14 Sep 2010, Hanning Chen wrote:<br>
<br>
 Dear CP2K community,<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
<br>
 I am wondering if I can output the current density (Jx Jy Jz) in CP2K as<br>
defined in the following page:<br>
<br>
 <a href="http://en.wikipedia.org/wiki/Probability_current" target="_blank">http://en.wikipedia.org/wiki/Probability_current</a><br>
<br>
 Thanks.<br>
<br>
Hanning Chen<br>
Northwestern University<br>
<br>
--<br>
You received this message because you are subscribed to the Google Groups<br>
"cp2k" group.<br>
To post to this group, send email to <a href="mailto:cp...@googlegroups.com" target="_blank">cp...@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to<br>
</div></div><a href="mailto:cp2k%2Bun...@googlegroups.com" target="_blank">cp2k+uns...@googlegroups.com</a> <<a href="mailto:cp2k%252Bu...@googlegroups.com" target="_blank">cp2k%2Bun...@googlegroups.com</a>>.<div>

<br>
For more options, visit this group at<br>
<a href="http://groups.google.com/group/cp2k?hl=en" target="_blank">http://groups.google.com/group/cp2k?hl=en</a>.<br>
<br>
<br>
<br>
</div></blockquote><div>
--<br>
You received this message because you are subscribed to the Google Groups<br>
"cp2k" group.<br>
To post to this group, send email to <a href="mailto:cp...@googlegroups.com" target="_blank">cp...@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to<br>
</div><a href="mailto:cp2k%2Bun...@googlegroups.com" target="_blank">cp2k+uns...@googlegroups.com</a> <<a href="mailto:cp2k%252Bu...@googlegroups.com" target="_blank">cp2k%2Bun...@googlegroups.com</a>>.<div>

<br>
For more options, visit this group at<br>
<a href="http://groups.google.com/group/cp2k?hl=en" target="_blank">http://groups.google.com/group/cp2k?hl=en</a>.<br>
<br>
<br>
</div></blockquote>
<br>
</blockquote><div>
<br>
-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To post to this group, send email to <a href="mailto:cp...@googlegroups.com" target="_blank">cp...@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href="mailto:cp2k%2Bun...@googlegroups.com" target="_blank">cp2k+uns...@googlegroups.com</a>.<br>
For more options, visit this group at <a href="http://groups.google.com/group/cp2k?hl=en" target="_blank">http://groups.google.com/group/cp2k?hl=en</a>.<br>
<br>
<br>
</div></blockquote><div><div></div><div>
<br>
-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To post to this group, send email to <a href="mailto:cp...@googlegroups.com" target="_blank">cp...@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href="mailto:cp2k%2Bun...@googlegroups.com" target="_blank">cp2k+uns...@googlegroups.com</a>.<br>
For more options, visit this group at <a href="http://groups.google.com/group/cp2k?hl=en" target="_blank">http://groups.google.com/group/cp2k?hl=en</a>.<br>
<br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>