diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index aefa9cd597..850d32714e 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -110,7 +110,7 @@ set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-MESODPD USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-LB USER-MANIFOLD USER-MEAMC USER-MESONT USER-MGPT USER-MISC USER-MOFFF - USER-MOLFILE USER-NETCDF USER-PHONON USER-PLUMED USER-PTM USER-QTB + USER-MOLFILE USER-NETCDF USER-NNP USER-PHONON USER-PLUMED USER-PTM USER-QTB USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM USER-YAFF) diff --git a/cmake/presets/all_off.cmake b/cmake/presets/all_off.cmake index bd94b9dbe5..d567b141bf 100644 --- a/cmake/presets/all_off.cmake +++ b/cmake/presets/all_off.cmake @@ -8,8 +8,8 @@ set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU 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-MESODPD - USER-MESONT 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-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-NNP + USER-OMP USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK USER-YAFF) diff --git a/cmake/presets/all_on.cmake b/cmake/presets/all_on.cmake index 438c119c4c..2b879e9ecf 100644 --- a/cmake/presets/all_on.cmake +++ b/cmake/presets/all_on.cmake @@ -10,8 +10,8 @@ set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU 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-MESODPD - USER-MESONT 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-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-NNP + USER-OMP USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK USER-YAFF) diff --git a/cmake/presets/nolib.cmake b/cmake/presets/nolib.cmake index 0245b58cc7..c0236347cb 100644 --- a/cmake/presets/nolib.cmake +++ b/cmake/presets/nolib.cmake @@ -3,8 +3,8 @@ set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MPIIO MSCG PYTHON VORONOI USER-ADIOS USER-ATC USER-AWPMD USER-H5MD USER-LB - USER-MOLFILE USER-MESONT USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP - USER-SCAFACOS USER-SMD USER-VTK) + USER-MOLFILE USER-MESONT USER-NETCDF USER-NNP USER-PLUMED USER-QMMM + USER-QUIP USER-SCAFACOS USER-SMD USER-VTK) foreach(PKG ${PACKAGES_WITH_LIB}) set(PKG_${PKG} OFF CACHE BOOL "" FORCE) diff --git a/doc/src/Build_package.rst b/doc/src/Build_package.rst index f9fc52f8db..36a7bce482 100644 --- a/doc/src/Build_package.rst +++ b/doc/src/Build_package.rst @@ -30,17 +30,17 @@ steps, as explained on the :doc:`Build extras ` page. These links take you to the extra instructions for those select packages: -+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ -| :ref:`COMPRESS ` | :ref:`GPU ` | :ref:`KIM ` | :ref:`KOKKOS ` | :ref:`LATTE ` | :ref:`MESSAGE ` | -+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ -| :ref:`MSCG ` | :ref:`OPT ` | :ref:`POEMS ` | :ref:`PYTHON ` | :ref:`VORONOI ` | :ref:`USER-ADIOS ` | -+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ -| :ref:`USER-ATC ` | :ref:`USER-AWPMD ` | :ref:`USER-COLVARS ` | :ref:`USER-H5MD ` | :ref:`USER-INTEL ` | :ref:`USER-MOLFILE ` | -+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ -| :ref:`USER-NETCDF ` | :ref:`USER-PLUMED ` | :ref:`USER-OMP ` | :ref:`USER-QMMM ` | :ref:`USER-QUIP ` | :ref:`USER-SCAFACOS ` | -+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ -| :ref:`USER-SMD ` | :ref:`USER-VTK ` | | | | | -+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ ++--------------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ +| :ref:`COMPRESS ` | :ref:`GPU ` | :ref:`KIM ` | :ref:`KOKKOS ` | :ref:`LATTE ` | :ref:`MESSAGE ` | ++--------------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ +| :ref:`MSCG ` | :ref:`OPT ` | :ref:`POEMS ` | :ref:`PYTHON ` | :ref:`VORONOI ` | :ref:`USER-ADIOS ` | ++--------------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ +| :ref:`USER-ATC ` | :ref:`USER-AWPMD ` | :ref:`USER-COLVARS ` | :ref:`USER-H5MD ` | :ref:`USER-INTEL ` | :ref:`USER-MOLFILE ` | ++--------------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ +| :ref:`USER-NETCDF ` | :ref:`USER-NNP ` | :ref:`USER-PLUMED ` | :ref:`USER-OMP ` | :ref:`USER-QMMM ` | :ref:`USER-QUIP ` | ++--------------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ +| :ref:`USER-SCAFACOS ` | :ref:`USER-SMD ` | :ref:`USER-VTK ` | | | | ++--------------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ The mechanism for including packages is simple but different for CMake versus make. diff --git a/doc/src/pair_nnp.rst b/doc/src/pair_nnp.rst index 56ea8bf575..78fa635c1f 100644 --- a/doc/src/pair_nnp.rst +++ b/doc/src/pair_nnp.rst @@ -46,13 +46,21 @@ Description """"""""""" This pair style adds an interaction based on the high-dimensional neural network -potential method [1]_. These potentials must be carefully trained to reproduce -the potential energy surface in the desired phase-space region prior to their -usage in an MD simulation. This pair style uses an interface to the NNP library -[2]_ [3]_, see the documentation there for more information. +potential (HDNNP) method as presented in :ref:`(Behler and Parrinello 2007) +`. HDNNPs are machine learning potentials which require +careful training of neural networks prior to application in MD simulations. The +pair style uses an interface to the *n2p2* library :ref:`(Singraber et al 2019) +` which is available on Github `here +`__. Please see the *n2p2* +`documentation `__ for further details. +*n2p2* (and hence this pair style) is compatible with neural network potentials +trained with its own tools and with `RuNNer +`__. However, at this point only +short-range HDNNPs are supported. -The maximum cutoff radius of all symmetry functions is the only argument of the -*pair_coeff* command which should be invoked with asterisk wild-cards only: +The maximum cutoff radius of all symmetry functions (the atomic environment +descriptors of HDNNPs) is the only argument of the *pair_coeff* command which +should be invoked with asterisk wild-cards only: .. code-block:: LAMMPS @@ -211,12 +219,16 @@ present elements (see above). ---- -.. [1] Behler, J.; Parrinello, M. Generalized Neural-Network Representation of - High-Dimensional Potential-Energy Surfaces. Phys. Rev. Lett. 2007, 98 (14), - 146401. https://doi.org/10.1103/PhysRevLett.98.146401 +.. _Behler_Parrinello_2007: -.. [2] https://github.com/CompPhysVienna/n2p2 +**(Behler and Parrinello 2007)** Behler, J.; Parrinello, M. Generalized +Neural-Network Representation of High-Dimensional Potential-Energy Surfaces. +Phys. Rev. Lett. 2007, 98 (14), 146401. +https://doi.org/10.1103/PhysRevLett.98.146401 -.. [3] Singraber, A.; Morawietz, T.; Behler, J.; Dellago, C. Parallel - Multistream Training of High-Dimensional Neural Network Potentials. J. Chem. - Theory Comput. 2019, 15 (5), 3075–3092. https://doi.org/10.1021/acs.jctc.8b01092 +.. _Singraber_et_al_2019: + +**(Singraber et al 2019)** Singraber, A.; Behler, J.; Dellago, C. Library-Based +LAMMPS Implementation of High-Dimensional Neural Network Potentials. J. Chem. +Theory Comput. 2019, 15 (3), 1827–1840. +https://doi.org/10.1021/acs.jctc.8b00770. diff --git a/src/USER-NNP/pair_nnp.cpp b/src/USER-NNP/pair_nnp.cpp index 64043a78bb..c7ac600e45 100644 --- a/src/USER-NNP/pair_nnp.cpp +++ b/src/USER-NNP/pair_nnp.cpp @@ -253,46 +253,9 @@ void PairNNP::init_style() double PairNNP::init_one(int i, int j) { - // TODO: Check how this actually works for different cutoffs. return maxCutoffRadius; } -/* ---------------------------------------------------------------------- - proc 0 writes to restart file -------------------------------------------------------------------------- */ - -void PairNNP::write_restart(FILE *fp) -{ - return; -} - -/* ---------------------------------------------------------------------- - proc 0 reads from restart file, bcasts -------------------------------------------------------------------------- */ - -void PairNNP::read_restart(FILE *fp) -{ - return; -} - -/* ---------------------------------------------------------------------- - proc 0 writes to restart file -------------------------------------------------------------------------- */ - -void PairNNP::write_restart_settings(FILE *fp) -{ - return; -} - -/* ---------------------------------------------------------------------- - proc 0 reads from restart file, bcasts -------------------------------------------------------------------------- */ - -void PairNNP::read_restart_settings(FILE *fp) -{ - return; -} - /* ---------------------------------------------------------------------- allocate all arrays ------------------------------------------------------------------------- */ @@ -333,7 +296,6 @@ void PairNNP::transferNeighborList() void PairNNP::handleExtrapolationWarnings() { // Get number of extrapolation warnings for local atoms. - // TODO: Is the conversion from std::size_t to long ok? long numCurrentEW = (long)interface->getNumExtrapolationWarnings(); // Update (or set, resetew == true) total warnings counter. diff --git a/src/USER-NNP/pair_nnp.h b/src/USER-NNP/pair_nnp.h index ab86abbc0e..0b76739d77 100644 --- a/src/USER-NNP/pair_nnp.h +++ b/src/USER-NNP/pair_nnp.h @@ -42,10 +42,6 @@ class PairNNP : public Pair { virtual void coeff(int, char **); virtual void init_style(); virtual double init_one(int, int); - virtual void write_restart(FILE *); - virtual void read_restart(FILE *); - virtual void write_restart_settings(FILE *); - virtual void read_restart_settings(FILE *); protected: