Skip to content

Commit

Permalink
correction of generator entries for point group -3m
Browse files Browse the repository at this point in the history
  • Loading branch information
marcdegraef committed Jul 12, 2024
1 parent f1c6f5c commit 9f1981e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 55 deletions.
32 changes: 2 additions & 30 deletions NamelistTemplates/EMECP.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
! size of output pattern in pixels (image is always square npix x npix)
npix = 256,
! half angle of cone for incident beams (degrees)
thetac = 5.0,
conesemiangle = 5.0,
! mask pattern or not; 'y' or 'n'
maskpattern = 'n',
! monte carlo input file; path relative to EMdatapathname
Expand Down Expand Up @@ -37,32 +37,4 @@
! outer radius of annular detector [in mm]
Rout = 6.0,
!
!==============================================================
! the nml parameters only used in case of two layered structure
! ignore them for normal ECP calculation
! this is an experimental part of the code and is not guaranteed
! to work properly...
!==============================================================
! foil normal of film
fn_f = 0,0,1,
! foil normal of substrate
fn_s = 0,0,1,
! second (substrate) crystal structure filename
xtalname2 = 'undefined',
! plane normal in Film
gF = 0,0,0,
! plane normal in Substrate
gS = 0,0,0,
! direction in Film
tF = 0,0,0,
! direction in Substrate
tS = 0,0,0,
! smallest d-spacing to take into account [nm]
dmin = 0.025,
! film thickness if present (0.0 if not present)
filmthickness = 0.0,
! output file for film signal
filmfile = 'undefined',
! output file for substrate signal
subsfile = 'undefined'
/
/
38 changes: 24 additions & 14 deletions Source/EMsoftOOLib/mod_symmetry.f90
Original file line number Diff line number Diff line change
Expand Up @@ -563,12 +563,19 @@ module mod_symmetry


!> SYM_GL encoded point group generator strings
! character(4), dimension(32) :: SYM_PGGL= (/ &
! '----', 'h---', 'c---', 'j---', 'ch--', 'bc--', 'bj--', 'bch-', &
! 'g---', 'm---', 'gh--', 'cg--', 'gj--', 'cm--', 'cgh-', 'n---', &
! 'hn--', 'en--', 'kn--', 'fhn-', 'bn--', 'in--', 'bhn-', 'ben-', &
! 'bkn-', 'ikn-', 'benh', 'cd--', 'cdh-', 'dg--', 'dml-', 'dghl' /)

character(4), dimension(32) :: SYM_PGGL= (/ &
'----', 'h---', 'c---', 'j---', 'ch--', 'bc--', 'bj--', 'bch-', &
'g---', 'm---', 'gh--', 'cg--', 'gj--', 'cm--', 'cgh-', 'n---', &
'hn--', 'en--', 'kn--', 'fhn-', 'bn--', 'in--', 'bhn-', 'ben-', &
'hn--', 'en--', 'kn--', 'ehn-', 'bn--', 'in--', 'bhn-', 'ben-', &
'bkn-', 'ikn-', 'benh', 'cd--', 'cdh-', 'dg--', 'dml-', 'dghl' /)


!DEC$ ATTRIBUTES DLLEXPORT :: SYM_PGGL

! here is the main symmetry class definition; this class must be able to function on its
Expand Down Expand Up @@ -4012,6 +4019,8 @@ recursive subroutine MakePGGenerators_(self)
! we need to include the identity as a generator
self%GENnum = self%GENnum+1

write (*,*) ' Number of point group generators found : ', self%GENnum

end subroutine MakePGGenerators_

!--------------------------------------------------------------------------
Expand Down Expand Up @@ -4109,19 +4118,20 @@ recursive subroutine GeneratePGSymmetry_(self, SG, SGnumber, dmt, rmt)
end do
end if

! next the rhombohedral cases
if (minval(abs(Rnums-SGnumber)).eq.0) then
sr2 = sqrt(3.D0)*0.5D0
R = reshape( (/ sr2, -0.5D0, 0.D0, 0.5D0, sr2, 0.D0, 0.D0, 0.D0, 1.D0 /), (/3,3/) )
do k=1, nsym
self%c(:,:) = self%direc(k,:,:)
write (*,*) k
write (*,*) self%c
self%c = matmul( transpose(R), matmul(self%c, R) )
self%direc(k,:,:) = self%c(:,:)
write (*,*) self%c
end do
end if
! next the rhombohedral cases;
! THIS IS INCORRECT BECAUSE IT GENERATES MATRICES THAT HAVE ENTRIES OTHER THAN 0, +1, -1 ...
! if (minval(abs(Rnums-SGnumber)).eq.0) then
! sr2 = sqrt(3.D0)*0.5D0
! R = reshape( (/ sr2, 0.5D0, 0.D0, -0.5D0, sr2, 0.D0, 0.D0, 0.D0, 1.D0 /), (/3,3/) )
! do k=1, nsym
! self%c(:,:) = self%direc(k,:,:)
! write (*,*) k
! write (*,*) self%c
! self%c = matmul( transpose(R), matmul(self%c, R) )
! self%direc(k,:,:) = self%c(:,:)
! write (*,*) self%c
! end do
! end if

! generate new elements from the squares of the generators
do k=1,self%GENnum
Expand Down
23 changes: 12 additions & 11 deletions Source/EMsoftOOLib/program_mods/mod_EBSDmaster.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1101,11 +1101,12 @@ subroutine EBSDmaster_(self, EMsoft, progname, HDFnames, thickness)
usehex = .FALSE.
if ((SG%getSpaceGroupXtalSystem().eq.4).or.(SG%getSpaceGroupXtalSystem().eq.5)) usehex = .TRUE.

! write (*,*) '========================'
! write (*,*) 'isym = ',isym
! write (*,*) 'SamplingType = ', SamplingType
! write (*,*) 'usehex = ', usehex
! write (*,*) '========================'
write (*,*) '========================'
write (*,*) 'isym = ',isym
write (*,*) 'SamplingType = ', SamplingType
write (*,*) 'usehex = ', usehex
write (*,*) 'SG%trigonal = ', SG%getSpaceGrouptrigonal()
write (*,*) '========================'

! ---------- end of symmetry and crystallography section
!=============================================
Expand Down Expand Up @@ -1535,12 +1536,12 @@ subroutine EBSDmaster_(self, EMsoft, progname, HDFnames, thickness)
karray(1:3,ik) = ktmp%k(1:3)
karray(4,ik) = ktmp%kn
kij(1:3,ik) = (/ ktmp%i, ktmp%j, ktmp%hs /)
do ik=2,numk
ktmp => ktmp%next
karray(1:3,ik) = ktmp%k(1:3)
karray(4,ik) = ktmp%kn
kij(1:3,ik) = (/ ktmp%i, ktmp%j, ktmp%hs /)
end do
do ik=2,numk
ktmp => ktmp%next
karray(1:3,ik) = ktmp%k(1:3)
karray(4,ik) = ktmp%kn
kij(1:3,ik) = (/ ktmp%i, ktmp%j, ktmp%hs /)
end do
! and remove the linked list
call kvec%Delete_kvectorlist()

Expand Down

0 comments on commit 9f1981e

Please sign in to comment.