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 655649b57ce55414c58c8b9f2210c09ab014b87d..c9c30919f6348fc9a546dd201afa4a4be00c9b5f 100644 --- a/src/mol-model/structure/model/properties/utils/secondary-structure.ts +++ b/src/mol-model/structure/model/properties/utils/secondary-structure.ts @@ -43,12 +43,6 @@ const hbondEnergyCutoff = -0.5 /** prevent extremely low hbond energies */ const hbondEnergyMinimal = -9.9 -export function computeSecondaryStructure(hierarchy: AtomicHierarchy, - conformation: AtomicConformation): SecondaryStructure { - // TODO use Zhang-Skolnik for CA alpha only parts or for coarse parts with per-residue elements - return computeModelDSSP(hierarchy, conformation) -} - interface DSSPContext { /** Whether to use the old DSSP convention for the annotation of turns and helices, causes them to be two residues shorter */ oldDefinition: boolean, @@ -119,10 +113,11 @@ namespace DSSPType { } } -export function computeModelDSSP(hierarchy: AtomicHierarchy, +export function computeSecondaryStructure(hierarchy: AtomicHierarchy, conformation: AtomicConformation, oldDefinition = true, - oldOrdering = true) { + oldOrdering = true): SecondaryStructure { + // TODO use Zhang-Skolnik for CA alpha only parts or for coarse parts with per-residue elements // console.log(`calculating secondary structure elements using ${ oldDefinition ? 'old' : 'revised'} definition and ${ oldOrdering ? 'old' : 'revised'} ordering of secondary structure 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 927e24c14132b9746c37f2d90b2764b6c47652ad..146ef8c6e1fe3dee3138f0d9f891aaa7e476b6fe 100644 --- a/src/tests/browser/render-structure.ts +++ b/src/tests/browser/render-structure.ts @@ -12,7 +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 { computeModelDSSP } from 'mol-model/structure/model/properties/utils/secondary-structure'; +import { computeSecondaryStructure } from 'mol-model/structure/model/properties/utils/secondary-structure'; const parent = document.getElementById('app')! parent.style.width = '100%' @@ -65,7 +65,7 @@ async function init() { const cif = await downloadFromPdb('1acj') const models = await getModels(cif) console.time('computeModelDSSP') - const secondaryStructure = computeModelDSSP(models[0].atomicHierarchy, + const secondaryStructure = computeSecondaryStructure(models[0].atomicHierarchy, models[0].atomicConformation) console.timeEnd('computeModelDSSP'); (models[0].properties as any).secondaryStructure = secondaryStructure