Commit 1c5abfe0 authored by Jacob Durrant's avatar Jacob Durrant

Added links to download receptor/ligand PDBQT input files.

parent 5f0ab028
......@@ -4,21 +4,30 @@ Changes
WIP
---
* Updated copyright notices.
* Updated the "Run Vina from the Command Line" widget.
* Fixed a minor bug that sometimes caused malformed example command lines.
* Added links so users can save the receptor and ligand PDBQT files
generated within the app.
* Created a separate, independent helper app called PDBQTConvert that can
convert files in many other formats (e.g., PDB, XYZ, CAN, SMI) to PDBQT (see
`pdbqt_convert/`). This app uses
[openbabel.js](https://github.com/partridgejiang/cheminfo-to-web/)
and is GNU GPL licensed. We distribute it alongside Webina, but as a
separate program.
* Modified Webina so users can optionally use PDBQTConvert to convert their
files. Webina communicates with PDBQTConvert at "arms length," via an
iframe.
* Added the ability to draw small-molecule ligands.
* Added link to optionally remove non-protein residues from the receptor.
* Added technical documentation (see `docs/`).
* Added the receptor and ligand PDBQT files used as examples in the
manuscript. See `docking_files/`.
* Added ways to provide/process input PDBQT files.
* Modified Webina so users can optionally use PDBQTConvert to convert their
input files. Webina communicates with PDBQTConvert at "arms length," via
an iframe.
* Added the ability to draw small-molecule ligands.
* Added a link to optionally remove non-protein residues from the receptor.
* Improved documentation.
* Added technical documentation (see `docs/`).
* Updated the `README.md` file to include:
* Instructions describing how to prepare PDBQT files.
* A brief description re. how to perform full-surface docking.
* Updated copyright notices.
* Added the receptor/ligand PDBQT files used as examples in the manuscript.
See `docking_files/`.
1.0.0
-----
......
......@@ -17,7 +17,7 @@ We have tested the Webina library on macOS 10.14.5, Windows 10 Home 1803, and
Ubuntu 18.04.3 LTS. Webina uses the SharedArrayBuffer JavaScript object to
allow multiple processes/threads to exchange data directly. This object is
currently available on Chromium-based browsers such as Google Chrome.
AAdditional browsers are likely to enable SharedArrayBuffer soon.
Additional browsers are likely to enable SharedArrayBuffer soon.
## Repository Contents ##
......@@ -38,6 +38,68 @@ AAdditional browsers are likely to enable SharedArrayBuffer soon.
## Description of Use ##
### Preparing Receptor/Ligand PDBQT Input Files ###
As is the case with command-line Vina, Webina accepts input receptor and
ligand files in the PDBQT format. The latest version of the Webina app
interfaces with the PDBQTConvert app (included in the git repository) to
convert these files from other formats (e.g., PDB) to PDBQT. But some advanced
users may wish to provide their own PDBQT files. Such users include:
* Users who wish to have more fine-grained control over the input. For
example, users who wish to specify protonation states, ring-conformational
forms, etc.
* Users who wish to access the Webina JavaScript Library itself, independent
of our user-friendly Webina app. The library itself is simply Vina compiled
to WebAssembly. It cannot convert files because Vina cannot convert files,
so users must provide their own PDBQT files.
#### Preparing the Receptor PDBQT File ####
We recommend the following steps for those who wish to provide their own
receptor PDBQT files:
* Download the PDB file from the [Protein Data Bank](https://www.rcsb.org/).
* Remove any ligands, ions, co-factors, water molecules, etc. that might
interfere with docking. Editing the PDB file in a text editor (e.g.,
[Notepad++](https://notepad-plus-plus.org/)) and deleting the appropriate
`ATOM` and `HETATM` records is perhaps the easiest way to remove these
components.
* Assign hydrogen atoms to the protein model. We recommend using the [PDB2PQR
server](http://apbs-rest-test.westus2.cloudapp.azure.com/), an online
website that adds hydrogen atoms per a user-specified pH.
* Convert to the PDBQT format. The PDB2PQR server will produce a PQR file that
includes hydrogen atoms. The simplest way to convert this file to PDBQT is
with the free program [Open Babel](http://openbabel.org/wiki/Main_Page).
Here is an example command: `obabel -xr -ipqr my_receptor.pqr -O
my_receptor.pdbqt`
##### Preparing the Ligand PDBQT File #####
We recommend the following steps for those who wish to provide their own
ligand PDBQT files:
* Obtain a copy of your ligand file in SMILES-string or SDF format. Many
molecular databases provide small-molecule files in these common formats. If
necessary, you can convert to these formats using [Open
Babel](http://openbabel.org/wiki/Main_Page). Many [online molecular
editors](https://pubchem.ncbi.nlm.nih.gov/edit3/index.html) also generate
SMILES strings by letting users draw their molecules.
* Generate 3D models of your ligand. We recommend using the program
[Gypsum-DL](https://durrantlab.pitt.edu/gypsum-dl/) to generate high-quality
models that account for alternate ionization, tautomeric, chiral, cis/trans
isomeric, and ring-conformational states (see [the
documentation](https://durrantlab.pitt.edu/gypsum-dl/) for a description of
use).
* Convert to PDBQT. Gypsum-DL will output ligand models in the SDF format. You
can convert these to PDBQT using [Open
Babel](http://openbabel.org/wiki/Main_Page) like this: `obabel -isdf
gypsum_output.sdf -O gypsum_output.pdbqt`
* It is also possible to convert directly from a SMILES or SDF file using only
Open Babel, though Open Babel lacks some of the features Gypsum-DL provides.
Here is an example command line: `obabel --gen3d -p -ismi ligand.smi -O
ligand.pdbqt`
### Webina JavaScript Library ###
The Webina library is built on the AutoDock Vina 1.1.2 codebase, compiled to
......@@ -80,7 +142,9 @@ receptor, ligand, and known-pose files.
__Docking Box.__ The "Docking Box" subsection allows users to specify the
region of the receptor where Webina should attempt to pose the ligand. This
box-shaped volume is typically centered on a known protein pocket or cavity
where a small-molecule ligand might reasonably bind.
where a small-molecule ligand might reasonably bind. If the box is large
enough to encompass the whole protein, Webina will attempt full-surface
docking (though so broad a search is not recommended).
To simplify the process of selecting a docking box, the Webina web app
automatically displays 3D models of the user-specified receptor and ligand
......@@ -161,7 +225,7 @@ generate the displayed Webina output.
#### Start Over Tab ####
The "Start Over" tab displays a simple button that allows the user to restart
the Webina app. A warning message reminds the user that they will loose the
the Webina app. A warning message reminds the user that they will lose the
results of the current Webina run unless they have saved their output files.
## Running Webina on Your Own Computer ##
......
......@@ -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.9c89844bce1d7efcb659.css" rel="stylesheet"><link href="styles.9c89844bce1d7efcb659.css" rel="stylesheet"></head>
<link rel="shortcut icon" href="favicon.ico"><link href="vendors.977a594b8e00216f9521.css" rel="stylesheet"><link href="styles.css.977a594b8e00216f9521.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.9c89844bce1d7efcb659.js"></script><script type="text/javascript" src="vendors.9c89844bce1d7efcb659.js"></script><script type="text/javascript" src="app.9c89844bce1d7efcb659.js"></script><script type="text/javascript" src="styles.9c89844bce1d7efcb659.js"></script><script type="text/javascript" src="styles.css.9c89844bce1d7efcb659.js"></script></body>
<script type="text/javascript" src="runtime.977a594b8e00216f9521.js"></script><script type="text/javascript" src="vendors.977a594b8e00216f9521.js"></script><script type="text/javascript" src="app.977a594b8e00216f9521.js"></script><script type="text/javascript" src="styles.css.977a594b8e00216f9521.js"></script></body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -85,7 +85,7 @@
Ubuntu 18.04.3 LTS. Webina uses the SharedArrayBuffer JavaScript object to
allow multiple processes/threads to exchange data directly. This object is
currently available on Chromium-based browsers such as Google Chrome.
AAdditional browsers are likely to enable SharedArrayBuffer soon.</p>
Additional browsers are likely to enable SharedArrayBuffer soon.</p>
<a href="#repository-contents" id="repository-contents" style="color: inherit; text-decoration: none;">
<h2>Repository Contents</h2>
</a>
......@@ -110,6 +110,71 @@
<a href="#description-of-use" id="description-of-use" style="color: inherit; text-decoration: none;">
<h2>Description of Use</h2>
</a>
<a href="#preparing-receptorligand-pdbqt-input-files" id="preparing-receptorligand-pdbqt-input-files" style="color: inherit; text-decoration: none;">
<h3>Preparing Receptor/Ligand PDBQT Input Files</h3>
</a>
<p>As is the case with command-line Vina, Webina accepts input receptor and
ligand files in the PDBQT format. The latest version of the Webina app
interfaces with the PDBQTConvert app (included in the git repository) to
convert these files from other formats (e.g., PDB) to PDBQT. But some advanced
users may wish to provide their own PDBQT files. Such users include:</p>
<ul>
<li>Users who wish to have more fine-grained control over the input. For
example, users who wish to specify protonation states, ring-conformational
forms, etc.</li>
<li>Users who wish to access the Webina JavaScript Library itself, independent
of our user-friendly Webina app. The library itself is simply Vina compiled
to WebAssembly. It cannot convert files because Vina cannot convert files,
so users must provide their own PDBQT files.</li>
</ul>
<a href="#preparing-the-receptor-pdbqt-file" id="preparing-the-receptor-pdbqt-file" style="color: inherit; text-decoration: none;">
<h4>Preparing the Receptor PDBQT File</h4>
</a>
<p>We recommend the following steps for those who wish to provide their own
receptor PDBQT files:</p>
<ul>
<li>Download the PDB file from the <a href="https://www.rcsb.org/">Protein Data Bank</a>.</li>
<li>Remove any ligands, ions, co-factors, water molecules, etc. that might
interfere with docking. Editing the PDB file in a text editor (e.g.,
<a href="https://notepad-plus-plus.org/">Notepad++</a>) and deleting the appropriate
<code>ATOM</code> and <code>HETATM</code> records is perhaps the easiest way to remove these
components.</li>
<li>Assign hydrogen atoms to the protein model. We recommend using the <a href="http://apbs-rest-test.westus2.cloudapp.azure.com/">PDB2PQR
server</a>, an online
website that adds hydrogen atoms per a user-specified pH.</li>
<li>Convert to the PDBQT format. The PDB2PQR server will produce a PQR file that
includes hydrogen atoms. The simplest way to convert this file to PDBQT is
with the free program <a href="http://openbabel.org/wiki/Main_Page">Open Babel</a>.
Here is an example command: <code>obabel -xr -ipqr my_receptor.pqr -O
my_receptor.pdbqt</code></li>
</ul>
<a href="#preparing-the-ligand-pdbqt-file" id="preparing-the-ligand-pdbqt-file" style="color: inherit; text-decoration: none;">
<h5>Preparing the Ligand PDBQT File</h5>
</a>
<p>We recommend the following steps for those who wish to provide their own
ligand PDBQT files:</p>
<ul>
<li>Obtain a copy of your ligand file in SMILES-string or SDF format. Many
molecular databases provide small-molecule files in these common formats. If
necessary, you can convert to these formats using <a href="http://openbabel.org/wiki/Main_Page">Open
Babel</a>. Many <a href="https://pubchem.ncbi.nlm.nih.gov/edit3/index.html">online molecular
editors</a> also generate
SMILES strings by letting users draw their molecules.</li>
<li>Generate 3D models of your ligand. We recommend using the program
<a href="https://durrantlab.pitt.edu/gypsum-dl/">Gypsum-DL</a> to generate high-quality
models that account for alternate ionization, tautomeric, chiral, cis/trans
isomeric, and ring-conformational states (see <a href="https://durrantlab.pitt.edu/gypsum-dl/">the
documentation</a> for a description of
use).</li>
<li>Convert to PDBQT. Gypsum-DL will output ligand models in the SDF format. You
can convert these to PDBQT using <a href="http://openbabel.org/wiki/Main_Page">Open
Babel</a> like this: <code>obabel -isdf
gypsum_output.sdf -O gypsum_output.pdbqt</code></li>
<li>It is also possible to convert directly from a SMILES or SDF file using only
Open Babel, though Open Babel lacks some of the features Gypsum-DL provides.
Here is an example command line: <code>obabel --gen3d -p -ismi ligand.smi -O
ligand.pdbqt</code></li>
</ul>
<a href="#webina-javascript-library" id="webina-javascript-library" style="color: inherit; text-decoration: none;">
<h3>Webina JavaScript Library</h3>
</a>
......@@ -150,7 +215,9 @@
<p><strong>Docking Box.</strong> The &quot;Docking Box&quot; subsection allows users to specify the
region of the receptor where Webina should attempt to pose the ligand. This
box-shaped volume is typically centered on a known protein pocket or cavity
where a small-molecule ligand might reasonably bind.</p>
where a small-molecule ligand might reasonably bind. If the box is large
enough to encompass the whole protein, Webina will attempt full-surface
docking (though so broad a search is not recommended).</p>
<p>To simplify the process of selecting a docking box, the Webina web app
automatically displays 3D models of the user-specified receptor and ligand
using the <a href="https://3dmol.csb.pitt.edu/">3Dmol.js JavaScript library</a>. By
......@@ -222,7 +289,7 @@
<h4>Start Over Tab</h4>
</a>
<p>The &quot;Start Over&quot; tab displays a simple button that allows the user to restart
the Webina app. A warning message reminds the user that they will loose the
the Webina app. A warning message reminds the user that they will lose the
results of the current Webina run unless they have saved their output files.</p>
<a href="#running-webina-on-your-own-computer" id="running-webina-on-your-own-computer" style="color: inherit; text-decoration: none;">
<h2>Running Webina on Your Own Computer</h2>
......
......@@ -229,6 +229,9 @@
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.iinputfilenames.html" class="tsd-kind-icon">IInput<wbr>File<wbr>Names</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.imodal.html" class="tsd-kind-icon">IModal</a>
</li>
......
......@@ -203,6 +203,9 @@
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.ifileconvertmodal.html" class="tsd-kind-icon">IFile<wbr>Convert<wbr>Modal</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.iinputfilenames.html" class="tsd-kind-icon">IInput<wbr>File<wbr>Names</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
......
......@@ -203,6 +203,9 @@
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.ifileconvertmodal.html" class="tsd-kind-icon">IFile<wbr>Convert<wbr>Modal</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.iinputfilenames.html" class="tsd-kind-icon">IInput<wbr>File<wbr>Names</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.imodal.html" class="tsd-kind-icon">IModal</a>
</li>
......
......@@ -214,6 +214,9 @@
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.ifileconvertmodal.html" class="tsd-kind-icon">IFile<wbr>Convert<wbr>Modal</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.iinputfilenames.html" class="tsd-kind-icon">IInput<wbr>File<wbr>Names</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.imodal.html" class="tsd-kind-icon">IModal</a>
</li>
......
......@@ -203,6 +203,9 @@
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.ifileconvertmodal.html" class="tsd-kind-icon">IFile<wbr>Convert<wbr>Modal</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.iinputfilenames.html" class="tsd-kind-icon">IInput<wbr>File<wbr>Names</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-not-exported">
<a href="_vue_store_.imodal.html" class="tsd-kind-icon">IModal</a>
</li>
......
......@@ -118,7 +118,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Forms/FileInput.ts:154</li>
<li>Defined in UI/Forms/FileInput.ts:162</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -141,7 +141,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Forms/FileInput.ts:180</li>
<li>Defined in UI/Forms/FileInput.ts:188</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -181,7 +181,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Forms/FileInput.ts:95</li>
<li>Defined in UI/Forms/FileInput.ts:103</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -204,7 +204,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Forms/FileInput.ts:106</li>
<li>Defined in UI/Forms/FileInput.ts:114</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -280,7 +280,7 @@
<div class="tsd-signature tsd-kind-icon">methods<wbr>Functions<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Forms/FileInput.ts:122</li>
<li>Defined in UI/Forms/FileInput.ts:130</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -298,7 +298,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Forms/FileInput.ts:129</li>
<li>Defined in UI/Forms/FileInput.ts:137</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......
......@@ -100,7 +100,7 @@
<div class="tsd-signature tsd-kind-icon">Vue<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:5</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:7</li>
</ul>
</aside>
</section>
......@@ -117,7 +117,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:136</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:146</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -139,7 +139,7 @@
<div class="tsd-signature tsd-kind-icon">computed<wbr>Functions<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:8</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:10</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -157,7 +157,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:28</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:30</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -180,7 +180,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:37</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:39</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -204,7 +204,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:47</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:49</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -225,7 +225,7 @@
<div class="tsd-signature tsd-kind-icon">convert<wbr>File<wbr>Modal<wbr>Show<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:11</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:13</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -244,7 +244,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:12</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:14</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
......@@ -261,7 +261,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:16</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:18</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
......@@ -282,7 +282,7 @@
<div class="tsd-signature tsd-kind-icon">methods<wbr>Functions<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:59</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:61</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -300,7 +300,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:60</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:62</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
......@@ -323,7 +323,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:114</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:122</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
......@@ -340,7 +340,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Modal/ConvertFileModal.ts:127</li>
<li>Defined in UI/Modal/ConvertFileModal.ts:137</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
......
......@@ -116,7 +116,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Tabs/VinaExistingOutput.ts:118</li>
<li>Defined in UI/Tabs/VinaExistingOutput.ts:119</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -156,7 +156,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Tabs/VinaExistingOutput.ts:56</li>
<li>Defined in UI/Tabs/VinaExistingOutput.ts:57</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -220,7 +220,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Tabs/VinaExistingOutput.ts:90</li>
<li>Defined in UI/Tabs/VinaExistingOutput.ts:91</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......
......@@ -129,7 +129,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Tabs/VinaParams.ts:318</li>
<li>Defined in UI/Tabs/VinaParams.ts:330</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -152,7 +152,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Tabs/VinaParams.ts:326</li>
<li>Defined in UI/Tabs/VinaParams.ts:338</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -280,7 +280,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Tabs/VinaParams.ts:265</li>
<li>Defined in UI/Tabs/VinaParams.ts:277</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -324,7 +324,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Tabs/VinaParams.ts:173</li>
<li>Defined in UI/Tabs/VinaParams.ts:177</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -356,7 +356,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Tabs/VinaParams.ts:180</li>
<li>Defined in UI/Tabs/VinaParams.ts:184</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
......@@ -379,7 +379,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Tabs/VinaParams.ts:106</li>
<li>Defined in UI/Tabs/VinaParams.ts:110</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -402,7 +402,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Tabs/VinaParams.ts:306</li>
<li>Defined in UI/Tabs/VinaParams.ts:318</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......@@ -458,7 +458,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in UI/Tabs/VinaParams.ts:218</li>
<li>Defined in UI/Tabs/VinaParams.ts:230</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
......
......@@ -76,6 +76,7 @@
<li class="tsd-kind-function tsd-parent-kind-module"><a href="_utils_.html#curpath" class="tsd-kind-icon">cur<wbr>Path</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="_utils_.html#getnewobjwithupdate" class="tsd-kind-icon">get<wbr>New<wbr>Obj<wbr>With<wbr>Update</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="_utils_.html#isfirefox" class="tsd-kind-icon">is<wbr>Firefox</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="_utils_.html#replaceext" class="tsd-kind-icon">replace<wbr>Ext</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="_utils_.html#webassemblysupported" class="tsd-kind-icon">web<wbr>Assembly<wbr>Supported</a></li>
</ul>
</section>
......@@ -175,6 +176,44 @@
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
<a name="replaceext" class="tsd-anchor"></a>
<h3>replace<wbr>Ext</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
<li class="tsd-signature tsd-kind-icon">replace<wbr>Ext<span class="tsd-signature-symbol">(</span>filename<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, newExt<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in Utils.ts:76</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Given a filename, replace its extension.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>filename: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The original filename.</p>
</div>
</li>
<li>
<h5>newExt: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The new extension.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<p>string The new filename.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
<a name="webassemblysupported" class="tsd-anchor"></a>
<h3>web<wbr>Assembly<wbr>Supported</h3>
......@@ -294,6 +333,9 @@
<li class=" tsd-kind-function tsd-parent-kind-module">
<a href="_utils_.html#isfirefox" class="tsd-kind-icon">is<wbr>Firefox</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module">
<a href="_utils_.html#replaceext" class="tsd-kind-icon">replace<wbr>Ext</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module">
<a href="_utils_.html#webassemblysupported" class="tsd-kind-icon">web<wbr>Assembly<wbr>Supported</a>
</li>
......
This diff is collapsed.
......@@ -32,6 +32,12 @@ let computedFunctions = {
.map((e) => e.replace(/ /g, "").replace(/\./, ""));
if (convertExt.indexOf(ext) !== -1) {
// Set the filename.
this.$store.commit("updateFileName", {
type: this["id"],
filename: val.name,
});
this.getModelFileContents(val).then((text: string) => {
this.$store.commit("openConvertFileModal", {
ext: ext,
......@@ -43,17 +49,19 @@ let computedFunctions = {
} else if (acceptableExt.indexOf(ext) === -1) {
// It is not one of the acceptable extensions that can be
// converted to pdbqt. Need to cancel.
let extsAllowed = acceptableExt.concat(convertExt);
let msg = "The file must end in ";
if (acceptableExt.length > 1) {
acceptableExt[acceptableExt.length - 1] =
"or " + acceptableExt[acceptableExt.length - 1];
if (extsAllowed.length > 1) {
extsAllowed[extsAllowed.length - 1] =
"or " + extsAllowed[extsAllowed.length - 1];
}
let okFilesString: string;
if (acceptableExt.length > 2) {
okFilesString = acceptableExt.join('," "');
if (extsAllowed.length > 2) {
okFilesString = extsAllowed.join('," "');
} else {
okFilesString = acceptableExt.join('" "');
okFilesString = extsAllowed.join('" "');
}
okFilesString = okFilesString.replace(/"or /g, 'or "');
......@@ -74,9 +82,9 @@ let computedFunctions = {
val: true,
});
this.$store.commit("setVar", {
name: this["id"] + "FileName",
val: val.name,
this.$store.commit("updateFileName", {
type: this["id"],
filename: val.name,
});
this.getModelFileContents(this["file"]).then((text: string) => {
......
......@@ -2,6 +2,8 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
import * as Utils from "../../Utils";
declare var Vue;
/** An object containing the vue-component computed functions. */
......@@ -83,9 +85,10 @@ let methodsFunctions = {
name: this["currentType"] + "Contents",
val: out
});
this["$refs"]["convert-modal"].hide();
// This makes it ook like it validated.
// This makes it look like it validated.
this.$store.commit("setVar", {
name: this["currentType"] + "ForceValidate",
val: true
......@@ -96,6 +99,10 @@ let methodsFunctions = {
name: this["currentType"],
val: true
});
// Update the filename to end in pdbqt.
let newFilename = Utils.replaceExt(this.$store.state[this["currentType"] + "FileName"], "converted.pdbqt");
this.$store.commit("updateFileName", { type: this["currentType"], filename: newFilename });
}).catch((msg) => {
this["$refs"]["convert-modal"].hide();
this["$bvModal"]["msgBoxOk"]("Could not convert your file. Are you sure it is a properly formatted " + this["currentExt"] + " file?", {
......@@ -105,6 +112,7 @@ let methodsFunctions = {
name: this["currentType"] + "ForceValidate",
val: false