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

added entityKey support for coarse element properties

parent 2b6c941e
No related branches found
No related tags found
No related merge requests found
...@@ -89,7 +89,16 @@ const coarse = { ...@@ -89,7 +89,16 @@ const coarse = {
gaussian_covariance_matrix: Element.property(l => !Unit.isGaussians(l.unit) ? notCoarse('gaussians') : l.unit.coarseConformation.covariance_matrix[l.element]) gaussian_covariance_matrix: Element.property(l => !Unit.isGaussians(l.unit) ? notCoarse('gaussians') : l.unit.coarseConformation.covariance_matrix[l.element])
} }
function eK(l: Element.Location) { return !Unit.isAtomic(l.unit) ? notAtomic() : l.unit.model.atomicHierarchy.entityKey[l.unit.chainIndex[l.element]]; } function eK(l: Element.Location) {
switch (l.unit.kind) {
case Unit.Kind.Atomic:
return l.unit.model.atomicHierarchy.entityKey[l.unit.chainIndex[l.element]]
case Unit.Kind.Spheres:
return l.unit.model.coarseHierarchy.spheres.entityKey[l.element]
case Unit.Kind.Gaussians:
return l.unit.model.coarseHierarchy.gaussians.entityKey[l.element]
}
}
const entity = { const entity = {
key: eK, key: eK,
......
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