Commit 5af6835b authored by Jacob Durrant's avatar Jacob Durrant

Added docstrings.

parent 141a4ebc
This diff is collapsed.
/**
* Webina Copyright 2019 Jacob Durrant
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var c=0;return function(){return c<a.length?{done:!1,value:a[c++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,c,b){a!=Array.prototype&&a!=Object.prototype&&(a[c]=b.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};
$jscomp.SymbolClass=function(a,c){this.$jscomp$symbol$id_=a;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:c})};$jscomp.SymbolClass.prototype.toString=function(){return this.$jscomp$symbol$id_};$jscomp.Symbol=function(){function a(b){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new $jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(b||"")+"_"+c++,b)}var c=0;return a}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.asyncIterator;a||(a=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("Symbol.asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};
$jscomp.iteratorFromArray=function(a,c){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var b=0,d={next:function(){if(b<a.length){var e=b++;return{value:c(e,a[e]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d};
$jscomp.polyfill=function(a,c,b,d){if(c){b=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in b||(b[e]={});b=b[e]}a=a[a.length-1];d=b[a];c=c(d);c!=d&&null!=c&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:c})}};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a){return a})}},"es6","es3");var VERSION="1.0.0";console.log("Webina JavaScript Library "+VERSION);
var WEBINA_Module,decodeBase64="function"==typeof atob?atob:function(a){var c,b,d,e,f,m,g="",h=0;for(a=a.replace(/[^A-Za-z0-9\+\/=]/g,"");c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++))<<2|(e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++)))>>4,b=(15&e)<<4|(f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++)))>>2,d=(3&f)<<6|(m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++))),
g+=String.fromCharCode(c),64!==f&&(g+=String.fromCharCode(b)),64!==m&&(g+=String.fromCharCode(d)),h<a.length;)return g},Webina=function(){return{WEBINA_ENVIRONMENT_IS_NODE:window.WEBINA_ENVIRONMENT_IS_NODE,WEBINA_lengthBytesUTF8:window.WEBINA_lengthBytesUTF8,WEBINA_stringToUTF8Array:window.WEBINA_stringToUTF8Array,WEBINA_assert:window.WEBINA_assert,WEBINA_ASSERTIONS:1,WEBINA_DATA_URI_PREFIX:"data:application/octet-stream;base64,",WEBINA_BASE_URL:"./",FS:window.FS,start:function(a,c,b,d,e,f){var m=
this,g="\nWEBINA\n======\n\n";void 0!==f?("/"!==f.slice(f.length-1)&&(f+="/"),this.WEBINA_BASE_URL=f,g+="User specified baseUrl: "+f+"\n"):g+="No baseUrl specified, so using ./\n\nUse Webina.start() to specify the baseUrl:\n function start(vinaParams, receptorPDBQTTxt, \n ligandPDBQTTxt, onDone, \n onError, baseUrl)\n";g+="\nExpecting files at the following locations:\n";for(var h=0;5>h;h++)g+=" "+(void 0===f?"./":f)+["Webina.min.min.js","vina.html.mem","vina.min.min.js",
"vina.worker.min.min.js","vina.wasm"][h]+"\n";g+="\n";void 0!==f?console.log(g):console.warn(g);void 0===e&&(e=function(){console.log("Webina encountered an error! Does your browser support WebAssembly?")});WEBINA_Module={preRun:[],postRun:[],stdOut:"",stdErr:"",print:function(){return function(a){1<arguments.length&&(a=Array.prototype.slice.call(arguments).join(" "));window.WEBINA_Module.stdOut+=a+"\n"}}(),printErr:function(a){1<arguments.length&&(a=Array.prototype.slice.call(arguments).join(" "));window.WEBINA_Module.stdErr+=
a+"\n"},setStatus:function(a){""===a&&void 0!==d&&(a=(new TextDecoder("utf-8")).decode(window.FS.readFile("ligand_out.pdbqt")),d(a,window.WEBINA_Module.stdOut,window.WEBINA_Module.stdErr))},onError:e,catchError:function(a){e(a)},receptorPDBQTTxt:c,ligandPDBQTTxt:b};void 0!==a.receptor&&console.warn("Webina does not support Vina's --receptor parameter. Instead, pass the content of the receptor file as a string to the webina.start() function.");void 0!==a.receptor&&console.warn("Webina does not support Vina's --ligand parameter. Instead, pass the content of the ligand file as a string to the webina.start() function.");
WEBINA_Module.arguments=["--receptor","/receptor.pdbqt","--ligand","/ligand.pdbqt"];c=Object.keys(a);b=c.length;for(h=0;h<b;h++)f=c[h],g=a[f],WEBINA_Module.arguments.push("--"+f),"boolean"!==typeof g&&WEBINA_Module.arguments.push(String(g));window.WEBINA_Module=WEBINA_Module;var k=this.WEBINA_BASE_URL+"vina.html.mem";k=WEBINA_Module.locateFile?WEBINA_Module.locateFile(k,""):k;WEBINA_Module.memoryInitializerRequestURL=k;var l=WEBINA_Module.memoryInitializerRequest=new XMLHttpRequest;l.onloadend=function(){if(404===
l.status){var a="Unable to access "+k+'. See JavaScript console for warnings. The "baseUrl" variable passed to Webina is likely incorrect.';WEBINA_Module.catchError({message:a});console.warn(a)}else a=document.createElement("script"),a.src=m.WEBINA_BASE_URL+"vina.min.js",document.body.appendChild(a)};l.open("GET",k,!0);l.responseType="arraybuffer";l.send(null)},isDataURI:function(a){return String.prototype.startsWith?a.startsWith(this.WEBINA_DATA_URI_PREFIX):0===a.indexOf(this.WEBINA_DATA_URI_PREFIX)},
intArrayFromBase64:function(a){if("boolean"==typeof this.WEBINA_ENVIRONMENT_IS_NODE&&this.WEBINA_ENVIRONMENT_IS_NODE){try{var c=Buffer.from(a,"base64")}catch(e){c=new Buffer(a,"base64")}return new Uint8Array(c.buffer,c.byteOffset,c.byteLength)}try{var b=decodeBase64(a),d=new Uint8Array(b.length);for(a=0;a<b.length;++a)d[a]=b.charCodeAt(a);return d}catch(e){throw Error("Converting base64 string to bytes failed.");}},tryParseAsDataURI:function(a){if(this.isDataURI(a))return this.intArrayFromBase64(a.slice(this.WEBINA_DATA_URI_PREFIX.length))},
intArrayFromString:function(a,c,b){b=0<b?b:this.WEBINA_lengthBytesUTF8(a)+1;b=Array(b);a=this.WEBINA_stringToUTF8Array(a,b,0,b.length);return c&&(b.length=a),b},intArrayToString:function(a){for(var c=[],b=0;b<a.length;b++){var d=a[b];255<d&&(this.WEBINA_ASSERTIONS&&this.WEBINA_assert(!1,"Character code "+d+" ("+String.fromCharCode(d)+") at offset "+b+" not in 0x00-0xFF."),d&=255);c.push(String.fromCharCode(d))}return c.join("")}}}();
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
var threadInfoStruct=0,selfThreadId=0,parentThreadId=0,tempDoublePtr=0,STACK_BASE=0,STACKTOP=0,STACK_MAX=0,buffer,DYNAMICTOP_PTR=0,DYNAMIC_BASE=0,noExitRuntime,PthreadWorkerInit={},__performance_now_clock_drift=0,WEBINA_Module={};function WEBINA_assert(a,b){a||abort("Assertion failed: "+b)}
this.addEventListener("error",function(a){if(-1!=a.message.indexOf("SimulateInfiniteLoop"))return a.preventDefault();var b=" in "+a.filename+":"+a.lineno+":"+a.colno;console.error("Pthread "+selfThreadId+" uncaught exception"+(a.filename||a.lineno||a.colno?b:"")+": "+a.message+". Error object:");console.error(a.error)});function threadPrintErr(){var a=Array.prototype.slice.call(arguments).join(" ");console.error(a);console.error(Error().stack)}
function threadAlert(){var a=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:a,threadId:selfThreadId})}var err=threadPrintErr;this.alert=threadAlert;function resetPrototype(a,b){a=Object.create(a.prototype);for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);return a}WEBINA_Module.instantiateWasm=function(a,b){a=new WebAssembly.Instance(wasmModule,a);wasmModule=null;b(a);return a.exports};var wasmModule,wasmMemory;
this.onmessage=function(a){try{if("load"===a.data.cmd){tempDoublePtr=a.data.tempDoublePtr;DYNAMIC_BASE=a.data.DYNAMIC_BASE;DYNAMICTOP_PTR=a.data.DYNAMICTOP_PTR;WEBINA_Module.STACK_MAX=WEBINA_Module.STACKTOP=2147483647;wasmModule=a.data.wasmModule;wasmMemory=a.data.wasmMemory;buffer=wasmMemory.buffer;PthreadWorkerInit=a.data.PthreadWorkerInit;WEBINA_Module.ENVIRONMENT_IS_PTHREAD=!0;if("string"===typeof a.data.urlOrBlob)importScripts(a.data.urlOrBlob);else{var b=URL.createObjectURL(a.data.urlOrBlob);
importScripts(b);URL.revokeObjectURL(b)}"undefined"!==typeof FS&&"function"===typeof FS.createStandardStreams&&FS.createStandardStreams();postMessage({cmd:"loaded"})}else if("objectTransfer"===a.data.cmd)PThread.receiveObjectTransfer(a.data);else if("run"===a.data.cmd){__performance_now_clock_drift=performance.now()-a.data.time;threadInfoStruct=a.data.threadInfoStruct;__register_pthread_ptr(threadInfoStruct,0,0);selfThreadId=a.data.selfThreadId;parentThreadId=a.data.parentThreadId;var d=a.data.stackBase+
a.data.stackSize,e=a.data.stackBase;STACKTOP=STACK_BASE=e;STACK_MAX=d;WEBINA_assert(threadInfoStruct);WEBINA_assert(selfThreadId);WEBINA_assert(parentThreadId);WEBINA_assert(0!=STACK_BASE);WEBINA_assert(d>a.data.stackBase);WEBINA_assert(d>e);WEBINA_assert(a.data.stackBase===e);WEBINA_Module.establishStackSpace(a.data.stackBase,a.data.stackBase+a.data.stackSize);writeStackCookie();PThread.receiveObjectTransfer(a.data);PThread.setThreadStatus(_pthread_self(),1);try{var f=WEBINA_Module.dynCall_ii(a.data.start_routine,
a.data.arg);checkStackCookie()}catch(c){if("Canceled!"===c){PThread.threadCancel();return}if("SimulateInfiniteLoop"===c||"pthread_exit"===c)return;Atomics.store(HEAPU32,threadInfoStruct+4>>2,c instanceof ExitStatus?c.status:-2);Atomics.store(HEAPU32,threadInfoStruct+0>>2,1);if("function"!==typeof _emscripten_futex_wake)throw err("Thread Initialisation failed."),c;_emscripten_futex_wake(threadInfoStruct+0,2147483647);if(!(c instanceof ExitStatus))throw c;}noExitRuntime||PThread.threadExit(f)}else"cancel"===
a.data.cmd?threadInfoStruct&&0==PThread.thisThreadCancelState&&PThread.threadCancel():"setimmediate"!==a.data.target&&("processThreadQueue"===a.data.cmd?threadInfoStruct&&_emscripten_current_thread_process_queued_calls():(err("worker.min.js received unknown command "+a.data.cmd),console.error(a.data)))}catch(c){throw console.error("worker.min.js onmessage() captured an uncaught exception: "+c),console.error(c.stack),c;}};
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,7 +5,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.fcf47e43952982c9dca9.vendors.css" rel="stylesheet"><link href="styles.css.fcf47e43952982c9dca9.styles.css.css" rel="stylesheet"></head>
<link rel="shortcut icon" href="favicon.ico"><link href="vendors.13c7e9f06bde2c8bfdb6.1.css" rel="stylesheet"><link href="styles.13c7e9f06bde2c8bfdb6.3.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
......@@ -19,6 +19,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.fcf47e43952982c9dca9.js"></script><script type="text/javascript" src="vendors.fcf47e43952982c9dca9.js"></script><script type="text/javascript" src="app.fcf47e43952982c9dca9.js"></script><script type="text/javascript" src="styles.css.fcf47e43952982c9dca9.js"></script></body>
<script type="text/javascript" src="runtime.13c7e9f06bde2c8bfdb6.js"></script><script type="text/javascript" src="vendors.13c7e9f06bde2c8bfdb6.js"></script><script type="text/javascript" src="app.13c7e9f06bde2c8bfdb6.js"></script><script type="text/javascript" src="styles.13c7e9f06bde2c8bfdb6.js"></script><script type="text/javascript" src="styles.css.13c7e9f06bde2c8bfdb6.js"></script></body>
</html>
This diff is collapsed.
(function(m){function p(a){for(var b=a[0],c=a[1],d=a[2],f,h,e=0,g=[];e<b.length;e++)h=b[e],Object.prototype.hasOwnProperty.call(k,h)&&k[h]&&g.push(k[h][0]),k[h]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(m[f]=c[f]);for(q&&q(a);g.length;)g.shift()();l.push.apply(l,d||[]);return r()}function r(){for(var a,b=0;b<l.length;b++){for(var n=l[b],d=!0,f=1;f<n.length;f++)0!==k[n[f]]&&(d=!1);d&&(l.splice(b--,1),a=c(c.s=n[0]))}return a}function c(a){if(e[a])return e[a].exports;var b=e[a]={i:a,l:!1,
exports:{}};m[a].call(b.exports,b,b.exports,c);b.l=!0;return b.exports}var e={},k={0:0},l=[];c.m=m;c.c=e;c.d=function(a,b,d){c.o(a,b)||Object.defineProperty(a,b,{enumerable:!0,get:d})};c.r=function(a){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"});Object.defineProperty(a,"__esModule",{value:!0})};c.t=function(a,b){b&1&&(a=c(a));if(b&8||b&4&&"object"===typeof a&&a&&a.__esModule)return a;var d=Object.create(null);c.r(d);Object.defineProperty(d,
"default",{enumerable:!0,value:a});if(b&2&&"string"!=typeof a)for(var e in a)c.d(d,e,function(b){return a[b]}.bind(null,e));return d};c.n=function(a){var b=a&&a.__esModule?function(){return a["default"]}:function(){return a};c.d(b,"a",b);return b};c.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};c.p="";var d=window.webpackJsonp=window.webpackJsonp||[],t=d.push.bind(d);d.push=p;d=d.slice();for(var g=0;g<d.length;g++)p(d[g]);var q=t;r()})([]);
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{1:function(b,c,a){a("+eM2");a("LdiE");a("GwUf");b.exports=a("8Lv4")},"8Lv4":function(b,c,a){},GwUf:function(b,c,a){}}]);
(function(){(window.webpackJsonp=window.webpackJsonp||[]).push([[4],[],[[1,0,1,3]]])}).call(this||window);
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
/**
* vuex v3.1.1
* (c) 2019 Evan You
* @license MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Vuex=e()}(this,function(){"use strict";var t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}var n=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},o={namespaced:{configurable:!0}};o.namespaced.get=function(){return!!this._rawModule.namespaced},n.prototype.addChild=function(t,e){this._children[t]=e},n.prototype.removeChild=function(t){delete this._children[t]},n.prototype.getChild=function(t){return this._children[t]},n.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},n.prototype.forEachChild=function(t){e(this._children,t)},n.prototype.forEachGetter=function(t){this._rawModule.getters&&e(this._rawModule.getters,t)},n.prototype.forEachAction=function(t){this._rawModule.actions&&e(this._rawModule.actions,t)},n.prototype.forEachMutation=function(t){this._rawModule.mutations&&e(this._rawModule.mutations,t)},Object.defineProperties(n.prototype,o);var i,r=function(t){this.register([],t,!1)};r.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},r.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")},"")},r.prototype.update=function(t){!function t(e,n,o){n.update(o);if(o.modules)for(var i in o.modules){if(!n.getChild(i))return;t(e.concat(i),n.getChild(i),o.modules[i])}}([],this.root,t)},r.prototype.register=function(t,o,i){var r=this;void 0===i&&(i=!0);var s=new n(o,i);0===t.length?this.root=s:this.get(t.slice(0,-1)).addChild(t[t.length-1],s);o.modules&&e(o.modules,function(e,n){r.register(t.concat(n),e,i)})},r.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var s=function(e){var n=this;void 0===e&&(e={}),!i&&"undefined"!=typeof window&&window.Vue&&d(window.Vue);var o=e.plugins;void 0===o&&(o=[]);var s=e.strict;void 0===s&&(s=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new r(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new i;var a=this,c=this.dispatch,u=this.commit;this.dispatch=function(t,e){return c.call(a,t,e)},this.commit=function(t,e,n){return u.call(a,t,e,n)},this.strict=s;var h=this._modules.root.state;p(this,h,[],this._modules.root),f(this,h),o.forEach(function(t){return t(n)}),(void 0!==e.devtools?e.devtools:i.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",function(t){e.replaceState(t)}),e.subscribe(function(e,n){t.emit("vuex:mutation",e,n)}))}(this)},a={state:{configurable:!0}};function c(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function u(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;p(t,n,[],t._modules.root,!0),f(t,n,e)}function f(t,n,o){var r=t._vm;t.getters={};var s=t._wrappedGetters,a={};e(s,function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var c=i.config.silent;i.config.silent=!0,t._vm=new i({data:{$$state:n},computed:a}),i.config.silent=c,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}(t),r&&(o&&t._withCommit(function(){r._data.$$state=null}),i.nextTick(function(){return r.$destroy()}))}function p(t,e,n,o,r){var s=!n.length,a=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[a]=o),!s&&!r){var c=h(e,n.slice(0,-1)),u=n[n.length-1];t._withCommit(function(){i.set(c,u,o.state)})}var f=o.context=function(t,e,n){var o=""===e,i={dispatch:o?t.dispatch:function(n,o,i){var r=l(n,o,i),s=r.payload,a=r.options,c=r.type;return a&&a.root||(c=e+c),t.dispatch(c,s)},commit:o?t.commit:function(n,o,i){var r=l(n,o,i),s=r.payload,a=r.options,c=r.type;a&&a.root||(c=e+c),t.commit(c,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return t.getters}:function(){return function(t,e){var n={},o=e.length;return Object.keys(t.getters).forEach(function(i){if(i.slice(0,o)===e){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return t.getters[i]},enumerable:!0})}}),n}(t,e)}},state:{get:function(){return h(t.state,n)}}}),i}(t,a,n);o.forEachMutation(function(e,n){!function(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,o.state,e)})}(t,a+n,e,f)}),o.forEachAction(function(e,n){var o=e.root?n:a+n,i=e.handler||e;!function(t,e,n,o){(t._actions[e]||(t._actions[e]=[])).push(function(e,i){var r,s=n.call(t,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:t.getters,rootState:t.state},e,i);return(r=s)&&"function"==typeof r.then||(s=Promise.resolve(s)),t._devtoolHook?s.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):s})}(t,o,i,f)}),o.forEachGetter(function(e,n){!function(t,e,n,o){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(t,a+n,e,f)}),o.forEachChild(function(o,i){p(t,e,n.concat(i),o,r)})}function h(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function l(t,e,n){var o;return null!==(o=t)&&"object"==typeof o&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function d(t){i&&t===i||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(i=t)}a.state.get=function(){return this._vm._data.$$state},a.state.set=function(t){},s.prototype.commit=function(t,e,n){var o=this,i=l(t,e,n),r=i.type,s=i.payload,a={type:r,payload:s},c=this._mutations[r];c&&(this._withCommit(function(){c.forEach(function(t){t(s)})}),this._subscribers.forEach(function(t){return t(a,o.state)}))},s.prototype.dispatch=function(t,e){var n=this,o=l(t,e),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.filter(function(t){return t.before}).forEach(function(t){return t.before(s,n.state)})}catch(t){}return(a.length>1?Promise.all(a.map(function(t){return t(r)})):a[0](r)).then(function(t){try{n._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(s,n.state)})}catch(t){}return t})}},s.prototype.subscribe=function(t){return c(t,this._subscribers)},s.prototype.subscribeAction=function(t){return c("function"==typeof t?{before:t}:t,this._actionSubscribers)},s.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch(function(){return t(o.state,o.getters)},e,n)},s.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},s.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),p(this,this.state,t,this._modules.get(t),n.preserveState),f(this,this.state)},s.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=h(e.state,t.slice(0,-1));i.delete(n,t[t.length-1])}),u(this)},s.prototype.hotUpdate=function(t){this._modules.update(t),u(this,!0)},s.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(s.prototype,a);var m=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=w(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[o].vuex=!0}),n}),v=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var r=w(this.$store,"mapMutations",t);if(!r)return;o=r.context.commit}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n}),_=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;i=t+i,n[o]=function(){if(!t||w(this.$store,"mapGetters",t))return this.$store.getters[i]},n[o].vuex=!0}),n}),y=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var r=w(this.$store,"mapActions",t);if(!r)return;o=r.context.dispatch}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n});function g(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function b(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function w(t,e,n){return t._modulesNamespaceMap[n]}return{Store:s,install:d,version:"3.1.1",mapState:m,mapMutations:v,mapGetters:_,mapActions:y,createNamespacedHelpers:function(t){return{mapState:m.bind(null,t),mapGetters:_.bind(null,t),mapMutations:v.bind(null,t),mapActions:y.bind(null,t)}}}});
\ No newline at end of file
......@@ -5,24 +5,47 @@
declare var Vue;
/**
* Setup the check-box Vue commponent.
* @returns void
*/
export function setup(): void {
Vue.component('check-box', {
/**
* Get the data associated with this component.
* @returns any The data.
*/
"data": function() {
return {}
},
"computed": {
"val": {
get() {
/**
* Get the value from the vinaParams object.
* @returns any
*/
get(): any {
return this.$store.state["vinaParams"][this["id"]];
},
set(val) {
/**
* Set the vinaParams object value.
* @param {any} val The new value.
* @returns void
*/
set(val: any): void {
this.$store.commit("setVinaParam", {
name: this["id"],
val: val
});
}
},
"desc"() {
/**
* Generates a description string.
* @returns string The description.
*/
"desc"(): string {
return this["description"] + (this["required"] !== true ? " (Leave blank to use default value.)" : "");
}
},
......
......@@ -5,9 +5,17 @@
declare var Vue;
/**
* Setup the file-input Vue commponent.
* @returns void
*/
export function setup(): void {
Vue.component('file-input', {
"data": function() {
/**
* Get the data associated with this component.
* @returns any The data.
*/
"data"(): any {
return {
"file": false
}
......@@ -49,10 +57,20 @@ export function setup(): void {
},
"computed": {
"val": {
get() {
/**
* Get the file.
* @returns any A blob?
*/
get(): any {
return this["file"]
},
set(val) {
/**
* Set the vinaParams object value.
* @param {any} val The new value.
* @returns void
*/
set(val: any): void {
if (val === null) {
// Reseting the value. Nothing to do here.
return;
......@@ -116,11 +134,21 @@ export function setup(): void {
fr.readAsArrayBuffer(val);
}
},
/**
* Determine whether the component value is valid.
* @returns boolean True if it is valid, false otherwise.
*/
"isValid"(): boolean {
return (this["file"] !== false) && (this["file"] !== null);
}
},
"mounted"() {
/**
* Runs when the vue component is mounted.
* @returns void
*/
"mounted"(): void {
// Make default validation entry.
if (this.$store.state["validation"][this["id"]] === undefined) {
this.$store.commit("setValidationParam", {
......
......@@ -5,12 +5,24 @@
declare var Vue;
/**
* Setup the form-button Vue commponent.
* @returns void
*/
export function setup(): void {
Vue.component('form-button', {
/**
* Get the data associated with this component.
* @returns any The data.
*/
"data": function() {
return {}
},
"computed": {
/**
* Determine which class to add to this buttno.
* @returns string The classes.
*/
"classToUse"(): string {
let classes = [this["cls"]];
if (this["small"] === true) {
......@@ -18,6 +30,11 @@ export function setup(): void {
}
return classes.join(" ");
},
/**
* Determine which button size to use.
* @returns string The size.
*/
"sizeToUse"(): string {
if (this["small"] === true) {
return "sm";
......
......@@ -5,18 +5,40 @@
declare var Vue;
/**
* Setup the form-group Vue commponent.
* @returns void
*/
export function setup(): void {
Vue.component('form-group', {
/**
* Get the data associated with this component.
* @returns any The data.
*/
"data": function() {
return {}
},
"computed": {
/**
* Determines whether this component has a label.
* @returns boolean True if it does, false otherwise.
*/
hasLabel(): boolean {
return this["label"] !== "" && this["label"] !== undefined;
},
/**
* Determines if label should be placed to the left or above.
* @returns number Returns 3 if it has a label, 0 otherwise.
*/
"labelCols"(): number {
return ((this.hasLabel === true) && (this["labelToLeft"] === true)) ? 3 : 0;
},
/**
* Determines if label should be placed to the left or above.
* @returns number Returns 2 if it has a label, 0 otherwise.
*/
"labelColsLg"(): number {
return ((this.hasLabel === true) && (this["labelToLeft"] === true)) ? 2 : 0;
}
......
......@@ -5,8 +5,16 @@
declare var Vue;
/**
* Setup the numeric-input Vue commponent.
* @returns void
*/
export function setup(): void {
Vue.component('numeric-input', {
/**
* Get the data associated with this component.
* @returns any The data.
*/
"data": function() {
return {
"invalidMsg": "This field is required."
......@@ -14,10 +22,20 @@ export function setup(): void {
},
"computed": {
"val": {
get() {
/**
* Get the value from the vinaParams object.
* @returns any
*/
get(): any {
return this.$store.state["vinaParams"][this["id"]];
},
set(val) {
/**
* Set the vinaParams object value.
* @param {any} val The new value.
* @returns void
*/
set(val: any): void {
// Save the value to the store
val = (val === "") ? undefined : +val;
if (isNaN(val)) {
......@@ -54,6 +72,11 @@ export function setup(): void {
});
}
},
/**
* Generates a description string.
* @returns string The description.
*/
"desc"(): string {
let toAdd = "";
if ((this["required"] !== true) && (this["default"] === undefined)) {
......@@ -61,6 +84,11 @@ export function setup(): void {
}
return this["description"] + toAdd;
},
/**
* Determine whether the component value is valid.
* @returns boolean True if it is valid, false otherwise.
*/
"isValid"(): boolean {
let val = this.$store.state["validation"][this["id"]];
return val;
......@@ -108,7 +136,12 @@ export function setup(): void {
"default": undefined
}
},
"mounted"() {
/**
* Runs when the vue component is mounted.
* @returns void
*/
"mounted"(): void {
// Always start by assuming it validates fine.
if (this.$store.state["validation"][this["id"]] === undefined) {
this.$store.commit("setValidationParam", {
......
......@@ -5,8 +5,16 @@
declare var Vue;
/**
* Setup the triple-numeric-input Vue commponent.
* @returns void
*/
export function setup(): void {
Vue.component('triple-numeric-input', {
/**
* Get the data associated with this component.
* @returns any The data.
*/
"data": function() {
return {}
},
......
......@@ -5,27 +5,55 @@
declare var Vue;
/**
* Setup the open-modal Vue commponent.
* @returns void
*/
export function setup(): void {
Vue.component('open-modal', {
/**
* Get the data associated with this component.
* @returns any The data.
*/
"data": function() {
return {}
},
"computed": {
"modalShow": {
get() {
/**
* Get the modalShow value..
* @returns boolean
*/
get(): boolean {
return this.$store.state["modalShow"];
},
set(val) {
/**
* Set the mmodalShow value.
* @param {boolean} val The new value.
* @returns void
*/
set(val: boolean): void {
this.$store.commit("setVar", {
name: "modalShow",
val
});
}
},
"title"() {
/**
* Gets the modal title.
* @returns string The title.
*/
"title"(): string {
return this.$store.state["modalTitle"];
},
"body"() {
/**
* Get's the modal body.
* @returns string The body.
*/
"body"(): string {
return this.$store.state["modalBody"];
}
},
......
......@@ -5,12 +5,24 @@
declare var Vue;
/**
* Setup the results-table Vue commponent.
* @returns void
*/
export function setup(): void {
Vue.component('results-table', {
/**
* Get the data associated with this component.
* @returns any The data.
*/
"data": function() {
return {}
},
"computed": {
/**
* Gets the items in the results table.
* @returns any[] The array of items.
*/
"items"(): any[] {
// let data = [[[1,48.4,0,0],"HETATM 1 C"],[[1,48.4,0,0],"HETATM 1 C"],[[1,48.4,0,0],"HETATM 1 C"]]; //this.$store.state["pdbOutputFrames"];
let data = this.$store.state["pdbOutputFrames"];
......@@ -45,6 +57,11 @@ export function setup(): void {
}
return items;
},
/**
* Get's the field descriptions of each item in the results list.
* @returns any[] A list of the field descriptions.
*/
"fields"(): any[] {
return [
{
......@@ -72,7 +89,13 @@ export function setup(): void {
`,
"props": {},
"methods": {
"rowClicked"(data, idx) {
/**
* Runs when the table row is clicked. Updates visualization.
* @param {any} data Not used.
* @param {number} idx The index of the clicked row.
* @returns void
*/
"rowClicked"(data: any, idx: number): void {
let ligPDBTxt = this.$store.state["pdbOutputFrames"][idx][1];
this.$store.commit("setVar", {
name: "dockedContents",
......
......@@ -5,9 +5,17 @@
declare var Vue;
/**
* Setup the sub-section Vue commponent.
* @returns void
*/
export function setup(): void {
Vue.component('sub-section', {
"data": function() {
/**
* Get the data associated with this component.
* @returns any The data.
*/
"data"(): any {
return {}
},