mirror of
https://github.com/triqs/dft_tools
synced 2024-12-22 12:23:41 +01:00
elk interface bug fixs
This commit is contained in:
parent
f82af2823c
commit
e2c038ae8a
@ -142,7 +142,7 @@ class ElkConverter(ConverterTools,Elk_tools,read_Elk):
|
||||
for isym in range(n_symm):
|
||||
#rotate symmetry matrix into basis defined by T
|
||||
mat[isym][ish]=numpy.matmul(T[ish],mat[isym][ish])
|
||||
mat[isym][ish]=numpy.matmul(mat[isym][ish],T[ish].transpose())
|
||||
mat[isym][ish]=numpy.matmul(mat[isym][ish],T[ish].conjugate().transpose())
|
||||
#put desired subset of transformed symmetry matrix into temp matrix for symmetry isym
|
||||
for id in range(len(ind[ish])):
|
||||
i=ind[ish][id]
|
||||
@ -348,15 +348,19 @@ class ElkConverter(ConverterTools,Elk_tools,read_Elk):
|
||||
use_rotations = 1
|
||||
rot_mat = [numpy.identity(corr_shells[icrsh]['dim'], numpy.complex_) for icrsh in range(n_corr_shells)]
|
||||
for icrsh in range(n_corr_shells):
|
||||
incrsh = corr_to_inequiv[icrsh]
|
||||
iatom = corr_shells[incrsh]['atom']
|
||||
#incrsh = corr_to_inequiv[icrsh]
|
||||
#iatom = corr_shells[incrsh]['atom']
|
||||
#want to rotate atom to first inequivalent atom in list
|
||||
iatom = 1
|
||||
for isym in range(n_symm):
|
||||
jatom=perm[isym][corr_shells[icrsh]['atom']-1]
|
||||
#determinant determines if crystal symmetry matrix has inversion symmetry (=-1)
|
||||
det = numpy.linalg.det(symmat[isym][:,:])
|
||||
if((jatom==iatom)&(det>0.0)):
|
||||
rot_mat[icrsh][:,:]=mat[isym][icrsh][:,:]
|
||||
#used first desired symmetry in crystal symmetry list
|
||||
#local rotation which rotates equivalent atom into its local coordinate system
|
||||
#(inverse of the symmetry operator applied to the projectors in Elk)
|
||||
rot_mat[icrsh][:,:]=mat[isym][icrsh][:,:].conjugate().transpose()
|
||||
#used first desired symmetry in crystal symmetry list
|
||||
break
|
||||
# Elk does not currently use time inversion symmetry
|
||||
rot_mat_time_inv = [0 for i in range(n_corr_shells)]
|
||||
|
@ -92,8 +92,9 @@ class ElkConverterTools:
|
||||
v[2]=numpy.sqrt(abs(rotp[2,2]+1.0)/2.0)
|
||||
v[0]=(rotp[0,2]+rotp[2,0])/(4.0*v[2])
|
||||
v[1]=(rotp[1,2]+rotp[2,1])/(4.0*v[2])
|
||||
# return theta and v
|
||||
return v,th
|
||||
# return -theta and v. -theta is returned as TRIQS does not rotate
|
||||
# the observable (such as the density matrix) which is done in Elk
|
||||
return v,-th
|
||||
|
||||
def axangsu2(self,v,th):
|
||||
"""
|
||||
@ -198,9 +199,10 @@ class ElkConverterTools:
|
||||
#ang=r.as_euler('zyz')
|
||||
ang=self.zyz_euler(rot)
|
||||
#Elk uses inverse rotations, i.e. the function is being rotated, not the spherical harmonics
|
||||
angi[0]=-ang[2]
|
||||
angi[1]=-ang[1]
|
||||
angi[2]=-ang[0]
|
||||
#TRIQS rotates the spherical harmonics instead
|
||||
angi[0]=ang[0]
|
||||
angi[1]=ang[1]
|
||||
angi[2]=ang[2]
|
||||
#calculate the symmetry in the complex spherical harmonic basis.
|
||||
d = self.ylmrot(p,angi,l)
|
||||
symmat[isym][ish][:,:] = d[:,:]
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user