diff --git a/src/apps/cif2bcif/field-classifier.ts b/src/apps/cif2bcif/field-classifier.ts index f7caac96ae1c49f58d8f5dd1edb25772d133d52b..5bf4de2b37527c10975f0cf42470278eeb632f13 100644 --- a/src/apps/cif2bcif/field-classifier.ts +++ b/src/apps/cif2bcif/field-classifier.ts @@ -146,6 +146,9 @@ namespace FloatClassifier { } export function classify(data: number[], name: string) { + // if a vector/matrix, do not reduce precision + if (name.indexOf('[') > 0) return { encoder: E.by(E.byteArray), typedArray: Float64Array }; + let dc = 10; for (let i = 0, n = data.length; i < n; i++) dc = Math.max(dc, digitCount(data[i]));