Skip to content
Snippets Groups Projects

Added features for aggregated ligand interaction view and interactivity with heat map

Merged Ibrahim Roshan Kunnakkattu requested to merge PDBE-3362 into master
5 files
+ 201
39
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 19
10
@@ -13,6 +13,7 @@ class pdbLigandEnv extends LitElement {
entityId: { type: String, attribute: 'entity-id' },
resName: { type: String, attribute: 'pdb-res-name' },
resId: { type: Number, attribute: 'pdb-res-id' },
contactType: {type: String, attribute: 'contact-type'},
chainId: { type: String, attribute: 'pdb-chain-id' },
substructureHighlight: { type: Array, attribute: 'substructure' },
substructureColor: { type: String, attribute: 'color' },
@@ -47,12 +48,22 @@ class pdbLigandEnv extends LitElement {
this.display.initLigandInteractions(this.pdbId, this.resId, this.chainId);
}
}
else if (this.resName) {
this.display.initLigandDisplay(this.resName, names).then(() => this.display.centerScene());
else if (this.resName){
this.display.initLigandDisplay(this.resName, names).then(() => {
if (this.contactType){
if(this.display.atomWeights === undefined){
this.display.initLigandWeights(this.resName).then(() => {
this.display.showWeights(this.contactType);
})
}
else {
this.display.showWeights(this.contactType);
}
}
})
}
}
//#region properties
set depiction(data) {
if (!data) return;
@@ -61,6 +72,10 @@ class pdbLigandEnv extends LitElement {
this.display.centerScene();
}
set atomWeights(contactType) {
this.display.showWeights(contactType);
}
set highlightSubstructure(data) {
if (!data || !this.display) {
console.log(`Argument needs to be a non empty array of strings.`);
@@ -78,12 +93,6 @@ class pdbLigandEnv extends LitElement {
this.display.addLigandHighlight(this.substructureHighlight, this.highlightColor);
}
set contourData(data) {
if (!data || !this.display || !this.display.depiction !== undefined) return;
this.display.addContours(data);
}
set zoom(data) {
if (this.display !== undefined) this.display.toggleZoom(data);
}
@@ -104,4 +113,4 @@ class pdbLigandEnv extends LitElement {
}
// Register the new element with the browser.
customElements.define('pdb-ligand-env', pdbLigandEnv);
\ No newline at end of file
customElements.define('pdb-ligand-env', pdbLigandEnv);