Skip to content

lgrigon/ActiveHingeModel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Active Hinge Simulations

This repository contains simulation codes used in our study of motile active particle clusters. The system involves a pair of self-propelled rods connected by a hinge and embedded in a crowded medium. We provide two simulation setups:

  • double/: Simulations where both rods are alive.
  • single/: Simulations where one rod is already absorbed (asymmetric case).

πŸ“Œ Note
Output folders: (data/, mfpt/, temp/)

These codes were used to generate the results for our paper titled:

Symmetry breaking in crowded channels
Leonardo Garibaldi Rigon and Yongjoo Baek
Submitted to: Soft Matter Journal
[arXiv link]


Requirements

  • GCC compiler
  • Gnuplot for fitting survival curves

πŸ“‚ double/: Two Active Rods

▢️ Main Simulation (file: double_hinge.c)

gcc double_hinge.c -lm -O3
./a.out

Set parameters at the top of the file:

  1. SIMULATION PARAMETERS section: typical values to change
  2. FIXED PARAMETERS section: for advanced control

Output files are written to ../data/

Optional flags (set in code):

  1. SAVE_CONFIGS = 1: saves particle positions
  2. SAVE_DETAILS = 1: saves angles and extra details

πŸ“‰ Estimating MFPT (files: survival_rate.c and fit_mfpt.gnu)

gcc survival_rate.c -lm -O3
./a.out

Reads measurement files from ../data/
Outputs survival probabilities to ../mfpt/

Fitting with Gnuplot:

load 'fit_mfpt.gnu'

Adjust parameters in the .gnu file to match the simulation

πŸ“‰ Calculating Mean Squared Displacement (MSD) (file: msd.c)

Requires: SAVE_DETAILS = 1 in double_hinge.c
Outputs saved to ../data/

gcc msd.c -lm -O3
./a.out

πŸ“‚ single/: One Rod Already Absorbed

▢️ Main Simulation (file: single_hinge.c)

gcc single_hinge.c -lm -O3
./a.out

Setup similar to double_hinge.c

Extra optional flags (set in code):

  1. SAVE_MSD: computes MSD internally
  2. SAVE_FINALS: saves data from the final 50 steps (forces, torque, etc.)
  3. SAVE_TORQUE: saves torque data
  4. SAVE_N0: logs information when particles below the hinge are 0 or 1

πŸ“‰ Estimating MFPT

Same process as in the double/ folder

πŸ“‰ Estimating Time in State TN (files: terms_surv_rate.c and fit_mfpt_terms.gnu)

gcc terms_surv_rate.c -lm -O3
./a.out

Outputs survival rates for each coarse-grained state to mfpt/ folder

Fitting with Gnuplot:

load 'fit_mfpt_terms.gnu'

About

Simulation codes for active hinge systems of self-propelled rods in crowded environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published