10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-11-03 20:53:59 +01:00

Fix problem with xyz geometry with the line containing the number of atoms have right extra space are not readed correctly

This commit is contained in:
Mickaël Véril 2020-11-02 15:18:46 +01:00
parent b16bc38a72
commit b535c5dca6

View File

@ -21,7 +21,7 @@ class Geometry {
static loadXYZString(text) { static loadXYZString(text) {
var lines = text.split("\n") var lines = text.split("\n")
var indexes = lines.findAllIndexes((line) => { var indexes = lines.findAllIndexes((line) => {
return line.match(/^\d+$/) return line.match(/^\d+\s*$/)
}) })
indexes.push(lines.length) indexes.push(lines.length)
var geoms = [] var geoms = []