mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-27 06:43:47 +01:00
20 lines
531 B
JavaScript
20 lines
531 B
JavaScript
|
if (!Geometry.prototype.parseMetadata) {
|
||
|
Geometry.prototype.parseMetadata = function () {
|
||
|
const Ametadata = this.comment.split(",")
|
||
|
const molecule = Ametadata[0]
|
||
|
const stateRegExp = /^\^(\d+)(.+)$/
|
||
|
const m = Ametadata[1].match(stateRegExp)
|
||
|
const mul = parseInt(m[1],10)
|
||
|
const sym = m[2]
|
||
|
var meth = null
|
||
|
if (Ametadata.length>2) {
|
||
|
meth = new method(Ametadata[2],Ametadata[3])
|
||
|
}
|
||
|
return {
|
||
|
molecule:molecule,
|
||
|
multiplicity:mul,
|
||
|
symmetry:sym,
|
||
|
method:meth
|
||
|
}
|
||
|
}
|
||
|
}
|