From 3d971c498b1b7fdc7bad8081592444bd54fa17d8 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 2 Jun 2020 23:23:56 +0530 Subject: Publish deploy 2020-06-02 23:23 --- feed.rss | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'feed.rss') diff --git a/feed.rss b/feed.rss index 306d50a..a14888e 100644 --- a/feed.rss +++ b/feed.rss @@ -1,4 +1,32 @@ -Navan ChauhanWelcome to my personal fragment of the internet. Majority of the posts should be complete.https://navanchauhan.github.io/enMon, 1 Jun 2020 12:33:11 +0530Mon, 1 Jun 2020 12:33:11 +0530250https://navanchauhan.github.io/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOLWorkflow for Lightning Fast Molecular Docking Part OneThis is my workflow for lightning fast molecular docking.https://navanchauhan.github.io/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOLMon, 1 Jun 2020 13:10:00 +0530Workflow for Lightning Fast Molecular Docking Part One

My Setup

  • macOS Catalina ( RIP 32bit app)
  • PyMOL
  • AutoDock Vina
  • Open Babel

One Command Docking

obabel -:"$(pbpaste)" --gen3d -opdbqt -Otest.pdbqt && vina --receptor lu.pdbqt --center_x -9.7 --center_y 11.4 --center_z 68.9 --size_x 19.3 --size_y 29.9 --size_z 21.3 --ligand test.pdbqt +Navan ChauhanWelcome to my personal fragment of the internet. Majority of the posts should be complete.https://navanchauhan.github.io/enTue, 2 Jun 2020 23:23:46 +0530Tue, 2 Jun 2020 23:23:46 +0530250https://navanchauhan.github.io/posts/2020-06-02-Compiling-AutoDock-Vina-on-iOSCompiling AutoDock Vina on iOSCompiling AutoDock Vina on iOShttps://navanchauhan.github.io/posts/2020-06-02-Compiling-AutoDock-Vina-on-iOSTue, 2 Jun 2020 23:23:00 +0530Compiling AutoDock Vina on iOS

Why? Because I can.

Installing makedepend

makedepend 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 makedepend (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 Makefile to provide the path to the iOS SDKs using the -isysroot flag.

Editting the Makefile

Original Makefile ( I used the provided mac Makefile base )

BASE=/usr/local +BOOST_VERSION=1_41 +BOOST_INCLUDE = $(BASE)/include +C_PLATFORM=-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 +GPP=/usr/bin/g++ +C_OPTIONS= -O3 -DNDEBUG +BOOST_LIB_VERSION= + +include ../../makefile_common +

I installed Boost 1.68.0-1 from Sam Bingner's repository. ( Otherwise I would have had to compile boost too 😫 )

Editted Makefile

BASE=/usr +BOOST_VERSION=1_68 +BOOST_INCLUDE = $(BASE)/include +C_PLATFORM=-arch arm64 -isysroot /var/sdks/Latest.sdk +GPP=/usr/bin/g++ +C_OPTIONS= -O3 -DNDEBUG +BOOST_LIB_VERSION= + +include ../../makefile_common +

Updating the Source Code

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

Error 1 - No Matching Constructor

../../../src/main/main.cpp:50:9: error: no matching constructor for initialization of 'path' (aka 'boost::filesystem::path') +return path(str, boost::filesystem::native); +

This was an easy fix, I just commented this and added a return statement to return the path

return path(str) +

Error 2 - No Member Named 'nativefilestring'

../../../src/main/main.cpp:665:57: error: no member named 'native_file_string' in 'boost::filesystem::path' + std::cerr << "\n\nError: could not open \"" << e.name.native_file_string() << "\" for " << (e.in ? "reading" : "writing") << ".\n"; + ~~~~~~ ^ +../../../src/main/main.cpp:677:80: error: no member named 'native_file_string' in 'boost::filesystem::path' + std::cerr << "\n\nParse error on line " << e.line << " in file \"" << e.file.native_file_string() << "\": " << e.reason << '\n'; + ~~~~~~ ^ +2 errors generated. +

Turns out native_file_string was deprecated in Boost 1.57 and replaced with just string

Error 3 - Library Not Found

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.

Error 4 - No Member Named 'nativefilestring' Again.

But, this time in another file and I quickle fixed it

Moment of Truth

Obviously it was working on my iPad, but would it work on another device? I transfered the compiled binary and

The package is available on my repository and only depends on boost. ( Both, Vina and Vina-Split are part of the package)

]]>
https://navanchauhan.github.io/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOLWorkflow for Lightning Fast Molecular Docking Part OneThis is my workflow for lightning fast molecular docking.https://navanchauhan.github.io/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOLMon, 1 Jun 2020 13:10:00 +0530Workflow for Lightning Fast Molecular Docking Part One

My Setup

  • macOS Catalina ( RIP 32bit app)
  • PyMOL
  • AutoDock Vina
  • Open Babel

One Command Docking

obabel -:"$(pbpaste)" --gen3d -opdbqt -Otest.pdbqt && vina --receptor lu.pdbqt --center_x -9.7 --center_y 11.4 --center_z 68.9 --size_x 19.3 --size_y 29.9 --size_z 21.3 --ligand test.pdbqt

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.

Let me break down the commands

obabel -:"$(pbpaste)" --gen3d -opdbqt -Otest.pdbqt

pbpaste and pbcopy are macOS commands for pasting and copying from and to the clipboard. Linux users may install the xclip and xsel packages from their respective package managers and then insert these aliases into their bash_profile, zshrc e.t.c

alias pbcopy='xclip -selection clipboard' alias pbpaste='xclip -selection clipboard -o' -- cgit v1.2.3