Version 1.0 15 September
2000
2e is a code for computing the wave function for a two-electron atom.
The trial function is a linear combination of correlated
exponentials Exp[a r1 + b r2 + c r12] but the code is modular, and it should
be very easy to add support for other basis sets, like Gaussians.
Given a basis, the code computes a selected eigenvalue
(and the associated eigenvector).
The user must select the nuclear charge, the spin state
(triplet or singlet), a trial value for the desired eigenvalue and the
number of functions the program must use.
If desired, the final basis can be saved to a file named
"newbasis.dat" and the matrix elements can be saved to the files "smat.dat"
for overlap elements, and "hmat.dat" for hamiltonian elements.
The simplest way to use the code is to supply a user generated basis set in file "basis.dat". The program then computes the eigenvalue and eigenvector. If the basis set has 16 functions the input fragment goes like this:
read_basis_from_file = 1
functions_on_file = 16
strategy = 0
1 stands for TRUE and 0 for FALSE.
the variable strategy rules
how the program generate and process the basis set.
If strategy=0 the program,
after reading the basis set from the file, does nothing else.
If strategy=1 the program
generates randomly up to max_functions functions.
Of course you have the option to read some functions from file and then
generate the others randomly.
If strategy=2 the
program adds one function at a time until max_functions
functions have been generated. The added function is the best between
trials
functions generated randomly.
The parameters, for strategy=1
and strategy=2, are randomly selected between
the user selected parameter_limits. In the case below, a
is selected between 0 and -2, b between -2
and -4 and c between 0 and -2.
The starting random seed is read from random_seed
in the input file. If this is zero, or is not found, a random random seed
is selected ;-)
Below you will find a sample input file and a typical output file
The program is started with 2e < input_file
! input file for 2e
spin_state = 1
! +1 = singlet -1 = triplet
charge = 2
! nuclear charge
trial_eigenvalue = -2.9038
! value close to the desired eigenvalue
random_seed = 12345 ! optional. default=0 (randomize)
save_matrix_elements = 0
! optional. default=0
save_basis = 0
! optional. default=0
read_basis_from_file = 0
functions_on_file = 16
strategy = 2 # 0=do_nothing 1=add_random 2=add_best_random
max_functions = 20
trials = 20000
parameter_limits[]
0 -2
-2 -4
0 -2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2e : a two-electron atom program
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
spin_state = 1
charge = 2.000000
trial_eigenvalue = -2.903800
random_seed = 12345
strategy = 2
save_matrix_elements = 0
save_basis = 0
max_functions = 20
Initialize: allocate 20
trials = 20000
Parameter limits: 0.000000 2.000000 2.000000 4.000000 0.000000
-2.000000
n = 1 E = -2.872393916
n = 2 E = -2.900330297
n = 3 E = -2.900877299
n = 4 E = -2.901908425
n = 5 E = -2.902386389
n = 6 E = -2.902938662
n = 7 E = -2.903223975
n = 8 E = -2.903383050
n = 9 E = -2.903468715
n = 10 E = -2.903578196
n = 11 E = -2.903643307
n = 12 E = -2.903658074
n = 13 E = -2.903682867
n = 14 E = -2.903693348
n = 15 E = -2.903696568
n = 16 E = -2.903698492
n = 17 E = -2.903702647
n = 18 E = -2.903711371
n = 19 E = -2.903715862
n = 20 E = -2.903717734