mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-11-04 13:13:55 +01:00
Starting TBE adaptation
This commit is contained in:
parent
16b07ae25c
commit
934e136e56
@ -20,23 +20,32 @@ class code {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
class method {
|
class method {
|
||||||
constructor(name, basis) {
|
constructor(name, basis=null,TBEcorr=null) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.basis = basis;
|
this.basis = basis;
|
||||||
|
this.TBEcorr=TBEcorr
|
||||||
}
|
}
|
||||||
static fromString(str) {
|
static fromString(str) {
|
||||||
var vals = str.split(",")
|
var vals = str.split(",")
|
||||||
if (vals.length == 2) {
|
switch (vals.lenght) {
|
||||||
return new method(vals[0], vals[1]);
|
case 3:
|
||||||
}
|
return new method(vals[0], vals[1],vals[2]);
|
||||||
else {
|
break;
|
||||||
return new method(vals[0], null)
|
case 2:
|
||||||
|
return new method(vals[0], vals[1])
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
return new method(vals[0])
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
toString() {
|
toString() {
|
||||||
var str = this.name;
|
var str = this.name;
|
||||||
if (this.basis) {
|
if (this.basis) {
|
||||||
str = str + '/' + this.basis;
|
str = str + '/' + this.basis;
|
||||||
|
if (this.TBEcorr) {
|
||||||
|
str+=" ("+this.TBEcorr +")"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@ -82,6 +91,14 @@ class excitationValue extends excitationBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class excitationValueCorrected extends excitationBase {
|
||||||
|
constructor(initial, final, value) {
|
||||||
|
super(initial, final)
|
||||||
|
this.value = value
|
||||||
|
this.Correction=value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class excitation extends excitationBase {
|
class excitation extends excitationBase {
|
||||||
constructor(initial, final, Eabs, Efluo, EZPE) {
|
constructor(initial, final, Eabs, Efluo, EZPE) {
|
||||||
super(initial, final)
|
super(initial, final)
|
||||||
|
@ -145,28 +145,31 @@ class dataFileBase(object):
|
|||||||
mystr=" {:8s}{:7s}{:10s}{:8s}{:6s}{:13s}{}\n".format(str(ex.initial.number),str(ex.initial.multiplicity),ex.initial.symetry,str(ex.final.number),str(ex.final.multiplicity),ex.final.symetry,str(ex.value))
|
mystr=" {:8s}{:7s}{:10s}{:8s}{:6s}{:13s}{}\n".format(str(ex.initial.number),str(ex.initial.multiplicity),ex.initial.symetry,str(ex.final.number),str(ex.final.multiplicity),ex.final.symetry,str(ex.value))
|
||||||
f.write(mystr)
|
f.write(mystr)
|
||||||
class method:
|
class method:
|
||||||
def __init__(self,name, basis):
|
def __init__(self,name, *args):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.basis = basis
|
self.basis=args[0] if len(args)>0 else None
|
||||||
|
self.TBECorr=args if len(args)>1 else None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def fromString(string):
|
def fromString(string):
|
||||||
vals = string.split(",")
|
vals = string.split(",")
|
||||||
if (vals.length == 2):
|
return method(*vals)
|
||||||
return method(vals[0], vals[1])
|
|
||||||
else:
|
|
||||||
return method(vals[0], None)
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
string = self.name
|
string = self.name
|
||||||
if (self.basis):
|
if (self.basis):
|
||||||
string+= '/' + self.basis
|
string+= '/' + self.basis
|
||||||
|
if (self.TBECorr)
|
||||||
|
string+=" ("+ self.TBECorr+")"
|
||||||
return string
|
return string
|
||||||
|
|
||||||
def toDataString(self):
|
def toDataString(self):
|
||||||
string=self.name
|
string=self.name
|
||||||
if (self.basis):
|
if (self.basis):
|
||||||
string+=","+self.basis
|
string+=","+self.basis
|
||||||
|
if (self.TBECorr)
|
||||||
|
string+=","+self.TBECorr
|
||||||
return string
|
return string
|
||||||
|
|
||||||
class code:
|
class code:
|
||||||
|
Loading…
Reference in New Issue
Block a user