mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-25 13:53:48 +01:00
Add geometry support
This commit is contained in:
parent
51a590e875
commit
fe72aca3fe
@ -40,6 +40,7 @@ draft: false
|
|||||||
var els=[];
|
var els=[];
|
||||||
md.push(["Title",dat.title]);
|
md.push(["Title",dat.title]);
|
||||||
md.push(["Code",dat.code]);
|
md.push(["Code",dat.code]);
|
||||||
|
md.push(["Geometry",dat.geometry])
|
||||||
md.push(["Method",dat.method])
|
md.push(["Method",dat.method])
|
||||||
md.push(["Basis",dat.basis]);
|
md.push(["Basis",dat.basis]);
|
||||||
md.push(["DOI",dat.doi]);
|
md.push(["DOI",dat.doi]);
|
||||||
|
@ -24,6 +24,19 @@ class basis {
|
|||||||
return str;
|
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{
|
class state{
|
||||||
constructor(number,multiplicity,symetry){
|
constructor(number,multiplicity,symetry){
|
||||||
@ -66,6 +79,7 @@ class data {
|
|||||||
constructor(){
|
constructor(){
|
||||||
this.title='';
|
this.title='';
|
||||||
this.code=null;
|
this.code=null;
|
||||||
|
this.geometry=null;
|
||||||
this.method=null;
|
this.method=null;
|
||||||
this.basis=null;
|
this.basis=null;
|
||||||
this.doi=null;
|
this.doi=null;
|
||||||
@ -100,6 +114,20 @@ class data {
|
|||||||
dat.code=new code(vals[0],null);
|
dat.code=new code(vals[0],null);
|
||||||
}
|
}
|
||||||
break;
|
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":
|
case "method":
|
||||||
dat.method=val;
|
dat.method=val;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user