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
91fff322
Commit
91fff322
authored
6 years ago
by
Sebastian Bittrich
Browse files
Options
Downloads
Patches
Plain Diff
support for nucleotides
parent
472ee474
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mol-model/structure/structure/unit/accessible-surface-area/compute.ts
+28
-9
28 additions, 9 deletions
...ructure/structure/unit/accessible-surface-area/compute.ts
with
28 additions
and
9 deletions
src/mol-model/structure/structure/unit/accessible-surface-area/compute.ts
+
28
−
9
View file @
91fff322
...
...
@@ -8,17 +8,22 @@ import Unit from '../../unit'
import
{
Vec3
}
from
'
mol-math/linear-algebra
'
;
import
{
AccessibleSurfaceAreaComputationParams
,
AccessibleSurfaceArea
,
SolventAccessibility
}
from
'
./data
'
;
import
{
isHydrogen
,
getElementIdx
}
from
'
../links/common
'
;
// TODO these functions are relevant for many tasks: move them somewhere actually common
import
{
MoleculeType
,
ElementSymbol
,
MaxAsa
,
DefaultMaxAsa
}
from
'
mol-model/structure/model/types
'
;
import
{
ElementSymbol
,
MaxAsa
,
DefaultMaxAsa
,
isPolymer
,
isNucleic
}
from
'
mol-model/structure/model/types
'
;
import
{
VdwRadius
}
from
'
mol-model/structure/model/properties/atomic/measures
'
;
import
{
ParamDefinition
as
PD
}
from
'
mol-util/param-definition
'
// Chothia's amino acid atoms vdw radii
const
trigonalCarbonVdw
=
1.76
;
const
tetrahedralCarbonVdw
=
1.87
;
const
trigonalNitrogenVdw
=
1.65
;
const
tetrahedralNitrogenVdw
=
1.50
;
/** deviating radii from definition in types.ts */
const
oxygenVdw
=
1.4
;
const
oxygenVdw
=
1.4
0
;
const
sulfurVdw
=
1.85
;
// Chothia's nucleotide atom vdw radii
const
nucCarbonVdw
=
1.80
;
const
nucNitrogenVdw
=
1.60
;
const
nucPhosphorusVdw
=
1.40
;
const
missingAccessibleSurfaceAreaValue
=
-
1.0
;
interface
AccessibleSurfaceAreaContext
{
...
...
@@ -33,7 +38,7 @@ interface AccessibleSurfaceAreaContext {
buried
?:
Uint8Array
}
/**
/**
* Adapts the BioJava implementation by Jose Duarte. That implementation is based on the publication by Shrake, A., and
* J. A. Rupley. "Environment and Exposure to Solvent of Protein Atoms. Lysozyme and Insulin." JMB (1973).
*/
...
...
@@ -60,8 +65,8 @@ function normalizeAccessibleSurfaceArea(ctx: AccessibleSurfaceAreaContext) {
const
{
accessibleSurfaceArea
,
relativeAccessibleSurfaceArea
}
=
ctx
;
for
(
let
i
=
0
;
i
<
residues
.
label_comp_id
.
rowCount
;
++
i
)
{
// skip entities not part of a p
eptide
chain
if
(
derived
.
residue
.
moleculeType
[
i
]
!==
MoleculeType
.
protein
)
continue
;
// skip entities not part of a p
olymer
chain
if
(
!
isPolymer
(
derived
.
residue
.
moleculeType
[
i
]
)
)
continue
;
const
maxAsa
=
(
MaxAsa
as
any
)[
residues
.
label_comp_id
.
value
(
i
)];
const
rasa
=
accessibleSurfaceArea
!
[
i
]
/
(
maxAsa
===
undefined
?
DefaultMaxAsa
:
maxAsa
);
...
...
@@ -167,8 +172,8 @@ function assignRadiusForHeavyAtoms(ctx: AccessibleSurfaceAreaContext) {
continue
;
}
// skip non-p
eptide
groups
if
(
moleculeType
[
raI
]
!==
MoleculeType
.
protein
)
{
// skip non-p
olymer
groups
if
(
!
isPolymer
(
moleculeType
[
raI
]
)
)
{
ctx
.
atomRadius
[
aI
]
=
missingAccessibleSurfaceAreaValue
;
continue
;
}
...
...
@@ -177,7 +182,7 @@ function assignRadiusForHeavyAtoms(ctx: AccessibleSurfaceAreaContext) {
const
element
=
type_symbol
.
value
(
aI
);
const
resn
=
label_comp_id
.
value
(
raI
)
!
;
ctx
.
atomRadius
[
aI
]
=
determineRadius
(
atomId
,
element
,
resn
);
ctx
.
atomRadius
[
aI
]
=
isNucleic
(
moleculeType
[
raI
])
?
determineRadiusNucl
(
atomId
,
element
,
resn
)
:
determineRadiusAmino
(
atomId
,
element
,
resn
);
}
}
...
...
@@ -186,7 +191,7 @@ function assignRadiusForHeavyAtoms(ctx: AccessibleSurfaceAreaContext) {
* J.Mol.Biol.105,1-14. NOTE: the vdw values defined by the paper assume no Hydrogens and thus "inflates" slightly
* the heavy atoms to account for Hydrogens.
*/
function
determineRadius
(
atomId
:
string
,
element
:
ElementSymbol
,
compId
:
string
):
number
{
function
determineRadius
Amino
(
atomId
:
string
,
element
:
ElementSymbol
,
compId
:
string
):
number
{
switch
(
element
)
{
case
'
O
'
:
return
oxygenVdw
;
...
...
@@ -214,6 +219,20 @@ function determineRadius(atomId: string, element: ElementSymbol, compId: string)
return
VdwRadius
(
element
);
}
function
determineRadiusNucl
(
atomId
:
string
,
element
:
ElementSymbol
,
compId
:
string
):
number
{
switch
(
element
)
{
case
'
C
'
:
return
nucCarbonVdw
;
case
'
N
'
:
return
nucNitrogenVdw
;
case
'
P
'
:
return
nucPhosphorusVdw
;
case
'
O
'
:
return
oxygenVdw
;
}
return
VdwRadius
(
element
);
}
function
initialize
(
unit
:
Unit
.
Atomic
,
params
:
PD
.
Values
<
AccessibleSurfaceAreaComputationParams
>
):
AccessibleSurfaceAreaContext
{
return
{
unit
:
unit
,
...
...
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