Skip to content

A physics computational framework for python and ipython

License

Notifications You must be signed in to change notification settings

rtrottie/pylada-light

 
 

Repository files navigation

pylada-crystal

https://travis-ci.org/pylada/pylada-light.svg?branch=master

A python computational physics framework.

Minimal version of pylada necessary to just run the crystal,VASP,ewald,jobs,and database modules

Constructed by Peter Graf from Mayeul d'Avezac's pylada

Usage

There are some IPython notebooks in the notebooks subdirectory. And documentation can be found [online](http://pylada.github.io/pylada-light/), though somewhat out of date. Notably, it does not describe the PWSCF wrapper.

For more examples, look at the tests in each subfolder, and at the BDD scenarios in the espresso/tests/bdd/features folder.

Finally, do join us on [slack](pylada.slack.com). Send one of the authors an email if you need access.

Installation

There are currently two pre-requisites:

  • CMake, a cross-platform build system
  • git, a distributed version control system

Both are generally available on Linux and OS/X (via homebrew for instance).

The simplest approach is to install via pip:

  • global installation

    pip install git+https://github.com/pylada/pylada-light
  • local (user) installation

    pip install --user git+https://github.com/pylada/pylada-light
  • in a virtual environment

    mkvirtualenv --system-site-packages pylada
    source pylada/bin/activate
    pip install git+https://github.com/pylada/pylada-light

    This last approach is recommended since it keeps the pylada environment isolated from the rest of the system. Susbsequently, this environment can be accessed by running the second line.

Installation for development

There are two approaches for developping with pylada. One is to use the bare-bone cmake build system. The other is to two have pip setup the cmake system for you.

In either case, the source should first be obtained from the github repo.

  • bare-bone

    cd /path/to/source
    mkdir build
    cd build
    cmake ..
    make
    make test

    The usual cmake options apply. In order to facilitate debugging, a script :bash:`localpython.sh` exists in the build directory to a run a python session that will know where to find the pylada package that is being developped. For instance :bash:`./localpython.sh -m IPython` will launch an ipython session where the current pylada can be imported.

  • pip develop

    mkvirtualenv --system-site-packages pylada
    source pylada/bin/activate
    pip install -e git+https://github.com/pylada/pylada-light#egg=pylada
    cd pylada/src/pylada/build
    make test

    The above creates a virtual environment and installs pylada inside it in development mode. This means that the virtual environment will know about the pylada flavor in development. It is possible to edit a file, do :bash:`make`, launch python and debug. One just needs to active the virtual environment once per session.

About

A physics computational framework for python and ipython

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 95.4%
  • C++ 1.4%
  • CMake 1.4%
  • Jupyter Notebook 1.2%
  • Fortran 0.4%
  • Gherkin 0.1%
  • Other 0.1%