ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
steepest_descent.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
25
26/** @brief Steepest descent algorithm. */
28 /**
29 * @brief Maximal particle force or torque.
30 *
31 * If the maximal force experienced by particles in the system (in any
32 * direction) is inferior to this threshold, minimization stops.
33 */
34 double f_max = 0.;
35 /** Dampening constant */
36 double gamma = 0.;
37 /**
38 * Maximal particle displacement or rotation.
39 *
40 * Maximal distance in MD units of length or rotation in radians that
41 * a particle can experience during one integration step, in one direction.
42 */
43 double max_displacement = 0.;
44
45 SteepestDescent() = default;
46 SteepestDescent(double f_max, double gamma, double max_displacement);
47
48 /**
49 * @brief Run steepest descent algorithm.
50 * @return whether the maximum force/torque encountered is below the user
51 * limit @ref SteepestDescent::f_max "f_max".
52 */
53 bool propagate(CellStructure &cell_structure) const;
54};
Describes a cell structure / cell system.
Steepest descent algorithm.
SteepestDescent()=default
double max_displacement
Maximal particle displacement or rotation.
double gamma
Dampening constant.
double f_max
Maximal particle force or torque.
bool propagate(CellStructure &cell_structure) const
Run steepest descent algorithm.