Git Product home page Git Product logo

cppm-generator's Introduction

Rust RustClippy Crate 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.

cppm-generator's People

Contributors

dependabot[bot] avatar mlund avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.