diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f834fc289fdc36416e4d5d46d0479bf6a2ad8ff..a4fa1d6befef858aa55743dbf6bff1b13005f3a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ Note that since we don't clearly distinguish between a public and private interf - Add QualityAssessment extension (using data from ma_qa_metric_local mmcif category) - pLDDT & qmean score: coloring, repr presets, molql symbol, loci labels (including avg for mutli-residue selections) - pLDDT: selection query +- Warn about erroneous symmetry operator matrix (instead of throwing an error) ## [v3.0.0-dev.5] - 2021-12-16 diff --git a/src/mol-math/geometry/symmetry-operator.ts b/src/mol-math/geometry/symmetry-operator.ts index d1257fc923ca36c09cd2d8ef687d2b0bcbb3e3cb..1742375dc1d92d5b44df422e359530376400483b 100644 --- a/src/mol-math/geometry/symmetry-operator.ts +++ b/src/mol-math/geometry/symmetry-operator.ts @@ -59,7 +59,9 @@ namespace SymmetryOperator { ncsId = ncsId || -1; const suffix = getSuffix(info); if (Mat4.isIdentity(matrix)) return { name, assembly, matrix, inverse: Mat4.identity(), isIdentity: true, hkl: _hkl, spgrOp, ncsId, suffix }; - if (!Mat4.isRotationAndTranslation(matrix, RotationTranslationEpsilon)) throw new Error(`Symmetry operator (${name}) must be a composition of rotation and translation.`); + if (!Mat4.isRotationAndTranslation(matrix, RotationTranslationEpsilon)) { + console.warn(`Symmetry operator (${name}) should be a composition of rotation and translation.`); + } return { name, assembly, matrix, inverse: Mat4.invert(Mat4(), matrix), isIdentity: false, hkl: _hkl, spgrOp, ncsId, suffix }; }