Skip to content

Commit

Permalink
Fix bug in calculation of Zion
Browse files Browse the repository at this point in the history
  • Loading branch information
rubel75 committed Feb 17, 2016
1 parent 4086907 commit e04be32
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions berrypi
Original file line number Diff line number Diff line change
Expand Up @@ -568,11 +568,11 @@ def rawBerryPhase(configFile):
args = [str(structureName), direction, opt]
pathPhases = mmn2pathphase.main(args)
if direction == 'x':
phaseX[spinIndex,:,:] = pathPhases
phaseX[spinIndex,:,:] = pathPhases
elif direction == 'y':
phaseY[spinIndex,:,:] = pathPhases
phaseY[spinIndex,:,:] = pathPhases
elif direction == 'z':
phaseZ[spinIndex,:,:] = pathPhases
phaseZ[spinIndex,:,:] = pathPhases
# END OF THE MAIN LOOP FOR BERRY PHASE CALCULATION+++++++++++++++++++
results = [phaseX,phaseY,phaseZ]

Expand Down
13 changes: 9 additions & 4 deletions parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,15 @@ def parse(self):

#remove repeating lines
theMainStringTemp = []
for element in theMainString:
if re.match(r' +[A-Za-z]+ +RHFS',element) and element in theMainStringTemp:
continue
theMainStringTemp.append(element)
for i in range(0,len(theMainString)-3):
if re.match(r' +[A-Za-z]+ +RHFS',theMainString[i]) and \
re.match(r' *TOTAL CHARGE FOR SPIN +[12] : +[0-9.]+',theMainString[i+1]) and \
re.match(r' *TOTAL CHARGE FOR SPIN +[12] : +[0-9.]+',theMainString[i+2]) and \
re.match(r' *TOTAL CORE-CHARGE: +[0-9.]+',theMainString[i+3]):
theMainStringTemp.append(theMainString[i])
theMainStringTemp.append(theMainString[i+1])
theMainStringTemp.append(theMainString[i+2])
theMainStringTemp.append(theMainString[i+3])
theMainString = theMainStringTemp
self['Element List'] = {}
#some regular expression magic
Expand Down
2 changes: 1 addition & 1 deletion version.info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
+++Version 1.3.1 (Apr 20, 2015)
+++Version 1.3.2 (Feb 17, 2016)

0 comments on commit e04be32

Please sign in to comment.