From e27125f93e7214bff6f090436c498e49e5e19314 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 5 Oct 2012 15:21:35 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8908 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/CLASS2/pair_lj_class2.cpp | 3 +++ src/CLASS2/pair_lj_class2_coul_cut.cpp | 3 +++ src/CLASS2/pair_lj_class2_coul_long.cpp | 3 +++ src/KSPACE/pair_buck_coul_long.cpp | 3 +++ src/KSPACE/pair_buck_long_coul_long.cpp | 6 ++++++ src/KSPACE/pair_coul_long.cpp | 6 ++++++ src/KSPACE/pair_coul_msm.cpp | 1 - src/KSPACE/pair_lj_charmm_coul_long.cpp | 6 ++++++ src/KSPACE/pair_lj_cut_coul_long.cpp | 9 +++++++++ src/KSPACE/pair_lj_cut_tip4p_long.cpp | 10 +++++++++- src/KSPACE/pair_lj_long_coul_long.cpp | 6 ++++++ src/KSPACE/pair_lj_long_tip4p_long.cpp | 7 ++++++- src/USER-CG-CMM/pair_cg_cmm_coul_long.cpp | 11 +++++++++++ src/USER-CG-CMM/pair_cmm_common.cpp | 3 +++ src/USER-CG-CMM/pair_lj_sdk.cpp | 3 +++ src/USER-CG-CMM/pair_lj_sdk_coul_long.cpp | 15 +++++++++++++-- src/pair_born.cpp | 3 +++ src/pair_buck.cpp | 3 +++ src/pair_buck_coul_cut.cpp | 3 +++ src/pair_lj96_cut.cpp | 3 +++ src/pair_lj_cut.cpp | 3 +++ src/pair_lj_cut_coul_cut.cpp | 3 +++ src/pair_lj_cut_coul_dsf.cpp | 3 +++ src/pair_lj_expand.cpp | 3 +++ 24 files changed, 114 insertions(+), 5 deletions(-) diff --git a/src/CLASS2/pair_lj_class2.cpp b/src/CLASS2/pair_lj_class2.cpp index 5c8b419b19..7006450b28 100644 --- a/src/CLASS2/pair_lj_class2.cpp +++ b/src/CLASS2/pair_lj_class2.cpp @@ -326,6 +326,7 @@ void PairLJClass2::write_restart_settings(FILE *fp) fwrite(&cut_global,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -339,10 +340,12 @@ void PairLJClass2::read_restart_settings(FILE *fp) fread(&cut_global,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */ diff --git a/src/CLASS2/pair_lj_class2_coul_cut.cpp b/src/CLASS2/pair_lj_class2_coul_cut.cpp index 5e5671c76f..1b193bccae 100644 --- a/src/CLASS2/pair_lj_class2_coul_cut.cpp +++ b/src/CLASS2/pair_lj_class2_coul_cut.cpp @@ -383,6 +383,7 @@ void PairLJClass2CoulCut::write_restart_settings(FILE *fp) fwrite(&cut_coul_global,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -396,11 +397,13 @@ void PairLJClass2CoulCut::read_restart_settings(FILE *fp) fread(&cut_coul_global,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */ diff --git a/src/CLASS2/pair_lj_class2_coul_long.cpp b/src/CLASS2/pair_lj_class2_coul_long.cpp index 546dae56b4..0d0a9be416 100644 --- a/src/CLASS2/pair_lj_class2_coul_long.cpp +++ b/src/CLASS2/pair_lj_class2_coul_long.cpp @@ -399,6 +399,7 @@ void PairLJClass2CoulLong::write_restart_settings(FILE *fp) fwrite(&cut_coul,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -412,11 +413,13 @@ void PairLJClass2CoulLong::read_restart_settings(FILE *fp) fread(&cut_coul,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_buck_coul_long.cpp b/src/KSPACE/pair_buck_coul_long.cpp index a29e58aa89..9e5f8660ff 100644 --- a/src/KSPACE/pair_buck_coul_long.cpp +++ b/src/KSPACE/pair_buck_coul_long.cpp @@ -398,6 +398,7 @@ void PairBuckCoulLong::write_restart_settings(FILE *fp) fwrite(&cut_coul,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -411,11 +412,13 @@ void PairBuckCoulLong::read_restart_settings(FILE *fp) fread(&cut_coul,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index ce68c5946e..c354b3d28f 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -411,6 +411,8 @@ void PairBuckLongCoulLong::write_restart_settings(FILE *fp) fwrite(&cut_coul,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&ncoultablebits,sizeof(int),1,fp); + fwrite(&tabinner,sizeof(double),1,fp); fwrite(&ewald_order,sizeof(int),1,fp); } @@ -425,12 +427,16 @@ void PairBuckLongCoulLong::read_restart_settings(FILE *fp) fread(&cut_coul,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&ncoultablebits,sizeof(int),1,fp); + fread(&tabinner,sizeof(double),1,fp); fread(&ewald_order,sizeof(int),1,fp); } MPI_Bcast(&cut_buck_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&ncoultablebits,1,MPI_INT,0,world); + MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world); MPI_Bcast(&ewald_order,1,MPI_INT,0,world); } diff --git a/src/KSPACE/pair_coul_long.cpp b/src/KSPACE/pair_coul_long.cpp index 1aa34041d5..1ec2544703 100644 --- a/src/KSPACE/pair_coul_long.cpp +++ b/src/KSPACE/pair_coul_long.cpp @@ -469,6 +469,8 @@ void PairCoulLong::write_restart_settings(FILE *fp) fwrite(&cut_coul,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&ncoultablebits,sizeof(int),1,fp); + fwrite(&tabinner,sizeof(double),1,fp); } /* ---------------------------------------------------------------------- @@ -481,10 +483,14 @@ void PairCoulLong::read_restart_settings(FILE *fp) fread(&cut_coul,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&ncoultablebits,sizeof(int),1,fp); + fread(&tabinner,sizeof(double),1,fp); } MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&ncoultablebits,1,MPI_INT,0,world); + MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pair_coul_msm.cpp b/src/KSPACE/pair_coul_msm.cpp index 7edf074d12..8fc9ef1701 100644 --- a/src/KSPACE/pair_coul_msm.cpp +++ b/src/KSPACE/pair_coul_msm.cpp @@ -150,7 +150,6 @@ void PairCoulMSM::compute(int eflag, int vflag) } /* ---------------------------------------------------------------------- - setup force tables used in compute routines ------------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_lj_charmm_coul_long.cpp b/src/KSPACE/pair_lj_charmm_coul_long.cpp index e81d4784f8..c11ab3bd21 100644 --- a/src/KSPACE/pair_lj_charmm_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_long.cpp @@ -1061,6 +1061,8 @@ void PairLJCharmmCoulLong::write_restart_settings(FILE *fp) fwrite(&cut_coul,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&ncoultablebits,sizeof(int),1,fp); + fwrite(&tabinner,sizeof(double),1,fp); } /* ---------------------------------------------------------------------- @@ -1075,12 +1077,16 @@ void PairLJCharmmCoulLong::read_restart_settings(FILE *fp) fread(&cut_coul,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&ncoultablebits,sizeof(int),1,fp); + fread(&tabinner,sizeof(double),1,fp); } MPI_Bcast(&cut_lj_inner,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&ncoultablebits,1,MPI_INT,0,world); + MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index 0a46c4577c..cad941ff78 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -1020,6 +1020,9 @@ void PairLJCutCoulLong::write_restart_settings(FILE *fp) fwrite(&cut_coul,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); + fwrite(&ncoultablebits,sizeof(int),1,fp); + fwrite(&tabinner,sizeof(double),1,fp); } /* ---------------------------------------------------------------------- @@ -1033,11 +1036,17 @@ void PairLJCutCoulLong::read_restart_settings(FILE *fp) fread(&cut_coul,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); + fread(&ncoultablebits,sizeof(int),1,fp); + fread(&tabinner,sizeof(double),1,fp); } MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); + MPI_Bcast(&ncoultablebits,1,MPI_INT,0,world); + MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pair_lj_cut_tip4p_long.cpp b/src/KSPACE/pair_lj_cut_tip4p_long.cpp index 0cea699a75..f0ec607e05 100644 --- a/src/KSPACE/pair_lj_cut_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_cut_tip4p_long.cpp @@ -509,6 +509,9 @@ void PairLJCutTIP4PLong::write_restart_settings(FILE *fp) fwrite(&cut_coul,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); + fwrite(&ncoultablebits,sizeof(int),1,fp); + fwrite(&tabinner,sizeof(double),1,fp); } /* ---------------------------------------------------------------------- @@ -528,6 +531,9 @@ void PairLJCutTIP4PLong::read_restart_settings(FILE *fp) fread(&cut_coul,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); + fread(&ncoultablebits,sizeof(int),1,fp); + fread(&tabinner,sizeof(double),1,fp); } MPI_Bcast(&typeO,1,MPI_INT,0,world); @@ -540,7 +546,9 @@ void PairLJCutTIP4PLong::read_restart_settings(FILE *fp) MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); - + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); + MPI_Bcast(&ncoultablebits,1,MPI_INT,0,world); + MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index fe8198bf45..61c068f7f0 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -412,6 +412,8 @@ void PairLJLongCoulLong::write_restart_settings(FILE *fp) fwrite(&cut_coul,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&ncoultablebits,sizeof(int),1,fp); + fwrite(&tabinner,sizeof(double),1,fp); fwrite(&ewald_order,sizeof(int),1,fp); } @@ -426,12 +428,16 @@ void PairLJLongCoulLong::read_restart_settings(FILE *fp) fread(&cut_coul,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&ncoultablebits,sizeof(int),1,fp); + fread(&tabinner,sizeof(double),1,fp); fread(&ewald_order,sizeof(int),1,fp); } MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&ncoultablebits,1,MPI_INT,0,world); + MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world); MPI_Bcast(&ewald_order,1,MPI_INT,0,world); } diff --git a/src/KSPACE/pair_lj_long_tip4p_long.cpp b/src/KSPACE/pair_lj_long_tip4p_long.cpp index 2ab931d2fb..56ae55a4d5 100755 --- a/src/KSPACE/pair_lj_long_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_long_tip4p_long.cpp @@ -541,6 +541,8 @@ void PairLJLongTIP4PLong::write_restart_settings(FILE *fp) fwrite(&cut_coul,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&ncoultablebits,sizeof(int),1,fp); + fwrite(&tabinner,sizeof(double),1,fp); } /* ---------------------------------------------------------------------- @@ -560,6 +562,8 @@ void PairLJLongTIP4PLong::read_restart_settings(FILE *fp) fread(&cut_coul,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&ncoultablebits,sizeof(int),1,fp); + fread(&tabinner,sizeof(double),1,fp); } MPI_Bcast(&typeO,1,MPI_INT,0,world); @@ -572,7 +576,8 @@ void PairLJLongTIP4PLong::read_restart_settings(FILE *fp) MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); - + MPI_Bcast(&ncoultablebits,1,MPI_INT,0,world); + MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world); } /* ---------------------------------------------------------------------- diff --git a/src/USER-CG-CMM/pair_cg_cmm_coul_long.cpp b/src/USER-CG-CMM/pair_cg_cmm_coul_long.cpp index a13f316ac0..efbde71354 100644 --- a/src/USER-CG-CMM/pair_cg_cmm_coul_long.cpp +++ b/src/USER-CG-CMM/pair_cg_cmm_coul_long.cpp @@ -408,6 +408,9 @@ void PairCGCMMCoulLong::compute_outer(int eflag, int vflag) void PairCGCMMCoulLong::write_restart(FILE *fp) { write_restart_settings(fp); + fwrite(&ncoultablebits,sizeof(int),1,fp); + fwrite(&tabinner,sizeof(double),1,fp); + PairCMMCommon::write_restart(fp); } @@ -416,6 +419,14 @@ void PairCGCMMCoulLong::write_restart(FILE *fp) void PairCGCMMCoulLong::read_restart(FILE *fp) { read_restart_settings(fp); + + if (comm->me == 0) { + fread(&ncoultablebits,sizeof(int),1,fp); + fread(&tabinner,sizeof(double),1,fp); + } + MPI_Bcast(&ncoultablebits,1,MPI_INT,0,world); + MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world); + allocate(); PairCMMCommon::read_restart(fp); } diff --git a/src/USER-CG-CMM/pair_cmm_common.cpp b/src/USER-CG-CMM/pair_cmm_common.cpp index f5f5f5799e..cf6d0a5b5e 100644 --- a/src/USER-CG-CMM/pair_cmm_common.cpp +++ b/src/USER-CG-CMM/pair_cmm_common.cpp @@ -390,6 +390,7 @@ void PairCMMCommon::write_restart_settings(FILE *fp) fwrite(&kappa,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -405,12 +406,14 @@ void PairCMMCommon::read_restart_settings(FILE *fp) fread(&kappa,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&kappa,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); cut_coulsq_global = cut_coul_global*cut_coul_global; } diff --git a/src/USER-CG-CMM/pair_lj_sdk.cpp b/src/USER-CG-CMM/pair_lj_sdk.cpp index 681260993f..c6063f3e0f 100644 --- a/src/USER-CG-CMM/pair_lj_sdk.cpp +++ b/src/USER-CG-CMM/pair_lj_sdk.cpp @@ -406,6 +406,7 @@ void PairLJSDK::write_restart_settings(FILE *fp) fwrite(&cut_global,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -419,10 +420,12 @@ void PairLJSDK::read_restart_settings(FILE *fp) fread(&cut_global,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */ diff --git a/src/USER-CG-CMM/pair_lj_sdk_coul_long.cpp b/src/USER-CG-CMM/pair_lj_sdk_coul_long.cpp index c8a738dc3a..11e7260768 100644 --- a/src/USER-CG-CMM/pair_lj_sdk_coul_long.cpp +++ b/src/USER-CG-CMM/pair_lj_sdk_coul_long.cpp @@ -188,7 +188,8 @@ void PairLJSDKCoulLong::eval() fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable]; table = ftable[itable] + fraction*dftable[itable]; forcecoul = qtmp*q[j] * table; - if (EFLAG) ecoul = qtmp*q[j] * (etable[itable] + fraction*detable[itable]); + if (EFLAG) ecoul = qtmp*q[j] * + (etable[itable] + fraction*detable[itable]); if (factor_coul < 1.0) { table = ctable[itable] + fraction*dctable[itable]; prefactor = qtmp*q[j] * table; @@ -316,7 +317,8 @@ void PairLJSDKCoulLong::settings(int narg, char **arg) void PairLJSDKCoulLong::coeff(int narg, char **arg) { - if (narg < 5 || narg > 6) error->all(FLERR,"Incorrect args for pair coefficients"); + if (narg < 5 || narg > 6) + error->all(FLERR,"Incorrect args for pair coefficients"); if (!allocated) allocate(); int ilo,ihi,jlo,jhi; @@ -604,6 +606,9 @@ void PairLJSDKCoulLong::write_restart_settings(FILE *fp) fwrite(&cut_coul,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); + fwrite(&ncoultablebits,sizeof(int),1,fp); + fwrite(&tabinner,sizeof(double),1,fp); } /* ---------------------------------------------------------------------- @@ -617,11 +622,17 @@ void PairLJSDKCoulLong::read_restart_settings(FILE *fp) fread(&cut_coul,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); + fread(&ncoultablebits,sizeof(int),1,fp); + fread(&tabinner,sizeof(double),1,fp); } MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); + MPI_Bcast(&ncoultablebits,1,MPI_INT,0,world); + MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world); } /* ---------------------------------------------------------------------- diff --git a/src/pair_born.cpp b/src/pair_born.cpp index 08aa6a96db..cb54bf3855 100644 --- a/src/pair_born.cpp +++ b/src/pair_born.cpp @@ -358,6 +358,7 @@ void PairBorn::write_restart_settings(FILE *fp) fwrite(&cut_global,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -370,10 +371,12 @@ void PairBorn::read_restart_settings(FILE *fp) fread(&cut_global,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_buck.cpp b/src/pair_buck.cpp index 4fba27257e..056a2b4f87 100644 --- a/src/pair_buck.cpp +++ b/src/pair_buck.cpp @@ -329,6 +329,7 @@ void PairBuck::write_restart_settings(FILE *fp) fwrite(&cut_global,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -341,10 +342,12 @@ void PairBuck::read_restart_settings(FILE *fp) fread(&cut_global,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp index 612539465b..bd77c41b61 100644 --- a/src/pair_buck_coul_cut.cpp +++ b/src/pair_buck_coul_cut.cpp @@ -388,6 +388,7 @@ void PairBuckCoulCut::write_restart_settings(FILE *fp) fwrite(&cut_coul_global,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -401,11 +402,13 @@ void PairBuckCoulCut::read_restart_settings(FILE *fp) fread(&cut_coul_global,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj96_cut.cpp b/src/pair_lj96_cut.cpp index 5fe152ab45..1a845a3511 100644 --- a/src/pair_lj96_cut.cpp +++ b/src/pair_lj96_cut.cpp @@ -663,6 +663,7 @@ void PairLJ96Cut::write_restart_settings(FILE *fp) fwrite(&cut_global,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -676,10 +677,12 @@ void PairLJ96Cut::read_restart_settings(FILE *fp) fread(&cut_global,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj_cut.cpp b/src/pair_lj_cut.cpp index 0804ee1e15..163edf4945 100644 --- a/src/pair_lj_cut.cpp +++ b/src/pair_lj_cut.cpp @@ -657,6 +657,7 @@ void PairLJCut::write_restart_settings(FILE *fp) fwrite(&cut_global,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -670,10 +671,12 @@ void PairLJCut::read_restart_settings(FILE *fp) fread(&cut_global,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj_cut_coul_cut.cpp b/src/pair_lj_cut_coul_cut.cpp index e7dbb1a538..ce5e631bf9 100644 --- a/src/pair_lj_cut_coul_cut.cpp +++ b/src/pair_lj_cut_coul_cut.cpp @@ -377,6 +377,7 @@ void PairLJCutCoulCut::write_restart_settings(FILE *fp) fwrite(&cut_coul_global,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -390,11 +391,13 @@ void PairLJCutCoulCut::read_restart_settings(FILE *fp) fread(&cut_coul_global,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj_cut_coul_dsf.cpp b/src/pair_lj_cut_coul_dsf.cpp index 10447edcb6..4f89a14ddc 100644 --- a/src/pair_lj_cut_coul_dsf.cpp +++ b/src/pair_lj_cut_coul_dsf.cpp @@ -395,6 +395,7 @@ void PairLJCutCoulDSF::write_restart_settings(FILE *fp) fwrite(&cut_coul,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -409,12 +410,14 @@ void PairLJCutCoulDSF::read_restart_settings(FILE *fp) fread(&cut_coul,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&alpha,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj_expand.cpp b/src/pair_lj_expand.cpp index 0cb2598cd2..ce6cc68901 100644 --- a/src/pair_lj_expand.cpp +++ b/src/pair_lj_expand.cpp @@ -349,6 +349,7 @@ void PairLJExpand::write_restart_settings(FILE *fp) fwrite(&cut_global,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); + fwrite(&tail_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- @@ -361,10 +362,12 @@ void PairLJExpand::read_restart_settings(FILE *fp) fread(&cut_global,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); + fread(&tail_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); + MPI_Bcast(&tail_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- */