Git Product home page Git Product logo

chargefw2's Introduction

ChargeFW2

Application for computing partial atomic charges using selected empirical methods. ChargeFW2 is the computational core of Atomic Charge Calculator II.

See the short description of implemented methods.

Compilation requirements

Tested on Fedora 32-36 and Ubuntu 20.04-22.04. Other version of the libraries might work too however this was not tested.

Installation

After downloading and unpacking the sources, run the following in the ChargeFW2 directory:

$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=<WHERE-TO-INSTALL> -DCMAKE_BUILD_TYPE=Release
$ make
$ make install

Docker

Rather than installing all dependencies, you can run ChargeFW2 directly inside a Docker container.

# Build docker image
$ docker build -t chargefw2 .

# Run docker container
$ docker run -it --rm --entrypoint bash chargefw2

A prebuild Linux image is available on Docker Hub. However, it is not actively maintained and therefore it should only be used as a demo. It's highly recommended to build and manage your own Docker images.

$ docker run -it --rm --entrypoint bash docker.io/frimen/chargefw2

CLI workflow

The Docker container can be used in CLI workflows. However, since containers are run in isolated environments and don't have access to your local host files by default, you will need to create a volume or a bind-mount, which will allow sharing host files with the container.

In this example we bind-mount the current working directory into the container. This allows us to specify input files and output directories using relative paths. This is the most similar to running ChargeFW2 natively.

$ docker run -it --rm -v $PWD:$PWD chargefw2 --mode charges \
    --input-file $PWD/doc/molecules.sdf --chg-out-dir $PWD/

However, it is good practise to only bind-mount necessary directories. In the folowing example we bind-mount two directories: one directory that contains our input files and the other directory for ChargeFW2 output.

$ INPUT_DIRECTORY="/path/to/input/directory/"
$ OUTPUT_DIRECTORY="/path/to/output/directory/"

$ docker run -it --rm \
    -v $INPUT_DIRECTORY:$INPUT_DIRECTORY \
    -v $OUTPUT_DIRECTORY:$OUTPUT_DIRECTORY \
    chargefw2 --mode charges \
    --input-file $INPUT_DIRECTORY/path/to/file \
    --chg-out-dir $OUTPUT_DIRECTORY

The previous examples used a container which was destroyed once ChargeFW2 finished running. If you don't want to keep recreating the container for each use of ChargeFW2, you can create a detached container that will keep running in the background. You can then use docker exec to run commands inside the container.

# Create detached container
$ CONTAINER_ID=$(docker run -dt --rm --entrypoint bash -v $PWD:$PWD chargefw2)

# Run ChargeFW2 in detached container (can run multiple commands)
$ docker exec -it $CONTAINER_ID chargefw2 --mode charges \
    --input-file $PWD/doc/molecules.sdf --chg-out-dir $PWD/

# Remove container
$ docker rm -f $CONTAINER_ID

Usage

The documentation for the application and its Python bindings is located in the doc folder.

How to cite

If you found ChargeFW2 or Atomic Charge Calculator II helpful, please cite: Raček, T., Schindler, O., Toušek, D., Horský, V., Berka, K., Koča, J., & Svobodová, R. (2020). Atomic Charge Calculator II: web-based tool for the calculation of partial atomic charges. Nucleic Acids Research.

chargefw2's People

Contributors

krab1k avatar mergunfrimen avatar danny305 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.