The script ``setup.m'' is an appropriate place to put the locations of the
ionic cores, which we shall store in an
matrix X, and their
charges, which we shall call Z. In ``setup.m'', immediately after your
statements defining the FFT box size S and the lattice vectors R, place the statements
%# Define atomic locations and nuclear charge X=[0 0 0; 1.75 0 0]; Z=1;which specifies two protons (
Finally, the information about the atomic locations is best conveyed to the
other parts of our program through the ``structure factor'' derived above
%# Computation of structure factor Sf=sum( exp(-i*G*X'), 2);immediately after the computation of the matrix G and the vector G2.
Debugging: Confirm that ``setup.m'' continues to run without error.
Tomas Arias 2007-04-05