mirror of https://github.com/lammps/lammps.git
Merge pull request #1923 from akohlmey/collected_small_fixes
Collected small fixes for the next patch
This commit is contained in:
commit
33996d9bac
|
@ -7,11 +7,11 @@ set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
|||
SRD VORONOI
|
||||
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
|
||||
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP
|
||||
USER-H5MD USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-H5MD USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
|
||||
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
|
||||
USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
|
||||
USER-TALLY USER-UEF USER-VTK USER-YAFF)
|
||||
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ
|
||||
USER-SPH USER-TALLY USER-UEF USER-VTK USER-YAFF)
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||
|
|
|
@ -9,11 +9,11 @@ set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
|||
SRD VORONOI
|
||||
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
|
||||
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP
|
||||
USER-H5MD USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-H5MD USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
|
||||
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
|
||||
USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
|
||||
USER-TALLY USER-UEF USER-VTK USER-YAFF)
|
||||
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ
|
||||
USER-SPH USER-TALLY USER-UEF USER-VTK USER-YAFF)
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
# external libraries. Compared to all_on.cmake some more unusual packages
|
||||
# are removed. The resulting binary should be able to run most inputs.
|
||||
|
||||
set(ALL_PACKAGES ASPHERE CLASS2 COLLOID CORESHELL DIPOLE
|
||||
GRANULAR KSPACE MANYBODY MC MISC MOLECULE OPT PERI
|
||||
PYTHON QEQ REPLICA RIGID SHOCK SNAP SRD VORONOI
|
||||
USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD
|
||||
USER-DRUDE USER-FEP USER-MEAMC USER-MESO
|
||||
USER-MISC USER-MOFFF USER-OMP USER-PHONON USER-REAXC
|
||||
USER-SPH USER-SMD USER-UEF USER-YAFF)
|
||||
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL
|
||||
DIPOLE GRANULAR KSPACE MANYBODY MC MISC MOLECULE OPT PERI
|
||||
POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI
|
||||
USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION
|
||||
USER-DPD USER-DRUDE USER-FEP USER-MEAMC USER-MESODPD
|
||||
USER-MISC USER-MOFFF USER-OMP USER-PHONON USER-REACTION
|
||||
USER-REAXC USER-SPH USER-SMD USER-UEF USER-YAFF)
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
|
|
|
@ -129,13 +129,17 @@ the work of :ref:`(Afshar) <Afshar>` and :ref:`(Phillips) <Phillips>`.
|
|||
|
||||
.. note::
|
||||
|
||||
The virial calculation for pressure when using this pair style
|
||||
The virial calculation for pressure when using these pair styles
|
||||
includes all the components of force listed above, including the
|
||||
random force.
|
||||
random force. Since the random force depends on random numbers,
|
||||
everything that changes the order of atoms in the neighbor list
|
||||
(e.g. different number of MPI ranks or a different neighbor list
|
||||
skin distance) will also change the sequence in which the random
|
||||
numbers are applied and thus the individual forces and therefore
|
||||
also the virial/pressure.
|
||||
|
||||
----------
|
||||
|
||||
|
||||
Styles with a *gpu*\ , *intel*\ , *kk*\ , *omp*\ , or *opt* suffix are
|
||||
functionally the same as the corresponding style without the suffix.
|
||||
They have been optimized to run faster, depending on your available
|
||||
|
|
|
@ -15,9 +15,9 @@ Syntax
|
|||
* distance = *min* or *mid*
|
||||
* zero or more keyword/value pairs may be appended
|
||||
* keyword = *exclude*
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
|
||||
*bptype* value = atom type for bond particles
|
||||
*exclude* value = *yes* or *no*
|
||||
|
||||
|
@ -34,7 +34,7 @@ Examples
|
|||
pair_coeff 1 2 none
|
||||
pair_coeff 2 2 srp 100.0 0.8
|
||||
|
||||
pair_style hybrid dpd 1.0 1.0 12345 srp 0.8 \* min exclude yes
|
||||
pair_style hybrid dpd 1.0 1.0 12345 srp 0.8 * min exclude yes
|
||||
pair_coeff 1 1 dpd 60.0 50 1.0
|
||||
pair_coeff 1 2 none
|
||||
pair_coeff 2 2 srp 40.0
|
||||
|
@ -60,7 +60,7 @@ bond-pairwise potential, such that the force on bond *i* due to bond
|
|||
|
||||
.. math::
|
||||
|
||||
F^{SRP}_{ij} & = C(1-r/r_c)\hat{r}_{ij} \qquad r < r_c
|
||||
F^{\mathrm{SRP}}_{ij} = C(1-r/r_c)\hat{r}_{ij} \qquad r < r_c
|
||||
|
||||
|
||||
where *r* and :math:`\hat{r}_{ij}` are the distance and unit vector
|
||||
|
@ -74,8 +74,8 @@ lever rule,
|
|||
|
||||
.. math::
|
||||
|
||||
F_{i1}^{SRP} & = F^{SRP}_{ij}(L) \\
|
||||
F_{i2}^{SRP} & = F^{SRP}_{ij}(1-L)
|
||||
F_{i1}^{\mathrm{SRP}} & = F^{\mathrm{SRP}}_{ij}(L) \\
|
||||
F_{i2}^{\mathrm{SRP}} & = F^{\mathrm{SRP}}_{ij}(1-L)
|
||||
|
||||
|
||||
where *L* is the normalized distance from the atom to the point of
|
||||
|
|
|
@ -486,6 +486,7 @@ class lammps(object):
|
|||
return None
|
||||
elif style == 2:
|
||||
self.lib.lammps_extract_compute.restype = POINTER(c_int)
|
||||
ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type)
|
||||
return ptr[0]
|
||||
if type == 1:
|
||||
self.lib.lammps_extract_compute.restype = POINTER(c_double)
|
||||
|
@ -509,6 +510,10 @@ class lammps(object):
|
|||
result = ptr[0]
|
||||
self.lib.lammps_free(ptr)
|
||||
return result
|
||||
elif (style == 2) and (type == 0):
|
||||
self.lib.lammps_extract_fix.restype = POINTER(c_int)
|
||||
ptr = self.lib.lammps_extract_fix(self.lmp,id,style,type,i,j)
|
||||
return ptr[0]
|
||||
elif (style == 1) or (style == 2):
|
||||
if type == 1:
|
||||
self.lib.lammps_extract_fix.restype = POINTER(c_double)
|
||||
|
|
|
@ -38,7 +38,7 @@ struct TagPairSNAPComputeNeigh{};
|
|||
struct TagPairSNAPPreUi{};
|
||||
struct TagPairSNAPComputeUi{};
|
||||
struct TagPairSNAPComputeUiTot{}; // accumulate ulist into ulisttot separately
|
||||
struct TagPairSNAPComputeUiCPU{};
|
||||
struct TagPairSNAPComputeUiCPU{};
|
||||
struct TagPairSNAPComputeZi{};
|
||||
struct TagPairSNAPComputeBi{};
|
||||
struct TagPairSNAPZeroYi{};
|
||||
|
|
|
@ -32,7 +32,7 @@ template <typename real>
|
|||
struct alignas(2*sizeof(real)) SNAComplex
|
||||
{
|
||||
real re,im;
|
||||
|
||||
|
||||
KOKKOS_FORCEINLINE_FUNCTION SNAComplex() = default;
|
||||
|
||||
KOKKOS_FORCEINLINE_FUNCTION SNAComplex(real re)
|
||||
|
@ -172,7 +172,7 @@ inline
|
|||
static KOKKOS_FORCEINLINE_FUNCTION
|
||||
void caxpy(const SNAcomplex& a, const SNAcomplex& x, SNAcomplex& y);
|
||||
|
||||
// efficient complex FMA, conjugate of scalar
|
||||
// efficient complex FMA, conjugate of scalar
|
||||
static KOKKOS_FORCEINLINE_FUNCTION
|
||||
void caconjxpy(const SNAcomplex& a, const SNAcomplex& x, SNAcomplex& y);
|
||||
|
||||
|
@ -201,7 +201,7 @@ inline
|
|||
void grow_rij(int, int);
|
||||
|
||||
int twojmax, diagonalstyle;
|
||||
|
||||
|
||||
t_sna_2d_ll blist;
|
||||
t_sna_2c_ll ulisttot;
|
||||
t_sna_2c_ll zlist;
|
||||
|
|
|
@ -537,35 +537,19 @@ void *lammps_extract_compute(void *ptr, char *id, int style, int type)
|
|||
|
||||
if (style == 1) {
|
||||
if (!compute->peratom_flag) return NULL;
|
||||
if (type == 1) {
|
||||
if (compute->invoked_peratom != lmp->update->ntimestep)
|
||||
compute->compute_peratom();
|
||||
return (void *) compute->vector_atom;
|
||||
}
|
||||
if (type == 2) {
|
||||
if (compute->invoked_peratom != lmp->update->ntimestep)
|
||||
compute->compute_peratom();
|
||||
return (void *) compute->array_atom;
|
||||
}
|
||||
if (compute->invoked_peratom != lmp->update->ntimestep)
|
||||
compute->compute_peratom();
|
||||
if (type == 1) return (void *) compute->vector_atom;
|
||||
if (type == 2) return (void *) compute->array_atom;
|
||||
}
|
||||
|
||||
if (style == 2) {
|
||||
if (!compute->local_flag) return NULL;
|
||||
if (type == 0) {
|
||||
if (compute->invoked_local != lmp->update->ntimestep)
|
||||
compute->compute_local();
|
||||
return (void *) &compute->size_local_rows;
|
||||
}
|
||||
if (type == 1) {
|
||||
if (compute->invoked_local != lmp->update->ntimestep)
|
||||
compute->compute_local();
|
||||
return (void *) compute->vector_local;
|
||||
}
|
||||
if (type == 2) {
|
||||
if (compute->invoked_local != lmp->update->ntimestep)
|
||||
compute->compute_local();
|
||||
return (void *) compute->array_local;
|
||||
}
|
||||
if (compute->invoked_local != lmp->update->ntimestep)
|
||||
compute->compute_local();
|
||||
if (type == 0) return (void *) &compute->size_local_rows;
|
||||
if (type == 1) return (void *) compute->vector_local;
|
||||
if (type == 2) return (void *) compute->array_local;
|
||||
}
|
||||
}
|
||||
END_CAPTURE
|
||||
|
@ -637,6 +621,7 @@ void *lammps_extract_fix(void *ptr, char *id, int style, int type,
|
|||
|
||||
if (style == 2) {
|
||||
if (!fix->local_flag) return NULL;
|
||||
if (type == 0) return (void *) &fix->size_local_rows;
|
||||
if (type == 1) return (void *) fix->vector_local;
|
||||
if (type == 2) return (void *) fix->array_local;
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ int MinCG::iterate(int maxiter)
|
|||
if (update->ftol > 0.0) {
|
||||
if (normstyle == MAX) fdotf = fnorm_max(); // max force norm
|
||||
else if (normstyle == INF) fdotf = fnorm_inf(); // infinite force norm
|
||||
else if (normstyle == TWO) fdotf = fnorm_sqr(); // Euclidean force 2-norm
|
||||
else if (normstyle == TWO) fdotf = dotall[0]; // same as fnorm_sqr(), Euclidean force 2-norm
|
||||
else error->all(FLERR,"Illegal min_modify command");
|
||||
if (fdotf < update->ftol*update->ftol) return FTOL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue