diff --git a/examples/amoeba/in.water_dimer.amoeba b/examples/amoeba/in.water_dimer.amoeba index c0e6ee35e4..8c4a317643 100644 --- a/examples/amoeba/in.water_dimer.amoeba +++ b/examples/amoeba/in.water_dimer.amoeba @@ -21,7 +21,7 @@ read_data data.water_dimer.amoeba fix amtype NULL "Tinker Types" # force field -pair_style amoeba +pair_style amoeba include angle pair_coeff * * amoeba_water.prm amoeba_water.key special_bonds lj/coul 0.5 0.5 0.5 one/five yes @@ -35,10 +35,10 @@ thermo_style custom step temp epair ebond eangle edihed eimp & # zero step run -#run 0 +run 0 # dynamics -thermo 1 -fix 1 all nve -run 100 +#thermo 1 +#fix 1 all nve +#run 100 diff --git a/examples/amoeba/in.water_dimer.hippo b/examples/amoeba/in.water_dimer.hippo index 55b173b789..7401c21310 100644 --- a/examples/amoeba/in.water_dimer.hippo +++ b/examples/amoeba/in.water_dimer.hippo @@ -21,7 +21,7 @@ read_data data.water_dimer.hippo fix amtype NULL "Tinker Types" # force field -pair_style hippo +pair_style hippo include angle pair_coeff * * hippo_water.prm hippo_water.key special_bonds lj/coul 0.5 0.5 0.5 one/five yes @@ -35,10 +35,10 @@ thermo_style custom step temp epair ebond eangle edihed eimp & # zero step run -#run 0 +run 0 # dynamics -thermo 1 -fix 1 all nve -run 100 +#thermo 1 +#fix 1 all nve +#run 100 diff --git a/src/AMOEBA/amoeba_multipole.cpp b/src/AMOEBA/amoeba_multipole.cpp index 08403be1bd..748a1e799f 100644 --- a/src/AMOEBA/amoeba_multipole.cpp +++ b/src/AMOEBA/amoeba_multipole.cpp @@ -812,6 +812,7 @@ void PairAmoeba::multipole_kspace() f[i][2] -= h3; } empole += 0.5*e; + //printf("mpole_force %g %g %g \n", f[0][0], f[0][1], f[0][2]); // augment the permanent multipole virial contributions diff --git a/src/AMOEBA/angle_amoeba.cpp b/src/AMOEBA/angle_amoeba.cpp index 3ee7535c38..6b5bb93c02 100644 --- a/src/AMOEBA/angle_amoeba.cpp +++ b/src/AMOEBA/angle_amoeba.cpp @@ -697,9 +697,11 @@ void AngleAmoeba::coeff(int narg, char **arg) void AngleAmoeba::init_style() { - // check if PairAmoeba disabled angle or Urey-Bradley terms + // check if PairAmoeba or PairHippo disabled angle or Urey-Bradley terms - Pair *pair = force->pair_match("amoeba",1,0); + Pair *pair = NULL; + pair = force->pair_match("amoeba",1,0); + if (!pair) pair = force->pair_match("hippo",1,0); if (!pair) enable_angle = enable_urey = 1; else { diff --git a/src/AMOEBA/fix_amoeba_bitorsion.cpp b/src/AMOEBA/fix_amoeba_bitorsion.cpp index b4d94a30f7..28524df994 100644 --- a/src/AMOEBA/fix_amoeba_bitorsion.cpp +++ b/src/AMOEBA/fix_amoeba_bitorsion.cpp @@ -185,9 +185,11 @@ void FixAmoebaBiTorsion::init() if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } - // check if PairAmoeba disabled bitorsion terms + // check if PairAmoeba or PairHippo disabled bitorsion terms - Pair *pair = force->pair_match("amoeba",1,0); + Pair *pair = NULL; + pair = force->pair_match("amoeba",1,0); + if (!pair) pair = force->pair_match("hippo",1,0); if (!pair) disable = 0; else { diff --git a/src/AMOEBA/fix_amoeba_pitorsion.cpp b/src/AMOEBA/fix_amoeba_pitorsion.cpp index 1d76f28faf..f386c1b005 100644 --- a/src/AMOEBA/fix_amoeba_pitorsion.cpp +++ b/src/AMOEBA/fix_amoeba_pitorsion.cpp @@ -151,9 +151,11 @@ void FixAmoebaPiTorsion::init() if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } - // check if PairAmoeba disabled pitorsion terms + // check if PairAmoeba or PairHippo disabled pitorsion terms - Pair *pair = force->pair_match("amoeba",1,0); + Pair *pair = NULL; + pair = force->pair_match("amoeba",1,0); + if (!pair) pair = force->pair_match("hippo",1,0); if (!pair) disable = 0; else { diff --git a/src/AMOEBA/improper_amoeba.cpp b/src/AMOEBA/improper_amoeba.cpp index 93a9b412cd..d821c9411a 100644 --- a/src/AMOEBA/improper_amoeba.cpp +++ b/src/AMOEBA/improper_amoeba.cpp @@ -276,21 +276,24 @@ void ImproperAmoeba::coeff(int narg, char **arg) void ImproperAmoeba::init_style() { - Pair *pair = force->pair_match("amoeba",1,0); + // check if PairAmoeba disabled improper terms + + Pair *pair = NULL; + pair = force->pair_match("amoeba",1,0); if (!pair) pair = force->pair_match("hippo",1,0); - if (!pair) error->all(FLERR,"Improper amoeba could not find pair amoega"); - + if (!pair) error->all(FLERR,"Improper amoeba could not find pair amoeba/hippo"); + + int tmp; + int flag = *((int *) pair->extract("improper_flag",tmp)); + disable = flag ? 0 : 1; + + // also extract opbend params + int dim; opbend_cubic = *(double *) pair->extract("opbend_cubic",dim); opbend_quartic = *(double *) pair->extract("opbend_quartic",dim); opbend_pentic = *(double *) pair->extract("opbend_pentic",dim); opbend_sextic = *(double *) pair->extract("opbend_sextic",dim); - - // check if PairAmoeba disabled improper terms - - int tmp; - int flag = *((int *) pair->extract("improper_flag",tmp)); - disable = flag ? 0 : 1; } /* ---------------------------------------------------------------------- diff --git a/src/CLASS2/bond_class2.cpp b/src/CLASS2/bond_class2.cpp index d056b2aea9..79d1484768 100644 --- a/src/CLASS2/bond_class2.cpp +++ b/src/CLASS2/bond_class2.cpp @@ -161,9 +161,11 @@ void BondClass2::coeff(int narg, char **arg) void BondClass2::init_style() { - // check if PairAmoeba disabled bond terms + // check if PairAmoeba or PairHippo disabled bond terms - Pair *pair = force->pair_match("amoeba",1,0); + Pair *pair = NULL; + pair = force->pair_match("amoeba",1,0); + if (!pair) pair = force->pair_match("hippo",1,0); if (!pair) disable = 0; else { diff --git a/src/EXTRA-MOLECULE/dihedral_fourier.cpp b/src/EXTRA-MOLECULE/dihedral_fourier.cpp index 1dcbdf4563..72c79c3528 100644 --- a/src/EXTRA-MOLECULE/dihedral_fourier.cpp +++ b/src/EXTRA-MOLECULE/dihedral_fourier.cpp @@ -333,9 +333,11 @@ void DihedralFourier::coeff(int narg, char **arg) void DihedralFourier::init_style() { - // check if PairAmoeba disabled dihedral terms + // check if PairAmoeba or PairHippo disabled dihedral terms - Pair *pair = force->pair_match("amoeba",1,0); + Pair *pair = NULL; + pair = force->pair_match("amoeba",1,0); + if (!pair) pair = force->pair_match("hippo",1,0); if (!pair) disable = 0; else { diff --git a/tools/tinker/tinker2lmp.py b/tools/tinker/tinker2lmp.py index fec9f8a506..3d871747b6 100644 --- a/tools/tinker/tinker2lmp.py +++ b/tools/tinker/tinker2lmp.py @@ -860,12 +860,13 @@ for i,one in enumerate(alist): # IMPORTANT subtlety # flip order of 3 atoms in alist if the angle # matches Angle Bending section of PRM file in reverse order + # no need to flip if c1 = c3 # necessary b/c BondAngle coeffs will be generated with r1,r2 params # from Bond Stretching section of PRM file # since in general r1 != r2, the LAMMPS AngleAmoeba class requires # the 3 atoms in the angle be in the order that matches r1 and r2 - if (c3,c2,c1) in adict: + if c1 != c3 and (c3,c2,c1) in adict: m,params = adict[(c3,c2,c1)] alist[i] = (atom3,atom2,atom1)