mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2025-01-12 05:58:23 +01:00
self.Command is now uppercase
This commit is contained in:
parent
a973526f20
commit
13ea1361c2
@ -12,7 +12,7 @@ class TBEHandler(formatHandlerBase):
|
|||||||
mymolecule=str(table[myrange[0],0])
|
mymolecule=str(table[myrange[0],0])
|
||||||
initialState=self.TexOps.initialStates[mymolecule]
|
initialState=self.TexOps.initialStates[mymolecule]
|
||||||
mymethod=(method("TBE","aug-cc-pVTZ"),method("TBE(Full)","CBS"))
|
mymethod=(method("TBE","aug-cc-pVTZ"),method("TBE(Full)","CBS"))
|
||||||
finsts=dataFileBase.convertState(table[myrange,1],initialState,default=self.TexOps.defaultType,commands=self.commands)
|
finsts=dataFileBase.convertState(table[myrange,1],initialState,default=self.TexOps.defaultType,commands=self.Commands)
|
||||||
for index,row in enumerate(table[myrange,]):
|
for index,row in enumerate(table[myrange,]):
|
||||||
oscilatorForces=checkFloat(str(row[2]))
|
oscilatorForces=checkFloat(str(row[2]))
|
||||||
T1 = checkFloat(str(row[3]))
|
T1 = checkFloat(str(row[3]))
|
||||||
|
@ -15,7 +15,7 @@ class columnHandler(formatHandlerBase):
|
|||||||
mymolecule=str(table[myrange[0],0])
|
mymolecule=str(table[myrange[0],0])
|
||||||
initialState=self.TexOps.initialStates[mymolecule]
|
initialState=self.TexOps.initialStates[mymolecule]
|
||||||
mymethod=method(str(col[1]),str(col[0]))
|
mymethod=method(str(col[1]),str(col[0]))
|
||||||
finsts=dataFileBase.convertState(table[myrange,1],initialState,default=self.TexOps.defaultType,commands=self.commands)
|
finsts=dataFileBase.convertState(table[myrange,1],initialState,default=self.TexOps.defaultType,commands=self.Commands)
|
||||||
for index,cell in enumerate(col[myrange]):
|
for index,cell in enumerate(col[myrange]):
|
||||||
if str(cell)!="":
|
if str(cell)!="":
|
||||||
val,unsafe=getValFromCell(cell)
|
val,unsafe=getValFromCell(cell)
|
||||||
|
@ -21,7 +21,7 @@ class doubleColumnHandler(formatHandlerBase):
|
|||||||
mytransdesc=mytrans[0:2,1]
|
mytransdesc=mytrans[0:2,1]
|
||||||
|
|
||||||
for i in range(2):
|
for i in range(2):
|
||||||
mathsoup=extractMath(mytransdesc[i],Soup=True,commands=self.commands)
|
mathsoup=extractMath(mytransdesc[i],Soup=True,commands=self.Commands)
|
||||||
mytransdesc[i]=str(mathsoup)
|
mytransdesc[i]=str(mathsoup)
|
||||||
for colindex in range(3,np.size(table,1)):
|
for colindex in range(3,np.size(table,1)):
|
||||||
col=mytrans[:,colindex]
|
col=mytrans[:,colindex]
|
||||||
|
@ -15,7 +15,7 @@ class doubleTBEHandler(formatHandlerBase):
|
|||||||
data.molecule=str(table[rangeMol[0],0])
|
data.molecule=str(table[rangeMol[0],0])
|
||||||
data.method=method("TBE","CBS")
|
data.method=method("TBE","CBS")
|
||||||
for mytrans in table[rangeMol]:
|
for mytrans in table[rangeMol]:
|
||||||
mathsoup=extractMath(mytrans[1],Soup=True,commands=self.commands)
|
mathsoup=extractMath(mytrans[1],Soup=True,commands=self.Commands)
|
||||||
mytransdesc=str(mathsoup)
|
mytransdesc=str(mathsoup)
|
||||||
infin=mytransdesc.split(r"\rightarrow")
|
infin=mytransdesc.split(r"\rightarrow")
|
||||||
for i,item in enumerate(infin):
|
for i,item in enumerate(infin):
|
||||||
|
@ -21,19 +21,19 @@ class exoticColumnHandler(formatHandlerBase):
|
|||||||
mymethcell=list(col[1])
|
mymethcell=list(col[1])
|
||||||
if isinstance(mymethcell[0],TexNode) and mymethcell[0].name=="$":
|
if isinstance(mymethcell[0],TexNode) and mymethcell[0].name=="$":
|
||||||
kindSoup=TexSoup("".join(list(mymethcell[0].expr.all)))
|
kindSoup=TexSoup("".join(list(mymethcell[0].expr.all)))
|
||||||
newCommand.runAll(kindSoup,self.commands)
|
newCommand.runAll(kindSoup,self.Commands)
|
||||||
kind=str(kindSoup)
|
kind=str(kindSoup)
|
||||||
methodnameSoup=TexSoup(mymethcell[1].value)
|
methodnameSoup=TexSoup(mymethcell[1].value)
|
||||||
newCommand.runAll(methodnameSoup,self.commands)
|
newCommand.runAll(methodnameSoup,self.Commands)
|
||||||
methodname=str(methodnameSoup)
|
methodname=str(methodnameSoup)
|
||||||
else:
|
else:
|
||||||
kind=""
|
kind=""
|
||||||
methtex=col[1]
|
methtex=col[1]
|
||||||
newCommand.runAll(methtex,self.commands)
|
newCommand.runAll(methtex,self.Commands)
|
||||||
methodname=str(methtex)
|
methodname=str(methtex)
|
||||||
mymethod=method(methodname,basis)
|
mymethod=method(methodname,basis)
|
||||||
methkey=json.dumps(mymethod.__dict__)
|
methkey=json.dumps(mymethod.__dict__)
|
||||||
finsts=dataFileBase.convertState(table[myrange,1],initialState,default=self.TexOps.defaultType,commands=self.commands)
|
finsts=dataFileBase.convertState(table[myrange,1],initialState,default=self.TexOps.defaultType,commands=self.Commands)
|
||||||
for index,cell in enumerate(col[myrange]):
|
for index,cell in enumerate(col[myrange]):
|
||||||
if str(cell)!="":
|
if str(cell)!="":
|
||||||
val,unsafe=getValFromCell(cell)
|
val,unsafe=getValFromCell(cell)
|
||||||
|
@ -62,20 +62,20 @@ class fromXLSToLaTeXHandler(formatHandlerBase):
|
|||||||
continue
|
continue
|
||||||
if isinstance(mymethcell[0],TexNode) and mymethcell[0].name=="$":
|
if isinstance(mymethcell[0],TexNode) and mymethcell[0].name=="$":
|
||||||
kindSoup=TexSoup("".join(list(mymethcell[0].expr.all)))
|
kindSoup=TexSoup("".join(list(mymethcell[0].expr.all)))
|
||||||
newCommand.runAll(kindSoup,self.commands)
|
newCommand.runAll(kindSoup,self.Commands)
|
||||||
kind=str(kindSoup)
|
kind=str(kindSoup)
|
||||||
methodnameSoup=TexSoup(mymethcell[1].value)
|
methodnameSoup=TexSoup(mymethcell[1].value)
|
||||||
newCommand.runAll(methodnameSoup,self.commands)
|
newCommand.runAll(methodnameSoup,self.Commands)
|
||||||
methodname=str(methodnameSoup)
|
methodname=str(methodnameSoup)
|
||||||
else:
|
else:
|
||||||
kind=""
|
kind=""
|
||||||
methtex=col[0]
|
methtex=col[0]
|
||||||
newCommand.runAll(methtex,self.commands)
|
newCommand.runAll(methtex,self.Commands)
|
||||||
methodname=str(methtex)
|
methodname=str(methtex)
|
||||||
mymethod=method(methodname,basis)
|
mymethod=method(methodname,basis)
|
||||||
methkey=json.dumps(mymethod.__dict__)
|
methkey=json.dumps(mymethod.__dict__)
|
||||||
mathstates=[GetFullState(table[i,4],VR=str(table[i,6]),typeAcronym=str(table[i,7]),Soup=True) for i in myrange]
|
mathstates=[GetFullState(table[i,4],VR=str(table[i,6]),typeAcronym=str(table[i,7]),Soup=True) for i in myrange]
|
||||||
finsts=dataFileBase.convertState(mathstates,initialState,default=self.TexOps.defaultType,commands=self.commands)
|
finsts=dataFileBase.convertState(mathstates,initialState,default=self.TexOps.defaultType,commands=self.Commands)
|
||||||
for index,cell in enumerate(col[myrange]):
|
for index,cell in enumerate(col[myrange]):
|
||||||
if str(cell)!="":
|
if str(cell)!="":
|
||||||
val=str(cell)
|
val=str(cell)
|
||||||
|
@ -12,7 +12,7 @@ class lineHandler(formatHandlerBase):
|
|||||||
mymolecule=str(col[0])
|
mymolecule=str(col[0])
|
||||||
mymethod=method(str(col[2]),str(col[1]))
|
mymethod=method(str(col[2]),str(col[1]))
|
||||||
initialState=self.TexOps.initialStates[mymolecule]
|
initialState=self.TexOps.initialStates[mymolecule]
|
||||||
finsts=dataFileBase.convertState(table[3:,0],initialState,default=self.TexOps.defaultType,commands=self.commands)
|
finsts=dataFileBase.convertState(table[3:,0],initialState,default=self.TexOps.defaultType,commands=self.Commands)
|
||||||
datacls=dict()
|
datacls=dict()
|
||||||
for index,cell in enumerate(col[3:]):
|
for index,cell in enumerate(col[3:]):
|
||||||
if str(cell)!="":
|
if str(cell)!="":
|
||||||
|
@ -2,7 +2,7 @@ from abc import ABCMeta, abstractmethod
|
|||||||
class formatHandlerBase(object, metaclass=ABCMeta):
|
class formatHandlerBase(object, metaclass=ABCMeta):
|
||||||
def __init__(self,TexOps, commands=[]):
|
def __init__(self,TexOps, commands=[]):
|
||||||
self.TexOps=TexOps
|
self.TexOps=TexOps
|
||||||
self.commands=commands
|
self.Commands=commands
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def readFromTable(self,table):
|
def readFromTable(self,table):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
Loading…
Reference in New Issue
Block a user