From a77d98150cb8627d47fb513a429bc655efcd5ece Mon Sep 17 00:00:00 2001 From: Sebastian Bittrich <bittrich@hs-mittweida.de> Date: Mon, 25 Mar 2019 10:10:53 -0700 Subject: [PATCH] removes minCaDist criterion --- .../model/properties/utils/secondary-structure.ts | 11 ----------- src/tests/browser/render-structure.ts | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) 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 2d6a1153c..bedaa01f0 100644 --- a/src/mol-model/structure/model/properties/utils/secondary-structure.ts +++ b/src/mol-model/structure/model/properties/utils/secondary-structure.ts @@ -216,9 +216,6 @@ namespace DSSPType { /** max distance between two C-alpha atoms to check for hbond */ const caMaxDist = 9.0; -/** min distance between two C-alpha atoms to check for hbond */ -const caMinDist = 0.5; - function calcAtomicTraceLookup3D(hierarchy: AtomicHierarchy, conformation: AtomicConformation) { const { x, y, z } = conformation; const { moleculeType, traceElementIndex } = hierarchy.derived.residue @@ -423,8 +420,6 @@ function calcBackboneHbonds(hierarchy: AtomicHierarchy, conformation: AtomicConf const cPosPrev = Vec3.zero() const oPosPrev = Vec3.zero() - // const caMinDistSq = caMinDist * caMinDist - for (let i = 0, il = proteinResidues.length; i < il; ++i) { const oPI = i const oRI = proteinResidues[i] @@ -446,8 +441,6 @@ function calcBackboneHbonds(hierarchy: AtomicHierarchy, conformation: AtomicConf const { indices, count } = lookup3d.find(caPos[0], caPos[1], caPos[2], caMaxDist) for (let j = 0; j < count; ++j) { - // if (squaredDistances[j] < caMinDist * caMinDist) continue - const nPI = indices[j] // ignore bonds within a residue or to prev or next residue, TODO take chain border into account @@ -584,10 +577,6 @@ function calcHbondEnergy(oPos: Vec3, cPos: Vec3, nPos: Vec3, hPos: Vec3) { const distCN = Vec3.distance(cPos, nPos) const distON = Vec3.distance(oPos, nPos) - if (distOH < caMinDist || distCH < caMinDist || distCN < caMinDist || distON < caMinDist) { - return hbondEnergyMinimal - } - const e1 = Q / distOH - Q / distCH const e2 = Q / distCN - Q / distON const e = e1 + e2 diff --git a/src/tests/browser/render-structure.ts b/src/tests/browser/render-structure.ts index 927e24c14..1436e7517 100644 --- a/src/tests/browser/render-structure.ts +++ b/src/tests/browser/render-structure.ts @@ -62,7 +62,7 @@ function getCartoonRepr() { } async function init() { - const cif = await downloadFromPdb('1acj') + const cif = await downloadFromPdb('3j3q') const models = await getModels(cif) console.time('computeModelDSSP') const secondaryStructure = computeModelDSSP(models[0].atomicHierarchy, -- GitLab