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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
3d9c485c
Commit
3d9c485c
authored
6 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
improved coarse backbone trace, e.g. 1jgq
parent
ebc1af83
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mol-repr/structure/visual/polymer-trace-mesh.ts
+1
-1
1 addition, 1 deletion
src/mol-repr/structure/visual/polymer-trace-mesh.ts
src/mol-repr/structure/visual/util/polymer/trace-iterator.ts
+16
-2
16 additions, 2 deletions
src/mol-repr/structure/visual/util/polymer/trace-iterator.ts
with
17 additions
and
3 deletions
src/mol-repr/structure/visual/polymer-trace-mesh.ts
+
1
−
1
View file @
3d9c485c
...
...
@@ -89,7 +89,7 @@ function createPolymerTraceMesh(ctx: VisualContext, unit: Unit, structure: Struc
h2
=
w2
}
interpolateSizes
(
state
,
w0
,
w1
,
w2
,
h0
,
h1
,
h2
,
shift
)
addTube
(
builderState
,
curvePoints
,
normalVectors
,
binormalVectors
,
linearSegments
,
radialSegments
,
widthValues
,
heightValues
,
1
,
v
.
secStrucFirst
,
v
.
secStruc
Last
)
addTube
(
builderState
,
curvePoints
,
normalVectors
,
binormalVectors
,
linearSegments
,
radialSegments
,
widthValues
,
heightValues
,
1
,
v
.
secStrucFirst
||
v
.
coarseBackboneFirst
,
v
.
secStrucLast
||
v
.
coarseBackbone
Last
)
}
++
i
...
...
This diff is collapsed.
Click to expand it.
src/mol-repr/structure/visual/util/polymer/trace-iterator.ts
+
16
−
2
View file @
3d9c485c
...
...
@@ -36,6 +36,7 @@ interface PolymerTraceElement {
secStrucType
:
SecondaryStructureType
moleculeType
:
MoleculeType
isCoarseBackbone
:
boolean
coarseBackboneFirst
:
boolean
,
coarseBackboneLast
:
boolean
p0
:
Vec3
,
p1
:
Vec3
,
p2
:
Vec3
,
p3
:
Vec3
,
p4
:
Vec3
d12
:
Vec3
,
d23
:
Vec3
...
...
@@ -52,6 +53,7 @@ function createPolymerTraceElement (unit: Unit): PolymerTraceElement {
secStrucFirst
:
false
,
secStrucLast
:
false
,
secStrucType
:
SecStrucTypeNA
,
moleculeType
:
MoleculeType
.
unknown
,
coarseBackboneFirst
:
false
,
coarseBackboneLast
:
false
,
isCoarseBackbone
:
false
,
p0
:
Vec3
.
zero
(),
p1
:
Vec3
.
zero
(),
p2
:
Vec3
.
zero
(),
p3
:
Vec3
.
zero
(),
p4
:
Vec3
.
zero
(),
d12
:
Vec3
.
create
(
1
,
0
,
0
),
d23
:
Vec3
.
create
(
1
,
0
,
0
),
...
...
@@ -72,6 +74,9 @@ export class AtomicPolymerTraceIterator implements Iterator<PolymerTraceElement>
private
prevSecStrucType
:
SecondaryStructureType
private
currSecStrucType
:
SecondaryStructureType
private
nextSecStrucType
:
SecondaryStructureType
private
prevCoarseBackbone
:
boolean
private
currCoarseBackbone
:
boolean
private
nextCoarseBackbone
:
boolean
private
state
:
AtomicPolymerTraceIteratorState
=
AtomicPolymerTraceIteratorState
.
nextPolymer
private
residueAtomSegments
:
Segmentation
<
ElementIndex
,
ResidueIndex
>
private
traceElementIndex
:
ArrayLike
<
ElementIndex
>
...
...
@@ -148,6 +153,8 @@ export class AtomicPolymerTraceIterator implements Iterator<PolymerTraceElement>
this
.
state
=
AtomicPolymerTraceIteratorState
.
nextResidue
this
.
currSecStrucType
=
SecStrucTypeNA
this
.
nextSecStrucType
=
this
.
secondaryStructureType
[
this
.
residueSegmentMin
]
this
.
currCoarseBackbone
=
false
this
.
nextCoarseBackbone
=
this
.
directionElementIndex
[
this
.
residueSegmentMin
]
===
-
1
break
}
}
...
...
@@ -159,11 +166,18 @@ export class AtomicPolymerTraceIterator implements Iterator<PolymerTraceElement>
this
.
currSecStrucType
=
this
.
nextSecStrucType
this
.
nextSecStrucType
=
residueIt
.
hasNext
?
this
.
secondaryStructureType
[
residueIndex
+
1
]
:
SecStrucTypeNA
this
.
prevCoarseBackbone
=
this
.
currCoarseBackbone
this
.
currCoarseBackbone
=
this
.
nextCoarseBackbone
this
.
nextCoarseBackbone
=
residueIt
.
hasNext
?
this
.
directionElementIndex
[
residueIndex
+
1
]
===
-
1
:
false
value
.
secStrucType
=
this
.
currSecStrucType
value
.
first
=
residueIndex
===
this
.
residueSegmentMin
value
.
last
=
residueIndex
===
this
.
residueSegmentMax
value
.
secStrucFirst
=
this
.
prevSecStrucType
!==
this
.
currSecStrucType
value
.
secStrucLast
=
this
.
currSecStrucType
!==
this
.
nextSecStrucType
value
.
isCoarseBackbone
=
this
.
currCoarseBackbone
value
.
coarseBackboneFirst
=
this
.
prevCoarseBackbone
!==
this
.
currCoarseBackbone
value
.
coarseBackboneLast
=
this
.
currCoarseBackbone
!==
this
.
nextCoarseBackbone
value
.
first
=
residueIndex
===
this
.
residueSegmentMin
value
.
last
=
residueIndex
===
this
.
residueSegmentMax
value
.
moleculeType
=
this
.
moleculeType
[
residueIndex
]
const
residueIndexPrev3
=
this
.
getResidueIndex
(
residueIndex
-
3
)
...
...
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