[Pw_forum] A question about pp.x and potential output

Guido Fratesi fratesi at mater.unimib.it
Fri May 4 07:57:55 CEST 2007


Dear Peter,

PW> 1=total potential V_bare +V_H+V_xc
PW> 2=local ionic potential
PW> 11=the V_bare+V_H potential
PW> 
PW> Now what I want is the "classical electrostatic energy or Coulombic
PW> potential". I searched
PW> the achive of this discussion list a bit and could not find the answer.
PW> I also read the source
PW> code and could not sort it out. I am wondering if it is possible at all to
PW> seperate the Coulombic
PW> contribution from the total potential?

if you just need the Hartree contribution *due to electronic charge only* 
to the total potential, V_H(r) = \int dr' \rho(r') \frac{1}{r-r'}
where \rho is the electron density, you can either:

1) run twice pp.x with plot_num=2 and plot_num=11 and substract the results;

2) edit PP/punch_plot.f90 so that plot_num=11 plots only v_H:

  ELSEIF (plot_num == 11) THEN

[old]     raux(:) = vltot(:) 
[new]     raux(:) = 0._DP
     IF (nspin == 2) THEN
        rhog(:,1) =  rhog(:,1) +  rhog(:,2)
        rho (:,1) =  rho (:,1) +  rho (:,2)
        nspin = 1
     END IF
     CALL v_h (rhog, ehart, charge, raux)
     IF (tefield.AND.dipfield) CALL add_efield(rho,raux,dummy,1)

(notice that routine "v_h" ADDS the potential V_H to the array raux.

Let me say it again, this gives you the Coulomb contribution from the 
valence charge only.

Cheers,
Guido

-- 
Guido Fratesi

Dipartimento di Scienza dei Materiali
Universita` degli studi di Milano-Bicocca
via Cozzi 53, 20125 Milano, Italy

Phone: +39 02 6448 5214
email: fratesi at mater.unimib.it



More information about the users mailing list