10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 05:43:46 +01:00

Fix excitation type parsing

This commit is contained in:
Mickaël Véril 2020-01-06 14:35:29 +01:00
parent 7d2f503388
commit f1d24fb938

View File

@ -118,26 +118,26 @@ class excitationBase {
for (const ty of tys) {
if (ty.includes(arrow)) {
const [initialt, finalt] = ty.split(arrow, 2)
const initialts = initialt.split(",")
if (initialts.length==2||initialts.length==2){
this.type.Value = this.type | excitationTypes.Simple
}
else{
const initialts = initialt.split(",").map(x => x.trim())
const finalts = finalt.split(",").map(x => x.trim())
if (initialts.length == 2 && finalt.length == 2) {
this.type.Value = this.type | excitationTypes.Double
}
const finalts = finalt.split(",").map(x => x.trim())
else if (initialts.length == 1 && finalt.length == 1) {
this.type.Value = this.type | excitationTypes.Single
}
if (initialts.includes("n") && finalts.includes(String.raw`\pi^\star`)) {
this.type.Value = this.type | excitationTypes.PiPis
this.type.Value = this.type | excitationTypes.nPis
} else if (initialts.includes(String.raw`\pi`) in initialts && finals.includes(String.raw`\pi^\star`)) {
this.type.Value = this.type | excitationTypes.PiPis
} else if (ty.includes(String.raw`\pi^\star`)) {
}
} else if (ty.includes(String.raw`\mathrm{R}`)) {
this.type.Value = this.type | excitationTypes.RYDBERG
} else if (ty.includes(String.raw`\mathrm{V}`)) {
this.type.Value = this.type | excitationTypes.VALENCE
}
}
}
}
this.T1 = T1
}
}