Skip to content
Snippets Groups Projects
Commit cf993ab0 authored by Sebastian Bittrich's avatar Sebastian Bittrich
Browse files

better add files to commit

parent e02fefa6
No related branches found
No related tags found
No related merge requests found
......@@ -39,11 +39,10 @@ function normalizeAccessibleSurfaceArea(ctx: AccessibleSurfaceAreaContext) {
const maxAsa = (MaxAsa as any)[residues.label_comp_id.value(i)];
relativeAccessibleSurfaceArea[i] = accessibleSurfaceArea[i] / (maxAsa === undefined ? DefaultMaxAsa : maxAsa);
}
}
/**
* notes on performance - scenario: compute for first 10 units of 3j3q
* notes on performance - scenario: compute for first 10 units of 3j3q @ 960 sphere points
* lookup3d + refinement: ~5000ms
* naive approach: ~5600ms - higher variance
*/
......@@ -65,7 +64,7 @@ function computePerResidue(ctx: AccessibleSurfaceAreaContext) { // runs at rough
const radii1 = atomRadius[aI];
if (radii1 === missingAccessibleSurfaceAreaValue) continue;
// find suitable neighbors by lookup
// find suitable neighbor candidates by lookup
const { indices, count } = lookup3d.find(x[aI], y[aI], z[aI], maxLookupRadius);
position(aI, a1Pos);
......@@ -109,6 +108,8 @@ function computePerResidue(ctx: AccessibleSurfaceAreaContext) { // runs at rough
const value = cons * accessiblePointCount * r * r;
accessibleSurfaceArea[residueIndex[aI]] += value;
// +30% computation by normalizing partial solutions
// relativeAccessibleSurfaceArea[residueIndex[aI]] += value * (NormalizationFactors as any)[residueIndex[aI]];
}
}
......@@ -244,7 +245,7 @@ function generateSpherePoints(numberOfSpherePoints: number): Vec3[] {
const y = k * offset - 1.0 + (offset / 2.0);
const r = Math.sqrt(1.0 - y * y);
const phi = k * inc;
points[points.length] = [Math.cos(phi), y, Math.sin(phi) * r] as Vec3;
points[points.length] = [Math.cos(phi) * r, y, Math.sin(phi) * r] as Vec3;
}
return points;
}
......
......@@ -39,7 +39,7 @@ export function AccessibleSurfaceAreaColorTheme(ctx: ThemeDataContext, props: PD
color = (location: Location): Color => {
if (StructureElement.isLocation(location)) {
if (Unit.isAtomic(location.unit)) {
const value = location.unit.accessibleSurfaceArea.accessibleSurfaceArea[location.unit.residueIndex[location.element]];
const value = location.unit.accessibleSurfaceArea.relativeAccessibleSurfaceArea[location.unit.residueIndex[location.element]];
return value !== missingAccessibleSurfaceAreaValue ? scaleColor(value) : DefaultColor;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment