[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quick fix for drix




 As Jim Sims noticed, the memory hog in FEFF8 is the rotation matrix
subroutine drix (m,m',l,n, i,j) which stores the rotation matrices
R^l_m m' for all pairs of atoms i,j in the cluster, with n=+/-1 (+ rotate from
bond to z axis; or - vice versa).

  For optimal efficiency it's desirable to factor R into 3 euler angle components
exp(i alpha m) r(beta) exp(i gamma m'), and store the relatively small number
of angles, as Alex has proposed. But this will require a lot of re coding.

  However, a quicker "fix" which already saves considerably on memory would
be to make use of crystal translational symmetry; Clearly R^l_m,m' will be
the same for all pairs i,j for which the unit vector
 R_ij = vec R_j - vec R_i / |vec R_j - vec R_i| is the same.

  Thus one can define a much smaller matrx  drixs (m,m',l,n, k), where
k=ij runs over inequivalent pairs. For Si, for example, there are only
8 atoms per cubic unit cell, so there are at most only 8*nclusx inequivalent
pairs. This permits one to reduce the size of the drix matrix by a factor
of nclusx/8. Thus for 900 atoms, one needs only 1.5 GB/100 = 15 MB plus
a simple look-up table. This method will also save time in constructing the
drix matrix which now takes about 25% of the total execution time for 
large FMS runs.

  One can probably generate the lookup table for a given structure by looping
over a given cluster, so no explicit symmetry declaration is required.
In cases where there is large disorder, all pairs will be inequivalent
and no savings are obtained. However, for cases of disorder, there is no
long range order and it's probably not necessary to go beyond 200 atoms
in any case for convergence.

  J. Rehr