git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7019 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2011-09-30 16:58:05 +00:00
parent 7d2dd1a90f
commit 4fb55e4972
8 changed files with 29 additions and 11 deletions

View File

@ -126,7 +126,7 @@ void PairCGCMMGPU::init_style()
cut_respa = NULL;
if (force->newton_pair)
error->all(FLERR,"Cannot use newton pair with GPU CGCMM pair style");
error->all(FLERR,"Cannot use newton pair with cg/cmm/gpu pair style");
// Repeat cutsq calculation because done after call to init_style
double maxcut = -1.0;

View File

@ -122,9 +122,9 @@ void PairBornCoulLong::compute(int eflag, int vflag)
if (rsq < cutsq[itype][jtype]) {
r2inv = 1.0/rsq;
r = sqrt(rsq);
if (rsq < cut_coulsq) {
r = sqrt(rsq);
grij = g_ewald * r;
expm2 = exp(-grij*grij);
t = 1.0 / (1.0 + EWALD_P*grij);
@ -136,7 +136,6 @@ void PairBornCoulLong::compute(int eflag, int vflag)
if (rsq < cut_ljsq[itype][jtype]) {
r6inv = r2inv*r2inv*r2inv;
r = sqrt(rsq);
rexp = exp((sigma[itype][jtype]-r)*rhoinv[itype][jtype]);
forceborn = born1[itype][jtype]*r*rexp - born2[itype][jtype]*r6inv
+ born3[itype][jtype]*r2inv*r6inv;

View File

@ -115,9 +115,9 @@ void PairBuckCoulLong::compute(int eflag, int vflag)
if (rsq < cutsq[itype][jtype]) {
r2inv = 1.0/rsq;
r = sqrt(rsq);
if (rsq < cut_coulsq) {
r = sqrt(rsq);
grij = g_ewald * r;
expm2 = exp(-grij*grij);
t = 1.0 / (1.0 + EWALD_P*grij);
@ -129,7 +129,6 @@ void PairBuckCoulLong::compute(int eflag, int vflag)
if (rsq < cut_ljsq[itype][jtype]) {
r6inv = r2inv*r2inv*r2inv;
r = sqrt(rsq);
rexp = exp(-r*rhoinv[itype][jtype]);
forcebuck = buck1[itype][jtype]*r*rexp - buck2[itype][jtype]*r6inv;
} else forcebuck = 0.0;

View File

@ -27,14 +27,14 @@ namespace LAMMPS_NS {
class PairLJCutCoulLongTIP4P : public PairLJCutCoulLong {
public:
PairLJCutCoulLongTIP4P(class LAMMPS *);
void compute(int, int);
virtual void compute(int, int);
void settings(int, char **);
void init_style();
void write_restart_settings(FILE *fp);
void read_restart_settings(FILE *fp);
void *extract(char *, int &);
private:
protected:
int typeH,typeO; // atom types of TIP4P water H and O atoms
int typeA,typeB; // angle and bond types of TIP4P water
double qdist; // distance from O site to negative charge

View File

@ -15,6 +15,10 @@ if (test $1 = 1) then
if (test -e ../pair_lj_charmm_coul_long.cpp) then
cp pair_lj_charmm_coul_long_opt.cpp ..
cp pair_lj_charmm_coul_long_opt.h ..
cp pair_lj_cut_coul_long_opt.cpp ..
cp pair_lj_cut_coul_long_opt.h ..
cp pair_lj_cut_coul_long_tip4p_opt.cpp ..
cp pair_lj_cut_coul_long_tip4p_opt.h ..
fi
cp pair_lj_cut_opt.cpp ..
@ -29,6 +33,8 @@ elif (test $1 = 0) then
rm -f ../pair_eam_alloy_opt.cpp
rm -f ../pair_eam_fs_opt.cpp
rm -f ../pair_lj_charmm_coul_long_opt.cpp
rm -f ../pair_lj_cut_coul_long_opt.cpp
rm -f ../pair_lj_cut_coul_long_tip4p_opt.cpp
rm -f ../pair_lj_cut_opt.cpp
rm -f ../pair_morse_opt.cpp
@ -36,6 +42,8 @@ elif (test $1 = 0) then
rm -f ../pair_eam_alloy_opt.h
rm -f ../pair_eam_fs_opt.h
rm -f ../pair_lj_charmm_coul_long_opt.h
rm -f ../pair_lj_cut_coul_long_opt.h
rm -f ../pair_lj_cut_coul_long_tip4p_opt.h
rm -f ../pair_lj_cut_opt.h
rm -f ../pair_morse_opt.h

View File

@ -27,6 +27,18 @@ for file in *.cpp *.h; do
if (test $file = pair_lj_charmm_coul_long_opt.h -a ! -e ../pair_lj_charmm_coul_long.cpp) then
continue
fi
if (test $file = pair_lj_cut_coul_long_opt.cpp -a ! -e ../pair_lj_cut_coul_long.cpp) then
continue
fi
if (test $file = pair_lj_cut_coul_long_opt.h -a ! -e ../pair_lj_cut_coul_long.cpp) then
continue
fi
if (test $file = pair_lj_cut_coul_long_tip4p_opt.cpp -a ! -e ../pair_lj_cut_coul_long_tip4p.cpp) then
continue
fi
if (test $file = pair_lj_cut_coul_long_tip4p_opt.h -a ! -e ../pair_lj_cut_coul_long_tip4p.cpp) then
continue
fi
if (test ! -e ../$file) then
echo " creating src/$file"

View File

@ -1234,7 +1234,7 @@ void *imdsock_accept(void * v) {
#elif defined(SOCKLEN_T)
SOCKLEN_T len;
#define _SOCKLEN_TYPE SOCKLEN_T
#elif defined(_POSIX_SOURCE)
#elif defined(_POSIX_SOURCE) || (defined(__APPLE__) && defined(__MACH__)) || defined(__linux)
socklen_t len;
#define _SOCKLEN_TYPE socklen_t
#else

View File

@ -110,14 +110,14 @@ void PairBuckCoulCut::compute(int eflag, int vflag)
if (rsq < cutsq[itype][jtype]) {
r2inv = 1.0/rsq;
r = sqrt(rsq);
if (rsq < cut_coulsq[itype][jtype])
forcecoul = qqrd2e * qtmp*q[j]*sqrt(r2inv);
forcecoul = qqrd2e * qtmp*q[j]/r;
else forcecoul = 0.0;
if (rsq < cut_ljsq[itype][jtype]) {
r6inv = r2inv*r2inv*r2inv;
r = sqrt(rsq);
rexp = exp(-r*rhoinv[itype][jtype]);
forcebuck = buck1[itype][jtype]*r*rexp - buck2[itype][jtype]*r6inv;
} else forcebuck = 0.0;
@ -135,7 +135,7 @@ void PairBuckCoulCut::compute(int eflag, int vflag)
if (eflag) {
if (rsq < cut_coulsq[itype][jtype])
ecoul = factor_coul * qqrd2e * qtmp*q[j]*sqrt(r2inv);
ecoul = factor_coul * qqrd2e * qtmp*q[j]/r;
else ecoul = 0.0;
if (rsq < cut_ljsq[itype][jtype]) {
evdwl = a[itype][jtype]*rexp - c[itype][jtype]*r6inv -