cppm-generator

Crates.iocppm-generator
lib.rscppm-generator
version0.2.0
sourcesrc
created_at2022-04-26 09:11:10.835981
updated_at2022-04-26 09:11:10.835981
descriptionGenerates charged patchy particles by Monte Carlo sampling on a sphere
homepagehttps://github.com/mlund/cppm-generator
repositoryhttps://github.com/mlund/cppm-generator
max_upload_size
id575228
size56,152
Mikael Lund (mlund)

documentation

README

Rust DOI

CPPM generator

Overview

This is a single command-line tool that generates spherical Charged Patchy Particle Models (CPPM) which mimic bio-colloidal particles, e.g. globular proteins. The figure below shows examples of interacting CPPMs taken from https://doi.org/10.1063/1.4928077:

cppm-generator generates CPPMs by placing neutral, positive, and negative particles on the surface of a sphere, and minimise the (free) energy using Metropolis-Hastings Monte Carlo sampling.

Installing

$ cargo install cppm-generator

Usage

The default parameters produce an isotropic, charged particle similar to P00 from Table 1 in this publication. It is also possible to impose a target molecular dipole moment using the --dipole option.

$ cppm-generator --help

USAGE:
    cppm-generator [OPTIONS] --file <FILE>

OPTIONS:
    -b, --bjerrum-length <BJERRUM_LENGTH>    Bjerrum length (Å) [default: 7.0]
    -h, --help                               Print help information
    -m, --minus <NUM_MINUS>                  Number of negative (-1e) particles [default: 37]
    -N <NUM_TOTAL>                           Total number of particles [default: 643]
    -o, --file <FILE>                        Output structure (.xyz or .pqr)
    -p, --plus <NUM_PLUS>                    Number of positive (+1e) particles [default: 29]
    -r, --radius <RADIUS>                    Sphere radius (Å) [default: 20.0]
    -s, --steps <STEPS>                      Number of Monte Carlo iterations [default: 10000]
    -u, --dipole <TARGET_DIPOLE_MOMENT>      Target dipole moment (Debye)
    -V, --version                            Print version information

Details and status:

  • Random walk on a sphere using spherical coordinates
  • Particle-particle interactions using a Coulomb/softcore potential
  • Arbitrary mixing of neutral and charged particles
  • Output to .xyz and .pqr files
  • Command line interface
  • Dipole moment analysis
  • External electric field to induce arbitrary patches
  • Constrain to target dipole moment w. harmonic potential
  • Written in Rust
  • Use uon for dimensional analysis
  • IO error handling
  • Unittests
  • Logging support

Motivation

Besides some scientific use, this project is mainly a first dive into the Rust programming language.

Commit count: 95

cargo fmt