aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2024-04-03 00:23:42 -0600
committerGitHub <noreply@github.com>2024-04-03 00:23:42 -0600
commita202bcbf8dea84a5c14453a32d232a93fa2b19b5 (patch)
tree44d456ac8b9adcb9e4862b83f2977799c505d849
parent94392ab9c05d5677b99883f44eacc5a0fd16d3e1 (diff)
parente659a731ea37d9c0f501793254bd93054b52dcc2 (diff)
Merge pull request #1 from navanchauhan/init-add
add autodock-vina and chemicalite
-rw-r--r--Formula/autodock-vina.rb43
-rw-r--r--Formula/chemicalite.rb29
2 files changed, 72 insertions, 0 deletions
diff --git a/Formula/autodock-vina.rb b/Formula/autodock-vina.rb
new file mode 100644
index 0000000..078b16c
--- /dev/null
+++ b/Formula/autodock-vina.rb
@@ -0,0 +1,43 @@
+class AutodockVina < Formula
+ desc "Open-source program for doing molecular docking"
+ homepage "https://vina.scripps.edu"
+ url "https://github.com/ccsb-scripps/AutoDock-Vina/archive/refs/tags/v1.2.5.tar.gz"
+ sha256 "38aec306bff0e47522ca8f581095ace9303ae98f6a64031495a9ff1e4b2ff712"
+ license "Apache-2.0"
+
+ depends_on "swig" => :build
+ depends_on "boost"
+
+ def install
+ if OS.mac?
+ cd "build/mac/release" do
+ inreplace "Makefile" do |s|
+ s.gsub! "C_OPTIONS= -O3 -DNDEBUG -std=c++11 -fvisibility=hidden", "C_OPTIONS= -O3 -DNDEBUG \
+ -std=c++14 -fvisibility=hidden -DBOOST_TIMER_ENABLE_DEPRECATED"
+ s.gsub! "BASE=/usr/local", "BASE=#{HOMEBREW_PREFIX}"
+ end
+ system "make"
+ system "make"
+ bin.install "vina"
+ bin.install "vina_split"
+ end
+ else
+ cd "build/linux/release" do
+ inreplace "Makefile" do |s|
+ s.gsub! "C_OPTIONS= -O3 -DNDEBUG -std=c++11", "C_OPTIONS= -O3 -DNDEBUG \
+ -std=c++14 -DBOOST_TIMER_ENABLE_DEPRECATED"
+ s.gsub! "BASE=/usr/local", "BASE=#{HOMEBREW_PREFIX}"
+ end
+ system "make"
+ system "make"
+ bin.install "vina"
+ bin.install "vina_split"
+ end
+ end
+ end
+
+ test do
+ system "#{HOMEBREW_PREFIX}/bin/vina", "--version"
+ system "#{HOMEBREW_PREFIX}/bin/vina_split", "--version"
+ end
+end
diff --git a/Formula/chemicalite.rb b/Formula/chemicalite.rb
new file mode 100644
index 0000000..6c94a38
--- /dev/null
+++ b/Formula/chemicalite.rb
@@ -0,0 +1,29 @@
+class Chemicalite < Formula
+ desc "SQLite extension for chemoinformatics applications"
+ homepage "https://chemicalite.readthedocs.io/en/latest/"
+ url "https://github.com/rvianello/chemicalite/archive/refs/tags/2024.02.1.tar.gz"
+ sha256 "fa254bb9a9b15b8fb4befefc28ff12225fdf99ddcf3ee0a5bd749be72283c9e7"
+ license "BSD-3-Clause"
+
+ depends_on "catch2" => [:build, :test]
+ depends_on "cmake" => :build
+ depends_on "sqlite" => [:build, :test]
+ depends_on "python3" => [:test]
+ depends_on "boost"
+ depends_on "rdkit"
+
+ def install
+ system "cmake", "-S", ".", "-B", "build", "-DCHEMICALITE_ENABLE_TESTS=OFF", *std_cmake_args
+ system "cmake", "--build", "build"
+ system "cmake", "--install", "build"
+ end
+
+ test do
+ system "python3", "-c", "import sqlite3; \
+ con = sqlite3.connect('chembldb.sql'); \
+ con.enable_load_extension(True); \
+ con.load_extension('chemicalite'); \
+ con.execute( \
+ 'CREATE TABLE chembl(id INTEGER PRIMARY KEY, chembl_id TEXT, molecule MOL)')"
+ end
+end