class forcefields::PotentialBase

Overview

Functions and tools commonly used by potentials. Contains functions for quadratic retrainst, Lennard-Jones, Coulomb, to manage the periodic boundaries and interface for cutoff. The system of units used is (eV, Angstrom, fs, e). Rules to combine different Lennard-Jones parameters were taken from:

Unlike Lennard-Jones Parameters for Vapor-Liquid Equilibria, Thorsten Schnabel, Jadran Vrabec , Hans Hasse, Institut fur Technische Thermodynamik und Thermische Verfahrenstechnik, Universitat Stuttgart, D-70550 Stuttgart, Germany, http://www.itt.uni-stuttgart.de/~schnabel/CR.pdf. More…

class PotentialBase {
public:
    // structs
 
    template <int N, class R = double(*const)[N], class F = double(*const)[N]>
    struct ChargeGroup;
 
    struct Vector3;
 
    // construction
 
    PotentialBase();
    PotentialBase(double cutoff, double switchingWidth);
    virtual ~PotentialBase();
 
    // methods
 
    double getSwitchingWidth() const;
    void setSwitchingWidth(double width);
    double getCutoff() const;
    void setCutoff(double cutoff);
    static double applyPeriodicity0(double r, double const period);
    static void applyPeriodicity0(double r[], double const periods[]);
};

Detailed Documentation

Functions and tools commonly used by potentials. Contains functions for quadratic retrainst, Lennard-Jones, Coulomb, to manage the periodic boundaries and interface for cutoff. The system of units used is (eV, Angstrom, fs, e). Rules to combine different Lennard-Jones parameters were taken from:

Unlike Lennard-Jones Parameters for Vapor-Liquid Equilibria, Thorsten Schnabel, Jadran Vrabec , Hans Hasse, Institut fur Technische Thermodynamik und Thermische Verfahrenstechnik, Universitat Stuttgart, D-70550 Stuttgart, Germany, http://www.itt.uni-stuttgart.de/~schnabel/CR.pdf.

Construction

PotentialBase()

Non bond interaction cutoff. When the distance between two molecules is over getCutoff(), van der Waals and Coulomb interactions between the two molecules are ignored.

See also:

getSwitchingWidth().

Methods

double getSwitchingWidth() const

Width of the switching zone. In the switching zone the potential is replaced by \(V=U\times S(x)\) where U is the real potential V the switching potential and S the switching function. Variable x=0 at the beginning of the switching zone and x=1 at the end the function S is \(S=2x^3-3x^2+1\) which has the following properties: S(0)=1, S(1)=0, S’(0)=0 and S’(1)=0. The switching when the distance between the two molecules is getCutoff()- getSwitchingWidth() and ends when the distance is getCutoff();

See also:

getCutoff().

static double applyPeriodicity0(double r, double const period)

Minimum image representation.

Parameters:

r

Cyclic coordinate.

period

Period of the coordinates.

Returns:

Minimum image representation of r. The value returned is \(\frac{-period}{2} \le r \le \frac{period}{2}\)

static void applyPeriodicity0(double r[], double const periods[])

Minimum image representation. Writes the minimum image of r in place. Each component satisfies \(\frac{-period}{2} \le r_i \le \frac{period}{2}\).

Parameters:

r

Three-dimension vector.

periods

Three-dimension vector containing periods along each of the axes.