``GeSolid.m''

Make a copy of ``Ge.m'' called ``GeSolid.m'', and modify it as follows to carry out a calculation of solid germanium.

  1. Immediately after the evaluation of the expansion coefficients Vps is complete and before they are used in any expressions, multiply Vps, value by value, by Sf. This makes the total potential equal to the sum of contributions for all of the atoms listed in X.
  2. Replace the statement ``Ns=4;'' with a statement giving the appropriate number of states.
    Hints: The number of atoms is size(X,2), there are four electrons per atom, and two electrons per state.
  3. Make certain that the fillings are set to a column vector of length Ns filled with all 2's.
  4. To display two-dimensional slices through the final charge density, add the following statements to the very end of ``GeSolid.m'',
    %# Get density
    n=getn(Psi,gbl_f);
    
    %# Basic slice from "100" edge of cell
    sl=reshape(n(1:S(1)*S(2)),S(1),S(2));
    ppm("100.ppm",sl*0.3,sl,sl); system("xli 100.ppm &"); %# Make and view image
    
    %# 110 slice cutting bonds (assumes cube)
    sl=reshape(n(find(M(:,2)==M(:,3))),S(1),S(2));
    %# Expand by 2, drop data to restore (approximate) aspect ratio
    sl=smooth(sl); li=find(rem([1:size(sl,1)],3)!=0); sl=sl(li,:);
    ppm("110.ppm",sl,sl,sl*0.3); system("xli 110.ppm &"); %# Make and view image
    
    and copy the utility files ``ppm.m'' and ``smooth.m'' from Appendices D-E into your current directory.



Subsections

Tomas Arias 2005-05-04