diff --git a/src/mol-model/structure/model/properties/utils/secondary-structure.ts b/src/mol-model/structure/model/properties/utils/secondary-structure.ts index d21ef0b8c9054a6b62f98269124d3fbdc2536e8e..1398c4a240ebf623c615b280de6db4188fb4fe2d 100644 --- a/src/mol-model/structure/model/properties/utils/secondary-structure.ts +++ b/src/mol-model/structure/model/properties/utils/secondary-structure.ts @@ -120,7 +120,10 @@ export type SecondaryStructureComputationParams = typeof SecondaryStructureCompu export function computeSecondaryStructure(hierarchy: AtomicHierarchy, conformation: AtomicConformation, - params: PD.Values<SecondaryStructureComputationParams>): SecondaryStructure { + params?: PD.Values<SecondaryStructureComputationParams>): SecondaryStructure { + // TODO is this the best way? is should be possible to provide partial 'overrides' of default values + if (!params) params = PD.getDefaultValues(SecondaryStructureComputationParams); + // TODO use Zhang-Skolnik for CA alpha only parts or for coarse parts with per-residue elements const { lookup3d, proteinResidues } = calcAtomicTraceLookup3D(hierarchy, conformation) const backboneIndices = calcBackboneAtomIndices(hierarchy, proteinResidues) diff --git a/src/tests/browser/render-structure.ts b/src/tests/browser/render-structure.ts index 4fcdd704d0557c9073165155b2f2c3a3ef17c182..146ef8c6e1fe3dee3138f0d9f891aaa7e476b6fe 100644 --- a/src/tests/browser/render-structure.ts +++ b/src/tests/browser/render-structure.ts @@ -12,8 +12,7 @@ import { ColorTheme } from 'mol-theme/color'; import { SizeTheme } from 'mol-theme/size'; import { CartoonRepresentationProvider } from 'mol-repr/structure/representation/cartoon'; import { trajectoryFromMmCIF } from 'mol-model-formats/structure/mmcif'; -import { computeSecondaryStructure, SecondaryStructureComputationParams } from 'mol-model/structure/model/properties/utils/secondary-structure'; -import { ParamDefinition as PD } from 'mol-util/param-definition' +import { computeSecondaryStructure } from 'mol-model/structure/model/properties/utils/secondary-structure'; const parent = document.getElementById('app')! parent.style.width = '100%' @@ -67,8 +66,7 @@ async function init() { const models = await getModels(cif) console.time('computeModelDSSP') const secondaryStructure = computeSecondaryStructure(models[0].atomicHierarchy, - models[0].atomicConformation, - PD.getDefaultValues(SecondaryStructureComputationParams) /*{ oldDefinition: false, oldOrdering: false }*/) + models[0].atomicConformation) console.timeEnd('computeModelDSSP'); (models[0].properties as any).secondaryStructure = secondaryStructure const structure = await getStructure(models[0])