Git Product home page Git Product logo

active_particles's Introduction

Active Brownian disks

Simple model of active particles

Yann-Edwin Keta, University of British Columbia, 2018

This repository contains scripts, for simulation and analysis purposes, developed for a research project, detailed in this wiki. It is organised as a Python importable package.

Simulation scripts rely on the HOOMD-blue simulation toolkit to perform molecular dynamics simulation of active particles.

Requirements

  • active_particles was tested on 64-bit Linux, thus the installation script should work on this OS only.
  • An environment is set specifically for active_particles with conda, which thus has to be installed.

Installation

Clone this repository and source the install.sh file.

git clone https://github.com/yketa/active_particles
source active_particles/install.sh

install.sh creates a specific conda environment, sources setup.sh — which adds the directory containing active_particles to the Python path, and sets up aliases, environment variables and functions to be used in the command line — and writes to ~/.bash_profile so the latter is done at each login.

Remark: This is not an installation stricto sensu, all scripts can be used as they come without running install.sh. However, running it then using the defined commands and environment variables makes sure everything works as expected.

Useful aliases

  • ap_python: Python executable installed in the active_particles conda environment.
  • ap_mprof: mprof command of memory_profiler, useful for monitoring memory consumption of processes, installed in the active_particles conda environment.
  • ap_update: Pull git repository and source setup.sh.

Notable scripts

  • setup.sh sets up aliases, environment variables and functions to be used in the command line.
  • naming.py contains all the standards for naming all data files and directories.

Usage

All modules (or almost) contain a detailed documentation in their header, accessible through Python with the built-in function help(module_name). Scripts' headers should contain a detailed list of parameters to set as environment variables when executing them.

For example, to launch the script analysis/cuu.py — which computes displacement correlations — one can use the environment variable AP_CUU set by setup.sh. With parameters:

  • compute displacement correlations = True,
  • lag time = 10,
  • numbers of intervals of time considered = 10,

and all other parameters set to default, the program is launched the following way

yketa@yketa: ~/active_particles_data/Dk8000_Vj1000_Rg2000_Nq1000_Ll0000 $ COMPUTE=True TIME=10 INTERVAL_MAXIMUM=10 $AP_CUU
Execution time: 0:01:26.969770

and will output its execution time. Launching the program to plot the calculated data is done similarly

yketa@yketa: ~/active_particles_data/Dk8000_Vj1000_Rg2000_Nq1000_Ll0000 $ SHOW=True PLOT=True R_MAX=50 AXIS=LINLOG TIME=10 INTERVAL_MAXIMUM=10 $AP_CUU

and will make plotting windows appear.

Example of Cuu plot


Associated publication

"Cooperative motion and shear strain correlations in dense 2D systems of self-propelled soft disks", Yann-Edwin Keta and Jörg Rottler, EPL, 125 (2019) 58004. (doi: 10.1209/0295-5075/125/58004)

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.