Giter Site home page Giter Site logo

janberges / i-pi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from i-pi/i-pi

0.0 0.0 0.0 19.31 MB

i-PI: a universal force engine

Home Page: https://ipi-code.org/

Shell 0.12% Python 77.21% C 0.21% Fortran 21.00% Forth 0.69% Makefile 0.09% q 0.69%

i-pi's Introduction

i-PI: a Universal Force Engine

A Python interface for ab initio path integral molecular dynamics simulations (and more). i-PI is a Python server (that does not need to be compiled and only requires a relatively recent version of Python and Numpy) that applies an algorithm to update the positions of the nuclei. One of many compatible external codes acts as client, and computes the electronic energy and forces.

This is typically a patched version of an electronic structure code, but a simple self-contained Fortran driver that implements several simple interatomic potentials is included for test purposes.

i-PI was originally developed to simulate the quantum mechanical nature of light nuclei by performing path integral molecular dynamics simulations, and it implements most of the state-of-the-art methods to accelerate this kind of calculations. It has since grown to also provide all sorts of simulation strategies, from replica exchange to geometry optimization.

Quick Setup

To use i-PI with an existing driver, install and update using pip:

Last version:

python -m pip install git+https://github.com/i-pi/i-pi.git

Last Release:

pip install -U ipi

Full installation

To develop i-PI or test it with the self-contained driver, follow these instructions. It is assumed that i-PI will be run from a Linux environment, with a recent version of Python, Numpy and gfortran, and that the terminal is initially in the i-pi package directory (the directory containing this file), which you can obtain by cloning the repository

git clone https://github.com/i-pi/i-pi.git

Source the environment settings file env.sh as source env.sh or . env.sh. It is useful to put this in your .bashrc or other settings file if you always want to have i-PI available.

Compile the driver code

The built-in driver requires a FORTRAN compiler, and can be built as

cd drivers/f90
make
cd ../..

There is also a Python driver available in drivers/py, which however has limited functionalities.

Examples and demos

The examples and demos folders contain inputs for many different types of calculations based on i-PI. Examples are typically minimal use-cases of specific features, while demos are more structured, tutorial-like examples that show how to realize more complex setups, and also provide a brief discussion of the underlying algorithms.

To run these examples, you should typically start i-PI, redirecting the output to a log file, and then run a couple of instances of the driver code. The progress of the wrapper is followed by monitoring the log file with the tail Linux command.

Optionally, you can make a copy of the directory with the example somewhere else if you want to keep the i-PI directory clean. For example

cd demos/para-h2-tutorial/tutorial-1/
i-pi tutorial-1.xml > log &
i-pi-driver -h localhost -p 31415 -m sg -o 15 &
i-pi-driver -h localhost -p 31415 -m sg -o 15 &
tail -f log

The monitoring can be interrupted with CTRL+C when the run has finished (5000 steps).

Run the automatic test suite

The automatic test suite can be run by calling the i-pi-tests script. You need to have the pytest package installed

i-pi-tests

You may also need to install some dependencies, listed in requirements.txt.

See more details in the README file inside the ipi_tests folder.

Contributing

If you have new features you want to implement into i-PI, your contributions are much welcome. See CONTRIBUTING.md for a brief set of style guidelines and best practices. Before embarking into a substantial project, it might be good to get in touch with the developers, e.g. by opening a wishlist issue.

i-pi's People

Contributors

litman90 avatar ceriottm avatar eszterpos avatar mahrossi avatar venkatkapil24 avatar fidanyan avatar lykex avatar stur86 avatar ondrejmarsalek avatar taylor-96 avatar tbegusic avatar taochem avatar mjwillatt avatar jhrmnn avatar barakhirshberg avatar sauceda avatar luthaf avatar robinzyb avatar korolrom avatar glensk avatar alchem0x2a avatar kaisellschopp avatar sirmarcel avatar mhellstr avatar matthiassachs avatar yotamfe avatar b-fg avatar davidetisi avatar ianhbell avatar eljost 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.