diff --git a/docs/example-tbe.tex b/docs/example-tbe.tex index 19e2a8a1..c6903351 100644 --- a/docs/example-tbe.tex +++ b/docs/example-tbe.tex @@ -95,7 +95,7 @@ &$^3A_1 (\Ryd;n \rightarrow 3p)$ & &97.2 &8.10 & & &8.15 \\ &$^3B_1 (\Ryd;n \rightarrow 3d)$ & &97.9 &8.42 & & &8.42 \\ &$^1A'' [\mathrm{F}] (\mathrm{V};n \rightarrow \pis)$ & &87.8 &2.80 & & &2.80 \\ - Formamide &$^1A'' \mathrm{V};(n \rightarrow \pis)$ &0.000 &90.8 &5.65$^a$ &{\exCI}/AVDZ& AVQZ &5.63 \\ + Formamide &$^1A'' (\mathrm{V};n \rightarrow \pis)$ &0.000 &90.8 &5.65$^a$ &{\exCI}/AVDZ& AVQZ &5.63 \\ &$^1A' (\Ryd;n \rightarrow 3s)$ &0.001 &88.6 &6.77$^a$ & & &6.81 \\ &$^1A' (\mathrm{V};\pi \rightarrow \pis)$ &0.251 &89.3 &7.63 &{\exCI}/AVTZ & AVQZ &7.64 \\ &$^1A' (\Ryd;n \rightarrow 3p)$ &0.111 &89.6 &7.38$^b$ &{\CCSDT}/AVTZ& AVQZ &7.41 \\ diff --git a/tools/lib/data.py b/tools/lib/data.py index 6fd42ae6..777c5698 100644 --- a/tools/lib/data.py +++ b/tools/lib/data.py @@ -123,19 +123,25 @@ class dataFileBase(object): elif format==Format.TBE: subtablesindex=list() firstindex=2 - for i in range(2,np.size(table,0)): + for i in range(3,np.size(table,0)): if str(table[i,0])!="": subtablesindex.append((firstindex,i-1)) firstindex=i for first, last in subtablesindex: + datacls=dict() mymolecule=str(table[first,0]) - mymethod="TBE" + mymethod=method("TBE",None) finsts=dataFileBase.convertState(table[first:last+1,1],default=default,firstState=firstState) - for row in table[first,last+1]: - OscilatorForces=float(str(cell.contents)[2]) - T1 = float(str(list(cell.contents)[3])) - val = float(str(list(cell.contents)[4])) - corr = float(str(list(cell.contents[7]))) + for index,row in enumerate(table[first:last+1,]): + def toFloat(x): + try: + return float(x) + except ValueError: + return None + oscilatorForces=toFloat(str(row[2])) + T1 = toFloat(str(row[3])) + val = toFloat(str(row[4])) + corr = toFloat(str(row[7])) finst=finsts[index] dt=finst[1] if dt in datacls: @@ -146,7 +152,7 @@ class dataFileBase(object): data.molecule=mymolecule data.method=mymethod datacls[dt]=data - data.excitations.append(excitationValue(firstState,finst[0],val,type=finst[2],T1=T1,corrected=corr)) + data.excitations.append(excitationValue(firstState,finst[0],val,type=finst[2],T1=T1,corrected=corr,oscilatorForces=oscilatorForces)) for value in datacls.values(): datalist.append(value) return datalist