Merge pull request #749 from akohlmey/collected-bugfixes-and-updates
Collected bugfixes and updates for the next patch release
This commit is contained in:
@ -732,7 +732,7 @@ make lib-latte args="-b -m gfortran" # download and build in lib/latte and
|
|||||||
:pre
|
:pre
|
||||||
|
|
||||||
Note that 3 symbolic (soft) links, "includelink" and "liblink" and
|
Note that 3 symbolic (soft) links, "includelink" and "liblink" and
|
||||||
"filelink", are created in lib/latte to point into the LATTE home dir.
|
"filelink.o", are created in lib/latte to point into the LATTE home dir.
|
||||||
When LAMMPS builds in src it will use these links. You should
|
When LAMMPS builds in src it will use these links. You should
|
||||||
also check that the Makefile.lammps file you create is appropriate
|
also check that the Makefile.lammps file you create is appropriate
|
||||||
for the compiler you use on your system to build LATTE.
|
for the compiler you use on your system to build LATTE.
|
||||||
|
|||||||
@ -138,17 +138,17 @@ By default, no additional forces act on the first and last replicas
|
|||||||
during the NEB relaxation, so these replicas simply relax toward their
|
during the NEB relaxation, so these replicas simply relax toward their
|
||||||
respective local minima. By using the key word {end}, additional
|
respective local minima. By using the key word {end}, additional
|
||||||
forces can be applied to the first and/or last replicas, to enable
|
forces can be applied to the first and/or last replicas, to enable
|
||||||
them to relax toward a MEP while constraining their energy.
|
them to relax toward a MEP while constraining their energy E to the
|
||||||
|
target energy ETarget.
|
||||||
|
|
||||||
The interatomic force Fi for the specified replica becomes:
|
If ETarget>E, the interatomic force Fi for the specified replica becomes:
|
||||||
|
|
||||||
Fi = -Grad(V) + (Grad(V) dot T' + (E-ETarget)*Kspring3) T', {when} Grad(V) dot T' < 0
|
Fi = -Grad(V) + (Grad(V) dot T' + (E-ETarget)*Kspring3) T', {when} Grad(V) dot T' < 0
|
||||||
Fi = -Grad(V) + (Grad(V) dot T' + (ETarget- E)*Kspring3) T', {when} Grad(V) dot T' > 0
|
Fi = -Grad(V) + (Grad(V) dot T' + (ETarget- E)*Kspring3) T', {when} Grad(V) dot T' > 0
|
||||||
:pre
|
:pre
|
||||||
|
|
||||||
where E is the current energy of the replica and ETarget is the target
|
The "spring" constant on the difference in energies is the specified
|
||||||
energy. The "spring" constant on the difference in energies is the
|
{Kspring3} value.
|
||||||
specified {Kspring3} value.
|
|
||||||
|
|
||||||
When {estyle} is specified as {first}, the force is applied to the
|
When {estyle} is specified as {first}, the force is applied to the
|
||||||
first replica. When {estyle} is specified as {last}, the force is
|
first replica. When {estyle} is specified as {last}, the force is
|
||||||
@ -183,10 +183,9 @@ After converging a NEB calculation using an {estyle} of
|
|||||||
have a larger energy than the first replica. If this is not the case,
|
have a larger energy than the first replica. If this is not the case,
|
||||||
the path is probably not a MEP.
|
the path is probably not a MEP.
|
||||||
|
|
||||||
Finally, note that if the last replica converges toward a local
|
Finally, note that the last replica may never reach the target energy
|
||||||
minimum which has a larger energy than the energy of the first
|
if it is stuck in a local minima which has a larger energy than the
|
||||||
replica, a NEB calculation using an {estyle} of {last/efirst} or
|
target energy.
|
||||||
{last/efirst/middle} cannot reach final convergence.
|
|
||||||
|
|
||||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||||
|
|
||||||
|
|||||||
@ -111,6 +111,10 @@ need to communicate their new values to/from ghost atoms, an operation
|
|||||||
that can be invoked from within a "pair style"_pair_style.html or
|
that can be invoked from within a "pair style"_pair_style.html or
|
||||||
"fix"_fix.html or "compute"_compute.html that you write.
|
"fix"_fix.html or "compute"_compute.html that you write.
|
||||||
|
|
||||||
|
NOTE: If this fix is defined [after] the simulation box is created,
|
||||||
|
a 'run 0' command should be issued to properly initialize the storage
|
||||||
|
created by this fix.
|
||||||
|
|
||||||
:line
|
:line
|
||||||
|
|
||||||
This fix is one of a small number that can be defined in an input
|
This fix is one of a small number that can be defined in an input
|
||||||
@ -155,7 +159,7 @@ these commands could be used:
|
|||||||
|
|
||||||
fix prop all property/atom mol
|
fix prop all property/atom mol
|
||||||
variable cluster atom ((id-1)/10)+1
|
variable cluster atom ((id-1)/10)+1
|
||||||
set id * mol v_cluster :pre
|
set atom * mol v_cluster :pre
|
||||||
|
|
||||||
The "atom-style variable"_variable.html will create values for atoms
|
The "atom-style variable"_variable.html will create values for atoms
|
||||||
with IDs 31,32,33,...40 that are 4.0,4.1,4.2,...,4.9. When the
|
with IDs 31,32,33,...40 that are 4.0,4.1,4.2,...,4.9. When the
|
||||||
|
|||||||
@ -9,6 +9,7 @@ def loop(N,cut0,thresh,lmpptr):
|
|||||||
lmp = lammps(ptr=lmpptr)
|
lmp = lammps(ptr=lmpptr)
|
||||||
natoms = lmp.get_natoms()
|
natoms = lmp.get_natoms()
|
||||||
|
|
||||||
|
try:
|
||||||
for i in range(N):
|
for i in range(N):
|
||||||
cut = cut0 + i*0.1
|
cut = cut0 + i*0.1
|
||||||
|
|
||||||
@ -22,3 +23,6 @@ def loop(N,cut0,thresh,lmpptr):
|
|||||||
pe = lmp.extract_compute("thermo_pe",0,0) # extract total PE from LAMMPS
|
pe = lmp.extract_compute("thermo_pe",0,0) # extract total PE from LAMMPS
|
||||||
print("PE",pe/natoms,thresh)
|
print("PE",pe/natoms,thresh)
|
||||||
if pe/natoms < thresh: return
|
if pe/natoms < thresh: return
|
||||||
|
except Exception as e:
|
||||||
|
print("LOOP error:", e)
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,7 @@ python simple here """
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
def simple():
|
def simple():
|
||||||
|
foo = 0
|
||||||
print("Inside simple function")
|
print("Inside simple function")
|
||||||
try:
|
try:
|
||||||
foo += 1
|
foo += 1
|
||||||
|
|||||||
@ -28,14 +28,15 @@ Instructions:
|
|||||||
and finally, build the code via the make command
|
and finally, build the code via the make command
|
||||||
% make
|
% make
|
||||||
|
|
||||||
3. Create three soft links in this dir (lib/latte)
|
3. Create three symbolic links in this dir (lib/latte)
|
||||||
E.g if you built LATTE in this dir:
|
E.g if you built LATTE in this dir:
|
||||||
% ln -s ./LATTE-master/src includelink
|
% ln -s ./LATTE-master/src includelink
|
||||||
% ln -s ./LATTE-master liblink
|
% ln -s ./LATTE-master liblink
|
||||||
% ln -s ./LATTE-master/src/latte_c_bind.o filelink
|
% ln -s ./LATTE-master/src/latte_c_bind.o filelink.o
|
||||||
|
|
||||||
4. Choose a Makefile.lammps.* file appropriate for your compiler
|
4. Choose a Makefile.lammps.* file appropriate for your compiler
|
||||||
(GNU gfortran or Intel ifort) and copy it to Makefile.lammps.
|
(GNU gfortran with external BLAS, GNU gfortran with local liblinalg,
|
||||||
|
or Intel ifort with MKL) and copy it to Makefile.lammps.
|
||||||
Note that you may need to edit Makefile.lammps for paths
|
Note that you may need to edit Makefile.lammps for paths
|
||||||
and compiler options appropriate to your system.
|
and compiler options appropriate to your system.
|
||||||
|
|
||||||
@ -49,7 +50,7 @@ with the LATTE package installed:
|
|||||||
% make g++ (or whatever target you wish)
|
% make g++ (or whatever target you wish)
|
||||||
|
|
||||||
Note that if you download and unpack a new LAMMPS tarball, the
|
Note that if you download and unpack a new LAMMPS tarball, the
|
||||||
"includelink" and "liblink" and "filelink" files will be lost and you
|
"includelink" and "liblink" and "filelink.o" symbolic links will be
|
||||||
will need to re-create them (step 3). If you built LATTE in this
|
lost and you will need to re-create them (step 3). If you built LATTE
|
||||||
directory (as opposed to somewhere else on your system), you will also
|
in this directory (as opposed to somewhere else on your system), you
|
||||||
need to repeat steps 1,2,4.
|
will also need to repeat steps 1,2,4.
|
||||||
|
|||||||
@ -969,6 +969,8 @@ void PPPMKokkos<DeviceType>::set_grid_global()
|
|||||||
if (!gewaldflag) {
|
if (!gewaldflag) {
|
||||||
if (accuracy <= 0.0)
|
if (accuracy <= 0.0)
|
||||||
error->all(FLERR,"KSpace accuracy must be > 0");
|
error->all(FLERR,"KSpace accuracy must be > 0");
|
||||||
|
if (q2 == 0.0)
|
||||||
|
error->all(FLERR,"Must use 'kspace_modify gewald' for uncharged system");
|
||||||
g_ewald = accuracy*sqrt(natoms*cutoff*xprd*yprd*zprd) / (2.0*q2);
|
g_ewald = accuracy*sqrt(natoms*cutoff*xprd*yprd*zprd) / (2.0*q2);
|
||||||
if (g_ewald >= 1.0) g_ewald = (1.35 - 0.15*log(accuracy))/cutoff;
|
if (g_ewald >= 1.0) g_ewald = (1.35 - 0.15*log(accuracy))/cutoff;
|
||||||
else g_ewald = sqrt(-log(g_ewald)) / cutoff;
|
else g_ewald = sqrt(-log(g_ewald)) / cutoff;
|
||||||
@ -1179,6 +1181,7 @@ double PPPMKokkos<DeviceType>::final_accuracy()
|
|||||||
double yprd = domain->yprd;
|
double yprd = domain->yprd;
|
||||||
double zprd = domain->zprd;
|
double zprd = domain->zprd;
|
||||||
bigint natoms = atomKK->natoms;
|
bigint natoms = atomKK->natoms;
|
||||||
|
if (natoms == 0) natoms = 1; // avoid division by zero
|
||||||
|
|
||||||
double df_kspace = compute_df_kspace();
|
double df_kspace = compute_df_kspace();
|
||||||
double q2_over_sqrt = q2 / sqrt(natoms*cutoff*xprd*yprd*zprd);
|
double q2_over_sqrt = q2 / sqrt(natoms*cutoff*xprd*yprd*zprd);
|
||||||
|
|||||||
@ -154,6 +154,8 @@ void Ewald::init()
|
|||||||
if (!gewaldflag) {
|
if (!gewaldflag) {
|
||||||
if (accuracy <= 0.0)
|
if (accuracy <= 0.0)
|
||||||
error->all(FLERR,"KSpace accuracy must be > 0");
|
error->all(FLERR,"KSpace accuracy must be > 0");
|
||||||
|
if (q2 == 0.0)
|
||||||
|
error->all(FLERR,"Must use 'kspace_modify gewald' for uncharged system");
|
||||||
g_ewald = accuracy*sqrt(natoms*cutoff*xprd*yprd*zprd) / (2.0*q2);
|
g_ewald = accuracy*sqrt(natoms*cutoff*xprd*yprd*zprd) / (2.0*q2);
|
||||||
if (g_ewald >= 1.0) g_ewald = (1.35 - 0.15*log(accuracy))/cutoff;
|
if (g_ewald >= 1.0) g_ewald = (1.35 - 0.15*log(accuracy))/cutoff;
|
||||||
else g_ewald = sqrt(-log(g_ewald)) / cutoff;
|
else g_ewald = sqrt(-log(g_ewald)) / cutoff;
|
||||||
@ -340,6 +342,7 @@ void Ewald::setup()
|
|||||||
|
|
||||||
double Ewald::rms(int km, double prd, bigint natoms, double q2)
|
double Ewald::rms(int km, double prd, bigint natoms, double q2)
|
||||||
{
|
{
|
||||||
|
if (natoms == 0) natoms = 1; // avoid division by zero
|
||||||
double value = 2.0*q2*g_ewald/prd *
|
double value = 2.0*q2*g_ewald/prd *
|
||||||
sqrt(1.0/(MY_PI*km*natoms)) *
|
sqrt(1.0/(MY_PI*km*natoms)) *
|
||||||
exp(-MY_PI*MY_PI*km*km/(g_ewald*g_ewald*prd*prd));
|
exp(-MY_PI*MY_PI*km*km/(g_ewald*g_ewald*prd*prd));
|
||||||
|
|||||||
@ -193,6 +193,10 @@ void EwaldDisp::init()
|
|||||||
|
|
||||||
if (!gewaldflag) {
|
if (!gewaldflag) {
|
||||||
if (function[0]) {
|
if (function[0]) {
|
||||||
|
if (accuracy <= 0.0)
|
||||||
|
error->all(FLERR,"KSpace accuracy must be > 0");
|
||||||
|
if (q2 == 0.0)
|
||||||
|
error->all(FLERR,"Must use 'kspace_modify gewald' for uncharged system");
|
||||||
g_ewald = accuracy*sqrt(natoms*(*cutoff)*shape_det(domain->h)) / (2.0*q2);
|
g_ewald = accuracy*sqrt(natoms*(*cutoff)*shape_det(domain->h)) / (2.0*q2);
|
||||||
if (g_ewald >= 1.0) g_ewald = (1.35 - 0.15*log(accuracy))/(*cutoff);
|
if (g_ewald >= 1.0) g_ewald = (1.35 - 0.15*log(accuracy))/(*cutoff);
|
||||||
else g_ewald = sqrt(-log(g_ewald)) / (*cutoff);
|
else g_ewald = sqrt(-log(g_ewald)) / (*cutoff);
|
||||||
@ -298,6 +302,7 @@ double EwaldDisp::rms(int km, double prd, bigint natoms,
|
|||||||
double q2, double b2, double M2)
|
double q2, double b2, double M2)
|
||||||
{
|
{
|
||||||
double value = 0.0;
|
double value = 0.0;
|
||||||
|
if (natoms == 0) natoms = 1; // avoid division by zero
|
||||||
|
|
||||||
// Coulombic
|
// Coulombic
|
||||||
|
|
||||||
|
|||||||
@ -1004,6 +1004,8 @@ void PPPM::set_grid_global()
|
|||||||
if (!gewaldflag) {
|
if (!gewaldflag) {
|
||||||
if (accuracy <= 0.0)
|
if (accuracy <= 0.0)
|
||||||
error->all(FLERR,"KSpace accuracy must be > 0");
|
error->all(FLERR,"KSpace accuracy must be > 0");
|
||||||
|
if (q2 == 0.0)
|
||||||
|
error->all(FLERR,"Must use kspace_modify gewald for uncharged system");
|
||||||
g_ewald = accuracy*sqrt(natoms*cutoff*xprd*yprd*zprd) / (2.0*q2);
|
g_ewald = accuracy*sqrt(natoms*cutoff*xprd*yprd*zprd) / (2.0*q2);
|
||||||
if (g_ewald >= 1.0) g_ewald = (1.35 - 0.15*log(accuracy))/cutoff;
|
if (g_ewald >= 1.0) g_ewald = (1.35 - 0.15*log(accuracy))/cutoff;
|
||||||
else g_ewald = sqrt(-log(g_ewald)) / cutoff;
|
else g_ewald = sqrt(-log(g_ewald)) / cutoff;
|
||||||
@ -1268,6 +1270,7 @@ double PPPM::compute_qopt()
|
|||||||
double PPPM::estimate_ik_error(double h, double prd, bigint natoms)
|
double PPPM::estimate_ik_error(double h, double prd, bigint natoms)
|
||||||
{
|
{
|
||||||
double sum = 0.0;
|
double sum = 0.0;
|
||||||
|
if (natoms == 0) return 0.0;
|
||||||
for (int m = 0; m < order; m++)
|
for (int m = 0; m < order; m++)
|
||||||
sum += acons[order][m] * pow(h*g_ewald,2.0*m);
|
sum += acons[order][m] * pow(h*g_ewald,2.0*m);
|
||||||
double value = q2 * pow(h*g_ewald,(double)order) *
|
double value = q2 * pow(h*g_ewald,(double)order) *
|
||||||
@ -1345,6 +1348,7 @@ double PPPM::final_accuracy()
|
|||||||
double yprd = domain->yprd;
|
double yprd = domain->yprd;
|
||||||
double zprd = domain->zprd;
|
double zprd = domain->zprd;
|
||||||
bigint natoms = atom->natoms;
|
bigint natoms = atom->natoms;
|
||||||
|
if (natoms == 0) natoms = 1; // avoid division by zero
|
||||||
|
|
||||||
double df_kspace = compute_df_kspace();
|
double df_kspace = compute_df_kspace();
|
||||||
double q2_over_sqrt = q2 / sqrt(natoms*cutoff*xprd*yprd*zprd);
|
double q2_over_sqrt = q2 / sqrt(natoms*cutoff*xprd*yprd*zprd);
|
||||||
|
|||||||
@ -17,7 +17,7 @@ Once you have successfully built LAMMPS with this package and the
|
|||||||
LATTE library you can test it using an input file from the examples
|
LATTE library you can test it using an input file from the examples
|
||||||
latte dir, e.g.
|
latte dir, e.g.
|
||||||
|
|
||||||
lmp_serial < lammps/examples/latte/in.latte.water
|
lmp_serial -in lammps/examples/latte/in.latte.water
|
||||||
|
|
||||||
This pair style was written in collaboration with the LATTE
|
This pair style was written in collaboration with the LATTE
|
||||||
developers.
|
developers.
|
||||||
|
|||||||
@ -298,12 +298,14 @@ void FixNEB::min_post_force(int vflag)
|
|||||||
if (ireplica == 0) vIni=veng;
|
if (ireplica == 0) vIni=veng;
|
||||||
|
|
||||||
if (FreeEndFinalWithRespToEIni) {
|
if (FreeEndFinalWithRespToEIni) {
|
||||||
if (me == 0) {
|
if (cmode == SINGLE_PROC_DIRECT || cmode == SINGLE_PROC_MAP) {
|
||||||
int procFirst;
|
int procFirst;
|
||||||
procFirst=universe->root_proc[0];
|
procFirst=universe->root_proc[0];
|
||||||
MPI_Bcast(&vIni,1,MPI_DOUBLE,procFirst,uworld);
|
MPI_Bcast(&vIni,1,MPI_DOUBLE,procFirst,uworld);
|
||||||
}
|
}else {
|
||||||
if (cmode == MULTI_PROC) {
|
if (me == 0)
|
||||||
|
MPI_Bcast(&vIni,1,MPI_DOUBLE,0,rootworld);
|
||||||
|
|
||||||
MPI_Bcast(&vIni,1,MPI_DOUBLE,0,world);
|
MPI_Bcast(&vIni,1,MPI_DOUBLE,0,world);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -514,9 +516,10 @@ void FixNEB::min_post_force(int vflag)
|
|||||||
MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world);
|
MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world);
|
||||||
dot=dotall/tlen;
|
dot=dotall/tlen;
|
||||||
|
|
||||||
|
if (veng<EFinalIni) {
|
||||||
if (dot<0) prefactor = -dot - kspringFinal*(veng-EFinalIni);
|
if (dot<0) prefactor = -dot - kspringFinal*(veng-EFinalIni);
|
||||||
else prefactor = -dot + kspringFinal*(veng-EFinalIni);
|
else prefactor = -dot + kspringFinal*(veng-EFinalIni);
|
||||||
|
}
|
||||||
for (int i = 0; i < nlocal; i++)
|
for (int i = 0; i < nlocal; i++)
|
||||||
if (mask[i] & groupbit) {
|
if (mask[i] & groupbit) {
|
||||||
f[i][0] += prefactor *tangent[i][0];
|
f[i][0] += prefactor *tangent[i][0];
|
||||||
@ -531,10 +534,10 @@ void FixNEB::min_post_force(int vflag)
|
|||||||
double dotall;
|
double dotall;
|
||||||
MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world);
|
MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world);
|
||||||
dot=dotall/tlen;
|
dot=dotall/tlen;
|
||||||
|
if (veng<vIni) {
|
||||||
if (dot<0) prefactor = -dot - kspringFinal*(veng-vIni);
|
if (dot<0) prefactor = -dot - kspringFinal*(veng-vIni);
|
||||||
else prefactor = -dot + kspringFinal*(veng-vIni);
|
else prefactor = -dot + kspringFinal*(veng-vIni);
|
||||||
|
}
|
||||||
for (int i = 0; i < nlocal; i++)
|
for (int i = 0; i < nlocal; i++)
|
||||||
if (mask[i] & groupbit) {
|
if (mask[i] & groupbit) {
|
||||||
f[i][0] += prefactor *tangent[i][0];
|
f[i][0] += prefactor *tangent[i][0];
|
||||||
|
|||||||
@ -34,6 +34,10 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#ifdef LAMMPS_BIGBIG
|
||||||
|
#error "The USER-INTEL package is not compatible with -DLAMMPS_BIGBIG"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _LMP_INTEL_OFFLOAD
|
#ifdef _LMP_INTEL_OFFLOAD
|
||||||
#ifndef INTEL_OFFLOAD_NOAFFINITY
|
#ifndef INTEL_OFFLOAD_NOAFFINITY
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|||||||
@ -127,7 +127,7 @@ struct KernelArgsAIREBOT {
|
|||||||
struct NeighListAIREBO neigh_rebo;
|
struct NeighListAIREBO neigh_rebo;
|
||||||
PairAIREBOIntelParam<flt_t,acc_t> params;
|
PairAIREBOIntelParam<flt_t,acc_t> params;
|
||||||
struct AtomAIREBOT<flt_t> * x; /* num_all */
|
struct AtomAIREBOT<flt_t> * x; /* num_all */
|
||||||
int * tag; /* num_all */
|
tagint * tag; /* num_all */
|
||||||
flt_t * nC, * nH; /* num_all */
|
flt_t * nC, * nH; /* num_all */
|
||||||
int * map; /* num_types+1 */
|
int * map; /* num_types+1 */
|
||||||
struct ResultForceT<acc_t> * result_f; /* num_all */
|
struct ResultForceT<acc_t> * result_f; /* num_all */
|
||||||
@ -399,7 +399,7 @@ void PairAIREBOIntel::eval(
|
|||||||
const int * _noalias const numneigh = list->numneigh;
|
const int * _noalias const numneigh = list->numneigh;
|
||||||
const int * _noalias const cnumneigh = buffers->cnumneigh(list);
|
const int * _noalias const cnumneigh = buffers->cnumneigh(list);
|
||||||
const int * _noalias const firstneigh = buffers->firstneigh(list);
|
const int * _noalias const firstneigh = buffers->firstneigh(list);
|
||||||
int * const tag = atom->tag;
|
tagint * const tag = atom->tag;
|
||||||
|
|
||||||
const int ntypes = atom->ntypes + 1;
|
const int ntypes = atom->ntypes + 1;
|
||||||
const int eatom = this->eflag_atom;
|
const int eatom = this->eflag_atom;
|
||||||
@ -1912,10 +1912,10 @@ template<typename flt_t, typename acc_t>
|
|||||||
void ref_torsion(KernelArgsAIREBOT<flt_t,acc_t> * ka) {
|
void ref_torsion(KernelArgsAIREBOT<flt_t,acc_t> * ka) {
|
||||||
AtomAIREBOT<flt_t> * x = ka->x;
|
AtomAIREBOT<flt_t> * x = ka->x;
|
||||||
int * map = ka->map;
|
int * map = ka->map;
|
||||||
int * tag = ka->tag;
|
tagint * tag = ka->tag;
|
||||||
for (int ii = ka->frebo_from_atom; ii < ka->frebo_to_atom; ii++) {
|
for (int ii = ka->frebo_from_atom; ii < ka->frebo_to_atom; ii++) {
|
||||||
int i = ii;
|
int i = ii;
|
||||||
int itag = tag[i];
|
tagint itag = tag[i];
|
||||||
int itype = map[x[i].w];
|
int itype = map[x[i].w];
|
||||||
if (itype != 0) continue;
|
if (itype != 0) continue;
|
||||||
flt_t xtmp = x[i].x;
|
flt_t xtmp = x[i].x;
|
||||||
@ -1925,7 +1925,7 @@ void ref_torsion(KernelArgsAIREBOT<flt_t,acc_t> * ka) {
|
|||||||
int jnum = ka->neigh_rebo.num[i];
|
int jnum = ka->neigh_rebo.num[i];
|
||||||
for (int jj = 0; jj < jnum; jj++) {
|
for (int jj = 0; jj < jnum; jj++) {
|
||||||
int j = REBO_neighs_i[jj];
|
int j = REBO_neighs_i[jj];
|
||||||
int jtag = tag[j];
|
tagint jtag = tag[j];
|
||||||
|
|
||||||
if (itag > jtag) {
|
if (itag > jtag) {
|
||||||
if (((itag+jtag) & 1) == 0) continue;
|
if (((itag+jtag) & 1) == 0) continue;
|
||||||
@ -2039,9 +2039,9 @@ void ref_frebo_single_interaction(KernelArgsAIREBOT<flt_t,acc_t> * ka, int i,
|
|||||||
template<typename flt_t, typename acc_t>
|
template<typename flt_t, typename acc_t>
|
||||||
inline void ref_frebo_single_atom(KernelArgsAIREBOT<flt_t,acc_t> * ka, int i) {
|
inline void ref_frebo_single_atom(KernelArgsAIREBOT<flt_t,acc_t> * ka, int i) {
|
||||||
AtomAIREBOT<flt_t> * x = ka->x;
|
AtomAIREBOT<flt_t> * x = ka->x;
|
||||||
int * tag = ka->tag;
|
tagint * tag = ka->tag;
|
||||||
int jj;
|
int jj;
|
||||||
int itag = tag[i];
|
tagint itag = tag[i];
|
||||||
flt_t x_i = x[i].x;
|
flt_t x_i = x[i].x;
|
||||||
flt_t y_i = x[i].y;
|
flt_t y_i = x[i].y;
|
||||||
flt_t z_i = x[i].z;
|
flt_t z_i = x[i].z;
|
||||||
@ -2049,7 +2049,7 @@ inline void ref_frebo_single_atom(KernelArgsAIREBOT<flt_t,acc_t> * ka, int i) {
|
|||||||
int jnum = ka->neigh_rebo.num[i];
|
int jnum = ka->neigh_rebo.num[i];
|
||||||
for (jj = 0; jj < jnum; jj++) {
|
for (jj = 0; jj < jnum; jj++) {
|
||||||
int j = neighs[jj];
|
int j = neighs[jj];
|
||||||
int jtag = tag[j];
|
tagint jtag = tag[j];
|
||||||
if (itag > jtag) {
|
if (itag > jtag) {
|
||||||
if (((itag + jtag) & 1) == 0)
|
if (((itag + jtag) & 1) == 0)
|
||||||
continue;
|
continue;
|
||||||
@ -2165,9 +2165,7 @@ template<typename flt_t, typename acc_t>
|
|||||||
void ref_lennard_jones_single_atom(KernelArgsAIREBOT<flt_t,acc_t> * ka, int i,
|
void ref_lennard_jones_single_atom(KernelArgsAIREBOT<flt_t,acc_t> * ka, int i,
|
||||||
int morseflag) {
|
int morseflag) {
|
||||||
AtomAIREBOT<flt_t> * x = ka->x;
|
AtomAIREBOT<flt_t> * x = ka->x;
|
||||||
int * tag = ka->tag;
|
|
||||||
int jj;
|
int jj;
|
||||||
int itag = tag[i];
|
|
||||||
int * neighs = ka->neigh_lmp.entries + ka->neigh_lmp.offset[i];
|
int * neighs = ka->neigh_lmp.entries + ka->neigh_lmp.offset[i];
|
||||||
int jnum = ka->neigh_lmp.num_half[i];
|
int jnum = ka->neigh_lmp.num_half[i];
|
||||||
for (jj = 0; jj < jnum; jj++) {
|
for (jj = 0; jj < jnum; jj++) {
|
||||||
@ -3640,7 +3638,6 @@ static void aut_frebo_batch_of_kind(KernelArgsAIREBOT<flt_t,acc_t> * ka,
|
|||||||
int * i_buf, int * j_buf) {
|
int * i_buf, int * j_buf) {
|
||||||
{ // jump-scope for exceed_limits
|
{ // jump-scope for exceed_limits
|
||||||
AtomAIREBOT<flt_t> * x = ka->x;
|
AtomAIREBOT<flt_t> * x = ka->x;
|
||||||
int * tag = ka->tag;
|
|
||||||
int * map = ka->map;
|
int * map = ka->map;
|
||||||
ResultForceT<acc_t> * result_f = ka->result_f;
|
ResultForceT<acc_t> * result_f = ka->result_f;
|
||||||
flt_t rcminij = ka->params.rcmin[itype][jtype];
|
flt_t rcminij = ka->params.rcmin[itype][jtype];
|
||||||
@ -3847,13 +3844,13 @@ exceed_limits:
|
|||||||
*/
|
*/
|
||||||
static void aut_frebo(KernelArgsAIREBOT<flt_t,acc_t> * ka, int torflag) {
|
static void aut_frebo(KernelArgsAIREBOT<flt_t,acc_t> * ka, int torflag) {
|
||||||
AtomAIREBOT<flt_t> * _noalias x = ka->x;
|
AtomAIREBOT<flt_t> * _noalias x = ka->x;
|
||||||
int * _noalias tag = ka->tag;
|
tagint * _noalias tag = ka->tag;
|
||||||
int * _noalias map = ka->map;
|
int * _noalias map = ka->map;
|
||||||
int i_buf[2][2][fvec::VL];
|
int i_buf[2][2][fvec::VL];
|
||||||
int j_buf[2][2][fvec::VL];
|
int j_buf[2][2][fvec::VL];
|
||||||
int n_buf[2][2] = {0};
|
int n_buf[2][2] = {0};
|
||||||
for (int i = ka->frebo_from_atom; i < ka->frebo_to_atom; i++) {
|
for (int i = ka->frebo_from_atom; i < ka->frebo_to_atom; i++) {
|
||||||
int itag = tag[i];
|
tagint itag = tag[i];
|
||||||
int itype = map[x[i].w];
|
int itype = map[x[i].w];
|
||||||
flt_t x_i = x[i].x;
|
flt_t x_i = x[i].x;
|
||||||
flt_t y_i = x[i].y;
|
flt_t y_i = x[i].y;
|
||||||
@ -3862,7 +3859,7 @@ static void aut_frebo(KernelArgsAIREBOT<flt_t,acc_t> * ka, int torflag) {
|
|||||||
int jnum = ka->neigh_rebo.num[i];
|
int jnum = ka->neigh_rebo.num[i];
|
||||||
for (int jj = 0; jj < jnum; jj++) {
|
for (int jj = 0; jj < jnum; jj++) {
|
||||||
int j = neighs[jj];
|
int j = neighs[jj];
|
||||||
int jtag = tag[j];
|
tagint jtag = tag[j];
|
||||||
if (itag > jtag) {
|
if (itag > jtag) {
|
||||||
if (((itag + jtag) & 1) == 0)
|
if (((itag + jtag) & 1) == 0)
|
||||||
continue;
|
continue;
|
||||||
@ -4490,7 +4487,6 @@ exceed_limits:
|
|||||||
template<int MORSEFLAG>
|
template<int MORSEFLAG>
|
||||||
static void aut_lennard_jones(KernelArgsAIREBOT<flt_t,acc_t> * ka) {
|
static void aut_lennard_jones(KernelArgsAIREBOT<flt_t,acc_t> * ka) {
|
||||||
AtomAIREBOT<flt_t> * x = ka->x;
|
AtomAIREBOT<flt_t> * x = ka->x;
|
||||||
int * tag = ka->tag;
|
|
||||||
int * map = ka->map;
|
int * map = ka->map;
|
||||||
ResultForceT<acc_t> * result_f = ka->result_f;
|
ResultForceT<acc_t> * result_f = ka->result_f;
|
||||||
ivec c_i1 = ivec::set1(1);
|
ivec c_i1 = ivec::set1(1);
|
||||||
@ -4521,7 +4517,6 @@ static void aut_lennard_jones(KernelArgsAIREBOT<flt_t,acc_t> * ka) {
|
|||||||
int num_bo[2][2] = {0};
|
int num_bo[2][2] = {0};
|
||||||
|
|
||||||
for (int i = ka->frebo_from_atom; i < ka->frebo_to_atom; i++) {
|
for (int i = ka->frebo_from_atom; i < ka->frebo_to_atom; i++) {
|
||||||
ivec itag_bc = ivec::set1(tag[i]);
|
|
||||||
int itype = map[x[i].w];
|
int itype = map[x[i].w];
|
||||||
fvec x_i = fvec::set1(x[i].x);
|
fvec x_i = fvec::set1(x[i].x);
|
||||||
fvec y_i = fvec::set1(x[i].y);
|
fvec y_i = fvec::set1(x[i].y);
|
||||||
|
|||||||
@ -540,8 +540,8 @@ void FixNeighHistoryOMP::post_neighbor()
|
|||||||
int *allflags;
|
int *allflags;
|
||||||
double *allvalues;
|
double *allvalues;
|
||||||
|
|
||||||
MyPage <tagint> &ipg = ipage_atom[tid];
|
MyPage <int> &ipg = ipage_neigh[tid];
|
||||||
MyPage <double> &dpg = dpage_atom[tid];
|
MyPage <double> &dpg = dpage_neigh[tid];
|
||||||
ipg.reset();
|
ipg.reset();
|
||||||
dpg.reset();
|
dpg.reset();
|
||||||
|
|
||||||
|
|||||||
@ -1099,7 +1099,7 @@ void AtomVecSMD::data_atom(double *coord, imageint imagetmp, char **values) {
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int AtomVecSMD::data_atom_hybrid(int nlocal, char **values) {
|
int AtomVecSMD::data_atom_hybrid(int nlocal, char **values) {
|
||||||
error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style tlsph");
|
error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style smd");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1121,7 +1121,7 @@ void AtomVecSMD::data_vel(int m, char **values) {
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int AtomVecSMD::data_vel_hybrid(int m, char **values) {
|
int AtomVecSMD::data_vel_hybrid(int m, char **values) {
|
||||||
error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style tlsph");
|
error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style smd");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1144,9 +1144,13 @@ void AtomVecSMD::pack_data(double **buf) {
|
|||||||
buf[i][8] = x[i][1];
|
buf[i][8] = x[i][1];
|
||||||
buf[i][9] = x[i][2];
|
buf[i][9] = x[i][2];
|
||||||
|
|
||||||
buf[i][10] = ubuf((image[i] & IMGMASK) - IMGMAX).d;
|
buf[i][10] = x0[i][0];
|
||||||
buf[i][11] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d;
|
buf[i][11] = x0[i][1];
|
||||||
buf[i][12] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d;
|
buf[i][12] = x0[i][2];
|
||||||
|
|
||||||
|
buf[i][13] = ubuf((image[i] & IMGMASK) - IMGMAX).d;
|
||||||
|
buf[i][14] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d;
|
||||||
|
buf[i][15] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1155,7 +1159,7 @@ void AtomVecSMD::pack_data(double **buf) {
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int AtomVecSMD::pack_data_hybrid(int i, double *buf) {
|
int AtomVecSMD::pack_data_hybrid(int i, double *buf) {
|
||||||
error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style tlsph");
|
error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style smd");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1167,9 +1171,9 @@ void AtomVecSMD::write_data(FILE *fp, int n, double **buf) {
|
|||||||
for (int i = 0; i < n; i++)
|
for (int i = 0; i < n; i++)
|
||||||
fprintf(fp,
|
fprintf(fp,
|
||||||
TAGINT_FORMAT
|
TAGINT_FORMAT
|
||||||
" %d %d %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n", (tagint) ubuf(buf[i][0]).i,
|
" %d %d %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e\n", (tagint) ubuf(buf[i][0]).i,
|
||||||
(int) ubuf(buf[i][1]).i, (int) ubuf(buf[i][2]).i, buf[i][3], buf[i][4], buf[i][5], buf[i][6], buf[i][7], buf[i][8],
|
(int) ubuf(buf[i][1]).i, (int) ubuf(buf[i][2]).i, buf[i][3], buf[i][4], buf[i][5], buf[i][6], buf[i][7], buf[i][8],
|
||||||
buf[i][9], (int) ubuf(buf[i][7]).i, (int) ubuf(buf[i][8]).i, (int) ubuf(buf[i][9]).i);
|
buf[i][9], buf[i][10], buf[i][11], buf[i][12]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
@ -1177,7 +1181,7 @@ void AtomVecSMD::write_data(FILE *fp, int n, double **buf) {
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int AtomVecSMD::write_data_hybrid(FILE *fp, double *buf) {
|
int AtomVecSMD::write_data_hybrid(FILE *fp, double *buf) {
|
||||||
error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style tlsph");
|
error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style smd");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1200,7 +1204,7 @@ void AtomVecSMD::pack_vel(double **buf) {
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int AtomVecSMD::pack_vel_hybrid(int i, double *buf) {
|
int AtomVecSMD::pack_vel_hybrid(int i, double *buf) {
|
||||||
error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style tlsph");
|
error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style smd");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1211,8 +1215,7 @@ int AtomVecSMD::pack_vel_hybrid(int i, double *buf) {
|
|||||||
void AtomVecSMD::write_vel(FILE *fp, int n, double **buf) {
|
void AtomVecSMD::write_vel(FILE *fp, int n, double **buf) {
|
||||||
for (int i = 0; i < n; i++)
|
for (int i = 0; i < n; i++)
|
||||||
fprintf(fp, TAGINT_FORMAT
|
fprintf(fp, TAGINT_FORMAT
|
||||||
" %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e\n", (tagint) ubuf(buf[i][0]).i, buf[i][1], buf[i][2], buf[i][3],
|
" %-1.16e %-1.16e %-1.16e\n", (tagint) ubuf(buf[i][0]).i, buf[i][1], buf[i][2], buf[i][3]);
|
||||||
buf[i][4], buf[i][5], buf[i][6]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
@ -1220,7 +1223,7 @@ void AtomVecSMD::write_vel(FILE *fp, int n, double **buf) {
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int AtomVecSMD::write_vel_hybrid(FILE *fp, double *buf) {
|
int AtomVecSMD::write_vel_hybrid(FILE *fp, double *buf) {
|
||||||
error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style tlsph");
|
error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style smd");
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -306,6 +306,10 @@ void CreateBonds::many()
|
|||||||
nadd_bonds,atom->nbonds);
|
nadd_bonds,atom->nbonds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// trigger clearing the list of available neighbor list requests
|
||||||
|
// and a full rebuild of them during the next run setup.
|
||||||
|
// otherwise the request from this command may linger around.
|
||||||
|
neighbor->init();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -338,6 +342,7 @@ void CreateBonds::single_bond()
|
|||||||
bond_atom[m][num_bond[m]] = batom2;
|
bond_atom[m][num_bond[m]] = batom2;
|
||||||
num_bond[m]++;
|
num_bond[m]++;
|
||||||
}
|
}
|
||||||
|
++atom->nbonds;
|
||||||
|
|
||||||
if (force->newton_bond) return;
|
if (force->newton_bond) return;
|
||||||
|
|
||||||
@ -385,6 +390,7 @@ void CreateBonds::single_angle()
|
|||||||
angle_atom3[m][num_angle[m]] = aatom3;
|
angle_atom3[m][num_angle[m]] = aatom3;
|
||||||
num_angle[m]++;
|
num_angle[m]++;
|
||||||
}
|
}
|
||||||
|
++atom->nangles;
|
||||||
|
|
||||||
if (force->newton_bond) return;
|
if (force->newton_bond) return;
|
||||||
|
|
||||||
@ -448,6 +454,7 @@ void CreateBonds::single_dihedral()
|
|||||||
dihedral_atom4[m][num_dihedral[m]] = datom4;
|
dihedral_atom4[m][num_dihedral[m]] = datom4;
|
||||||
num_dihedral[m]++;
|
num_dihedral[m]++;
|
||||||
}
|
}
|
||||||
|
++atom->ndihedrals;
|
||||||
|
|
||||||
if (force->newton_bond) return;
|
if (force->newton_bond) return;
|
||||||
|
|
||||||
|
|||||||
@ -407,6 +407,10 @@ void DeleteAtoms::delete_overlap(int narg, char **arg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// trigger clearing the list of available neighbor list requests
|
||||||
|
// and a full rebuild of them during the next run setup.
|
||||||
|
// otherwise the request from this command may linger around.
|
||||||
|
neighbor->init();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user