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
e403c371
Commit
e403c371
authored
6 years ago
by
Sebastian Bittrich
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
parent
a040cde9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mol-model/structure/model/properties/utils/accessible-surface-area.ts
+7
-15
7 additions, 15 deletions
...ructure/model/properties/utils/accessible-surface-area.ts
with
7 additions
and
15 deletions
src/mol-model/structure/model/properties/utils/accessible-surface-area.ts
+
7
−
15
View file @
e403c371
import
{
Vec3
}
from
'
mol-math/linear-algebra
'
;
import
{
AtomicHierarchy
,
AtomicConformation
}
from
'
../atomic
'
;
import
{
ElementSymbol
,
VdwRadii
,
MaxAsa
,
DefaultMaxAsa
}
from
'
../../types
'
;
import
{
ElementSymbol
,
MaxAsa
,
DefaultMaxAsa
,
MoleculeType
}
from
'
../../types
'
;
import
{
VdwRadius
}
from
'
../atomic/measures
'
;
const
defaultNumberOfPoints
=
960
;
const
defaultProbeSize
=
1.4
;
...
...
@@ -24,24 +25,14 @@ export function computeModelASA(hierarchy: AtomicHierarchy, conformation: Atomic
conformation
}
return
calculateASA
(
ctx
);
}
const
valueForIgnoredAtom
=
-
1.0
;
function
calculateASA
(
ctx
:
ASAContext
)
{
const
{
probeSize
,
spherePoints
,
cons
}
=
ctx
;
const
{
atoms
,
residues
,
residueAtomSegments
,
derived
}
=
ctx
.
hierarchy
;
const
{
type_symbol
}
=
atoms
;
const
{
x
,
y
,
z
}
=
ctx
.
conformation
;
const
radii
:
number
[]
=
[];
// const atomAsa: number[] = [];
const
residueAsa
:
number
[]
=
[];
console
.
log
(
ctx
.
hierarchy
);
console
.
log
(
ctx
.
conformation
);
const
position
=
(
i
:
number
,
v
:
Vec3
)
=>
Vec3
.
set
(
v
,
x
[
i
],
y
[
i
],
z
[
i
]);
const
a1Pos
=
Vec3
.
zero
();
const
a2Pos
=
Vec3
.
zero
();
...
...
@@ -59,7 +50,7 @@ function calculateASA(ctx: ASAContext) {
const
groupIndex
=
residueAtomSegments
.
index
[
i
];
// skip entities not part of a peptide chain
if
(
derived
.
residue
.
moleculeType
[
groupIndex
]
!==
4
)
{
if
(
derived
.
residue
.
moleculeType
[
groupIndex
]
!==
MoleculeType
.
protein
)
{
radii
[
radii
.
length
]
=
valueForIgnoredAtom
;
continue
;
}
...
...
@@ -144,10 +135,12 @@ function calculateASA(ctx: ASAContext) {
residueAsa
[
i
]
/=
(
maxAsa
===
undefined
?
DefaultMaxAsa
:
maxAsa
);
}
//
console.log(residueAsa);
console
.
log
(
residueAsa
);
return
residueAsa
;
}
const
valueForIgnoredAtom
=
-
1.0
;
/**
* Gets the van der Waals radius of the given atom following the values defined by Chothia (1976)
* J.Mol.Biol.105,1-14. NOTE: the vdw values defined by the paper assume no Hydrogens and thus "inflates" slightly
...
...
@@ -178,8 +171,7 @@ function determineRadius(atomId: string, element: ElementSymbol, compId: string)
}
}
}
// TODO could potentially use logging or error thrown
return
(
VdwRadii
as
any
)[
atomId
];
return
VdwRadius
(
element
);
}
/** Creates a collection of points on a sphere by the Golden Section Spiral algorithm. */
...
...
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