GCMC Simulation
A C++ and Python-based Monte Carlo simulation framework for interacting particles.
Loading...
Searching...
No Matches
potential.h
Go to the documentation of this file.
1#ifndef POTENTIAL_H
2#define POTENTIAL_H
3
4#include <string>
5#include <functional>
6#include <cmath>
7
11enum class PotentialType {
13 WCA,
14 Yukawa,
16 Ideal
17};
18
24double idealPotential();
25
31double idealForceDotR();
32
39double lennardJonesPotential(double r2);
40
47double lennardJonesForceDotR(double r2);
48
58double wcaPotential(double r2);
59
66double wcaForceDotR(double r2);
67
77double yukawaPotential(double r2);
78
85double yukawaForceDotR(double r2);
86
94double athermalStarPotential(double r2, float f_dependenat);
95
103double athermalStarForceDotR(double r2, float f_dependant);
104
111PotentialType selectPotentialType(const std::string &potentialName);
112
121double computePairPotential(double r2, PotentialType potentialType, float f_prime);
122
131double computePairForce(double r2, PotentialType potentialType, float f_prime);
132
133#endif // POTENTIAL_H
PotentialType
Enumeration of available potential types.
Definition potential.h:11
@ Ideal
non interacting particls.
@ LennardJones
Lennard-Jones potential.
@ AthermalStar
potential between two cores of athermal star polymer.
@ WCA
Weeks-Chandler-Andersen (WCA) potential.
@ Yukawa
Yukawa potential.
double yukawaForceDotR(double r2)
Calculates the force between two particles using Yukawa potential.
Definition potential.cpp:107
double wcaPotential(double r2)
Calculates the Weeks-Chandler-Andersen (WCA) potential energy.
Definition potential.cpp:58
double idealForceDotR()
Calculates the force between two ideal particles.
Definition potential.cpp:20
double athermalStarForceDotR(double r2, float f_dependant)
Calculates the force between two star polymer cores.
Definition potential.cpp:140
PotentialType selectPotentialType(const std::string &potentialName)
Selects the potential type based on a string input.
Definition potential.cpp:154
double idealPotential()
Calculates the Ideal potential energy.
Definition potential.cpp:11
double computePairForce(double r2, PotentialType potentialType, float f_prime)
Returns the pair potential betwen two particles.
Definition potential.cpp:196
double wcaForceDotR(double r2)
Calculates the force between two particles using WCA potential.
Definition potential.cpp:76
double lennardJonesForceDotR(double r2)
Calculates the force between two particles using Lennard-Jones potential.
Definition potential.cpp:44
double lennardJonesPotential(double r2)
Calculates the Lennard-Jones potential energy.
Definition potential.cpp:30
double yukawaPotential(double r2)
Calculates the Yukawa potential energy.
Definition potential.cpp:94
double computePairPotential(double r2, PotentialType potentialType, float f_prime)
Returns the pair potential betwen two particles.
Definition potential.cpp:171
double athermalStarPotential(double r2, float f_dependenat)
Calculates the logarithmic potential energy.
Definition potential.cpp:121