Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.0.4 instead.
Reason given by maintainers: Improper handling of equilibration times

active

pypi version license pipeline coverage report

active is a simulation backend for atooms, a high-level framework for particle-based simulations. This backend implements active matter systems, e.g. the Vicsek model as described in Vicsek et al. (1995) and in Grégoire and Chaté (2004).

Quick start

Here we have a simulation of an active matter system based on the Vicsek model. First of all, we need to setup a 2D atooms system.

import numpy
import atooms
from atooms.system import System

n = 200
dim = 2
system = System(N = n)
system.cell = [32. for i in range(dim)]
for p in system.particle:

	p.orientation = numpy.random.uniform(-numpy.pi,numpy.pi)
	p.position = [L*numpy.random.uniform() for i in range(dim)]
	p.fold(system.cell)

Having done so, we can run a simple Vicsek model simulation as follows. We need to provide the system size n, its noise amplitude eta, velocity v0, and density rho.

from atooms.active.vicsek import Vicsek
from atooms.active.neighbors import VicsekNeighbors
from atooms.simulation import Simulation

eta = 0.4
v0 = 0.5
rho = 0.5

backend = Vicsek(system, eta, v0, noise='vectorial')
neighbors = VicsekNeighbors(system, method='kdtree')
bck.neighbors = neighbors

Simulation(backend).run(10)

This simulation employs the so-called 'vectorial' noise implementation (discussed in Grégoire and Chaté) and the scipy-based kD-tree neighbor search algorithm.

A basic API is also available. We can run the same simulation as follows

from atooms.active.api import vm

vm('input.xyz', file_out='output.xyz', npart=2048, eta=0.4, rho=2.0, nsteps=1000, config_number=10)

or, from the command line

api.py input.xyz --file-out output.xyz --npart 2048 --eta 0.4 --rho 2.0 --nsteps 1000 --config-number 10

Features

  • Seamless integration with atooms framework
  • Various nearest neighbors algorithms available
  • Easy extension to new variations of the Vicsek model
  • Support for user-provided code

Dependencies

  • gfortran 11.3.0
  • python 3.10
    • argh 0.28.1
    • atooms 3.17.0
    • f2py-jit 0.9.2
    • numpy
    • scipy (optional)

Documentation

Check out the tutorial for more detailed examples and the public API for more detail.

Installation

From the Python Package Index

pip install atooms.active[full]

to get all optional dependencies (i.e. scipy). A lightweight installation can be performed as well

pip install atooms.active

From the code repository

git clone https://framagit.org/atooms/active.git
cd active
make install

Authors

Iacopo Ricci: https://iricci.frama.io/

Huge thanks to Prof. Daniele Coslovich for his careful supervision and for his profound insights.

Metadata

Release files for atooms.active 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for atooms.active 1.0.5
File Size Uploaded
atooms.active-1.0.5.tar.gz 25.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for atooms.active 1.0.5
File Interpreter ABI Platform
atooms.active-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 53.3 kB

Release files / atooms.active-1.0.5.tar.gz

Download URL atooms.active-1.0.5.tar.gz
Size 25.8 kB
Tags Source
SHA-256 checksum
How to use checksums
24a4f7bcb0e5ae77992cf2dd7d73b435f2ef75acb31c91419bf37517cb61c340
BLAKE2b-256 checksum
How to use checksums
bb380d731e4a1eddb7258e88ce4fa64822525ef807aa9f836fbac5237be66fe0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / atooms.active-1.0.5-py3-none-any.whl

Download URL atooms.active-1.0.5-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
680189b0838e0d00a83c358e954076f583617ad8602272238374efa583fc818c
BLAKE2b-256 checksum
How to use checksums
be0e09791a69893dec1cd2ed30f151c795b79a81f94c7426ebd68d76b95bf3a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page