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
0f03fe99
Commit
0f03fe99
authored
3 years ago
by
Sebastian Bittrich
Browse files
Options
Downloads
Patches
Plain Diff
ANVIL: fix for 6y1z
parent
556d5bb0
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/extensions/anvil/algorithm.ts
+12
-4
12 additions, 4 deletions
src/extensions/anvil/algorithm.ts
with
12 additions
and
4 deletions
src/extensions/anvil/algorithm.ts
+
12
−
4
View file @
0f03fe99
...
...
@@ -101,6 +101,10 @@ async function initialize(structure: Structure, props: ANVILProps, accessibleSur
const
hydrophobic
=
new
Array
<
boolean
>
();
const
definition
=
props
.
tmdetDefinition
?
TMDET_DEFINITION
:
ANVIL_DEFINITION
;
function
isPartOfEntity
(
l
:
StructureElement
.
Location
):
boolean
{
return
!
Unit
.
isAtomic
(
l
.
unit
)
?
notAtomic
()
:
l
.
unit
.
model
.
atomicHierarchy
.
residues
.
label_seq_id
.
valueKind
(
l
.
unit
.
residueIndex
[
l
.
element
])
===
0
;
}
const
vec
=
v3zero
();
for
(
let
i
=
0
,
il
=
structure
.
units
.
length
;
i
<
il
;
++
i
)
{
const
unit
=
structure
.
units
[
i
];
...
...
@@ -111,8 +115,8 @@ async function initialize(structure: Structure, props: ANVILProps, accessibleSur
const
eI
=
elements
[
j
];
l
.
element
=
eI
;
// consider only amino acids
if
(
getElementMoleculeType
(
unit
,
eI
)
!==
MoleculeType
.
Protein
)
{
// consider only amino acids
in chains
if
(
getElementMoleculeType
(
unit
,
eI
)
!==
MoleculeType
.
Protein
||
!
isPartOfEntity
(
l
)
)
{
continue
;
}
...
...
@@ -357,7 +361,7 @@ function membraneSegments(ctx: ANVILContext, membrane: MembraneCandidate): Array
// collect all residues in membrane layer
for
(
let
k
=
0
,
kl
=
offsets
.
length
;
k
<
kl
;
k
++
)
{
const
unit
=
units
[
unitIndices
[
offsets
[
k
]]];
if
(
!
Unit
.
isAtomic
(
unit
))
throw
'
Property only available for atomic models.
'
;
if
(
!
Unit
.
isAtomic
(
unit
))
notAtomic
()
;
const
elementIndex
=
elementIndices
[
offsets
[
k
]];
authAsymId
=
unit
.
model
.
atomicHierarchy
.
chains
.
auth_asym_id
.
value
(
unit
.
chainIndex
[
elementIndex
]);
...
...
@@ -378,7 +382,7 @@ function membraneSegments(ctx: ANVILContext, membrane: MembraneCandidate): Array
for
(
let
k
=
0
,
kl
=
offsets
.
length
;
k
<
kl
;
k
++
)
{
const
unit
=
units
[
unitIndices
[
offsets
[
k
]]];
if
(
!
Unit
.
isAtomic
(
unit
))
throw
'
Property only available for atomic models.
'
;
if
(
!
Unit
.
isAtomic
(
unit
))
notAtomic
()
;
const
elementIndex
=
elementIndices
[
offsets
[
k
]];
authAsymId
=
unit
.
model
.
atomicHierarchy
.
chains
.
auth_asym_id
.
value
(
unit
.
chainIndex
[
elementIndex
]);
...
...
@@ -441,6 +445,10 @@ function membraneSegments(ctx: ANVILContext, membrane: MembraneCandidate): Array
return
refinedSegments
;
}
function
notAtomic
():
never
{
throw
'
Property only available for atomic models.
'
;
}
/** Filter for membrane residues and calculate the final extent of the membrane layer */
function
adjustExtent
(
ctx
:
ANVILContext
,
membrane
:
MembraneCandidate
,
centroid
:
Vec3
):
number
{
const
{
offsets
,
structure
}
=
ctx
;
...
...
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