mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-25 05:43:46 +01:00
Add geometry support
This commit is contained in:
parent
51a590e875
commit
fe72aca3fe
@ -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]);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user