Browse Source

omits multiple entrypoints

Sebastian Bittrich 6 years ago
parent
commit
a2da764855

+ 3 - 8
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)

+ 2 - 2
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