ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
ibm_tribend.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010-2022 The ESPResSo project
3 *
4 * This file is part of ESPResSo.
5 *
6 * ESPResSo is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * ESPResSo is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef IBM_TRIBEND_H
21#define IBM_TRIBEND_H
22
23#include "config/config.hpp"
24
25#include "BoxGeometry.hpp"
26#include "Particle.hpp"
27
28#include <utils/Vector.hpp>
29
30#include <tuple>
31
32/** Parameters for IBM tribend */
33struct IBMTribend {
34 /** Interaction data */
35 double kb;
36
37 /** Reference angle */
38 double theta0;
39
40 double cutoff() const { return 0.; }
41
42 // Krüger always has three partners
43 static constexpr int num = 3;
44
45 /** Set the IBM Tribend parameters.
46 * Also calculate and store the reference state.
47 * See details in @cite gompper96a and @cite kruger12a.
48 */
49 IBMTribend(int ind1, int ind2, int ind3, int ind4, double kb, bool flat);
50
51 /** Calculate the forces
52 * The equations can be found in Appendix C of @cite kruger12a.
53 * @return forces on @p p1, @p p2, @p p3, @p p4
54 */
55 std::tuple<Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d>
56 calc_forces(BoxGeometry const &box_geo, Particle const &p1,
57 Particle const &p2, Particle const &p3, Particle const &p4) const;
58
59private:
60 friend boost::serialization::access;
61 template <typename Archive>
62 void serialize(Archive &ar, long int /* version */) {
63 ar & kb;
64 ar & theta0;
65 }
66};
67
68#endif
Vector implementation and trait types for boost qvm interoperability.
This file contains the defaults for ESPResSo.
Parameters for IBM tribend.
double theta0
Reference angle.
static constexpr int num
double kb
Interaction data.
std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > calc_forces(BoxGeometry const &box_geo, Particle const &p1, Particle const &p2, Particle const &p3, Particle const &p4) const
Calculate the forces The equations can be found in Appendix C of .
double cutoff() const
Struct holding all information for one particle.
Definition Particle.hpp:393