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

removed gaussian density ignoreCache param

parent bd1b07ad
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,6 @@ export function GaussianDensityPointVisual(): UnitsVisual<GaussianDensityPointPa
if (newProps.radiusOffset !== currentProps.radiusOffset) state.createGeometry = true
if (newProps.smoothness !== currentProps.smoothness) state.createGeometry = true
if (newProps.useGpu !== currentProps.useGpu) state.createGeometry = true
if (newProps.ignoreCache !== currentProps.ignoreCache) state.createGeometry = true
}
})
}
\ No newline at end of file
......@@ -52,7 +52,6 @@ export function GaussianSurfaceVisual(): UnitsVisual<GaussianSurfaceParams> {
if (newProps.radiusOffset !== currentProps.radiusOffset) state.createGeometry = true
if (newProps.smoothness !== currentProps.smoothness) state.createGeometry = true
if (newProps.useGpu !== currentProps.useGpu) state.createGeometry = true
if (newProps.ignoreCache !== currentProps.ignoreCache) state.createGeometry = true
}
})
}
\ No newline at end of file
......@@ -51,7 +51,6 @@ export function GaussianWireframeVisual(): UnitsVisual<GaussianWireframeParams>
if (newProps.radiusOffset !== currentProps.radiusOffset) state.createGeometry = true
if (newProps.smoothness !== currentProps.smoothness) state.createGeometry = true
if (newProps.useGpu !== currentProps.useGpu) state.createGeometry = true
if (newProps.ignoreCache !== currentProps.ignoreCache) state.createGeometry = true
}
})
}
\ No newline at end of file
......@@ -6,8 +6,7 @@
import { Unit, StructureElement, ElementIndex, Structure } from 'mol-model/structure';
import { GaussianDensity } from 'mol-math/geometry/gaussian-density';
import { Task, RuntimeContext } from 'mol-task';
import { DensityData } from 'mol-math/geometry';
import { Task } from 'mol-task';
import { ParamDefinition as PD } from 'mol-util/param-definition';
import { GaussianDensityTexture } from 'mol-math/geometry/gaussian-density/gpu';
import { Texture } from 'mol-gl/webgl/texture';
......@@ -20,7 +19,6 @@ export const GaussianDensityParams = {
radiusOffset: PD.Numeric(0, { min: 0, max: 10, step: 0.1 }),
smoothness: PD.Numeric(1.5, { min: 0.5, max: 2.5, step: 0.1 }),
useGpu: PD.Boolean(false),
ignoreCache: PD.Boolean(false),
}
export const DefaultGaussianDensityProps = PD.getDefaultValues(GaussianDensityParams)
export type GaussianDensityProps = typeof DefaultGaussianDensityProps
......@@ -67,15 +65,6 @@ export function computeUnitGaussianDensityTexture(unit: Unit, props: GaussianDen
});
}
export async function computeUnitGaussianDensityCached(unit: Unit, props: GaussianDensityProps, cache: Map<string, DensityData>, ctx: RuntimeContext, webgl?: WebGLContext) {
const key = `${props.radiusOffset}|${props.resolution}|${props.smoothness}`
let density = cache.get(key)
if (density && !props.ignoreCache) return density
density = await computeUnitGaussianDensity(unit, props, webgl).runInContext(ctx)
if (!props.ignoreCache) cache.set(key, density)
return density
}
//
function getStructureConformationAndRadius(structure: Structure) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment