Skip to main content

Pythonic Wrapper to LAMMPS using cython

Project description

lammps-cython

A cython wrapper around lammps. Lammps is a great molecular dynamics package that currently does not have a convenient way to run. The goal of this project is to put an opinionated wrapper around LAMMPS (the good parts) and allow the user to easily extend it's functionality in python. The api should feel very similar to HOOMD. Full documentation can be found at lammps-python.

Features

  • Full MPI support
  • Pythonic API inspired by HOOMD
  • Supports Python 2 and 3
  • Heavily documented and tested
  • Elimination of unnecessary file I/O
  • Run lammps regularly (use "-i" instead of stdin)
from lammps import Lammps
import sys
Lammps(args=sys.args)

Install

First install all the dependencies. You must install an MPI implementation separately.

pip install -r requirements.txt

Edit the lammps.cfg to have the correct directories and filenames. Often times the lammps.cfg does not require much editing.

python setup.py install

Soon I will make the package available on PIPY so that it can be installed via pip install lammps.

Installing LAMMPS Ubuntu

I will attempt to keep this current (1/10/2016) on how to install in Ubuntu. Should work similarly for Linux distributions. I am not knowledgeable on how to install on OSX or Windows (maybe this will change). Run these commands most likely as a super user. If you are working on a cluster it is a good chance that you will not need to install the dependencies.

sudo apt install mpich libfftw3-dev libpng-dev libjpeg-dev

Assuming the dependencies are installed lammps should be very easy to install.

Building Library

Since we are using python to execute lammps we do not need to make the LAMMPS executable.

cd <lammps_download_folder>/src
make mode=shlib ubuntu

Honestly this make configuration should work for most systems.

Dependencies

Documentation

For a full reference of the lammps-python api.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lammps-cython-0.3.3.tar.gz (13.1 kB view details)

Uploaded Source

File details

Details for the file lammps-cython-0.3.3.tar.gz.

File metadata

  • Download URL: lammps-cython-0.3.3.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for lammps-cython-0.3.3.tar.gz
Algorithm Hash digest
SHA256 193d56b48a54d8351e001cad784fb4a309701844bcb4e45e3e67094d2fabba30
MD5 4b7812e45dcca5d00cf2136054e62210
BLAKE2b-256 716700aa22f0c06bfa3a63cbd658da3b04bf2ddf51bd49ef2bf1884d49c14636

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page