Commit f0ecb33f authored by Jacob Durrant's avatar Jacob Durrant
Browse files

Update to version 1.0.2.

parent dfe05910
Changes
=======
1.0.2
-----
* Renamed the `docs/` directory to `technical_docs/` so end users won't
confuse it with the user manual found in the `README.md` file.
* Improved Webina's ability to convert large PDB files to PDBQT. PDBQTConvert
cannot convert large PDB files, so Webina reduces the input file size if it
encounters an error. In addition to the previous steps, it now does the
following:
* keeps only the first frame of multi-frame PDB files
* removes existing hydrogen atoms
* removes beta/occupancy/element columns
1.0.1
-----
......
# Webina 1.0.1 #
# Webina 1.0.2 #
## Introduction ##
......
......@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(){'use strict';function G(r){var g=0;return function(){return g<r.length?{done:!1,value:r[g++]}:{done:!0}}}function H(r){var g="undefined"!=typeof Symbol&&Symbol.iterator&&r[Symbol.iterator];return g?g.call(r):{next:G(r)}}var I="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,J="function"==typeof Object.defineProperties?Object.defineProperty:function(r,g,m){r!=Array.prototype&&r!=Object.prototype&&(r[g]=m.value)};
function K(r,g){if(g){var m=I;r=r.split(".");for(var t=0;t<r.length-1;t++){var z=r[t];z in m||(m[z]={});m=m[z]}r=r[r.length-1];t=m[r];g=g(t);g!=t&&null!=g&&J(m,r,{configurable:!0,writable:!0,value:g})}}
K("Promise",function(r){function g(f){this.i=0;this.o=void 0;this.g=[];var k=this.j();try{f(k.resolve,k.reject)}catch(c){k.reject(c)}}function m(){this.g=null}function t(f){return f instanceof g?f:new g(function(k){k(f)})}if(r)return r;m.prototype.i=function(f){if(null==this.g){this.g=[];var k=this;this.j(function(){k.o()})}this.g.push(f)};var z=I.setTimeout;m.prototype.j=function(f){z(f,0)};m.prototype.o=function(){for(;this.g&&this.g.length;){var f=this.g;this.g=[];for(var k=0;k<f.length;++k){var c=
(function(){'use strict';function H(r){var g=0;return function(){return g<r.length?{done:!1,value:r[g++]}:{done:!0}}}function I(r){var g="undefined"!=typeof Symbol&&Symbol.iterator&&r[Symbol.iterator];return g?g.call(r):{next:H(r)}}var J="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,K="function"==typeof Object.defineProperties?Object.defineProperty:function(r,g,m){r!=Array.prototype&&r!=Object.prototype&&(r[g]=m.value)};
function L(r,g){if(g){var m=J;r=r.split(".");for(var t=0;t<r.length-1;t++){var z=r[t];z in m||(m[z]={});m=m[z]}r=r[r.length-1];t=m[r];g=g(t);g!=t&&null!=g&&K(m,r,{configurable:!0,writable:!0,value:g})}}
L("Promise",function(r){function g(f){this.i=0;this.o=void 0;this.g=[];var k=this.j();try{f(k.resolve,k.reject)}catch(c){k.reject(c)}}function m(){this.g=null}function t(f){return f instanceof g?f:new g(function(k){k(f)})}if(r)return r;m.prototype.i=function(f){if(null==this.g){this.g=[];var k=this;this.j(function(){k.o()})}this.g.push(f)};var z=J.setTimeout;m.prototype.j=function(f){z(f,0)};m.prototype.o=function(){for(;this.g&&this.g.length;){var f=this.g;this.g=[];for(var k=0;k<f.length;++k){var c=
f[k];f[k]=null;try{c()}catch(d){this.m(d)}}}this.g=null};m.prototype.m=function(f){this.j(function(){throw f;})};g.prototype.j=function(){function f(d){return function(e){c||(c=!0,d.call(k,e))}}var k=this,c=!1;return{resolve:f(this.M),reject:f(this.m)}};g.prototype.M=function(f){if(f===this)this.m(new TypeError("A Promise cannot resolve to itself"));else if(f instanceof g)this.N(f);else{a:switch(typeof f){case "object":var k=null!=f;break a;case "function":k=!0;break a;default:k=!1}k?this.X(f):this.F(f)}};
g.prototype.X=function(f){var k=void 0;try{k=f.then}catch(c){this.m(c);return}"function"==typeof k?this.O(k,f):this.F(f)};g.prototype.m=function(f){this.G(2,f)};g.prototype.F=function(f){this.G(1,f)};g.prototype.G=function(f,k){if(0!=this.i)throw Error("Cannot settle("+f+", "+k+"): Promise already settled in state"+this.i);this.i=f;this.o=k;this.W()};g.prototype.W=function(){if(null!=this.g){for(var f=0;f<this.g.length;++f)A.i(this.g[f]);this.g=null}};var A=new m;g.prototype.N=function(f){var k=this.j();
f.s(k.resolve,k.reject)};g.prototype.O=function(f,k){var c=this.j();try{f.call(k,c.resolve,c.reject)}catch(d){c.reject(d)}};g.prototype.then=function(f,k){function c(b,a){return"function"==typeof b?function(p){try{d(b(p))}catch(q){e(q)}}:a}var d,e,h=new g(function(b,a){d=b;e=a});this.s(c(f,d),c(k,e));return h};g.prototype.catch=function(f){return this.then(void 0,f)};g.prototype.s=function(f,k){function c(){switch(d.i){case 1:f(d.o);break;case 2:k(d.o);break;default:throw Error("Unexpected state: "+
d.i);}}var d=this;null==this.g?A.i(c):this.g.push(c)};g.resolve=t;g.reject=function(f){return new g(function(k,c){c(f)})};g.race=function(f){return new g(function(k,c){for(var d=H(f),e=d.next();!e.done;e=d.next())t(e.value).s(k,c)})};g.all=function(f){var k=H(f),c=k.next();return c.done?t([]):new g(function(d,e){function h(p){return function(q){b[p]=q;a--;0==a&&d(b)}}var b=[],a=0;do b.push(void 0),a++,t(c.value).s(h(b.length-1),e),c=k.next();while(!c.done)})};return g});
K("Array.prototype.find",function(r){return r?r:function(g,m){a:{var t=this;t instanceof String&&(t=String(t));for(var z=t.length,A=0;A<z;A++){var f=t[A];if(g.call(m,f,A,t)){g=f;break a}}g=void 0}return g}});
d.i);}}var d=this;null==this.g?A.i(c):this.g.push(c)};g.resolve=t;g.reject=function(f){return new g(function(k,c){c(f)})};g.race=function(f){return new g(function(k,c){for(var d=I(f),e=d.next();!e.done;e=d.next())t(e.value).s(k,c)})};g.all=function(f){var k=I(f),c=k.next();return c.done?t([]):new g(function(d,e){function h(p){return function(q){b[p]=q;a--;0==a&&d(b)}}var b=[],a=0;do b.push(void 0),a++,t(c.value).s(h(b.length-1),e),c=k.next();while(!c.done)})};return g});
L("Array.prototype.find",function(r){return r?r:function(g,m){a:{var t=this;t instanceof String&&(t=String(t));for(var z=t.length,A=0;A<z;A++){var f=t[A];if(g.call(m,f,A,t)){g=f;break a}}g=void 0}return g}});
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"/7QA":function(r,g,m){function t(){void 0===this.$store.state.validation[this.id]&&this.$store.commit("setValidationParam",{name:this.id,f:!this.required});void 0!==this["default"]&&this.$store.commit("setVinaParam",{name:this.id,f:this["default"]})}m.r(g);var z=m("/s4n"),A=m("kXk/"),f={val:{get:function(){return this.$store.state.vinaParams[this.id]},set:function(l){l=""===l?void 0:+l;isNaN(l)&&(l=void 0);this.$store.commit("setVinaParam",
{name:this.id,f:l});var n=!0,y=this.$store.state.vinaParams.score_only;!0===this.required&&!0!==y&&(this.invalidMsg="This field is required.",n=void 0!==l);!0===n&&void 0!==this.min&&this.min>l&&(this.invalidMsg="Value must be &ge; "+this.min.toString()+".",n=!1);!0===n&&void 0!==this.max&&this.max<l&&(this.invalidMsg="Value must be &le; "+this.max.toString()+".",n=!1);this.$store.commit("setValidationParam",{name:this.id,f:n})}},desc:function(){var l="";!0!==this.required&&void 0===this["default"]&&
(l=" (Leave blank to use default value.)");return this.description+l},isValid:function(){return this.$store.state.validation[this.id]}},k={val:{get:function(){return this.$store.state.vinaParams[this.id]},set:function(l){this.$store.commit("setVinaParam",{name:this.id,f:l})}},desc:function(){return this.description+(!0!==this.required?" (Leave blank to use default value.)":"")}};r=m("/dHQ");g=m("vrqd");var c=m("d/n1"),d={useExampleOutputFiles:function(){for(var l=this,n=["receptor","output"],y=n.length,
......@@ -29,13 +29,14 @@ w=0;w<y;w++)this.$store.commit("setValidationParam",{name:n[w],f:!0});n=new Prom
{title:"Invalid Parameters!",body:"<p>Please correct the following parameter(s) before continuing: <code>"+n.join(" ")+"</code></p>"});return l}},e=m("og8d"),h={B:function(){return""!==this.label&&void 0!==this.label},labelCols:function(){return!0===this.B&&!0===this.labelToLeft?3:0},labelColsLg:function(){return!0===this.B&&!0===this.labelToLeft?2:0}},b=m("NL52"),a={items:function(){for(var l=this.$store.state.pdbOutputFrames,n=l.length,y=[],w=!1,x=0;x<n;x++){var C=l[x][0];void 0!==C?y.push({mode:C[0],
"affinity (kcal/mol)":C[1],"dist from rmsd L.B.":C[2],"dist from rmsd U.B.":C[3]}):(w=!0,y.push({mode:"---","affinity (kcal/mol)":"---","dist from rmsd L.B.":"---","dist from rmsd U.B.":"---"}))}!0===w&&this.$store.commit("openModal",{title:"Output File Invalid!",body:"<p>The output PDBQT file does not appear to be properly formatted.</p>"});return y},fields:function(){return[{key:"mode"},{key:"affinity (kcal/mol)"},{key:"dist from rmsd L.B."},{key:"dist from rmsd U.B."}]}},p={rowClicked:function(l,
n){this.$store.commit("setVar",{name:"dockedContents",f:this.$store.state.pdbOutputFrames[n][1]})}},q={modalShow:{get:function(){return this.$store.state.modalShow},set:function(l){this.$store.commit("setVar",{name:"modalShow",f:l})}},title:function(){return this.$store.state.modalTitle},body:function(){return this.$store.state.modalBody}},v={convertFileModalShow:{get:function(){return this.$store.state.convertFileModalShow},set:function(l){this.$store.commit("setVar",{name:"convertFileModalShow",
f:l})}},currentExt:function(){return this.$store.state.convertFileExt.toUpperCase()},currentType:function(){return this.$store.state.convertFileType},gen3DRequired:function(){return-1!==["CAN","SMI","SMILES"].indexOf(this.currentExt)?this.gen3D=!0:!1}},u={beginConvert:function(l,n,y){var w=this;void 0===n&&(n=1);void 0===y&&(y="");var x=document.getElementById("convert-frame").contentWindow;x.startSpinner();for(var C=this.$store.state.convertFile;"\n"===C.substr(C.length-1,1);)C=C.substr(0,C.length-
1);"PDB"===this.currentExt.toUpperCase()&&(y+=this.U(n));"ligand"!==this.currentType&&(this.gen3D=!1);x.document.querySelector("html").style.overflow="hidden";x.PDBQTConvert.convert(C,this.currentExt.toLowerCase(),"ligand"===this.currentType,this.addHydrogens,this.gen3D,parseFloat(this.phVal)).then(function(D){w.$store.commit("setVar",{name:w.currentType+"Contents",f:D});w.$refs["convert-modal"].hide();w.$store.commit("setVar",{name:w.currentType+"ForceValidate",f:!0});w.$store.commit("setValidationParam",
{name:w.currentType,f:!0});D=A.d(w.$store.state[w.currentType+"FileName"],"converted.pdbqt");w.$store.commit("updateFileName",{type:w.currentType,filename:D});""!==y&&w.$bvModal.msgBoxOk("To convert your file to PDBQT, Webina had to make the following modifications: "+y,{title:"Warning: File Too Big!"})}).catch(function(D){3>=n?w.beginConvert(l,n+1,y):(w.$refs["convert-modal"].hide(),w.$bvModal.msgBoxOk("Could not convert your file. Are you sure it is a properly formatted "+w.currentExt+" file? If so, it may be too large to convert in the browser.",
{title:"Error Converting File!"}),w.$store.commit("setVar",{name:w.currentType+"ForceValidate",f:!1}),w.$store.commit("updateFileName",{type:w.currentType,filename:""}),console.log("ERROR: "+D))});l.preventDefault()},U:function(l){var n=this.$store.state.convertFile,y="";switch(l){case 1:n=n.split("\n").filter(function(x){return"ATOM "===x.slice(0,5)||"HETATM "===x.slice(0,7)}).join("\n");break;case 2:n=A.c(n);y+=" (1) Discard non-protein atoms.";break;case 3:var w=n.slice(21,22);n=n.split("\n").filter(function(x){return x.slice(21,
22)===w}).join("\n");y+=" (2) Keep only the first chain (chain "+w+")."}this.$store.commit("setVar",{name:"convertFile",f:n});return y},cancelPressed:function(){this.$store.commit("setVar",{name:this.currentType+"FileName",f:void 0});this.$store.commit("setValidationParam",{name:this.currentType,f:!1});this.$store.commit("updateFileName",{type:this.currentType,filename:""})},reloadIFrame:function(){document.getElementById("convert-frame").src="./pdbqt_convert/index.html?startBlank"}},B={drawSmilesModalShow:{get:function(){return this.$store.state.drawSmilesModalShow},
set:function(l){this.$store.commit("setVar",{name:"drawSmilesModalShow",f:l})}}},F={startConversion:function(){var l=document.getElementById("draw-widget").contentWindow.getSmiles();this.$store.commit("setVar",{name:"convertFileExt",f:"smi"});this.$store.commit("setVar",{name:"convertFileType",f:"ligand"});this.$store.commit("setVar",{name:"convertFile",f:l});this.$store.commit("setVar",{name:"convertFileModalShow",f:!0});this.$store.commit("setVar",{name:"ligandFileName",f:"drawn_ligand.pdbqt"})}};
m=m("DG5G");var E={classToUse:function(){var l=[this.cls];!0===this.small&&l.push("download-button float-right ml-1");return l.join(" ")},sizeToUse:function(){return!0===this.small?"sm":""}};console.log("Webina Web App 1.0.1");Vue.use(BootstrapVue);Vue.use(Vuex);(function(){Vue.component("sub-section",{data:function(){return{}},computed:{},template:'\n <b-card :title="title" class="mb-4">\n <b-card-text style="margin-top: 16px;">\n <slot></slot>\n </b-card-text>\n </b-card>\n ',
f:l})}},currentExt:function(){return this.$store.state.convertFileExt.toUpperCase()},currentType:function(){return this.$store.state.convertFileType},gen3DRequired:function(){return-1!==["CAN","SMI","SMILES"].indexOf(this.currentExt)?this.gen3D=!0:!1}},u={beginConvert:function(l,n,y){var w=this;void 0===n&&(n=1);void 0===y&&(y=[]);var x=document.getElementById("convert-frame").contentWindow;x.startSpinner();for(var C=this.$store.state.convertFile;"\n"===C.substr(C.length-1,1);)C=C.substr(0,C.length-
1);if("PDB"===this.currentExt.toUpperCase()){var D=this.U(n);""!==D&&y.push(D)}"ligand"!==this.currentType&&(this.gen3D=!1);x.document.querySelector("html").style.overflow="hidden";x.PDBQTConvert.convert(C,this.currentExt.toLowerCase(),"ligand"===this.currentType,this.addHydrogens,this.gen3D,parseFloat(this.phVal)).then(function(G){w.$store.commit("setVar",{name:w.currentType+"Contents",f:G});w.$refs["convert-modal"].hide();w.$store.commit("setVar",{name:w.currentType+"ForceValidate",f:!0});w.$store.commit("setValidationParam",
{name:w.currentType,f:!0});G=A.d(w.$store.state[w.currentType+"FileName"],"converted.pdbqt");w.$store.commit("updateFileName",{type:w.currentType,filename:G});0!==y.length&&(G=y.map(function(M,N){return"("+(N+1).toString()+") "+M}).join(" "),w.$bvModal.msgBoxOk("To convert your file to PDBQT, Webina had to make the following modifications: "+G,{title:"Warning: File Too Big!"}))}).catch(function(G){4>=n?w.beginConvert(l,n+1,y):(w.$refs["convert-modal"].hide(),w.$bvModal.msgBoxOk("Could not convert your file. Are you sure it is a properly formatted "+
w.currentExt+" file? If so, it may be too large to convert in the browser.",{title:"Error Converting File!"}),w.$store.commit("setVar",{name:w.currentType+"ForceValidate",f:!1}),w.$store.commit("updateFileName",{type:w.currentType,filename:""}),console.log("ERROR: "+G))});l.preventDefault()},U:function(l){var n=this.$store.state.convertFile,y="";switch(l){case 1:-1!==n.indexOf("\nEND")&&(n=n.split("\nEND")[0],y="Keep only the first frame.");n=n.split("\n").filter(function(x){return"ATOM "===x.slice(0,
5)||"HETATM "===x.slice(0,7)}).join("\n");break;case 2:n=A.c(n);y="Discard non-protein atoms.";break;case 3:var w=n.slice(21,22);n=n.split("\n").filter(function(x){return x.slice(21,22)===w}).join("\n");y="Keep only the first chain (chain "+w+").";break;case 4:n=n.split("\n").filter(function(x){return"H"!==x.substr(12,4).replace(/ /g,"").substr(0,1)}).join("\n");y="Remove original hydrogen atoms.";break;case 5:n=n.split("\n").map(function(x){return x.substr(0,54)}).join("\n"),y="Remove original occupancy, beta, and element columns."}this.$store.commit("setVar",
{name:"convertFile",f:n});return y},cancelPressed:function(){this.$store.commit("setVar",{name:this.currentType+"FileName",f:void 0});this.$store.commit("setValidationParam",{name:this.currentType,f:!1});this.$store.commit("updateFileName",{type:this.currentType,filename:""})},reloadIFrame:function(){document.getElementById("convert-frame").src="./pdbqt_convert/index.html?startBlank"}},B={drawSmilesModalShow:{get:function(){return this.$store.state.drawSmilesModalShow},set:function(l){this.$store.commit("setVar",
{name:"drawSmilesModalShow",f:l})}}},F={startConversion:function(){var l=document.getElementById("draw-widget").contentWindow.getSmiles();this.$store.commit("setVar",{name:"convertFileExt",f:"smi"});this.$store.commit("setVar",{name:"convertFileType",f:"ligand"});this.$store.commit("setVar",{name:"convertFile",f:l});this.$store.commit("setVar",{name:"convertFileModalShow",f:!0});this.$store.commit("setVar",{name:"ligandFileName",f:"drawn_ligand.pdbqt"})}};m=m("DG5G");var E={classToUse:function(){var l=
[this.cls];!0===this.small&&l.push("download-button float-right ml-1");return l.join(" ")},sizeToUse:function(){return!0===this.small?"sm":""}};console.log("Webina Web App 1.0.2");Vue.use(BootstrapVue);Vue.use(Vuex);(function(){Vue.component("sub-section",{data:function(){return{}},computed:{},template:'\n <b-card :title="title" class="mb-4">\n <b-card-text style="margin-top: 16px;">\n <slot></slot>\n </b-card-text>\n </b-card>\n ',
props:{title:String}})})();(function(){Vue.component("form-button",{data:function(){return{}},computed:E,template:'\n <b-button :pill="small" :size="sizeToUse" :class="classToUse" :variant="variant"><slot></slot></b-button>\n ',props:{variant:String,cls:String,small:{type:Boolean,default:!1}}})})();m.a();(function(){Vue.component("open-modal",{data:function(){return{}},computed:q,template:'\n <b-modal ok-only :size="size" ok-title="Close" v-model="modalShow" id="msg-modal" :title="title">\n <p class="my-4" v-html="body"><slot></slot></p>\n </b-modal>\n ',
props:{size:{type:String,"default":"lg"}}})})();(function(){Vue.component("convert-file-modal",{data:function(){return{addHydrogens:!0,gen3D:!1,phVal:7.4}},computed:v,methods:u,template:'\n <b-modal\n ref="convert-modal"\n @shown="reloadIFrame"\n ok-title="Convert" v-model="convertFileModalShow"\n id="convert-msg-modal" title="Convert File to PDBQT"\n @ok="beginConvert" @cancel="cancelPressed">\n <p class="my-4">\n Webina works with PDBQT files, not {{currentExt}} files. We suggest you:\n <span v-if="this[\'currentType\']===\'receptor\'">\n <ol>\n <li>Add hydrogen atoms using <a href="http://www.poissonboltzmann.org/" target="_blank">PDB2PQR</a></li>\n <li>Convert the resulting PQR file to PDB using <a href="http://openbabel.org/wiki/Main_Page" target="_blank">Open Babel</a></li>\n <li>Convert the PDB file to PDBQT using <a target=\'_blank\' href=\'http://mgltools.scripps.edu/\'>MGLTools</a></li>\n </ol>\n </span>\n <span v-else-if="this[\'currentType\']===\'ligand\'">\n <ol>\n <li>Add hydrogen atoms to your ligand files (SMILES or SDF format) using <a target=\'_blank\' href=\'https://git.durrantlab.pitt.edu/jdurrant/gypsum_dl\'>Gypsum-DL</a></li>\n <li>Convert the resulting PDB or SDF file(s) to PDBQT using <a target=\'_blank\' href=\'http://mgltools.scripps.edu/\'>MGLTools</a></li>\n </ol>\n </span>\n </p>\n\n <p>Or click "Convert" below to convert with the PDBQTConvert app, which should be good enough for most purposes.</p>\n\n <b-form-checkbox\n id="babel-add-hydrogens"\n v-model="addHydrogens"\n name="babel-add-hydrogens"\n :value="true"\n :unchecked-value="false"\n >\n Add hydrogen atoms at pH\n <b-form-input\n id="ph-val"\n v-model="phVal"\n type="text"\n placeholder="7.4"\n class="form-control-sm"\n @click.stop.prevent\n style="width: 45px; height: 23px; text-align: center; margin-left: 2px; display: inline-block;"\n ></b-form-input>\n </b-form-checkbox>\n\n <b-form-checkbox\n v-if="(this[\'currentType\']===\'ligand\') && (!gen3DRequired)"\n id="babel-gen-3d"\n v-model="gen3D"\n name="babel-gen-3d"\n :value="true"\n :unchecked-value="false"\n >\n Generate 3D coordinates.\n </b-form-checkbox>\n\n <iframe id="convert-frame" style="border: 0; width: 100%; height: 65px;"></iframe>\n\n <small class="form-text text-muted">\n PDBQTConvert is an optional GPL-licensed helper app\n built on <a\n href="https://github.com/partridgejiang/cheminfo-to-web/tree/master/OpenBabel/OpenBabel-js" target="_blank">\n OpenBabel JS</a>. It communicates with Webina at "arms\n length" via an iframe.\n </small>\n </b-modal>',
props:{}})})();(function(){Vue.component("draw-smiles-modal",{computed:B,methods:F,data:function(){return{}},template:'\n <b-modal\n size="xl" ok-title="Convert to PDBQT" v-model="drawSmilesModalShow"\n id="draw-structure-modal" title="Draw Ligand Structure"\n @ok="startConversion">\n <p class="my-4">\n <iframe id="draw-widget" style="border:0; width:100%; height:350px; margin-left:auto; margin-right:auto; display:block;" src="mol_editor/index.html"></iframe>\n </p>\n </b-modal>',
......@@ -45,8 +46,8 @@ props:{label:String,id:String,description:String,placeholder:String,required:Boo
props:{hide:Boolean,label:String,id1:String,id2:String,id3:String,styl:String,description:String,min:{type:Number,"default":void 0}},methods:{}})})();(function(){Vue.component("check-box",{data:function(){return{}},computed:k,template:'\n <b-form-checkbox\n :id="id"\n v-model="val"\n :name="id"\n :value="true"\n :unchecked-value="false"\n >\n {{label}}\n </b-form-checkbox>\n ',
props:{label:String,id:String}})})();r.a();(function(){Vue.component("results-table",{data:function(){return{}},computed:a,template:'\n <b-table\n striped hover small\n :items="items"\n :fields="fields"\n @row-clicked="rowClicked">\n </b-table>\n ',props:{},methods:p})})();g.a();(function(){Vue.component("vina-running",{template:'\n <div class="text-center">\n <b-spinner style="width: 4rem; height: 4rem;" label="Working"></b-spinner>\n <br /><br />\n <p>Running Webina in your browser. Docking may take some minutes.</p>\n <p>This page may become unresponsive while performing calculations.\n Need to stop Webina but can\'t close this tab? Use your browser or\n operating-system Task Manager.</p>\n </div>\n ',
props:{},computed:{},data:function(){return{msg:"",aa:0}},methods:{}})})();c.a();e.a();(function(){Vue.component("vina-existing-output",{template:'\n <b-form>\n <b-card\n class="mb-2 text-center"\n style="margin-bottom:1.4rem !important;"\n >\n <b-card-text>\n Use this tab if you\'ve already run Webina or Vina and\n have an existing docked-ligand PDBQT output file.\n </b-card-text>\n </b-card>\n\n <sub-section title="Existing Output Files">\n <file-input\n label="Receptor"\n id="receptor"\n description="The rigid part of the receptor (PDBQT or PDB)."\n accept=".pdbqt, .pdb"\n ></file-input>\n\n <file-input\n label="Docked Output"\n id="output"\n description="The Webina/Vina output file (PDBQT, OUT, VINA, or TXT) containing docked ligand poses."\n accept=".pdbqt, .out, .vina, .txt"\n ></file-input>\n\n <file-input\n label="Correct Pose"\n id="crystal"\n :required="false"\n description="The correct ligand pose, if known from experiment. This PDBQT or PDB file is optional."\n accept=".pdbqt, .pdb"\n ></file-input>\n </sub-section>\n\n <form-button cls="float-right mb-4" @click.native="onSubmitClick" variant="primary">Load Files</form-button>\n <form-button @click.native="useExampleOutputFiles" cls="float-right mr-2">Use Example Files</form-button>\n </b-form>\n ',
props:{},computed:{},data:function(){return{}},methods:d})})();(function(){new Vue({el:"#app",store:z.a,template:'\n <div class="container-fluid">\n <open-modal></open-modal>\n <convert-file-modal></convert-file-modal>\n <draw-smiles-modal></draw-smiles-modal>\n <div id="no-mobile">\n <b-jumbotron class="jumbo" header="Webina 1.0.1" lead="AutoDock Vina Ported to WebAssembly">\n <p>Webina 1.0.1 is not designed to work on mobile phones. Please use a device with a larger screen.</p>\n </b-jumbotron>\n </div>\n\n <b-jumbotron class="jumbo" style="background-image:url('+
A.a()+'webina_logo.jpg);" header="Webina 1.0.1" lead="AutoDock Vina Ported to WebAssembly">\n <p>Brought to you by the <a target="_blank" href="http://durrantlab.com">Durrant Lab</a>.</p>\n <b-button variant="primary" target="_blank" href="http://durrantlab.com">More Info</b-button>\n </b-jumbotron>\n\n <b-card no-body class="mb-3">\n <b-tabs v-model="tabIdx" card fill pills vertical content-class="mt-3"> \x3c!-- vertical --\x3e\n <b-tab title="Input Parameters" active :disabled="parametersTabDisabled">\n <b-card-text>\n <vina-params></vina-params>\n </b-card-text>\n </b-tab>\n <b-tab title="Existing Vina Output" :disabled="existingVinaOutputTabDisabled">\n <b-card-text>\n <vina-existing-output></vina-existing-output>\n </b-card-text>\n </b-tab>\n <b-tab title="Running Webina" :disabled="runningTabDisabled">\n <b-card-text>\n <vina-running></vina-running>\n </b-card-text>\n </b-tab>\n <b-tab title="Output" :disabled="outputTabDisabled">\n <b-card-text>\n <vina-output></vina-output>\n </b-card-text>\n </b-tab>\n <b-tab title="Start Over" :disabled="startOverTabDisabled">\n <b-card-text>\n <start-over></start-over>\n </b-card-text>\n </b-tab>\n </b-tabs>\n </b-card>\n </div>\n ',
props:{},computed:{},data:function(){return{}},methods:d})})();(function(){new Vue({el:"#app",store:z.a,template:'\n <div class="container-fluid">\n <open-modal></open-modal>\n <convert-file-modal></convert-file-modal>\n <draw-smiles-modal></draw-smiles-modal>\n <div id="no-mobile">\n <b-jumbotron class="jumbo" header="Webina 1.0.2" lead="AutoDock Vina Ported to WebAssembly">\n <p>Webina 1.0.2 is not designed to work on mobile phones. Please use a device with a larger screen.</p>\n </b-jumbotron>\n </div>\n\n <b-jumbotron class="jumbo" style="background-image:url('+
A.a()+'webina_logo.jpg);" header="Webina 1.0.2" lead="AutoDock Vina Ported to WebAssembly">\n <p>Brought to you by the <a target="_blank" href="http://durrantlab.com">Durrant Lab</a>.</p>\n <b-button variant="primary" target="_blank" href="http://durrantlab.com">More Info</b-button>\n </b-jumbotron>\n\n <b-card no-body class="mb-3">\n <b-tabs v-model="tabIdx" card fill pills vertical content-class="mt-3"> \x3c!-- vertical --\x3e\n <b-tab title="Input Parameters" active :disabled="parametersTabDisabled">\n <b-card-text>\n <vina-params></vina-params>\n </b-card-text>\n </b-tab>\n <b-tab title="Existing Vina Output" :disabled="existingVinaOutputTabDisabled">\n <b-card-text>\n <vina-existing-output></vina-existing-output>\n </b-card-text>\n </b-tab>\n <b-tab title="Running Webina" :disabled="runningTabDisabled">\n <b-card-text>\n <vina-running></vina-running>\n </b-card-text>\n </b-tab>\n <b-tab title="Output" :disabled="outputTabDisabled">\n <b-card-text>\n <vina-output></vina-output>\n </b-card-text>\n </b-tab>\n <b-tab title="Start Over" :disabled="startOverTabDisabled">\n <b-card-text>\n <start-over></start-over>\n </b-card-text>\n </b-tab>\n </b-tabs>\n </b-card>\n </div>\n ',
data:function(){return{receptorFile:!1,ligandFile:!1}},computed:{tabIdx:{get:function(){return this.$store.state.tabIdx},set:function(l){this.$store.commit("setVar",{name:"tabIdx",f:l})}},parametersTabDisabled:function(){return this.$store.state.parametersTabDisabled},runningTabDisabled:function(){return this.$store.state.runningTabDisabled},outputTabDisabled:function(){return this.$store.state.outputTabDisabled},existingVinaOutputTabDisabled:function(){return this.$store.state.existingVinaOutputTabDisabled},
startOverTabDisabled:function(){return this.$store.state.startOverTabDisabled}},methods:{},mounted:function(){}})})();-1!==window.location.href.indexOf("durrantlab")&&setTimeout(function(){(function(l,n,y,w,x,C,D){l.GoogleAnalyticsObject=x;l[x]=l[x]||function(){(l[x].q=l[x].q||[]).push(arguments)};l[x].$=(new Date).getTime();C=n.createElement(y);D=n.getElementsByTagName(y)[0];C.async=1;C.src=w;D.parentNode.insertBefore(C,D)})(window,document,"script","https://www.google-analytics.com/analytics.js",
"ga");ga("create","UA-144382730-1",{name:"webina"});ga("webina.send",{hitType:"event",eventCategory:"webina",eventAction:"pageview",eventLabel:window.location.href})},0)},"/dHQ":function(r,g,m){(function(t){function z(){void 0===this.$store.state.validation[this.id]&&this.$store.commit("setValidationParam",{name:this.id,f:!1});!1===this.required&&(this.$store.commit("setValidationParam",{name:this.id,f:!0}),t("."+this.id).find("input").removeClass("is-invalid"))}function A(){Vue.component("file-input",
......
......@@ -10,7 +10,7 @@
<meta charset="utf-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Webina</title>
<link rel="shortcut icon" href="favicon.ico"><link href="vendors.3c93c288707c624dc76d.css" rel="stylesheet"><link href="styles.3c93c288707c624dc76d.css" rel="stylesheet"></head>
<link rel="shortcut icon" href="favicon.ico"><link href="vendors.9f3da2d658e5da75f658.css" rel="stylesheet"><link href="styles.9f3da2d658e5da75f658.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
......@@ -24,6 +24,6 @@
<script src="vue.min.js"></script>
<script src="vuex.min.js"></script>
<script src="bootstrap-vue.min.js"></script>
<script type="text/javascript" src="runtime.3c93c288707c624dc76d.js"></script><script type="text/javascript" src="vendors.3c93c288707c624dc76d.js"></script><script type="text/javascript" src="app.3c93c288707c624dc76d.js"></script><script type="text/javascript" src="styles.3c93c288707c624dc76d.js"></script><script type="text/javascript" src="styles.css.3c93c288707c624dc76d.js"></script></body>
<script type="text/javascript" src="runtime.9f3da2d658e5da75f658.js"></script><script type="text/javascript" src="vendors.9f3da2d658e5da75f658.js"></script><script type="text/javascript" src="app.9f3da2d658e5da75f658.js"></script><script type="text/javascript" src="styles.9f3da2d658e5da75f658.js"></script><script type="text/javascript" src="styles.css.9f3da2d658e5da75f658.js"></script></body>
</html>
{
"name": "webina",
"version": "1.0.1",
"version": "1.0.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
{
"name": "webina",
"version": "1.0.1",
"version": "1.0.2",
"description": "",
"private": true,
"scripts": {
......
......@@ -66,12 +66,12 @@ let methodsFunctions = {
* file should be
* optimized (to keep size
* low for converting).
* @param {string=""} successMsg The message to display
* @param {string[]} successMsgs The messages to display
* to the user on success
* (if any).
* @returns void
*/
"beginConvert"(e, currentPDBOptimizationLevel=1, successMsg=""): void {
"beginConvert"(e, currentPDBOptimizationLevel=1, successMsgs=[]): void {
let frameWindow = document.getElementById("convert-frame")["contentWindow"];
frameWindow["startSpinner"]();
let content: string = this.$store.state["convertFile"];
......@@ -80,7 +80,10 @@ let methodsFunctions = {
}
if (this["currentExt"].toUpperCase() === "PDB") {
successMsg += this.pdbOptimization(currentPDBOptimizationLevel);
let msg = this.pdbOptimization(currentPDBOptimizationLevel);
if (msg !== "") {
successMsgs.push(msg);
}
}
if (this["currentType"]!=="ligand") {
......@@ -121,16 +124,17 @@ let methodsFunctions = {
let newFilename = Utils.replaceExt(this.$store.state[this["currentType"] + "FileName"], "converted.pdbqt");
this.$store.commit("updateFileName", { type: this["currentType"], filename: newFilename });
if (successMsg !== "") {
this["$bvModal"]["msgBoxOk"]("To convert your file to PDBQT, Webina had to make the following modifications: " + successMsg, {
if (successMsgs.length !== 0) {
let overallMsg = successMsgs.map((m, i) => { return "(" + (i + 1).toString() + ") " + m; }).join(" ");
this["$bvModal"]["msgBoxOk"]("To convert your file to PDBQT, Webina had to make the following modifications: " + overallMsg, {
"title": "Warning: File Too Big!",
});
}
}).catch((msg) => {
// The conversion failed. But if it's a PDB file, it might be
// worth trying to optimize it further.
if (currentPDBOptimizationLevel <= 3) {
this["beginConvert"](e, currentPDBOptimizationLevel + 1, successMsg);
if (currentPDBOptimizationLevel <= 4) { // one less than max number in pdbOptimization.
this["beginConvert"](e, currentPDBOptimizationLevel + 1, successMsgs);
return;
}
......@@ -166,22 +170,42 @@ let methodsFunctions = {
switch (level) {
case 1:
// Always run this optimization. Just removes lines that don't
// start with ATOM and HETATM.
// start with ATOM and HETATM. Also keeps only the first frame
// if it's a multi-frame PDB.
if (pdbTxt.indexOf("\nEND") !== -1) {
// Perhaps a multi-frame PDB.
pdbTxt = pdbTxt.split("\nEND")[0];
msg = "Keep only the first frame."
}
pdbTxt = pdbTxt.split("\n").filter(l => l.slice(0, 5) === "ATOM " || l.slice(0, 7) === "HETATM ").join("\n");
break;
case 2:
// Try removing everything but protein atoms.
pdbTxt = Utils.keepOnlyProteinAtoms(pdbTxt);
msg += " (1) Discard non-protein atoms."
msg = "Discard non-protein atoms."
break;
case 3:
// Keep only the first chain.
let chain = pdbTxt.slice(21,22);
let chain = pdbTxt.slice(21,22); // first chain
pdbTxt = pdbTxt.split("\n").filter(l => l.slice(21,22) === chain).join("\n");
msg += " (2) Keep only the first chain (chain " + chain + ").";
msg = "Keep only the first chain (chain " + chain + ").";
break;
case 4:
// Remove existing hydrogen atoms.
pdbTxt = pdbTxt.split("\n").filter(l => l.substr(12,4).replace(/ /g, "").substr(0, 1) !== "H").join("\n");
msg = "Remove original hydrogen atoms.";
break;
case 5:
// Remove beta, occupancy, etc. columns.
pdbTxt = pdbTxt.split("\n").map(l => l.substr(0,54)).join("\n");
msg = "Remove original occupancy, beta, and element columns.";
break;
}
// console.log("HHHHH>>> " + msg + " >>>> " + pdbTxt.length.toString());
this.$store.commit("setVar", {
name: "convertFile",
val: pdbTxt
......
......@@ -2,4 +2,4 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
export let VERSION = "1.0.1";
export let VERSION = "1.0.2";
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment