10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-24 13:23:40 +01:00
This commit is contained in:
Mickaël Véril 2019-12-12 10:11:34 +01:00
parent 1b6094d7f7
commit 39ad0ab933

View File

@ -2,8 +2,7 @@ from collections import OrderedDict
from enum import IntEnum,auto,unique,IntFlag from enum import IntEnum,auto,unique,IntFlag
from .Format import Format from .Format import Format
import re import re
import numpy as np import numpy as npss
import itertools
class state: class state:
def __init__(self,number, multiplicity, symetry): def __init__(self,number, multiplicity, symetry):
@ -87,7 +86,7 @@ class dataFileBase(object):
data.excitations.append(excitationValue(firstState,finst[0],val,type=finst[2])) data.excitations.append(excitationValue(firstState,finst[0],val,type=finst[2]))
for datamtbe in datacls.values(): for datamtbe in datacls.values():
datalist.append(datamtbe) datalist.append(datamtbe)
return list(itertools.chain.from_iterable(datalist)) return datalist
elif format==Format.COLUMN: elif format==Format.COLUMN:
subtablesindex=list() subtablesindex=list()
firstindex=2 firstindex=2
@ -151,7 +150,6 @@ class dataFileBase(object):
datamtbe=[] datamtbe=[]
for met in mymethod: for met in mymethod:
data=cl() data=cl()
datamtbe.append(cl())
data.molecule=mymolecule data.molecule=mymolecule
data.method=met data.method=met
datamtbe.append(data) datamtbe.append(data)
@ -160,7 +158,8 @@ class dataFileBase(object):
for i in range(2): for i in range(2):
datamtbe[i].excitations.append(excitationValue(firstState,finst[0],vs[i],type=finst[2],T1=T1,forces=oscilatorForces)) datamtbe[i].excitations.append(excitationValue(firstState,finst[0],vs[i],type=finst[2],T1=T1,forces=oscilatorForces))
for value in datacls.values(): for value in datacls.values():
datalist.append(value) for dat in value:
datalist.append(dat)
return datalist return datalist
def getMetadata(self): def getMetadata(self):