Browse Source

fix wedges direction

Alexander Rose 6 years ago
parent
commit
dabed7f56e

+ 1 - 1
src/mol-geo/representation/structure/visual/polymer-direction-wedge.ts

@@ -73,7 +73,7 @@ async function createPolymerDirectionWedgeMesh(ctx: RuntimeContext, unit: Unit,
             }
 
             Mat4.targetTo(t, v.p3, v.p1, upVec)
-            Mat4.mul(t, t, Mat4.rotY90)
+            Mat4.mul(t, t, Mat4.rotY90Z180)
             Mat4.scale(t, t, Vec3.set(sVec, height, width, depth))
             Mat4.setTranslation(t, v.p2)
             builder.addWedge(t)

+ 2 - 0
src/mol-math/linear-algebra/3d/mat4.ts

@@ -893,6 +893,8 @@ namespace Mat4 {
     export const rotZYZ90: ReadonlyMat4 = Mat4.mul(Mat4.identity(), rotZY90, rotZ90)
     /** Rotation matrix for 90deg around first z-axis and then 180deg around x-axis */
     export const rotZ90X180: ReadonlyMat4 = Mat4.mul(Mat4.identity(), rotZ90, rotX180)
+    /** Rotation matrix for 90deg around first y-axis and then 180deg around z-axis */
+    export const rotY90Z180: ReadonlyMat4 = Mat4.mul(Mat4.identity(), rotY90, rotZ180)
 }
 
 export default Mat4

+ 2 - 2
src/mol-view/stage.ts

@@ -98,7 +98,7 @@ export class Stage {
         // this.loadPdbid('3sn6') // discontinuous chains
         // this.loadPdbid('2zex') // contains carbohydrate polymer
         // this.loadPdbid('3sgj') // contains carbohydrate polymer
-        this.loadPdbid('3ina') // contains GlcN and IdoA
+        // this.loadPdbid('3ina') // contains GlcN and IdoA
         // this.loadPdbid('1umz') // contains Xyl (Xyloglucan)
         // this.loadPdbid('1mfb') // contains Abe
         // this.loadPdbid('2gdu') // contains sucrose
@@ -106,7 +106,7 @@ export class Stage {
         // this.loadPdbid('4zs9') // contains raffinose
         // this.loadPdbid('2yft') // contains kestose
         // this.loadPdbid('2b5t') // contains large carbohydrate polymer
-        // this.loadPdbid('1b5f') // contains carbohydrate with alternate locations
+        this.loadPdbid('1b5f') // contains carbohydrate with alternate locations
         // this.loadMmcifUrl(`../../examples/1cbs_full.bcif`)
         // this.loadMmcifUrl(`../../examples/1cbs_updated.cif`)
         // this.loadMmcifUrl(`../../examples/1crn.cif`)