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
fc470293
Commit
fc470293
authored
Feb 24, 2019
by
David Sehnal
Browse files
Options
Downloads
Patches
Plain Diff
basic wrapper tweaks
parent
ff8c751f
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/apps/basic-wrapper/index.html
+27
-8
27 additions, 8 deletions
src/apps/basic-wrapper/index.html
src/mol-model/structure/model/properties/utils/secondary-structure.ts
+18
-18
18 additions, 18 deletions
...l/structure/model/properties/utils/secondary-structure.ts
with
45 additions
and
26 deletions
src/apps/basic-wrapper/index.html
+
27
−
8
View file @
fc470293
...
...
@@ -35,20 +35,40 @@
#controls
>
hr
{
margin
:
5px
0
;
}
#controls
>
input
,
#controls
>
select
{
width
:
100%
;
display
:
block
;
}
</style>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"app.css"
/>
<script
type=
"text/javascript"
src=
"./index.js"
></script>
</head>
<body>
<div
id=
'controls'
>
<h3>
Source
</h3>
<input
type=
'text'
id=
'url'
placeholder=
'url'
/>
<input
type=
'text'
id=
'assemblyId'
placeholder=
'assembly id'
/>
<select
id=
'format'
>
<option
value=
'cif'
selected
>
CIF
</option>
<option
value=
'pdb'
>
PDB
</option>
</select>
</div>
<div
id=
"app"
></div>
<script>
function
$
(
id
)
{
return
document
.
getElementById
(
id
);
}
var
pdbId
=
'
1grm
'
,
assemblyId
=
'
1
'
;
var
url
=
'
https://www.ebi.ac.uk/pdbe/static/entry/
'
+
pdbId
+
'
_updated.cif
'
;
var
format
=
'
cif
'
;
$
(
'
url
'
).
value
=
url
;
$
(
'
url
'
).
onchange
=
function
(
e
)
{
url
=
e
.
target
.
value
;
}
$
(
'
assemblyId
'
).
value
=
assemblyId
;
$
(
'
assemblyId
'
).
onchange
=
function
(
e
)
{
assemblyId
=
e
.
target
.
value
;
}
$
(
'
format
'
).
value
=
format
;
$
(
'
format
'
).
onchange
=
function
(
e
)
{
format
=
e
.
target
.
value
;
}
// var url = 'https://www.ebi.ac.uk/pdbe/entry-files/pdb' + pdbId + '.ent';
// var format = 'pdb';
// var assemblyId = 'deposited';
...
...
@@ -58,9 +78,8 @@
BasicMolStarWrapper
.
load
({
url
:
url
,
format
:
format
,
assemblyId
:
assemblyId
});
BasicMolStarWrapper
.
toggleSpin
();
addHeader
(
'
Source
'
);
addControl
(
'
Load Asym Unit
'
,
()
=>
BasicMolStarWrapper
.
load
({
url
:
url
,
format
:
format
}));
addControl
(
'
Load Assembly
1
'
,
()
=>
BasicMolStarWrapper
.
load
({
url
:
url
,
format
:
format
,
assemblyId
:
assemblyId
}));
addControl
(
'
Load Assembly
'
,
()
=>
BasicMolStarWrapper
.
load
({
url
:
url
,
format
:
format
,
assemblyId
:
assemblyId
}));
addSeparator
();
...
...
@@ -73,7 +92,7 @@
// adjust this number to make the animation faster or slower
// requires to "restart" the animation if changed
BasicMolStarWrapper
.
animate
.
modelIndex
.
maxFPS
=
4
;
BasicMolStarWrapper
.
animate
.
modelIndex
.
maxFPS
=
30
;
addControl
(
'
Play To End
'
,
()
=>
BasicMolStarWrapper
.
animate
.
modelIndex
.
onceForward
());
addControl
(
'
Play To Start
'
,
()
=>
BasicMolStarWrapper
.
animate
.
modelIndex
.
onceBackward
());
...
...
@@ -87,18 +106,18 @@
var
btn
=
document
.
createElement
(
'
button
'
);
btn
.
onclick
=
action
;
btn
.
innerText
=
label
;
document
.
getElementById
(
'
controls
'
).
appendChild
(
btn
);
$
(
'
controls
'
).
appendChild
(
btn
);
}
function
addSeparator
()
{
var
hr
=
document
.
createElement
(
'
hr
'
);
document
.
getElementById
(
'
controls
'
).
appendChild
(
hr
);
$
(
'
controls
'
).
appendChild
(
hr
);
}
function
addHeader
(
header
)
{
var
h
=
document
.
createElement
(
'
h3
'
);
h
.
innerText
=
header
;
document
.
getElementById
(
'
controls
'
).
appendChild
(
h
);
$
(
'
controls
'
).
appendChild
(
h
);
}
</script>
</body>
...
...
This diff is collapsed.
Click to expand it.
src/mol-model/structure/model/properties/utils/secondary-structure.ts
+
18
−
18
View file @
fc470293
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