Skip to content
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

Logarithmic scale for integration of the spherical diffuse green's function #109

Merged
merged 35 commits into from
Feb 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c05f483
Use 4 points in splineInterpolation
robertodr Aug 18, 2017
20d3678
Use Runge-Kutta-Fehlberg 7(8) integrator
robertodr Aug 18, 2017
e015e3e
Update gems for Danger
robertodr Aug 26, 2017
302a8a7
WIP: The spherical diffuse interface does not yield the expected results
ilfreddy Oct 12, 2017
de90ed0
Minor modification to the integration boundaries
ilfreddy Oct 27, 2017
3b84d22
WIP: double logarithmic scale for the resolution of the differential …
ilfreddy Nov 14, 2017
cb656a1
Emacs garbage files are now ignored
ilfreddy Nov 14, 2017
75f19f0
Implemented logarithmic interface. Need some help to make sure we can…
ilfreddy Nov 14, 2017
0aaab09
Make OneLayerLog usable
robertodr Nov 14, 2017
342b525
Fixed cut&paste error
ilfreddy Nov 21, 2017
43a5819
WIP: converting Eq.58 of the Sph Diff paper
ilfreddy Nov 21, 2017
f1d4034
Bugfix for the Log dielectric profile
ilfreddy Nov 27, 2017
507d45d
Fixed the calculation of a spherical greens function component for th…
ilfreddy Nov 28, 2017
f4dc470
Logscale integration now compiles
ilfreddy Nov 28, 2017
fbc73c2
WIP: logscale
ilfreddy Nov 28, 2017
ed5f457
I'm not supposed to say that but this is a merge commit!
ilfreddy Feb 7, 2018
7158ef5
Merged main branch with new class structure for the Greens functions
ilfreddy Feb 15, 2018
023c30e
R0 is now at 0.1 and not 0.5
ilfreddy Feb 15, 2018
d7ee56b
Merge branch 'logscale' into new_sph_int
ilfreddy Feb 15, 2018
8e58b34
one_layer test updated with new logarithmic profile
ilfreddy Feb 20, 2018
0902fe1
Updated reference values for the test on the spherical diffise Greens…
ilfreddy Feb 20, 2018
e4ac2f3
Two more tests for diffuse interfaces updated
ilfreddy Feb 20, 2018
eb79967
Fix MACOSX_RPATH (again)
arnfinn Feb 7, 2018
2acd32d
Merge remote-tracking branch 'origin/release/1.Y' into logscale
Feb 23, 2018
ee44491
Cleanup of purisma test
ilfreddy Feb 26, 2018
111c5be
Merge branch 'logscale' of github.com:ilfreddy/pcmsolver into logscale
ilfreddy Feb 26, 2018
9b00a35
Added comments to the changelog
ilfreddy Feb 26, 2018
557fdf2
rm debug stuff
Feb 26, 2018
759feda
Modifications according to Ronaldos comments
Feb 26, 2018
880fd49
clang-format on some files
Feb 26, 2018
d6fa8c7
fixed some issues
Feb 27, 2018
08f99ed
fixed doc for Profile
Feb 27, 2018
693e113
Updated bi_operators test references
Feb 27, 2018
26a9b90
clang-format
Feb 27, 2018
fcdee69
fixed default profile
Feb 27, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@

