Ver Fonte

tweaks; allow higher aspectRatio, use radTodeg

Alexander Rose há 6 anos atrás
pai
commit
abef56479a

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

+ 1 - 1
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)