Skip to content
Snippets Groups Projects
Commit fe0d4dc1 authored by Alexander Rose's avatar Alexander Rose
Browse files

warn (not throw) about erroneous symmetry matrix

- #303
parent 812eb0ef
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ Note that since we don't clearly distinguish between a public and private interf ...@@ -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) - 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 & qmean score: coloring, repr presets, molql symbol, loci labels (including avg for mutli-residue selections)
- pLDDT: selection query - pLDDT: selection query
- Warn about erroneous symmetry operator matrix (instead of throwing an error)
## [v3.0.0-dev.5] - 2021-12-16 ## [v3.0.0-dev.5] - 2021-12-16
......
...@@ -59,7 +59,9 @@ namespace SymmetryOperator { ...@@ -59,7 +59,9 @@ namespace SymmetryOperator {
ncsId = ncsId || -1; ncsId = ncsId || -1;
const suffix = getSuffix(info); const suffix = getSuffix(info);
if (Mat4.isIdentity(matrix)) return { name, assembly, matrix, inverse: Mat4.identity(), isIdentity: true, hkl: _hkl, spgrOp, ncsId, suffix }; 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 }; return { name, assembly, matrix, inverse: Mat4.invert(Mat4(), matrix), isIdentity: false, hkl: _hkl, spgrOp, ncsId, suffix };
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment