An open API service indexing awesome lists of open source software.

https://github.com/zpreisler/patchy2d

Simulation software for patchy particles in 2d
https://github.com/zpreisler/patchy2d

2d c computer-simulation opengl scientific sdl2 self-assembly

Last synced: 4 months ago
JSON representation

Simulation software for patchy particles in 2d

Awesome Lists containing this project

README

        

# Patchy 2d
![license](https://img.shields.io/badge/license-MIT-green.svg)

Simulation software to simulate patchy particles in 2d.

------

This is a Monte Carlo code. Number of ensembles are supported: Canonical (*NVT*), Grand-Canonical (mu VT), isothermal-isobaric ensemble (*NpT*).
The code is also able to simulate more complex particles such as rods composed by number of single discs.

The code uses Kern-Frenkel interaction potential.

### Prerequisites
opengl, SDL

### Installing

First one needs to compile & install *lib*

```
git clone https://github.com/zpreisler/lib.git
make
make install
```

Get the source code

```
git clone https://github.com/zpreisler/patchy2d.git
make
make install
```

### Examples

From the command line

```
patchy2d -n three_patch -s 10000000 -N 512 --npatch 3 --sigma_well 1.1 --patch_width 7 -g 0 -b 30 30 -e 7 --pmod 100 -m 1000
```
The above will generate 512 3-patch particles with interaction range 0.1 and the patch width 7

### Patchy particles
![Snapshot](doc/three_patch.gif)

### Rods
![Snapshot](doc/rods_c.png)

__Usage:__ patchy2d

[-n] [--name] {name:} Name

[-s] [--step] {step:} Number of MC steps

[-N] [--specie] {specie:} Species

[--new_sigma] {(null)} Update sigma

[--new_width] {(null)} Update width

[--new_mu] {(null)} Update mu

[--new_angle] {(null)} Update angles

[-b] [--box] {box:} Simulation box lengths x and y

[-c] [--copy] {copy:} Copy the simulation box in x and y direction

[-e] [--epsilon] {epsilon:} epsilon -- interaction strength

[--end_epsilon] {end_epsilon:} end epsilon -- final interaction strength

[-p] [--pressure] {pressure:} pressure

[-l] [--lambda] {lambda:} lambda

[-L] [--lambda_coupling] {lambda_coupling:} lambda coupling

[--uy] {uy:} uy -- box tilt

[--max_move] {maximum_displacement:} Maximum displacement

[--max_rot] {maximum_rotation:} Maximum rotation

[--max_vol] {maximum_volume:} Maximum volume change

[--max_uy] {maximum_shape:} Maximum shape change

[--max_dsigma] {maximum_dsigma:} Maximum dsigma

[-m] [--mod] {mod:} Write modulus

[--pmod] {pmod:} Print modulus

[-o] [--optimize] {optimize:} Step size optimization on/off

[-v] [--verbose] {verbose:} Verbose mode on/off

[--snapshot] {snapshot:} Snapshot mode on/off

[--seed] {seed:} Seed