Browse Source

removes safety net to avoid dying for 3j3q

Sebastian Bittrich 6 years ago
parent
commit
0c3d4b4ce1

+ 26 - 26
src/mol-model/structure/structure/unit/accessible-surface-area/compute.ts

@@ -206,34 +206,34 @@ function initialize(unit: Unit.Atomic, params: AccessibleSurfaceAreaComputationP
     }
 }
 
-class Count {
-    static count = 10;
-    get count(): number {
-        return Count.count;
-    }
-    set count(v: number) {
-        Count.count = v;
-    }
-}
+// class Count {
+//     static count = 10;
+//     get count(): number {
+//         return Count.count;
+//     }
+//     set count(v: number) {
+//         Count.count = v;
+//     }
+// }
 
 function computeAccessibleSurfaceArea(unit: Unit.Atomic, params?: Partial<AccessibleSurfaceAreaComputationParameters>): AccessibleSurfaceArea {
-    const count = new Count();
-    count.count = count.count - 1;
-    if (count.count > 0) {
-        console.log(`computing accessible surface area for unit #${ unit.id + 1 }`);
-        return _computeAccessibleSurfaceArea(unit, {
-            numberOfSpherePoints: (params && params.numberOfSpherePoints) || 92 /* original value Shrake, A. & Rupley, J. A. (1973) J. Mol. Biol. 79: 92, BioJava: 960, EPPIC: 3000 */ ,
-            /** 92: 1600ms, 960: 5000ms, 3000: 13000ms */
-            probeSize: (params && params.probeSize) || 1.4
-        });
-    } else {
-        return {
-            atomRadius: [],
-            accessibleSurfaceArea: [],
-            relativeAccessibleSurfaceArea: [],
-            buried: void 0
-        }
-    }
+    // const count = new Count();
+    // count.count = count.count - 1;
+    // if (count.count > 0) {
+    console.log(`computing accessible surface area for unit #${ unit.id + 1 }`);
+    return _computeAccessibleSurfaceArea(unit, {
+        numberOfSpherePoints: (params && params.numberOfSpherePoints) || 92 /* original value Shrake, A. & Rupley, J. A. (1973) J. Mol. Biol. 79: 92, BioJava: 960, EPPIC: 3000 */ ,
+        /** 92: 1600ms, 960: 5000ms, 3000: 13000ms */
+        probeSize: (params && params.probeSize) || 1.4
+    });
+    // } else {
+    //     return {
+    //         atomRadius: [],
+    //         accessibleSurfaceArea: [],
+    //         relativeAccessibleSurfaceArea: [],
+    //         buried: void 0
+    //     }
+    // }
 }
 
 /** Creates a collection of points on a sphere by the Golden Section Spiral algorithm. */

+ 1 - 1
src/tests/browser/render-structure.ts

@@ -61,7 +61,7 @@ function getCartoonRepr() {
 }
 
 async function init() {
-    const cif = await downloadFromPdb('3j3q')
+    const cif = await downloadFromPdb(/*'3j3q'*/'3j3q')
     const models = await getModels(cif)
 
     const structure = await getStructure(models[0])