2020-09-28 15:39:46 +02:00
|
|
|
class GeometriesLoader{
|
|
|
|
static async loadForAsync(array){
|
|
|
|
var xyzs=[]
|
|
|
|
for (const item of array) {
|
2021-11-09 10:37:33 +01:00
|
|
|
const mymol=moleculeFormater.toFileName(item.molecule)
|
|
|
|
const myset=item.set.replace('#','')
|
2020-09-28 15:39:46 +02:00
|
|
|
try {
|
|
|
|
const mol=await Geometry.loadXYZAsync(`/${myset}/${mymol}.xyz`)
|
2020-11-19 23:56:04 +01:00
|
|
|
xyzs.push(mol)
|
2020-09-28 15:39:46 +02:00
|
|
|
} catch (error) {
|
2021-11-09 10:37:33 +01:00
|
|
|
console.error("Geometry not found",item,error)
|
2020-11-19 23:56:04 +01:00
|
|
|
}
|
2020-09-28 15:39:46 +02:00
|
|
|
}
|
|
|
|
return xyzs.flat()
|
|
|
|
}
|
2020-11-19 23:56:04 +01:00
|
|
|
}
|