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 ESPRESSO_ELECTROSTATICS
51
52#include "system/Leaf.hpp"
53
54#include <utils/Vector.hpp>
55
56#include <vector>
57
58/** ICC data structure */
59struct icc_data {
60 /** First id of ICC particle */
61 int n_icc;
62 /** maximum number of iterations */
64 /** bulk dielectric constant */
65 double eps_out;
66 /** areas of the particles */
67 std::vector<double> areas;
68 /** dielectric constants of the particles */
69 std::vector<double> epsilons;
70 /** surface charge density of the particles */
71 std::vector<double> sigmas;
72 /** convergence criteria */
74 /** surface normal vectors */
75 std::vector<Utils::Vector3d> normals;
76 /** external electric field */
78 /** relaxation parameter */
79 double relaxation;
80 /** last number of iterations */
82 /** first ICC particle id */
84
85 void sanity_checks() const;
86};
87
88struct ICCStar : public System::Leaf<ICCStar> {
89 /** ICC parameters */
91
92 ICCStar(icc_data data);
93
94 /**
95 * The main iterative scheme, where the surface element charges are calculated
96 * self-consistently.
97 */
98 void iteration();
99
100 void on_activation() const;
101 void sanity_checks_active_solver() const;
102 void sanity_check() const;
103};
104
105#endif // ESPRESSO_ELECTROSTATICS
Vector implementation and trait types for boost qvm interoperability.
Abstract class that represents a component of the system.
void sanity_checks_active_solver() const
Definition icc.cpp:311
void iteration()
The main iterative scheme, where the surface element charges are calculated self-consistently.
Definition icc.cpp:104
icc_data icc_cfg
ICC parameters.
Definition icc.hpp:90
void on_activation() const
Definition icc.cpp:270
void sanity_check() const
Definition icc.cpp:302
ICC data structure.
Definition icc.hpp:59
double convergence
convergence criteria
Definition icc.hpp:73
int first_id
first ICC particle id
Definition icc.hpp:83
double relaxation
relaxation parameter
Definition icc.hpp:79
std::vector< Utils::Vector3d > normals
surface normal vectors
Definition icc.hpp:75
int max_iterations
maximum number of iterations
Definition icc.hpp:63
int n_icc
First id of ICC particle.
Definition icc.hpp:61
double eps_out
bulk dielectric constant
Definition icc.hpp:65
void sanity_checks() const
Definition icc.cpp:242
std::vector< double > sigmas
surface charge density of the particles
Definition icc.hpp:71
std::vector< double > epsilons
dielectric constants of the particles
Definition icc.hpp:69
Utils::Vector3d ext_field
external electric field
Definition icc.hpp:77
int citeration
last number of iterations
Definition icc.hpp:81
std::vector< double > areas
areas of the particles
Definition icc.hpp:67