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
f2c04a13
Commit
f2c04a13
authored
5 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
adjust grid-cell-count in partitionAtomicUnitByResidue
parent
60ba0de2
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/structure/structure.ts
+6
-3
6 additions, 3 deletions
src/mol-model/structure/structure/structure.ts
with
6 additions
and
3 deletions
src/mol-model/structure/structure/structure.ts
+
6
−
3
View file @
f2c04a13
...
@@ -579,20 +579,23 @@ namespace Structure {
...
@@ -579,20 +579,23 @@ namespace Structure {
// keeps atoms of residues together
// keeps atoms of residues together
function
partitionAtomicUnitByResidue
(
model
:
Model
,
indices
:
SortedArray
,
builder
:
StructureBuilder
)
{
function
partitionAtomicUnitByResidue
(
model
:
Model
,
indices
:
SortedArray
,
builder
:
StructureBuilder
)
{
model
.
atomicHierarchy
.
residueAtomSegments
.
offsets
const
{
residueAtomSegments
}
=
model
.
atomicHierarchy
const
startIndices
:
number
[]
=
[]
const
startIndices
:
number
[]
=
[]
const
endIndices
:
number
[]
=
[]
const
endIndices
:
number
[]
=
[]
const
residueIt
=
Segmentation
.
transientSegments
(
model
.
atomicHierarchy
.
residueAtomSegments
,
indices
)
const
residueIt
=
Segmentation
.
transientSegments
(
residueAtomSegments
,
indices
)
while
(
residueIt
.
hasNext
)
{
while
(
residueIt
.
hasNext
)
{
const
residueSegment
=
residueIt
.
move
();
const
residueSegment
=
residueIt
.
move
();
startIndices
[
startIndices
.
length
]
=
indices
[
residueSegment
.
start
]
startIndices
[
startIndices
.
length
]
=
indices
[
residueSegment
.
start
]
endIndices
[
endIndices
.
length
]
=
indices
[
residueSegment
.
end
]
endIndices
[
endIndices
.
length
]
=
indices
[
residueSegment
.
end
]
}
}
const
firstResidueAtomCount
=
endIndices
[
0
]
-
startIndices
[
0
]
const
gridCellCount
=
512
*
firstResidueAtomCount
const
{
x
,
y
,
z
}
=
model
.
atomicConformation
;
const
{
x
,
y
,
z
}
=
model
.
atomicConformation
;
const
lookup
=
GridLookup3D
({
x
,
y
,
z
,
indices
:
SortedArray
.
ofSortedArray
(
startIndices
)
},
8192
);
const
lookup
=
GridLookup3D
({
x
,
y
,
z
,
indices
:
SortedArray
.
ofSortedArray
(
startIndices
)
},
gridCellCount
);
const
{
offset
,
count
,
array
}
=
lookup
.
buckets
;
const
{
offset
,
count
,
array
}
=
lookup
.
buckets
;
for
(
let
i
=
0
,
_i
=
offset
.
length
;
i
<
_i
;
i
++
)
{
for
(
let
i
=
0
,
_i
=
offset
.
length
;
i
<
_i
;
i
++
)
{
...
...
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