Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pdb-ligand-env
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
pdbe
web-components
pdb-ligand-env
Commits
66920d3d
Commit
66920d3d
authored
5 years ago
by
Lukas Pravda
Browse files
Options
Downloads
Patches
Plain Diff
few improvements
parent
879c7d5f
No related branches found
No related tags found
1 merge request
!1
Dev
Pipeline
#60862
passed with stages
Stage:
Stage:
in 1 minute and 26 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+17
-5
17 additions, 5 deletions
README.md
gulpfile.js
+2
-2
2 additions, 2 deletions
gulpfile.js
src/plugin/manager.ts
+13
-1
13 additions, 1 deletion
src/plugin/manager.ts
with
32 additions
and
8 deletions
README.md
+
17
−
5
View file @
66920d3d
...
...
@@ -50,19 +50,19 @@ A few files needs to be imported in the page before the component is attempted t
<script
type=
"module"
src=
"pdbe-interactions-component-0.1.0.js"
></script>
```
**
A) Ligand interactions
**
####
A) Ligand interactions
```
html
<pdb-interactions
pdb-id=
"1cbs"
pdb-res-id=
"200"
pdb-chain-id=
"A"
></pdb-interactions>
```
**
B) Bound molecule interactions
**
####
B) Bound molecule interactions
```
html
<pdb-interactions
pdb-id=
"3d12"
bound-molecule-id=
"bm1"
></pdb-interactions>
```
**
C) Ligand/chemical component
**
####
C) Ligand/chemical component
```
html
<pdb-interactions
pdb-res-name=
"CLR"
zoom-on
></pdb-interactions>
...
...
@@ -115,15 +115,27 @@ and then the component can be instantiated as simply as:
```
javascript
let
component
=
document
.
getElementById
(
'
SIA-component
'
);
let
uiParams
=
{
reinitialize
:
true
,
// allow reinitialize option in the component menu
zoom
:
true
,
// allow scene zoom
fullScreen
:
true
,
// allow allow full screen option in the component menu
downloadImage
:
true
,
// allow image download from the component menu
downloadData
:
true
,
// allow interactions data download from compoment menu
center
:
true
,
// allow scene centering option from the component menu
help
:
false
,
// allow help option from the component menu
residueLabel
:
true
,
// show residue label
tooltip
:
true
// show residue tooltip on mouse hover
};
this
.
display
=
new
Visualization
(
this
,
uiParams
);
// to display bound molecule interactions
this
.
display
.
initBoundMoleculeInteractions
(
'
3d12
'
,
'
bm1
'
this
.
display
.
initBoundMoleculeInteractions
(
'
3d12
'
,
'
bm1
'
);
// to display ligand interactions
this
.
display
.
initLigandInteractions
(
'
1cbs
'
,
200
,
'
A
'
);
// to display chemical component only
this
.
display
.
initLigandDisplay
(
'
HEM
'
)
.
then
(()
=>
this
.
display
.
centerScene
())
;
this
.
display
.
initLigandDisplay
(
'
HEM
'
);
```
`
## Parameters
...
...
This diff is collapsed.
Click to expand it.
gulpfile.js
+
2
−
2
View file @
66920d3d
...
...
@@ -10,13 +10,13 @@ const PKG_JSON = require(path.join(PACKAGE_ROOT_PATH, "package.json"));
const
banner
=
[
'
/**
'
,
` *
${
PKG_JSON
.
name
}
`
,
` * @version
${
PKG_JSON
.
version
}
`
,
'
* @link https://git
hub.com/PDBeurope/pdbe-molstar
'
,
'
* @link https://git
lab.ebi.ac.uk/pdbe/web-components/interactions
'
,
'
* @license Apache 2.0
'
,
'
*/
'
,
''
].
join
(
'
\n
'
);
const
license
=
[
'
/**
'
,
'
* Copyright 2019-2020
Mandar Deshpande <man
da
r
@ebi.ac.uk>
'
,
'
* Copyright 2019-2020
Lukas Pravda <lprav
da@ebi.ac.uk>
'
,
'
* European Bioinformatics Institute (EBI, http://www.ebi.ac.uk/)
'
,
'
* European Molecular Biology Laboratory (EMBL, http://www.embl.de/)
'
,
'
* Licensed under the Apache License, Version 2.0 (the "License");
'
,
...
...
This diff is collapsed.
Click to expand it.
src/plugin/manager.ts
+
13
−
1
View file @
66920d3d
...
...
@@ -197,7 +197,8 @@ class Visualization {
return
d3
.
json
(
ligandUrl
)
.
catch
(
e
=>
this
.
processError
(
e
,
`Depiction
${
ligandId
}
not found`
))
.
then
((
d
:
any
)
=>
this
.
addDepiction
(
d
));
.
then
((
d
:
any
)
=>
this
.
addDepiction
(
d
))
.
then
(()
=>
this
.
centerScene
());
}
...
...
@@ -294,6 +295,17 @@ class Visualization {
// #region menu functions
public
saveSvg
()
{
//let css = new Array<string>();
for
(
const
key
in
document
.
styleSheets
)
{
console
.
log
(
key
);
console
.
log
(
document
.
styleSheets
[
key
]);
let
rules
=
(
document
.
styleSheets
[
key
]
as
CSSStyleSheet
).
cssRules
for
(
const
rule
in
rules
)
{
console
.
log
(
rules
[
rule
].
cssText
);
}
}
d3
.
text
(
Resources
.
componentSvgCss
)
.
then
(
x
=>
{
let
svgData
=
`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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