diff --git a/cmake/presets/mingw-cross.cmake b/cmake/presets/mingw-cross.cmake index ab2b9f15a3..c2101d1d9a 100644 --- a/cmake/presets/mingw-cross.cmake +++ b/cmake/presets/mingw-cross.cmake @@ -5,7 +5,7 @@ set(WIN_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-HDNNP USER-INTEL USER-MANIFOLD USER-MDI USER-MEAMC USER-MESODPD USER-MESONT USER-MISC USER-MGPT USER-MOFFF USER-MOLFILE USER-OMP - USER-PACE USER-PHONON USER-PTM USER-QTB USER-REACTION USER-REAXC + USER-PHONON USER-PTM USER-QTB USER-REACTION USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-YAFF) diff --git a/doc/src/Intro_opensource.rst b/doc/src/Intro_opensource.rst index f9fe99e252..635982fd18 100644 --- a/doc/src/Intro_opensource.rst +++ b/doc/src/Intro_opensource.rst @@ -2,18 +2,20 @@ LAMMPS open-source license -------------------------- LAMMPS is a freely-available open-source code, distributed under the -terms of the `GNU Public License `_, which means you can use or -modify the code however you wish. +terms of the `GNU Public License Version 2 `_, which means you can +use or modify the code however you wish for your own purposes, but have +to adhere to certain rules when redistributing it or software derived +from it or that includes parts of it. LAMMPS comes with no warranty of any kind. As each source file states in its header, it is a copyrighted code that is distributed free-of- -charge, under the terms of the `GNU Public License `_ (GPL). This -is often referred to as open-source distribution - see -`www.gnu.org `_ or `www.opensource.org `_. The legal -text of the GPL is in the LICENSE file included in the LAMMPS +charge, under the terms of the `GNU Public License Version 2 `_ +(GPLv2). This is often referred to as open-source distribution - see +`www.gnu.org `_ or `www.opensource.org `_. The +legal text of the GPL is in the LICENSE file included in the LAMMPS distribution. -.. _gnu: http://www.gnu.org/copyleft/gpl.html +.. _gpl: https://github.com/lammps/lammps/blob/master/LICENSE .. _gnuorg: http://www.gnu.org @@ -24,14 +26,14 @@ Here is a summary of what the GPL means for LAMMPS users: (1) Anyone is free to use, modify, or extend LAMMPS in any way they choose, including for commercial purposes. -(2) If you distribute a modified version of LAMMPS, it must remain -open-source, meaning you distribute it under the terms of the GPL. -You should clearly annotate such a code as a derivative version of -LAMMPS. +(2) If you **distribute** a modified version of LAMMPS, it must remain +open-source, meaning you distribute **all** of it under the terms of +the GPL. You should clearly annotate such a code as a derivative version +of LAMMPS. -(3) If you release any code that includes LAMMPS source code, then it -must also be open-sourced, meaning you distribute it under the terms -of the GPL. +(3) If you release any code that includes or uses LAMMPS source code, +then it must also be open-sourced, meaning you distribute it under +the terms of the GPL. (4) If you give LAMMPS files to someone else, the GPL LICENSE file and source file headers (including the copyright and GPL notices) should diff --git a/doc/src/Manual.rst b/doc/src/Manual.rst index 9207f75c39..61b5af0eff 100644 --- a/doc/src/Manual.rst +++ b/doc/src/Manual.rst @@ -11,7 +11,7 @@ computers. It was developed originally at Sandia National Laboratories, a US Department of Energy facility. The majority of funding for LAMMPS has come from the US Department of Energy (DOE). LAMMPS is an open-source code, distributed freely under the terms of -the GNU Public License (GPL). +the GNU Public License Version 2 (GPLv2). The `LAMMPS website `_ has a variety of information about the code. It includes links to an on-line version of this manual, a diff --git a/src/lammps.cpp b/src/lammps.cpp index 1d9a41b4d5..a218b9e08a 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -130,6 +130,16 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) : init_pkg_lists(); +#if defined(LMP_PYTHON) && defined(_WIN32) + // if the LAMMPSHOME environment variable is set, it should point + // to the location of the LAMMPS installation tree where we bundle + // the matching Python installation for use with the PYTHON package. + // this is currently only used on Windows with the windows installer packages + const char *lmpenv = getenv("LAMMPSHOME"); + if (lmpenv) { + _putenv(utils::strdup(fmt::format("PYTHONHOME={}",lmpenv))); + } +#endif // check if -mpicolor is first arg // if so, then 2 apps were launched with one mpirun command // this means passed communicator (e.g. MPI_COMM_WORLD) is bigger than LAMMPS