ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
wca.cpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018-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
/** \file
20
*
21
* Implementation of \ref wca.hpp
22
*/
23
#include "
wca.hpp
"
24
25
#ifdef WCA
26
#include "
nonbonded_interaction_data.hpp
"
27
28
#include <cmath>
29
#include <stdexcept>
30
31
WCA_Parameters::WCA_Parameters
(
double
epsilon,
double
sigma)
32
: eps{epsilon}, sig{sigma} {
33
if
(epsilon < 0.) {
34
throw
std::domain_error(
"WCA parameter 'epsilon' has to be >= 0"
);
35
}
36
if
(sigma < 0.) {
37
throw
std::domain_error(
"WCA parameter 'sigma' has to be >= 0"
);
38
}
39
if
(sigma != 0.) {
40
cut
= sigma * std::pow(2., 1. / 6.);
41
}
42
}
43
44
#endif
/* ifdef WCA */
nonbonded_interaction_data.hpp
Various procedures concerning interactions between particles.
WCA_Parameters::cut
double cut
Definition
nonbonded_interaction_data.hpp:72
WCA_Parameters::WCA_Parameters
WCA_Parameters()=default
wca.hpp
Routines to calculate the Weeks-Chandler-Andersen potential between particle pairs.
src
core
nonbonded_interactions
wca.cpp
Generated on Fri Nov 22 2024 02:13:54 for ESPResSo by
1.9.8