espressomd / espresso

The ESPResSo package
https://espressomd.org
GNU General Public License v3.0
222 stars 183 forks source link

Issue tracker for Tutorial 12 #3941

Closed jngrad closed 2 years ago

jngrad commented 3 years ago

Regarding the version with WCA active and P3M active:

jonaslandsgesell commented 3 years ago

If there is low electrostatic interactions present, then the ionization of one group suppresses the ionization of other groups (because of the like-charge repulsion of charged monomers along the chain). Therefore at same pH (for a given acid which has a certain pK), the ionization is lower (if you turn on electrostatics). One can compute this when using the thermodynamic framework, starting from dF=sum_i nu_i mu_i=0 (for constant volume and temperature) and inserting the chemical potential. For the excess part of the chemical potential you need a model, e.g. the Debye-Hückel model. For more about the chemical equilibrium condition or the partition functuons of the reaction ensemble or the constant pH ensemble, see https://pubs.rsc.org/no/content/articlehtml/2019/sm/c8sm02085j as well as https://link.springer.com/article/10.1140/epjst/e2016-60324-3 for understanding the difference between the constant pH method and the reaction ensemble method (in short: the constant pH method does not take care of ionic strength changing with pH, i.e. the constant pH method uses implicit protons which results in wrong electrostatic interactions at extreme pH).

Note: if there is strong electrostatic interactions (i.e. low epsilon_r) which induce strong ionic correlations then the dissociation can also be enhanced at same pH and pK, so the dissociation increases (if you turn on electrostatics).

You really should separate between the pH (a measure for the chemical potential of H+) and pK (a property of the acidic/basic monomers of the polymer). Plotting stuff as a function of pH-pK suggests that this was some unique order parameter and it would not matter whether you change pH or pK. But his is only true for ideal systems! For systems with interactions changing pK or changing pH is very different. Changing pH changes e.g. the electrostatic screening in the system very different to changing pK. This should be stated clearly. Only in intermediate pH ranges changing pH or pK is approximately behaving similar. See https://link.springer.com/article/10.1140/epjst/e2016-60324-3

If you have a model for how the chemical potentials change with pH you can predict (from dF=0=sum_i nu_i mu_i) how alpha changes with pH at least for a monomeric system. But already here there is (to my knowledge) mostly empirical formulas available for this because computing the chemical potential for electrostatically interacting species would require to compute mu_i=partial F/partial N which is not possible because F=-kTln(Z) cannot be computed analytically because the partition function Z cannot be computed analytically. All this gets even more intractable for polymeric systems where bonds need to be taken into account in the excess part of the partition function.

I hope this answers the first part of your question.

kosovan commented 3 years ago

I think that an earlier version of the tutorial was running faster and I agree that one-hour runtime is too long. My suggestion is to decrease the number of pH values for which we calculate the result with electrostatics and/or decrease the accuracy of electrostatics, or replace it with DH. However, it should be explained in the tutorial that we sacrificed accuracy for speed, and that this should not be done in production runs.

Interpreting the plot is indeed desired. I plan to work on fixing some other issues in this tutorial, which showed up when I was teaching it. Hopefully in November 2020, when I will be going through the tutorials again with my new PhD students.

Testing can be done by generating a fixed set of numerical results as a reference. Jonas is right that there is no theory which could predict the correct result.

kosovan commented 3 years ago

I propose to address the following issues in the constant-pH tutorial ( I plan to do it during the coding day):

kosovan commented 3 years ago

I will try to finish the changes to the constant-pH tutorial during the coding day today.