wetting-complex-coacervates

Sample code to study wetting of complex coacervates near single surface

https://github.com/chrisbalzer/wetting-complex-coacervates

Science Score: 31.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Sample code to study wetting of complex coacervates near single surface

Basic Info
  • Host: GitHub
  • Owner: chrisbalzer
  • License: mit
  • Language: C++
  • Default Branch: main
  • Size: 1.36 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 4 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

Wetting of Complex Coacervates

This repository generally contains routines to study interfacial behavior for polyelectrolyte complex coacervates. This code calculates the density profiles of a polyanion, polyanion and salt (+/-) near a single surface based on Wetting Behavior of Complex Coacervates.

Author - Christopher Balzer

Compiling and Running Code

Navigate to run/ and compile using the Makefile with make. Note that the default compiler in the Makefile is g++ with the OpenMP flag. The program should compile with any gcc compiler that supports OpenMP.

Starting a calculation

Once you have compiled, one can run the default input file input.dat using the command,

./WettingCC

The output will automatically be generated in the run/example/ folder. The default input takes around 15 minutes to run.

Dependencies

This code requires the header library Eigen to run. For convenience, the necessary parts of Eigen are included in src/external.

Numerics

After formulating a theoretical model (free energy) $W$, we seek solutions that extremize the free energy. Mathematically, we seek

math \mathbf{H}(\mathbf{x}) = \frac{\delta W(\mathbf{x}) }{\delta \mathbf{x}} = 0

where $\mathbf{x}$ is the combined vector of all of our relevant fields (multiple spatially dependent fields), $W(\mathbf{x})$ is the relevant free energy for the configuration $\mathbf{x}$. One can formulate this as a multidimensional root-finding problem, where Newton or quasi-Newton methods are appropriate. Alternatively, we can formulate this as a fixed-point iteration problem by rewriting,

math \mathbf{F}(\mathbf{x}) = \mathbf{H}(\mathbf{x}) + \mathbf{x}

Then, we seek to solve the fixed-point iteration problem $\mathbf{x} = \mathbf{F}(\mathbf{x})$. In this work, we utilize Anderson Acceleration (also called Pulay mixing or DIIS) to iteratively solve the fixed-point iteration.

math \mathbf{x}_{n+1} = (1-\alpha) \sum_{i = 0}^m \beta_i \mathbf{x}_{n + i -m} + \alpha \sum_{i = 0}^m \beta_i \mathbf{F}_{n + i -m} where the coefficients $\beta = \rm{argmin} || (\mathbf{F}_k - \mathbf{x}_k) \beta ||_2$ with $\sum \beta = 1$. Thus, on each iteration, one must solve a least squares problem to determine the coefficients $\beta$. The value of $m$ determines how many previous iterations are used in making the next guess.

Example Results

The example input file calculates the equilibrium distribution and electric potential field near a single surface for a symmetrically adsorbing polycation/polyanion through the process of an adsorption isotherm. Namely, a sweep of the bulk polyelectrolyte density is done sequentially using a pseudo-arclength continuation (PAC) scheme. The salient results are shown below. The PAC algorithm allows for easy evaluation of the turning points (thermodyanmic spinodal points) based on the border between stable and unstable regions of the adsorption isotherm, which have been highlighted/colored in the figures below.

Excess Adsorption Surface Tension

Owner

  • Name: Chris Balzer
  • Login: chrisbalzer
  • Kind: user
  • Location: Pasadena, CA

Researcher in Chemical Engineering at Caltech

Citation (CITATION.bib)

@Article{Balzer2022SoftMatter,
author={Christopher Balzer, Pengfei Zhang, Zhen-Gang Wang},
title={Wetting behavior of polyelectrolyte complex coacervates on solid surfaces},
journal={Soft Matter},
year={2022},
volume={18},
issue={34},
pages={6326--6339},
publisher={The Royal Society of Chemistry},
doi={10.1039/D2SM00859A},
url={http://dx.doi.org/10.1039/D2SM00859A},
}

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Dependencies

.github/workflows/testBuild.yml actions
  • actions/checkout v3 composite