| |
| |
Spin Operator Generation
|
| |
This program constructs some spin operators. Typical GAMMA programs
begin with a declaration of a spin system (a collection of spin
isotopes) and this system is then passed to a GAMMA function to obtain
a spin operator. These spin operators are in turn used to construct
spin Hamiltonians, spin tensors, etc. No input is required.
The expected output will look like the following:
|
GAMMA Demo Program 2
A Default Two Spin System:
System :
Spin : 0 1
Isotope : 1H 1H
Momentum : 1/2 1/2
Here is Fx For The System:
GAMMA 4 x 4 Hermitian Matrix
( 0.00 , 0.00) ( 0.50 , 0.00) ( 0.50 , 0.00) ( 0.00 , 0.00)
( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.50 , 0.00)
( 0.00 , 0.00) ( 0.50 , 0.00)
( 0.00 , 0.00)
Here is F- + 3.2Fz:
Matrix:
GAMMA 4 x 4 Full Matrix
( 3.20 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00)
( 1.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00)
( 1.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00)
( 0.00 , 0.00) ( 1.00 , 0.00) ( 1.00 , 0.00) ( -3.20 , 0.00)
Basis:
Default Basis (4 x 4) Identity Matrix
Here's The System, Now C-D:
System :
Spin : 0 1
Isotope : 13C 2H
Momentum : 1/2 1
Here's Fy For The C-D System:
GAMMA 6 x 6 Hermitian Matrix
( 0.00 , 0.00) ( 0.00 , -0.71) ( 0.00 , 0.00) ( 0.00 , -0.50) ( 0.00 , 0.00) ( 0.00 , 0.00)
( 0.00 , 0.00) ( 0.00 , -0.71) ( 0.00 , 0.00) ( 0.00 , -0.50) ( 0.00 , 0.00)
( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , -0.50)
( 0.00 , 0.00) ( 0.00 , -0.71) ( 0.00 , 0.00)
( 0.00 , 0.00) ( 0.00 , -0.71)
( 0.00 , 0.00)
Here's F+ For D in C-DSystem:
GAMMA 6 x 6 Full Matrix
( 0.00 , 0.00) ( 1.41 , 0.00) ( 0.00 , 0.00) ( 1.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00)
( 0.00 , 0.00) ( 0.00 , 0.00) ( 1.41 , 0.00) ( 0.00 , 0.00) ( 1.00 , 0.00) ( 0.00 , 0.00)
( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 1.00 , 0.00)
( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 1.41 , 0.00) ( 0.00 , 0.00)
( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 1.41 , 0.00)
( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00) ( 0.00 , 0.00)
|
| |
Compiling Demo 2
|
| |
The executable program can be generated from the Unix prompt by invoking the C++
compiler with the proper arguments. As mentioned in the discussion of Demo 1
(and I state it again) there is a prepared script file, gamma,
which contains the proper call to the compiler (gxx) with library links, etc.
This assumes that you have a working GNU C++ on your system, a compiled GAMMA
library with headers (>= Version 3.5) and an accesible gamma command.
To compile the program, issue the command (where gamma1:ssmith> is my system prompt)
gamma1:ssmith>gamma demo2.cc -o demo2
The following is the dialog one might expect from this compilation
gamma1:ssmith>gamma demo2.cc -o demo2
G A M M A
(Version 3.5)
Written by Scott Smith and Tilo Levante
Dr. Scott A. Smith
National High Magnetic Field Laboratory
1800 E. Paul Dirac Drive
Tallahassee, FL, USA 32306-4005
ssmith@magnet.fsu.edu
The Compilation Is Specific To sun4
|
| |
This will produce the executable program named demo2 (set by the -o option).
|
| |
Executing Demo 2
|
| |
The executable program, demo2, can be now be run by issuing
the command demo2 in the command window.
gamma1:ssmith>demo2
No input arguments are required and the output has been shown at the top of this section.
On some WinTel systems its best to always name your output files with a ".exe" extension
or the binary won't be recognized as being executable.
|
|