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
175e0091
Commit
175e0091
authored
5 years ago
by
David Sehnal
Browse files
Options
Downloads
Patches
Plain Diff
proteopedia-wrapper: fix assembly loading
parent
897d17c8
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/examples/proteopedia-wrapper/index.ts
+7
-4
7 additions, 4 deletions
src/examples/proteopedia-wrapper/index.ts
with
7 additions
and
4 deletions
src/examples/proteopedia-wrapper/index.ts
+
7
−
4
View file @
175e0091
...
...
@@ -81,7 +81,7 @@ class MolStarProteopediaWrapper {
return
b
.
apply
(
StateTransforms
.
Data
.
Download
,
{
url
,
isBinary
:
false
})
}
private
model
(
b
:
StateBuilder
.
To
<
PSO
.
Data
.
Binary
|
PSO
.
Data
.
String
>
,
format
:
SupportedFormats
,
assemblyId
:
string
)
{
private
model
(
b
:
StateBuilder
.
To
<
PSO
.
Data
.
Binary
|
PSO
.
Data
.
String
>
,
format
:
SupportedFormats
)
{
const
parsed
=
format
===
'
cif
'
?
b
.
apply
(
StateTransforms
.
Data
.
ParseCif
).
apply
(
StateTransforms
.
Model
.
TrajectoryFromMmCif
)
:
b
.
apply
(
StateTransforms
.
Model
.
TrajectoryFromPDB
);
...
...
@@ -203,14 +203,17 @@ class MolStarProteopediaWrapper {
if
(
loadType
===
'
full
'
)
{
await
PluginCommands
.
State
.
RemoveObject
.
dispatch
(
this
.
plugin
,
{
state
,
ref
:
state
.
tree
.
root
.
ref
});
const
modelTree
=
this
.
model
(
this
.
download
(
state
.
build
().
toRoot
(),
url
),
format
,
assemblyId
);
const
modelTree
=
this
.
model
(
this
.
download
(
state
.
build
().
toRoot
(),
url
),
format
);
await
this
.
applyState
(
modelTree
);
const
info
=
await
this
.
doInfo
(
true
);
const
structureTree
=
this
.
structure
((
assemblyId
===
'
preferred
'
&&
info
&&
info
.
preferredAssemblyId
)
||
assemblyId
);
const
asmId
=
(
assemblyId
===
'
preferred
'
&&
info
&&
info
.
preferredAssemblyId
)
||
assemblyId
;
const
structureTree
=
this
.
structure
(
asmId
);
await
this
.
applyState
(
structureTree
);
}
else
{
const
tree
=
state
.
build
();
tree
.
to
(
StateElements
.
Assembly
).
update
(
StateTransforms
.
Model
.
StructureAssemblyFromModel
,
p
=>
({
...
p
,
id
:
assemblyId
||
'
deposited
'
}));
const
info
=
await
this
.
doInfo
(
true
);
const
asmId
=
(
assemblyId
===
'
preferred
'
&&
info
&&
info
.
preferredAssemblyId
)
||
assemblyId
;
tree
.
to
(
StateElements
.
Assembly
).
update
(
StateTransforms
.
Model
.
StructureAssemblyFromModel
,
p
=>
({
...
p
,
id
:
asmId
}));
await
this
.
applyState
(
tree
);
}
...
...
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