|
@@ -7,7 +7,7 @@
|
|
|
|
|
|
import { SymmetryOperator } from 'mol-math/geometry/symmetry-operator'
|
|
import { SymmetryOperator } from 'mol-math/geometry/symmetry-operator'
|
|
import { Model } from '../model'
|
|
import { Model } from '../model'
|
|
-import { GridLookup3D, Lookup3D, DensityData } from 'mol-math/geometry'
|
|
|
|
|
|
+import { GridLookup3D, Lookup3D } from 'mol-math/geometry'
|
|
import { IntraUnitLinks, computeIntraUnitBonds } from './unit/links'
|
|
import { IntraUnitLinks, computeIntraUnitBonds } from './unit/links'
|
|
import { CoarseElements, CoarseSphereConformation, CoarseGaussianConformation } from '../model/properties/coarse';
|
|
import { CoarseElements, CoarseSphereConformation, CoarseGaussianConformation } from '../model/properties/coarse';
|
|
import { ValueRef } from 'mol-util';
|
|
import { ValueRef } from 'mol-util';
|
|
@@ -18,9 +18,6 @@ import { IntMap, SortedArray } from 'mol-data/int';
|
|
import { hash2, hashFnv32a } from 'mol-data/util';
|
|
import { hash2, hashFnv32a } from 'mol-data/util';
|
|
import { getAtomicPolymerElements, getCoarsePolymerElements, getAtomicGapElements, getCoarseGapElements } from './util/polymer';
|
|
import { getAtomicPolymerElements, getCoarsePolymerElements, getAtomicGapElements, getCoarseGapElements } from './util/polymer';
|
|
import { getNucleotideElements } from './util/nucleotide';
|
|
import { getNucleotideElements } from './util/nucleotide';
|
|
-import { GaussianDensityProps, computeUnitGaussianDensityCached } from './unit/gaussian-density';
|
|
|
|
-import { RuntimeContext } from 'mol-task';
|
|
|
|
-import { WebGLContext } from 'mol-gl/webgl/context';
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* A building block of a structure that corresponds to an atomic or
|
|
* A building block of a structure that corresponds to an atomic or
|
|
@@ -191,10 +188,6 @@ namespace Unit {
|
|
return this.model.atomicHierarchy.residueAtomSegments.index[this.elements[elementIndex]];
|
|
return this.model.atomicHierarchy.residueAtomSegments.index[this.elements[elementIndex]];
|
|
}
|
|
}
|
|
|
|
|
|
- async computeGaussianDensity(props: GaussianDensityProps, ctx: RuntimeContext, webgl?: WebGLContext) {
|
|
|
|
- return computeUnitGaussianDensityCached(this, props, this.props.gaussianDensities, ctx, webgl);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
constructor(id: number, invariantId: number, model: Model, elements: StructureElement.Set, conformation: SymmetryOperator.ArrayMapping<ElementIndex>, props: AtomicProperties) {
|
|
constructor(id: number, invariantId: number, model: Model, elements: StructureElement.Set, conformation: SymmetryOperator.ArrayMapping<ElementIndex>, props: AtomicProperties) {
|
|
this.id = id;
|
|
this.id = id;
|
|
this.invariantId = invariantId;
|
|
this.invariantId = invariantId;
|
|
@@ -215,7 +208,6 @@ namespace Unit {
|
|
polymerElements: ValueRef<SortedArray<ElementIndex> | undefined>
|
|
polymerElements: ValueRef<SortedArray<ElementIndex> | undefined>
|
|
gapElements: ValueRef<SortedArray<ElementIndex> | undefined>
|
|
gapElements: ValueRef<SortedArray<ElementIndex> | undefined>
|
|
nucleotideElements: ValueRef<SortedArray<ElementIndex> | undefined>
|
|
nucleotideElements: ValueRef<SortedArray<ElementIndex> | undefined>
|
|
- gaussianDensities: Map<string, DensityData>
|
|
|
|
}
|
|
}
|
|
|
|
|
|
function AtomicProperties(): AtomicProperties {
|
|
function AtomicProperties(): AtomicProperties {
|
|
@@ -226,7 +218,6 @@ namespace Unit {
|
|
polymerElements: ValueRef.create(void 0),
|
|
polymerElements: ValueRef.create(void 0),
|
|
gapElements: ValueRef.create(void 0),
|
|
gapElements: ValueRef.create(void 0),
|
|
nucleotideElements: ValueRef.create(void 0),
|
|
nucleotideElements: ValueRef.create(void 0),
|
|
- gaussianDensities: new Map()
|
|
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
@@ -280,10 +271,6 @@ namespace Unit {
|
|
return this.kind === Kind.Spheres ? this.model.coarseConformation.spheres : this.model.coarseConformation.gaussians;
|
|
return this.kind === Kind.Spheres ? this.model.coarseConformation.spheres : this.model.coarseConformation.gaussians;
|
|
}
|
|
}
|
|
|
|
|
|
- async computeGaussianDensity(props: GaussianDensityProps, ctx: RuntimeContext, webgl?: WebGLContext): Promise<DensityData> {
|
|
|
|
- return computeUnitGaussianDensityCached(this as Unit.Spheres | Unit.Gaussians, props, this.props.gaussianDensities, ctx, webgl); // TODO get rid of casting
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
constructor(id: number, invariantId: number, model: Model, kind: K, elements: StructureElement.Set, conformation: SymmetryOperator.ArrayMapping<ElementIndex>, props: CoarseProperties) {
|
|
constructor(id: number, invariantId: number, model: Model, kind: K, elements: StructureElement.Set, conformation: SymmetryOperator.ArrayMapping<ElementIndex>, props: CoarseProperties) {
|
|
this.kind = kind;
|
|
this.kind = kind;
|
|
this.id = id;
|
|
this.id = id;
|
|
@@ -299,7 +286,6 @@ namespace Unit {
|
|
|
|
|
|
interface CoarseProperties {
|
|
interface CoarseProperties {
|
|
lookup3d: ValueRef<Lookup3D | undefined>,
|
|
lookup3d: ValueRef<Lookup3D | undefined>,
|
|
- gaussianDensities: Map<string, DensityData>
|
|
|
|
polymerElements: ValueRef<SortedArray<ElementIndex> | undefined>
|
|
polymerElements: ValueRef<SortedArray<ElementIndex> | undefined>
|
|
gapElements: ValueRef<SortedArray<ElementIndex> | undefined>
|
|
gapElements: ValueRef<SortedArray<ElementIndex> | undefined>
|
|
}
|
|
}
|
|
@@ -307,7 +293,6 @@ namespace Unit {
|
|
function CoarseProperties(): CoarseProperties {
|
|
function CoarseProperties(): CoarseProperties {
|
|
return {
|
|
return {
|
|
lookup3d: ValueRef.create(void 0),
|
|
lookup3d: ValueRef.create(void 0),
|
|
- gaussianDensities: new Map(),
|
|
|
|
polymerElements: ValueRef.create(void 0),
|
|
polymerElements: ValueRef.create(void 0),
|
|
gapElements: ValueRef.create(void 0),
|
|
gapElements: ValueRef.create(void 0),
|
|
};
|
|
};
|