ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
icc.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010-2022 The ESPResSo project
3 * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
4 * Max-Planck-Institute for Polymer Research, Theory Group
5 *
6 * This file is part of ESPResSo.
7 *
8 * ESPResSo is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * ESPResSo is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24/**
25 * @file
26 *
27 * ICC is a method that allows to take into account the influence
28 * of arbitrarily shaped dielectric interfaces. The dielectric
29 * properties of a dielectric medium in the bulk of the simulation
30 * box are taken into account by reproducing the jump in the electric
31 * field at the interface with charge surface segments. The charge
32 * density of the surface segments have to be determined
33 * self-consistently using an iterative scheme. It can at present
34 * be used with P3M, ELCP3M and MMM1D. For details see: @cite tyagi10a
35 *
36 * To set up ICC, first the dielectric boundary has to be modeled
37 * by ESPResSo particles n_0...n_0+n where n_0 and n have to be passed
38 * as a parameter to ICC.
39 *
40 * For the determination of the induced charges, only the forces acting
41 * on the induced charges have to be determined. As P3M and the other
42 * Coulomb solvers calculate all mutual forces, the force calculation
43 * was modified to avoid the calculation of the short-range part
44 * of the source-source force calculation. For different particle
45 * data organisation schemes, this is performed differently.
46 */
47
48#include "config/config.hpp"
49
50#ifdef ELECTROSTATICS
51
52#include "ParticleRange.hpp"
54#include "system/Leaf.hpp"
55
56#include <utils/Vector.hpp>
57
58#include <vector>
59
60/** ICC data structure */
61struct icc_data {
62 /** First id of ICC particle */
63 int n_icc;
64 /** maximum number of iterations */
66 /** bulk dielectric constant */
67 double eps_out;
68 /** areas of the particles */
69 std::vector<double> areas;
70 /** dielectric constants of the particles */
71 std::vector<double> epsilons;
72 /** surface charge density of the particles */
73 std::vector<double> sigmas;
74 /** convergence criteria */
76 /** surface normal vectors */
77 std::vector<Utils::Vector3d> normals;
78 /** external electric field */
80 /** relaxation parameter */
81 double relaxation;
82 /** last number of iterations */
84 /** first ICC particle id */
86
87 void sanity_checks() const;
88};
89
90struct ICCStar : public System::Leaf<ICCStar> {
91 /** ICC parameters */
93
94 ICCStar(icc_data data);
95
96 /**
97 * The main iterative scheme, where the surface element charges are calculated
98 * self-consistently.
99 */
100 void iteration(CellStructure &cell_structure, ParticleRange const &particles,
101 ParticleRange const &ghost_particles);
102
103 void on_activation() const;
104 void sanity_checks_active_solver() const;
105 void sanity_check() const;
106};
107
108#endif // ELECTROSTATICS
Vector implementation and trait types for boost qvm interoperability.
A range of particles.
Abstract class that represents a component of the system.
This file contains the defaults for ESPResSo.
Describes a cell structure / cell system.
void sanity_checks_active_solver() const
Definition icc.cpp:283
void iteration(CellStructure &cell_structure, ParticleRange const &particles, ParticleRange const &ghost_particles)
The main iterative scheme, where the surface element charges are calculated self-consistently.
Definition icc.cpp:99
icc_data icc_cfg
ICC parameters.
Definition icc.hpp:92
void on_activation() const
Definition icc.cpp:242
void sanity_check() const
Definition icc.cpp:274
ICC data structure.
Definition icc.hpp:61
double convergence
convergence criteria
Definition icc.hpp:75
int first_id
first ICC particle id
Definition icc.hpp:85
double relaxation
relaxation parameter
Definition icc.hpp:81
std::vector< Utils::Vector3d > normals
surface normal vectors
Definition icc.hpp:77
int max_iterations
maximum number of iterations
Definition icc.hpp:65
int n_icc
First id of ICC particle.
Definition icc.hpp:63
double eps_out
bulk dielectric constant
Definition icc.hpp:67
void sanity_checks() const
Definition icc.cpp:214
std::vector< double > sigmas
surface charge density of the particles
Definition icc.hpp:73
std::vector< double > epsilons
dielectric constants of the particles
Definition icc.hpp:71
Utils::Vector3d ext_field
external electric field
Definition icc.hpp:79
int citeration
last number of iterations
Definition icc.hpp:83
std::vector< double > areas
areas of the particles
Definition icc.hpp:69