forked from lijiext/lammps
Merge pull request #2761 from rbberger/collected-small-changes
Collected small changes and fixes for the next patch release
This commit is contained in:
commit
de025aec47
|
@ -0,0 +1,35 @@
|
|||
# Security Policy
|
||||
|
||||
LAMMPS is designed as a user-level application to conduct computer
|
||||
simulations for research using classical mechanics. As such LAMMPS
|
||||
depends to some degrees on users providing correctly formatted input and
|
||||
LAMMPS needs to read and write files based on uncontrolled user input.
|
||||
As a parallel application for use in high-performance computing
|
||||
environments, performance critical steps are also done without checking
|
||||
data.
|
||||
|
||||
LAMMPS also is interfaced to a number of external libraries, including
|
||||
libraries with experimental research software, that are not validated
|
||||
and tested by the LAMMPS developers, so it is easy to import bad
|
||||
behavior from calling functions in one of those libraries.
|
||||
|
||||
Thus is is quite easy to crash LAMMPS through malicious input and do all
|
||||
kinds of filesystem manipulations. And because of that LAMMPS should
|
||||
**NEVER** be compiled or **run** as superuser, either from a "root" or
|
||||
"administrator" account directly or indirectly via "sudo" or "su".
|
||||
|
||||
Therefore what could be seen as a security vulnerability is usually
|
||||
either a user mistake or a bug in the code. Bugs can be reported in
|
||||
the LAMMPS project
|
||||
[issue tracker on GitHub](https://github.com/lammps/lammps/issues).
|
||||
|
||||
|
||||
# Version Updates
|
||||
|
||||
LAMMPS follows continuous release development model. We aim to keep all
|
||||
release versions (stable or patch) fully functional and employ a variety
|
||||
of automatic testing procedures to detect failures of existing
|
||||
functionality from adding new features before releases are made. Thus
|
||||
bugfixes and updates are only integrated into the current development
|
||||
branch and thus the next (patch) release and users are recommended to
|
||||
update regularly.
|
|
@ -92,6 +92,11 @@ The :doc:`thermo_modify <thermo_modify>` *press* option is supported
|
|||
by this fix to add the rescaled kinetic pressure as part of
|
||||
:doc:`thermodynamic output <thermo_style>`.
|
||||
|
||||
This fix computes a global scalar which can be accessed by various
|
||||
:doc:`output commands <Howto_output>`. The scalar is the effective
|
||||
temperature :math:`T_{eff}`. The scalar value calculated by this
|
||||
fix is "intensive".
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ using namespace FixConst;
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixBrownianAsphere::FixBrownianAsphere(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixBrownianBase(lmp, narg, arg)
|
||||
FixBrownianAsphere::FixBrownianAsphere(LAMMPS *lmp, int narg, char **arg)
|
||||
: FixBrownianBase(lmp, narg, arg), avec(nullptr)
|
||||
{
|
||||
if (!gamma_t_eigen_flag || !gamma_r_eigen_flag) {
|
||||
error->all(FLERR, "Illegal fix brownian command.");
|
||||
|
|
|
@ -46,6 +46,7 @@ FixBrownianBase::FixBrownianBase(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, n
|
|||
gamma_t_flag = gamma_r_flag = 0;
|
||||
gamma_t_eigen_flag = gamma_r_eigen_flag = 0;
|
||||
dipole_flag = 0;
|
||||
g2 = 0.0;
|
||||
|
||||
if (narg < 5) error->all(FLERR, "Illegal fix brownian command.");
|
||||
|
||||
|
@ -201,7 +202,7 @@ void FixBrownianBase::init()
|
|||
|
||||
g1 = force->ftm2v;
|
||||
if (noise_flag == 0) {
|
||||
g2 = 0;
|
||||
g2 = 0.0;
|
||||
} else if (gaussian_noise_flag == 1) {
|
||||
g2 = sqrt(2 * force->boltz * temp / dt / force->mvv2e);
|
||||
} else {
|
||||
|
|
|
@ -42,7 +42,8 @@ enum { DIPOLE, VELOCITY, QUAT };
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixPropelSelf::FixPropelSelf(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
||||
FixPropelSelf::FixPropelSelf(LAMMPS *lmp, int narg, char **arg)
|
||||
: Fix(lmp, narg, arg), avec(nullptr)
|
||||
{
|
||||
|
||||
virial_global_flag = virial_peratom_flag = 1;
|
||||
|
|
|
@ -2212,6 +2212,7 @@ double FixBondReact::rxnfunction(std::string rxnfunc, std::string varid,
|
|||
|
||||
if (rxnfunc == "rxnsum") return sumvvec;
|
||||
if (rxnfunc == "rxnave") return sumvvec/nsum;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -39,6 +39,7 @@ using namespace FixConst;
|
|||
enum{NOBIAS,BIAS};
|
||||
enum{CONSTANT,EQUAL};
|
||||
|
||||
static constexpr int PRNGSIZE = 98+2+3;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixTempCSVR::FixTempCSVR(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
@ -330,7 +331,6 @@ double FixTempCSVR::compute_scalar()
|
|||
|
||||
void FixTempCSVR::write_restart(FILE *fp)
|
||||
{
|
||||
const int PRNGSIZE = 98+2+3;
|
||||
int nsize = PRNGSIZE*comm->nprocs+2; // pRNG state per proc + nprocs + energy
|
||||
double *list = nullptr;
|
||||
if (comm->me == 0) {
|
||||
|
@ -363,7 +363,7 @@ void FixTempCSVR::restart(char *buf)
|
|||
if (nprocs != comm->nprocs) {
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR,"Different number of procs. Cannot restore RNG state.");
|
||||
} else random->set_state(list+2+comm->me*103);
|
||||
} else random->set_state(list+2+comm->me*PRNGSIZE);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -379,7 +379,6 @@ namespace LAMMPS_NS {
|
|||
:cpp:class:`Tokenizer`, :cpp:class:`ValueTokenizer`
|
||||
|
||||
\endverbatim
|
||||
*
|
||||
* \param text string that should be split
|
||||
* \return STL vector with the words */
|
||||
|
||||
|
|
Loading…
Reference in New Issue