Skip to content

Commit

Permalink
sets crystal file status to readonly when structure data is read
Browse files Browse the repository at this point in the history
  • Loading branch information
marcdegraef committed Apr 10, 2024
1 parent 95220d3 commit 8daefd1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/EMsoftOOLib/mod_crystallography.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2631,7 +2631,10 @@ recursive subroutine readDataHDF_(self, SG, EMsoft, useHDF, useXtalName)
else
xtalname = trim(EMsoft%generateFilePath('EMXtalFolderpathname',self%xtalname))
end if
hdferr = me%openFile(xtalname)
! we use the readonly optional parameter to make sure that HDF does not lock
! the file; this could cause conflicts if multiple program simultaneously try to
! acces the same crystal structure file [MDG, 4/10/24]
hdferr = me%openFile(xtalname, readonly=.TRUE.)

groupname = SC_CrystalData
hdferr = me%openGroup(groupname)
Expand Down Expand Up @@ -2753,8 +2756,6 @@ recursive subroutine readDataHDF_(self, SG, EMsoft, useHDF, useXtalName)
! space groups, so this needs to remain at .FALSE. always.
call SG%setSpaceGroupsecond(.FALSE.)

! if (openHDFfile) call me%closer()

end subroutine readDataHDF_

!--------------------------------------------------------------------------
Expand Down

0 comments on commit 8daefd1

Please sign in to comment.