You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello !
I am interested in integrating LiteMol into my web-based tool by including LiteMol-plugin.js into HTML page. It works well and can display model from uploaded string data. However, when I tried to select the molecule entity and highlight specific residues by indices, it failed to select any molecule model entity, my code is as follows:
function display_3d(localdata,rid){
var plugin = LiteMol.Plugin.create({target: '#app'});
console.log("displaying structure from "+rid);
plugin.loadMolecule({
id: rid,
data: localdata,
modelRef: 'model',
moleculeRef: 'molecule',
format: 'pdb'
})
var molecule = plugin.context.select('model')[0];
if(!molecule){
console.log('molecule not loaded '+molecule);
}else{
console.log('molecule selected '+molecule);
}
}
after executing the above function, the model was displayed on the web page successfully , but the variable molecule remained undefined which indicated that it did not captured any entity. I've check the code from examples/Commands and still get no idea why it failed. Do I missed something? Or is there any alternative solution?
Would appreciate any help!
The text was updated successfully, but these errors were encountered:
Hello !
I am interested in integrating LiteMol into my web-based tool by including
LiteMol-plugin.js
into HTML page. It works well and can display model from uploaded string data. However, when I tried to select the molecule entity and highlight specific residues by indices, it failed to select any molecule model entity, my code is as follows:after executing the above function, the model was displayed on the web page successfully , but the variable
molecule
remained undefined which indicated that it did not captured any entity. I've check the code fromexamples/Commands
and still get no idea why it failed. Do I missed something? Or is there any alternative solution?Would appreciate any help!
The text was updated successfully, but these errors were encountered: