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