From abef56479a4f2592b79d1b901b7525f01eb7e598 Mon Sep 17 00:00:00 2001 From: Alexander Rose <alex.rose@rcsb.org> Date: Thu, 18 Apr 2019 09:40:31 -0700 Subject: [PATCH] tweaks; allow higher aspectRatio, use radTodeg --- .../structure/model/properties/utils/secondary-structure.ts | 3 ++- src/mol-repr/structure/visual/polymer-trace-mesh.ts | 2 +- 2 files changed, 3 insertions(+), 2 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 e61dd4241..7dcd761b8 100644 --- a/src/mol-model/structure/model/properties/utils/secondary-structure.ts +++ b/src/mol-model/structure/model/properties/utils/secondary-structure.ts @@ -16,6 +16,7 @@ import { BitFlags } from 'mol-util'; import { ElementIndex } from 'mol-model/structure/model/indexing'; import { AtomicHierarchy, AtomicConformation } from '../atomic'; import { ParamDefinition as PD } from 'mol-util/param-definition' +import { radToDeg } from 'mol-math/misc'; /** * TODO bugs to fix: @@ -335,7 +336,7 @@ function assignBends(ctx: DSSPContext) { Vec3.sub(caMinus2, caPosPrev2, caPos) Vec3.sub(caPlus2, caPos, caPosNext2) - const angle = Vec3.angle(caMinus2, caPlus2) * 360 / (2 * Math.PI) + const angle = radToDeg(Vec3.angle(caMinus2, caPlus2)) if (angle && angle > 70.00) { flags[i] |= DSSPType.Flag.S } diff --git a/src/mol-repr/structure/visual/polymer-trace-mesh.ts b/src/mol-repr/structure/visual/polymer-trace-mesh.ts index 9fafb82b8..8f4f73616 100644 --- a/src/mol-repr/structure/visual/polymer-trace-mesh.ts +++ b/src/mol-repr/structure/visual/polymer-trace-mesh.ts @@ -22,7 +22,7 @@ export const PolymerTraceMeshParams = { sizeFactor: PD.Numeric(0.2, { min: 0, max: 10, step: 0.01 }), linearSegments: PD.Numeric(8, { min: 1, max: 48, step: 1 }), radialSegments: PD.Numeric(16, { min: 3, max: 56, step: 1 }), - aspectRatio: PD.Numeric(5, { min: 0.1, max: 5, step: 0.1 }), + aspectRatio: PD.Numeric(5, { min: 0.1, max: 10, step: 0.1 }), arrowFactor: PD.Numeric(1.5, { min: 0.1, max: 5, step: 0.1 }), } export const DefaultPolymerTraceMeshProps = PD.getDefaultValues(PolymerTraceMeshParams) -- GitLab