-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update documentation and clarify ambiguities #3673
Conversation
Check out this pull request on You'll be able to see Jupyter notebook diff and discuss changes. Powered by ReviewNB. |
doc/sphinx/electrostatics.rst
Outdated
|
||
where | ||
|
||
.. math:: | ||
C=\frac{1}{4\pi \varepsilon_0 \varepsilon_r} | ||
C=\frac{e^2}{4\pi \varepsilon_0 \varepsilon_r} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this to be correct. I don't think that any of this is related to the elementary charge (which is a constant of nature, one absolute amount of charge, whose numerical value depends on the unit system). I rather think that the charges are measured in whatever the charge units are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're missing an e^2
somewhere to make these equations consistent. The issue here is about definition. You probably think of the Coulomb prefactor C
as the Coulomb constant k_e = 1/ (4 * pi * e0)
, which is also what I intuitively assumed the first time I read the text, but the text actually defines C
with regards to the Bjerrum length.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well the interaction energy in espresso is C * q_1 * q_2 / r
, independently of what the text defines...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could rewrite the text, starting from the Coulomb equation U_C = k_e * q1 * q2 / r
with k_e = 1/ (4 * pi * e0)
and then introduce the ESPResSo convention where U_C = C * z1 * z2 / r
with C
defined from the Bjerrum length. Most ESPResSo users prefer to put an integer charge (aka charge number) on their coarse-grained particles and delegate the actual units to the prefactor C
. This would clarify the ESPResSo convention while remaining in line with physics textbooks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it odd to push a unit system here, frankly. And charge numbers are not a concept that exists in electrodynamics. If you particles happen to not be ions, e
is by no means a natural charge unit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do the former but this is also not a hill I'm willing to die on. I just find the idea that quantities have specific natural unit odd and mislead in general, and confusing in Espresso in particular because it does not have a fix unit system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e
is by no means a natural charge unit
This is a valid argument, how about introducing z_i as "normalized charges" z_i = q_i / e
instead of formal charges?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not clear still on why they have to be introduced at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there da "definition" for C
at all, when right after it says that is a settable parameter?
So I'd do the following. Drop the definition of C
as such, then two examples which C
to use for a relative permittivity, and for a specific Bjerrum length?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be simpler to just rewrite C=l_B k_B T / e^2
to fix the inconsistency. As you said above and in #3673 (comment), the user can move q
around for convenience in simulations with ions, without changing the energy.
Codecov Report
@@ Coverage Diff @@
## python #3673 +/- ##
======================================
Coverage 87% 87%
======================================
Files 533 533
Lines 22959 22959
======================================
+ Hits 20156 20159 +3
+ Misses 2803 2800 -3
Continue to review full report at Codecov.
|
samples/visualization_cellsystem.py
Outdated
to color particles by node. With OpenMPI, this can be achieved using | ||
``mpiexec -n 4 ./pypresso ../samples/visualization_cellsystem.py``. | ||
Set property ``system.cell_system.node_grid = [n_x, n_y, n_z]`` | ||
(with ``n_x * n_y * n_z`` equal to the number of MPI threads) to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MPI threads
shoudl be MPI processes
or MPI ranks
.
Sorry if this was a little bit confused, I think I can give a better explanation. Espresso implements an interaction of the form Of course you can always move a charge factor from the |
Yes, the user just needs to be careful with dimensional analysis when setting up |
Repositories offer serial and parallel versions of the libhdf5 package. Only the parallel version can be used by ESPResSo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the many words, I feel we could have gotten there quicke if I'd be more to the point ^^ LGTM now
Description of changes:
libhdf5-dev
(fixes H5md feature unavailable #3656)node_grid
on domain decomposition (see mailing list email "dividing simulation box using MPI" from 2020-04-20)