# Autocmake stuff
cmake/lib/*.pyc

# Emacs backup files
*~

15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@

### Added

- Double logarithmic scale for the integration of spherical diffuse
interfaces: much more stable than the previous version, allowing for
Runge-Kutta 4 integrator.

### Fixed

- Bug in the diffuse interface Green's function. Contrary to the sharp
interface case, it is wrong to remove the monopole, which becomes
identically zero when the corresponding differential equation is
solved in extreme cases (e.g. charge far away from the sphere).

### Added

- A new CMake module `options_wrappers.cmake` that adds new wrapper macros for
the CMake `option` command.

Expand Down Expand Up @@ -125,6 +138,8 @@
- The uppercased contents of the `.pcm` input file are written to a temporary
file, instead of overwriting the user provided file. The temporary file is
removed after it has been parsed. Fixes #91 as noted by @ilfreddy.
- Use Runge-Kutta-Fehlberg 7(8) ODE solver to integrate the radial equation
in the spherical diffuse Green's function class.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add/edit the CHANGELOG.md for your changes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line in the changelog outdated? It seems so. If yes, please remove.


### Fixed

Expand Down
15 changes: 4 additions & 11 deletions doc/code-reference/greens-functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,12 @@ Green's functions objects relies on the Factory Method pattern
:cite:`Gamma1994,Alexandrescu2001`, implemented through the
generic Factory class.

The top-level header, _i.e._ to be included in client code, is `Green.hpp`.
The common interface to all Green's function classes is specified by the `IGreensFunction` class,
The top-level header, _i.e._ to be included in client code, is ``Green.hpp``.
The common interface to all Green's function classes is specified by the ``IGreensFunction`` class,
this is non-templated.
All other classes are templated. TODO: explain template parameters.
All other classes are templated.
The Green's functions are registered to the factory based on a label encoding: type, derivative, and dielectric profile.
The only allowed labels are:
- `VACUUM_NUMERICAL`
- `VACUUM_DERIVATIVE`
- `VACUMM_GRADIENT`
- `VACUUM_HESSIAN`

- `SPHERICALDIFFUSE_TANH`
- `SPHERICALDIFFUSE_ERF`
The only allowed labels must be listed in ``src/green/Green.hpp``. If they are not, they can not be selected at run time.

.. image:: ../gfx/green.png
:scale: 70 %
Expand Down
10 changes: 10 additions & 0 deletions doc/pcmsolver.bib
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,13 @@ @ARTICLE{Allinger1994-tx
doi = "10.1016/S0166-1280(09)80008-0"
}

@article{Fosso-Tande2013,
title = "Implicit solvation models in a multiresolution multiwavelet basis",
journal = "Chemical Physics Letters",
volume = "561-562",
pages = "179--184",
year = "2013",
issn = "0009-2614",
doi = "https://doi.org/10.1016/j.cplett.2013.01.065",
author = "Jacob Fosso-Tande and Robert J. Harrison"
}
6 changes: 3 additions & 3 deletions doc/users/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,13 @@ while the Green's function outside might vary.
* **Valid values**: :math:`\varepsilon \geq 1.0`
* **Default**: 1.0

Profile
Profile
Functional form of the dielectric profile

* **Type**: string
* **Valid values**: Tanh | Erf
* **Valid values**: Tanh | Erf | Log
* **Valid for**: SphericalDiffuse
* **Default**: Tanh
* **Default**: Log

Eps1
Static dielectric permittivity inside the interface
Expand Down
3 changes: 2 additions & 1 deletion src/green/Green.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "SphericalDiffuse.hpp"
#include "UniformDielectric.hpp"
#include "Vacuum.hpp"
#include "dielectric_profile/MembraneTanh.hpp"
#include "dielectric_profile/OneLayerErf.hpp"
#include "dielectric_profile/OneLayerTanh.hpp"
#include "utils/Factory.hpp"
Expand Down Expand Up @@ -89,6 +88,8 @@ inline Factory<detail::CreateGreensFunction> bootstrapFactory() {
createSphericalDiffuse<dielectric_profile::OneLayerTanh>);
factory_.subscribe("SPHERICALDIFFUSE_NUMERICAL_ERF",
createSphericalDiffuse<dielectric_profile::OneLayerErf>);
factory_.subscribe("SPHERICALDIFFUSE_NUMERICAL_LOG",
createSphericalDiffuse<dielectric_profile::OneLayerLog>);

return factory_;
}
Expand Down
2 changes: 2 additions & 0 deletions src/green/GreensFunction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class GreensFunction : public IGreensFunction {
*/
virtual DerivativeTraits operator()(DerivativeTraits * source,
DerivativeTraits * probe) const = 0;

/*! Returns value of the kernel of the \f$\mathcal{S}\f$ integral operator, i.e.
* the value of the Greens's function for the pair of points p1, p2:
* \f$ G(\mathbf{p}_1, \mathbf{p}_2)\f$
Expand All @@ -169,6 +170,7 @@ class GreensFunction : public IGreensFunction {
pp[2] = p2(2);
return this->operator()(sp, pp)[0];
}

virtual std::ostream & printObject(std::ostream & os) __override {
os << "Green's Function" << std::endl;
return os;
Expand Down
Loading