summaryrefslogtreecommitdiff
path: root/feed.rss
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-06-02 23:23:56 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2020-06-02 23:23:56 +0530
commit3d971c498b1b7fdc7bad8081592444bd54fa17d8 (patch)
treed07f13bf498f2313d4c8831071d3f7d75ff0c7c4 /feed.rss
parent3ec7d22d1ca0c5a5bbd54a735f917aebab633928 (diff)
Publish deploy 2020-06-02 23:23
Diffstat (limited to 'feed.rss')
-rw-r--r--feed.rss30
1 files changed, 29 insertions, 1 deletions
diff --git a/feed.rss b/feed.rss
index 306d50a..a14888e 100644
--- a/feed.rss
+++ b/feed.rss
@@ -1,4 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content"><channel><title>Navan Chauhan</title><description>Welcome to my personal fragment of the internet. Majority of the posts should be complete.</description><link>https://navanchauhan.github.io/</link><language>en</language><lastBuildDate>Mon, 1 Jun 2020 12:33:11 +0530</lastBuildDate><pubDate>Mon, 1 Jun 2020 12:33:11 +0530</pubDate><ttl>250</ttl><atom:link href="https://navanchauhan.github.io/feed.rss" rel="self" type="application/rss+xml"/><item><guid isPermaLink="true">https://navanchauhan.github.io/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOL</guid><title>Workflow for Lightning Fast Molecular Docking Part One</title><description>This is my workflow for lightning fast molecular docking.</description><link>https://navanchauhan.github.io/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOL</link><pubDate>Mon, 1 Jun 2020 13:10:00 +0530</pubDate><content:encoded><![CDATA[<h1>Workflow for Lightning Fast Molecular Docking Part One</h1><h2>My Setup</h2><ul><li>macOS Catalina ( RIP 32bit app)</li><li>PyMOL</li><li>AutoDock Vina</li><li>Open Babel</li></ul><h2>One Command Docking</h2><pre><code><div class="highlight"><span></span>obabel -:<span class="s2">&quot;</span><span class="k">$(</span>pbpaste<span class="k">)</span><span class="s2">&quot;</span> --gen3d -opdbqt -Otest.pdbqt <span class="o">&amp;&amp;</span> vina --receptor lu.pdbqt --center_x -9.7 --center_y <span class="m">11</span>.4 --center_z <span class="m">68</span>.9 --size_x <span class="m">19</span>.3 --size_y <span class="m">29</span>.9 --size_z <span class="m">21</span>.3 --ligand test.pdbqt
+<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content"><channel><title>Navan Chauhan</title><description>Welcome to my personal fragment of the internet. Majority of the posts should be complete.</description><link>https://navanchauhan.github.io/</link><language>en</language><lastBuildDate>Tue, 2 Jun 2020 23:23:46 +0530</lastBuildDate><pubDate>Tue, 2 Jun 2020 23:23:46 +0530</pubDate><ttl>250</ttl><atom:link href="https://navanchauhan.github.io/feed.rss" rel="self" type="application/rss+xml"/><item><guid isPermaLink="true">https://navanchauhan.github.io/posts/2020-06-02-Compiling-AutoDock-Vina-on-iOS</guid><title>Compiling AutoDock Vina on iOS</title><description>Compiling AutoDock Vina on iOS</description><link>https://navanchauhan.github.io/posts/2020-06-02-Compiling-AutoDock-Vina-on-iOS</link><pubDate>Tue, 2 Jun 2020 23:23:00 +0530</pubDate><content:encoded><![CDATA[<h1>Compiling AutoDock Vina on iOS</h1><p>Why? Because I can.</p><h2>Installing makedepend</h2><p><code>makedepend</code> is a Unix tool used to generate dependencies of C source files. Most modern programes do not use this anymore, but then again AutoDock Vina's source code hasn't been changed since 2011. The first hurdle came when I saw that there was no makedepend command, neither was there any package on any development repository for iOS. So, I tracked down the original source code for <code>makedepend</code> (https://github.com/DerellLicht/makedepend). According to the repository this is actually the source code for the makedepend utility that came with some XWindows distribution back around Y2K. I am pretty sure there is a problem with my current compiler configuration because I had to manually edit the <code>Makefile</code> to provide the path to the iOS SDKs using the <code>-isysroot</code> flag.</p><h2>Editting the Makefile</h2><p>Original Makefile ( I used the provided mac Makefile base )</p><pre><code><div class="highlight"><span></span><span class="nv">BASE</span><span class="o">=</span>/usr/local
+<span class="nv">BOOST_VERSION</span><span class="o">=</span>1_41
+<span class="nv">BOOST_INCLUDE</span> <span class="o">=</span> <span class="k">$(</span>BASE<span class="k">)</span>/include
+<span class="nv">C_PLATFORM</span><span class="o">=</span>-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min<span class="o">=</span><span class="m">10</span>.4
+<span class="nv">GPP</span><span class="o">=</span>/usr/bin/g++
+<span class="nv">C_OPTIONS</span><span class="o">=</span> -O3 -DNDEBUG
+<span class="nv">BOOST_LIB_VERSION</span><span class="o">=</span>
+
+include ../../makefile_common
+</div></code></pre><p>I installed Boost 1.68.0-1 from Sam Bingner's repository. ( Otherwise I would have had to compile boost too 😫 )</p><p>Editted Makefile</p><pre><code><div class="highlight"><span></span><span class="nv">BASE</span><span class="o">=</span>/usr
+<span class="nv">BOOST_VERSION</span><span class="o">=</span>1_68
+<span class="nv">BOOST_INCLUDE</span> <span class="o">=</span> <span class="k">$(</span>BASE<span class="k">)</span>/include
+<span class="nv">C_PLATFORM</span><span class="o">=</span>-arch arm64 -isysroot /var/sdks/Latest.sdk
+<span class="nv">GPP</span><span class="o">=</span>/usr/bin/g++
+<span class="nv">C_OPTIONS</span><span class="o">=</span> -O3 -DNDEBUG
+<span class="nv">BOOST_LIB_VERSION</span><span class="o">=</span>
+
+include ../../makefile_common
+</div></code></pre><h2>Updating the Source Code</h2><p>Of course since Boost 1.41 many things have been added and deprecated, that is why I had to edit the source code to make it work with version 1.68</p><h3>Error 1 - No Matching Constructor</h3><pre><code><div class="highlight"><span></span>../../../src/main/main.cpp:50:9: error: no matching constructor <span class="k">for</span> initialization of <span class="s1">&#39;path&#39;</span> <span class="o">(</span>aka <span class="s1">&#39;boost::filesystem::path&#39;</span><span class="o">)</span>
+<span class="k">return</span> path<span class="o">(</span>str, boost::filesystem::native<span class="o">)</span><span class="p">;</span>
+</div></code></pre><p>This was an easy fix, I just commented this and added a return statement to return the path</p><pre><code><div class="highlight"><span></span><span class="k">return</span> path<span class="o">(</span>str<span class="o">)</span>
+</div></code></pre><h3>Error 2 - No Member Named 'native<em>file</em>string'</h3><pre><code><div class="highlight"><span></span>../../../src/main/main.cpp:665:57: error: no member named <span class="s1">&#39;native_file_string&#39;</span> in <span class="s1">&#39;boost::filesystem::path&#39;</span>
+ std::cerr &lt;&lt; <span class="s2">&quot;\n\nError: could not open \&quot;&quot;</span> <span class="s">&lt;&lt; e.name</span>.native_file_string<span class="o">()</span> &lt;&lt; <span class="s2">&quot;\&quot; for &quot;</span> &lt;&lt; <span class="o">(</span>e.in ? <span class="s2">&quot;reading&quot;</span> : <span class="s2">&quot;writing&quot;</span><span class="o">)</span> &lt;&lt; <span class="s2">&quot;.\n&quot;</span><span class="p">;</span>
+ ~~~~~~ ^
+../../../src/main/main.cpp:677:80: error: no member named <span class="s1">&#39;native_file_string&#39;</span> in <span class="s1">&#39;boost::filesystem::path&#39;</span>
+ std::cerr &lt;&lt; <span class="s2">&quot;\n\nParse error on line &quot;</span> <span class="s">&lt;&lt; e.line</span> &lt;&lt; <span class="s2">&quot; in file \&quot;&quot;</span> <span class="s">&lt;&lt; e.file</span>.native_file_string<span class="o">()</span> &lt;&lt; <span class="s2">&quot;\&quot;: &quot;</span> <span class="s">&lt;&lt; e.re</span>ason <span class="s">&lt;&lt; &#39;\n&#39;;</span>
+<span class="s"> ~~~~~~ ^</span>
+<span class="s">2 errors gen</span>erated.
+</div></code></pre><p>Turns out <code>native_file_string</code> was deprecated in Boost 1.57 and replaced with just <code>string</code></p><h3>Error 3 - Library Not Found</h3><p>This one still boggles me because there was no reason for it to not work, as a workaround I downloaded the DEB, extracted it and used that path for compiling.</p><h3>Error 4 - No Member Named 'native<em>file</em>string' Again.</h3><p>But, this time in another file and I quickle fixed it</p><h2>Moment of Truth</h2><p>Obviously it was working on my iPad, but would it work on another device? I transfered the compiled binary and</p><img src="https://navanchauhan.github.io//assets/posts/autodock-vina/s1.png" alt=""AutoDock Vina running on my iPhone""/><p>The package is available on my repository and only depends on boost. ( Both, Vina and Vina-Split are part of the package)</p>]]></content:encoded></item><item><guid isPermaLink="true">https://navanchauhan.github.io/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOL</guid><title>Workflow for Lightning Fast Molecular Docking Part One</title><description>This is my workflow for lightning fast molecular docking.</description><link>https://navanchauhan.github.io/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOL</link><pubDate>Mon, 1 Jun 2020 13:10:00 +0530</pubDate><content:encoded><![CDATA[<h1>Workflow for Lightning Fast Molecular Docking Part One</h1><h2>My Setup</h2><ul><li>macOS Catalina ( RIP 32bit app)</li><li>PyMOL</li><li>AutoDock Vina</li><li>Open Babel</li></ul><h2>One Command Docking</h2><pre><code><div class="highlight"><span></span>obabel -:<span class="s2">&quot;</span><span class="k">$(</span>pbpaste<span class="k">)</span><span class="s2">&quot;</span> --gen3d -opdbqt -Otest.pdbqt <span class="o">&amp;&amp;</span> vina --receptor lu.pdbqt --center_x -9.7 --center_y <span class="m">11</span>.4 --center_z <span class="m">68</span>.9 --size_x <span class="m">19</span>.3 --size_y <span class="m">29</span>.9 --size_z <span class="m">21</span>.3 --ligand test.pdbqt
</div></code></pre><p>To run this command you simple copy the SMILES structure of the ligand you want an it automatically takes it from your clipboard, generates the 3D structure in the AutoDock PDBQT format using Open Babel and then docks it with your receptor using AutoDock Vina, all with just one command.</p><p>Let me break down the commands</p><pre><code><div class="highlight"><span></span>obabel -:<span class="s2">&quot;</span><span class="k">$(</span>pbpaste<span class="k">)</span><span class="s2">&quot;</span> --gen3d -opdbqt -Otest.pdbqt
</div></code></pre><p><code>pbpaste</code> and <code>pbcopy</code> are macOS commands for pasting and copying from and to the clipboard. Linux users may install the <code>xclip</code> and <code>xsel</code> packages from their respective package managers and then insert these aliases into their bash_profile, zshrc e.t.c</p><pre><code><div class="highlight"><span></span><span class="nb">alias</span> <span class="nv">pbcopy</span><span class="o">=</span><span class="s1">&#39;xclip -selection clipboard&#39;</span>
<span class="nb">alias</span> <span class="nv">pbpaste</span><span class="o">=</span><span class="s1">&#39;xclip -selection clipboard -o&#39;</span>