Merge branch 'evoyiatzis-patch-1' of https://github.com/evoyiatzis/lammps into collected-post-stable-patches
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "pair_lj_class2.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
@ -394,3 +395,13 @@ double PairLJClass2::single(int /*i*/, int /*j*/, int itype, int jtype, double r
|
||||
offset[itype][jtype];
|
||||
return factor_lj*philj;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void *PairLJClass2::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 2;
|
||||
if (strcmp(str,"epsilon") == 0) return (void *) epsilon;
|
||||
if (strcmp(str,"sigma") == 0) return (void *) sigma;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -39,6 +39,7 @@ class PairLJClass2 : public Pair {
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
void *extract(const char *, int &);
|
||||
|
||||
protected:
|
||||
double cut_global;
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "pair_lj_class2_coul_cut.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
@ -466,3 +467,16 @@ double PairLJClass2CoulCut::single(int i, int j, int itype, int jtype,
|
||||
|
||||
return eng;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void *PairLJClass2CoulCut::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 0;
|
||||
if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul;
|
||||
dim = 2;
|
||||
if (strcmp(str,"epsilon") == 0) return (void *) epsilon;
|
||||
if (strcmp(str,"sigma") == 0) return (void *) sigma;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -40,6 +40,7 @@ class PairLJClass2CoulCut : public Pair {
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
void *extract(const char *, int &);
|
||||
|
||||
protected:
|
||||
double cut_lj_global,cut_coul_global;
|
||||
|
||||
@ -549,5 +549,8 @@ void *PairLJClass2CoulLong::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 0;
|
||||
if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul;
|
||||
dim = 2;
|
||||
if (strcmp(str,"epsilon") == 0) return (void *) epsilon;
|
||||
if (strcmp(str,"sigma") == 0) return (void *) sigma;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user