Unverified Commit 70e80989 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1873 from iafoss/feature-cnt

Tubular potential force field package for carbon nanotubes
parents 419ebd74 57eab1f7
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -420,13 +420,19 @@ endforeach()
##############################################
# add lib sources of (simple) enabled packages
############################################
foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD)
foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD USER-MESONT)
  if(PKG_${SIMPLE_LIB})
    string(REGEX REPLACE "^USER-" "" PKG_LIB "${SIMPLE_LIB}")
    string(TOLOWER "${PKG_LIB}" PKG_LIB)
    if(PKG_LIB STREQUAL mesont)
      enable_language(Fortran)
      file(GLOB_RECURSE ${PKG_LIB}_SOURCES
        ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.f90)
    else()
      file(GLOB_RECURSE ${PKG_LIB}_SOURCES
        ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.c
        ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.cpp)
    endif()
    add_library(${PKG_LIB} STATIC ${${PKG_LIB}_SOURCES})
    set_target_properties(${PKG_LIB} PROPERTIES OUTPUT_NAME lammps_${PKG_LIB}${LAMMPS_MACHINE})
    target_link_libraries(lammps PRIVATE ${PKG_LIB})
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ 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-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
        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-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ
        USER-SPH USER-TALLY USER-UEF USER-VTK USER-YAFF)
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ 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-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
        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-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ
        USER-SPH USER-TALLY USER-UEF USER-VTK USER-YAFF)
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@

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-NETCDF USER-PLUMED USER-QMMM USER-QUIP
        USER-MOLFILE USER-MESONT USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP
        USER-SCAFACOS USER-SMD USER-VTK)

foreach(PKG ${PACKAGES_WITH_LIB})
+40 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ This is the list of packages that may require additional steps.
   * :ref:`USER-COLVARS <user-colvars>`
   * :ref:`USER-H5MD <user-h5md>`
   * :ref:`USER-INTEL <user-intel>`
   * :ref:`USER-MESONT <user-mesont>`
   * :ref:`USER-MOLFILE <user-molfile>`
   * :ref:`USER-NETCDF <user-netcdf>`
   * :ref:`USER-PLUMED <user-plumed>`
@@ -1275,6 +1276,45 @@ For KNLs:

----------

.. _user-mesont:

USER-MESONT package
-------------------------

This package includes a library written in Fortran 90 in the
``lib/mesont`` folder, so a working Fortran 90 compiler is required to
compile it.  Also, the files with the force field data for running the
bundled examples are not included in the source distribution. Instead
they will be downloaded the first time this package is installed.

**CMake build**\ :

No additional settings are needed besides ``-D PKG_USER-MESONT=yes``

**Traditional make**\ :

Before building LAMMPS, you must build the *mesont* library in ``lib/mesont``\ .
You can also do it in one step from the ``lammps/src`` dir, using a command like
these, which simply invoke the ``lib/mesont/Install.py`` script with the specified
args:

.. code-block:: bash

  $ make lib-mesont                    # print help message
  $ make lib-mesont args="-m gfortran" # build with GNU g++ compiler (settings as with "make serial")
  $ make lib-mesont args="-m ifort"    # build with Intel icc compiler

The build should produce two files: ``lib/mesont/libmesont.a`` and
``lib/mesont/Makefile.lammps``\ .  The latter is copied from an existing
``Makefile.lammps.\*`` and has settings needed to build LAMMPS with the
*mesont* library (though typically the settings contain only the Fortran
runtime library).  If necessary, you can edit/create a new
``lib/mesont/Makefile.machine`` file for your system, which should
define an ``EXTRAMAKE`` variable to specify a corresponding
``Makefile.lammps.machine`` file.

----------

.. _user-molfile:

USER-MOLFILE package
Loading