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
5605b2cd
Commit
5605b2cd
authored
5 years ago
by
Lukas Pravda
Browse files
Options
Downloads
Patches
Plain Diff
update readme
parent
5022078a
No related branches found
No related tags found
1 merge request
!1
Dev
Pipeline
#54967
passed with stages
Stage:
Stage:
in 1 minute and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+63
-9
63 additions, 9 deletions
README.md
with
63 additions
and
9 deletions
README.md
+
63
−
9
View file @
5605b2cd
...
...
@@ -10,43 +10,67 @@ This is a web-component to display ligand structure in 2D along with its interac
| Mode A | Mode B | Mode C |
|-------------------- | --------- | -------- |
|
<img
src=
"https://www.ebi.ac.uk/~lpravda/imgs/1cbs_REA_200_A.png"
/>
|
<img
src=
"https://www.ebi.ac.uk/~lpravda/imgs/3d12_bm1.png"
/>
|
<img
src=
"https://www.ebi.ac.uk/pdbe-srv/pdbechem/image/showNew?code=VIA&size=
4
00"
/>
|
|
<img
src=
"https://www.ebi.ac.uk/~lpravda/imgs/1cbs_REA_200_A.png"
/>
|
<img
src=
"https://www.ebi.ac.uk/~lpravda/imgs/3d12_bm1.png"
/>
|
<img
src=
"https://www.ebi.ac.uk/pdbe-srv/pdbechem/image/showNew?code=VIA&size=
5
00"
/>
|
| 1cbs REA 200 A | 3D12 bm1 (
`2xGLC-2xBGC-LXZ-NGA-GL0`
)| wwPDB CCD - VIA
## Usage: web-component
## How to use it
The component can be inserted into the pages by two different ways. Either as a web-component using html tag, or by using
### A) Bound molecule interactions
### web-component
#### Prerequisities
These files need to be inserted in the page before the component is attempted to be loaded:
```
html
<!-- CSS style to be used for scene drawing (required for saving SVGs.) -->
<link
rel=
"stylesheet"
href=
"pdbe-interactions-svg.css"
/>
<!-- UI icons -->
<link
rel=
"stylesheet"
href=
"https://ebi.emblstatic.net/web_guidelines/EBI-Icon-fonts/v1.3/fonts.css"
/>
<!-- Web component polyfill (only loads what it needs) -->
<script
src=
"https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs/webcomponents-lite.js"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"
charset=
"utf-8"
></script>
<!--PDBe interactions component-->
<script
type=
"module"
src=
"pdbe-interactions-component-0.1.0.js"
></script>
```
#### A) Bound molecule interactions
```
html
<pdb-interactions
pdb-id=
"3d12"
bound-molecule-id=
"bm1"
></pdb-interactions>
```
### B) Ligand interactions
###
#
B) Ligand interactions
```
html
<ligand-display
pdb-id=
"1cbs"
pdb-res-id=
"200"
pdb-chain-id=
"A"
></ligand-display>
```
### C) Ligand/chemical component
###
#
C) Ligand/chemical component
```
html
<ligand-display
pdb-res-name=
"CLR"
zoom-on
></ligand-display>
```
##
Usage: D
ata injection
##
# d
ata injection
First you need to define a component on the page
The component contains a number of properties that can be set, in order to change data that are being displayed.
First you need to define a component on the page
:
```
html
<ligand-display
id=
'SIA-component'
></ligand-display>
```
and then inject data you want to display
.
and then inject data you want to display
e.g.:
```
javascript
let
chemUrl
=
`https://www.ebi.ac.uk/pdbe/static/files/pdbechem_v2/SIA/annotation`
;
let
interactionsURL
=
""
;
let
interactionsURL
=
"
https://wwwdev.ebi.ac.uk/pdbe/graph-api/pdb/bound_ligand_interactions/4yy1/A/604
"
;
let
component
=
document
.
getElementById
(
'
SIA-component
'
);
const
depiction
=
await
(
await
fetch
(
chemUrl
)).
json
();
...
...
@@ -58,6 +82,36 @@ component.ligandHighlight = atomsToHighlight;
component
.
interactions
=
interactionsData
;
```
### Plugin
The component can be also added to DOM directly from JavaScript. There are some requirements
```
html
<!-- CSS style to be used for scene drawing (required for saving SVGs.) -->
<link
rel=
"stylesheet"
href=
"pdbe-interactions-svg.css"
/>
<!-- UI icons -->
<link
rel=
"stylesheet"
href=
"https://ebi.emblstatic.net/web_guidelines/EBI-Icon-fonts/v1.3/fonts.css"
/>
<!--PDBe interactions component-->
<script
type=
"module"
src=
"pdbe-interactions-component-0.1.0.js"
></script>
```
and then the component can be instantiated as simply as:
```
javascript
let
component
=
document
.
getElementById
(
'
SIA-component
'
);
this
.
display
=
new
Visualization
(
this
,
uiParams
);
// to display bound molecule interactions
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
());
```
`
## Parameters
| Parametr | Type | Required | Description |
...
...
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