10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-03 18:06:06 +02:00

Add geometry support

This commit is contained in:
Mickaël Véril 2019-09-16 11:57:52 +02:00
parent 51a590e875
commit fe72aca3fe
2 changed files with 29 additions and 0 deletions

View File

@ -40,6 +40,7 @@ draft: false
var els=[];
md.push(["Title",dat.title]);
md.push(["Code",dat.code]);
md.push(["Geometry",dat.geometry])
md.push(["Method",dat.method])
md.push(["Basis",dat.basis]);
md.push(["DOI",dat.doi]);

View File

@ -24,6 +24,19 @@ class basis {
return str;
}
}
class geometry {
constructor(method,basis){
this.method=method
this.basis=basis
}
toString() {
var str=this.method;
if (this.basis) {
str=str+'/'+this.basis.name;
}
return str;
}
}
class state{
constructor(number,multiplicity,symetry){
@ -66,6 +79,7 @@ class data {
constructor(){
this.title='';
this.code=null;
this.geometry=null;
this.method=null;
this.basis=null;
this.doi=null;
@ -100,6 +114,20 @@ 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;