mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-08-25 21:51:51 +02:00
Update format
This commit is contained in:
parent
5e1d372503
commit
50bb65cbe8
@ -40,7 +40,7 @@ draft: false
|
||||
var els=[];
|
||||
md.push(["Title",dat.title]);
|
||||
md.push(["Code",dat.code]);
|
||||
md.push(["Geometry",dat.geometry])
|
||||
md.push(["ZPE geometry",dat.ZPE])
|
||||
md.push(["Method",dat.method])
|
||||
md.push(["Basis",dat.basis]);
|
||||
md.push(["DOI",dat.doi]);
|
||||
|
@ -4,9 +4,9 @@
|
||||
# ZPE : B3LYP,6-31+G*
|
||||
# doi : 10.1021/acs.jctc.8b00406
|
||||
|
||||
# start end data
|
||||
# start end Energes (eV)
|
||||
########################################## ########################################## #######################
|
||||
# Spin number Symm geom Spin number Symm geom E_abs Delta_ZPE E_Fluo
|
||||
# Spin number Symm geom Spin number Symm geom E_abs E_Fluo Delta_ZPE
|
||||
1 1 A_1 C_2V,CC3,aug-cc-pVTZ 1 1 B_1 C_2V,CC3,aug-cc-pVTZ 7.51
|
||||
1 1 A_1 C_2V,CC3,aug-cc-pVTZ 1 1 A_2 C_2V,CC3,aug-cc-pVTZ 9.29
|
||||
1 1 A_1 C_2V,CC3,aug-cc-pVTZ 1 2 A_1 C_2V,CC3,aug-cc-pVTZ 9.92
|
||||
|
@ -11,38 +11,35 @@ class code {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
class basis {
|
||||
constructor(name,type){
|
||||
class method {
|
||||
constructor(name,basis){
|
||||
this.name=name;
|
||||
this.type=type;
|
||||
this.basis=basis;
|
||||
}
|
||||
toString() {
|
||||
var str=this.name;
|
||||
if (this.type) {
|
||||
str=str+' ('+this.type+')';
|
||||
if (this.name) {
|
||||
str=str+'/'+this.basis;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
class geometry {
|
||||
constructor(method,basis){
|
||||
this.method=method
|
||||
this.basis=basis
|
||||
constructor(symetry,method){
|
||||
this.symetry=method
|
||||
this.symetry=method
|
||||
}
|
||||
toString() {
|
||||
var str=this.method;
|
||||
if (this.basis) {
|
||||
str=str+'/'+this.basis.name;
|
||||
}
|
||||
return str;
|
||||
toString(){
|
||||
return String.raw `${this.symetry}-${this.method}`
|
||||
}
|
||||
}
|
||||
|
||||
class state{
|
||||
constructor(number,multiplicity,symetry){
|
||||
constructor(number,multiplicity,symetry,geometry){
|
||||
this.number=number;
|
||||
this.multiplicity=multiplicity;
|
||||
this.symetry=symetry;
|
||||
this.geometry=geometry
|
||||
};
|
||||
toString() {
|
||||
var str=this.number+ ' ^'+this.multiplicity+this.symetry;
|
||||
@ -79,9 +76,8 @@ class data {
|
||||
constructor(){
|
||||
this.title='';
|
||||
this.code=null;
|
||||
this.geometry=null;
|
||||
this.ZPE=null;
|
||||
this.method=null;
|
||||
this.basis=null;
|
||||
this.doi=null;
|
||||
this.excitations=[];
|
||||
}
|
||||
@ -114,30 +110,13 @@ class data {
|
||||
dat.code=new code(vals[0],null);
|
||||
}
|
||||
break;
|
||||
case "geometry":
|
||||
var vals=val.split(",")
|
||||
switch(vals.length){
|
||||
case 1:
|
||||
dat.geometry=new geometry(vals[0],null);
|
||||
break;
|
||||
case 2:
|
||||
dat.geometry=new geometry(vals[0],new basis(vals[1],null));
|
||||
break;
|
||||
case 3:
|
||||
dat.geometry=new geometry(vals[0],new basis(vals[1],vals[2]));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "method":
|
||||
dat.method=val;
|
||||
break;
|
||||
case "basis":
|
||||
var vals=val.split(",")
|
||||
if(vals.length>=2){
|
||||
dat.basis=new basis(vals[0],vals[1])
|
||||
} else {
|
||||
dat.basis=new basis(vals[0],null);
|
||||
}
|
||||
dat.method=new method(vals[0],vals[1]);
|
||||
break;
|
||||
case "zpe":
|
||||
var vals=val.split(",")
|
||||
dat.ZPE=new method(vals[0],vals[1]);
|
||||
break;
|
||||
case "doi":
|
||||
dat.doi=new doi(val);
|
||||
@ -147,9 +126,11 @@ class data {
|
||||
}
|
||||
function readrow(line){
|
||||
var vals=line.split(/\s+/);
|
||||
var start=new state(parseInt(vals[0],10),parseInt(vals[1],10),vals[2]);
|
||||
var end=new state(parseInt(vals[3],10),vals[4],vals[5]);
|
||||
var ex=new excitation(start,end,parseFloat(vals[6],10));
|
||||
var geom=vals[3].split(",")
|
||||
var start=new state(parseInt(vals[0],10),parseInt(vals[1],10),vals[2], new geometry(geom[0],new method(geom[1],geom[2])));
|
||||
geom=vals[7].split(",")
|
||||
var end=new state(parseInt(vals[4],10),vals[5],vals[6], new geometry(geom[0],new method(geom[1],geom[2])));
|
||||
var ex=new excitation(start,end,parseFloat(vals[8],10));
|
||||
dat.excitations.push(ex);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user