Physics 674, Winter 2011, Homework
- Homework 2 (due Jan. 26). A PDF file with
problem statements and instructions.
- Program for downloading. This is a program
for calculating squared structure factors |Fhkl|^2 for an arbitrary
combination of the h, k, l indices entered from the keyboard. Click on
the link
with the right mouse key, and select the "Save Link as" option.
Further instructions how to compile and to execute the program are
in the Homework 2 PDF file.
- Data file for downloading. It's
an example -- a data file the program needs for calculating |Fhkl|^2 for
Type I AFM order in an FCC spin lattice.
About the program, if you want to take a look at the code. Most of the
lines are for "administration" and for creating a "platform" for a
dialog with the user. The commands for doing actual calculations
take just seven lines located close to the end, between the "ss=0.0;"
and
"f2=ss*ss+sc*sc;" statements. The program does not use complex numbers,
it makes
calculations separately for the real and the imaginary part of the
structure factor, using sine and cosine functions. Telling the truth,
it's an incredibly simple program. But nothing more sophisticated is
needed for
calculating structure factors. They are quite simple mathematical
objects!