Code Monkey home page Code Monkey logo

useless_openbabel_script's Introduction

useless_openbabel_script

Installation

OpenBabel is needed. Install it via conda:

conda install -c conda-forge openbabel

Then adapt the Makefile (example from add_mols)

XX = g++

OBDIR = <path/to/directory>/anaconda3/envs/openbabel

INCLUDE = -I <path/to/directory>/anaconda3/envs/openbabel/include/openbabel3
LIBS = -L <path/to/directory>/anaconda3/envs/openbabel/lib

CXX_FLAGS = -std=c++17 -O3 -march=native -Wall
LINKER_FLAGS = -lopenbabel

all: add_mols

add_mols: src/add_mols.cpp src/utils.hpp
	$(CXX) $(INCLUDE) $(LIBS) $(CXX_FLAGS) src/add_mols.cpp -o add_mols $(LINKER_FLAGS)

clean:
	rm -f add_mols
	rm -f mols_combined.xyz

If it compiles but after running the executable following error appears:

error while loading shared libraries: libopenbabel.so.7: cannot open shared object file: No such file or directory

Add following line to your .bashrc:

LD_LIBRARY_PATH=<path/to/directory>/anaconda3/envs/openbabel/lib/:$LD_LIBRARY_PATH'

Use

convert: reads in a molecule using a specified file format and converts it to a desired format.

conv --f_in <full path to molecule> --format_in <input format> --format_out <output format>

add_mols: reading in 2 smiles codes, add hydrogens, generates 3D geometries, puts molecule in the same 'file' moves them apart and minimizes the energy using a forcefield and finally saves them as an xyz file.

add_mols --target 'O=Cl(=O)([O-])=O' --ligand 'C12=C(C=CC=C2)C=C3C=CC=CC3=[NH+]1'

TODO: a lot!

useless_openbabel_script's People

Contributors

heini-phys-chem avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.