Skip to content

zpreisler/patchy2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patchy 2d

license

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

Rods

Snapshot

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