Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
cf993ab0
Commit
cf993ab0
authored
6 years ago
by
Sebastian Bittrich
Browse files
Options
Downloads
Patches
Plain Diff
better add files to commit
parent
e02fefa6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mol-model/structure/structure/unit/accessible-surface-area/compute.ts
+5
-4
5 additions, 4 deletions
...ructure/structure/unit/accessible-surface-area/compute.ts
src/mol-theme/color/accessible-surface-area.ts
+1
-1
1 addition, 1 deletion
src/mol-theme/color/accessible-surface-area.ts
with
6 additions
and
5 deletions
src/mol-model/structure/structure/unit/accessible-surface-area/compute.ts
+
5
−
4
View file @
cf993ab0
...
...
@@ -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
candidate
s 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
;
}
...
...
This diff is collapsed.
Click to expand it.
src/mol-theme/color/accessible-surface-area.ts
+
1
−
1
View file @
cf993ab0
...
...
@@ -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
.
a
ccessibleSurfaceArea
[
location
.
unit
.
residueIndex
[
location
.
element
]];
const
value
=
location
.
unit
.
accessibleSurfaceArea
.
relativeA
ccessibleSurfaceArea
[
location
.
unit
.
residueIndex
[
location
.
element
]];
return
value
!==
missingAccessibleSurfaceAreaValue
?
scaleColor
(
value
)
:
DefaultColor
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment