mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2025-01-12 14:08:28 +01:00
Merge branch 'master' into QUEST5
This commit is contained in:
commit
e99a42ec67
@ -24,7 +24,7 @@ class columnHandler(formatHandlerBase):
|
||||
if dt in datacls:
|
||||
data=datacls[dt]
|
||||
else:
|
||||
cl=datafileSelector[dt]
|
||||
cl=datafileSelector(dt)
|
||||
data=cl()
|
||||
data.molecule=mymolecule
|
||||
data.method=mymethod
|
||||
|
@ -1,7 +1,7 @@
|
||||
from ..formatHandlerBase import formatHandlerBase
|
||||
from ..formatName import formatName
|
||||
from ...data import dataFileBase,DataType,method,excitationValue,datafileSelector,AbsDataFile,getSubtablesRange,state
|
||||
from ...LaTeX import newCommand
|
||||
from ...LaTeX import newCommand,extractMath
|
||||
import re
|
||||
from TexSoup import TexSoup
|
||||
import numpy as np
|
||||
@ -19,13 +19,9 @@ class doubleColumnHandler(formatHandlerBase):
|
||||
for rangeTrans in subtablestrans:
|
||||
mytrans=moltable[rangeTrans,:]
|
||||
mytransdesc=mytrans[0:2,1]
|
||||
|
||||
for i in range(2):
|
||||
try:
|
||||
mathsoup=TexSoup(mytransdesc[i])
|
||||
except:
|
||||
print(f"Error when parsing latex state: {str(mytransdesc[i])}")
|
||||
exit(-1)
|
||||
newCommand.runAll(mathsoup,self.commands)
|
||||
mathsoup=extractMath(mytransdesc[i],Soup=True,commands=self.commands)
|
||||
mytransdesc[i]=str(mathsoup)
|
||||
for colindex in range(3,np.size(table,1)):
|
||||
col=mytrans[:,colindex]
|
||||
|
@ -2,7 +2,7 @@ from ..formatHandlerBase import formatHandlerBase
|
||||
from ..formatName import formatName
|
||||
from ...data import dataFileBase,DataType,method,excitationValue,datafileSelector,getSubtablesRange,AbsDataFile,state
|
||||
from ...utils import getValFromCell, checkFloat
|
||||
from ...LaTeX import newCommand
|
||||
from ...LaTeX import newCommand,extractMath
|
||||
from TexSoup import TexSoup
|
||||
import re
|
||||
@formatName("doubleTBE")
|
||||
@ -12,15 +12,10 @@ class doubleTBEHandler(formatHandlerBase):
|
||||
subtablesMol=getSubtablesRange(table)
|
||||
for rangeMol in subtablesMol:
|
||||
data=AbsDataFile()
|
||||
data.molecule=str(table[rangeMol,0])
|
||||
data.molecule=str(table[rangeMol[0],0])
|
||||
data.method=method("TBE","CBS")
|
||||
for mytrans in table[rangeMol]:
|
||||
try:
|
||||
mathsoup=TexSoup(mytrans[1])
|
||||
except:
|
||||
print(f"Error when parsing latex state: {str(mytransdesc[i])}")
|
||||
exit(-1)
|
||||
newCommand.runAll(mathsoup,self.commands)
|
||||
mathsoup=extractMath(mytrans[1],Soup=True,commands=self.commands)
|
||||
mytransdesc=str(mathsoup)
|
||||
infin=mytransdesc.split(r"\rightarrow")
|
||||
for i,item in enumerate(infin):
|
||||
|
@ -33,7 +33,7 @@ class exoticColumnHandler(formatHandlerBase):
|
||||
methodname=str(methtex)
|
||||
mymethod=method(methodname,basis)
|
||||
methkey=json.dumps(mymethod.__dict__)
|
||||
finsts=dataFileBase.convertState(table[myrange,1],initialState,default=self.TexOps.default,commands=self.commands)
|
||||
finsts=dataFileBase.convertState(table[myrange,1],initialState,default=self.TexOps.defaultType,commands=self.commands)
|
||||
for index,cell in enumerate(col[myrange]):
|
||||
if str(cell)!="":
|
||||
val,unsafe=getValFromCell(cell)
|
||||
@ -57,7 +57,7 @@ class exoticColumnHandler(formatHandlerBase):
|
||||
#data.excitations.append(excitationValue(initialState,finst[0],val,type=finst[2]))
|
||||
for dt,methdic in valDic.items():
|
||||
for methstring,exdic in methdic.items():
|
||||
data=datafileSelector[dt]()
|
||||
data=datafileSelector(dt)()
|
||||
data.molecule=mymolecule
|
||||
methdic=json.loads(methstring)
|
||||
data.method=method(methdic["name"],methdic["basis"])
|
||||
|
Loading…
Reference in New Issue
Block a user