remove MSCG package from LAMMPS distribution

This commit is contained in:
Axel Kohlmeyer
2023-07-16 21:04:58 -04:00
parent 2090d33d5f
commit 9b7bd71ab6
45 changed files with 15 additions and 22737 deletions

View File

@ -278,7 +278,6 @@ set(STANDARD_PACKAGES
MOLECULE
MOLFILE
MPIIO
MSCG
NETCDF
ORIENT
PERI
@ -440,7 +439,7 @@ if(BUILD_OMP)
target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX)
endif()
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS)
if(PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS)
enable_language(C)
if (NOT USE_INTERNAL_LINALG)
find_package(LAPACK)
@ -520,7 +519,7 @@ else()
endif()
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM MSCG COMPRESS ML-PACE LEPTON)
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM COMPRESS ML-PACE LEPTON)
if(PKG_${PKG_WITH_INCL})
include(Packages/${PKG_WITH_INCL})
endif()

View File

@ -1,28 +0,0 @@
find_package(GSL REQUIRED)
find_package(MSCG QUIET)
if(MSGC_FOUND)
set(DOWNLOAD_MSCG_DEFAULT OFF)
else()
set(DOWNLOAD_MSCG_DEFAULT ON)
endif()
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
if(DOWNLOAD_MSCG)
set(MSCG_URL "https://github.com/uchicago-voth/MSCG-release/archive/491270a73539e3f6951e76f7dbe84e258b3ebb45.tar.gz" CACHE STRING "URL for MSCG tarball")
set(MSCG_MD5 "7ea50748fba5c3a372e0266bd31d2f11" CACHE STRING "MD5 checksum of MSCG tarball")
mark_as_advanced(MSCG_URL)
mark_as_advanced(MSCG_MD5)
include(ExternalCMakeProject)
ExternalCMakeProject(mscg ${MSCG_URL} ${MSCG_MD5} MSCG-release src/CMake "")
# set include and link library
target_include_directories(lammps PRIVATE "${CMAKE_BINARY_DIR}/_deps/mscg-src/src")
target_link_libraries(lammps PRIVATE mscg)
else()
find_package(MSCG)
if(NOT MSCG_FOUND)
message(FATAL_ERROR "MSCG not found, help CMake to find it by setting MSCG_LIBRARY and MSCG_INCLUDE_DIR, or set DOWNLOAD_MSCG=ON to download it")
endif()
target_link_libraries(lammps PRIVATE MSCG::MSCG)
endif()
target_link_libraries(lammps PRIVATE GSL::gsl ${LAPACK_LIBRARIES})

View File

@ -64,7 +64,6 @@ set(ALL_PACKAGES
MOLECULE
MOLFILE
MPIIO
MSCG
NETCDF
OPENMP
OPT

View File

@ -66,7 +66,6 @@ set(ALL_PACKAGES
MOLECULE
MOLFILE
MPIIO
MSCG
NETCDF
OPENMP
OPT

View File

@ -9,7 +9,6 @@ endforeach()
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
set(DOWNLOAD_MDI ON CACHE BOOL "" FORCE)
set(DOWNLOAD_MSCG ON CACHE BOOL "" FORCE)
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
set(DOWNLOAD_PACE ON CACHE BOOL "" FORCE)

View File

@ -20,7 +20,6 @@ set(PACKAGES_WITH_LIB
ML-QUIP
MOLFILE
MPIIO
MSCG
NETCDF
PLUMED
PYTHON

View File

@ -52,7 +52,6 @@ This is the list of packages that may require additional steps.
* :ref:`ML-POD <ml-pod>`
* :ref:`ML-QUIP <ml-quip>`
* :ref:`MOLFILE <molfile>`
* :ref:`MSCG <mscg>`
* :ref:`NETCDF <netcdf>`
* :ref:`OPENMP <openmp>`
* :ref:`OPT <opt>`
@ -921,59 +920,6 @@ Python version 3.6 or later.
----------
.. _mscg:
MSCG package
-----------------------
To build with this package, you must download and build the MS-CG
library. Building the MS-CG library requires that the GSL
(GNU Scientific Library) headers and libraries are installed on your
machine. See the ``lib/mscg/README`` and ``MSCG/Install`` files for
more details.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_MSCG=value # download MSCG for build, value = no (default) or yes
-D MSCG_LIBRARY=path # MSCG library file (only needed if a custom location)
-D MSCG_INCLUDE_DIR=path # MSCG include directory (only needed if a custom location)
If ``DOWNLOAD_MSCG`` is set, the MSCG library will be downloaded
and built inside the CMake build directory. If the MSCG library
is already on your system (in a location CMake cannot find it),
``MSCG_LIBRARY`` is the filename (plus path) of the MSCG library
file, not the directory the library file is in.
``MSCG_INCLUDE_DIR`` is the directory the MSCG include file is in.
.. tab:: Traditional make
You can download and build the MS-CG library manually if you
prefer; follow the instructions in ``lib/mscg/README``\ . You can
also do it in one step from the ``lammps/src`` dir, using a
command like these, which simply invokes the
``lib/mscg/Install.py`` script with the specified args:
.. code-block:: bash
make lib-mscg # print help message
make lib-mscg args="-b -m serial" # download and build in lib/mscg/MSCG-release-master
# with the settings compatible with "make serial"
make lib-mscg args="-b -m mpi" # download and build in lib/mscg/MSCG-release-master
# with the settings compatible with "make mpi"
make lib-mscg args="-p /usr/local/mscg-release" # use the existing MS-CG installation in /usr/local/mscg-release
Note that 2 symbolic (soft) links, ``includelink`` and ``liblink``,
will be created in ``lib/mscg`` to point to the MS-CG
``src/installation`` dir. When LAMMPS is built in src it will use
these links. You should not need to edit the
``lib/mscg/Makefile.lammps`` file.
----------
.. _opt:
OPT package

View File

@ -55,7 +55,6 @@ packages:
* :ref:`ML-POD <ml-pod>`
* :ref:`ML-QUIP <ml-quip>`
* :ref:`MOLFILE <molfile>`
* :ref:`MSCG <mscg>`
* :ref:`NETCDF <netcdf>`
* :ref:`OPENMP <openmp>`
* :ref:`OPT <opt>`

View File

@ -116,7 +116,6 @@ OPT.
* :doc:`momentum (k) <fix_momentum>`
* :doc:`momentum/chunk <fix_momentum>`
* :doc:`move <fix_move>`
* :doc:`mscg <fix_mscg>`
* :doc:`msst <fix_msst>`
* :doc:`mvv/dpd <fix_mvv_dpd>`
* :doc:`mvv/edpd <fix_mvv_dpd>`

View File

@ -85,6 +85,16 @@ The same functionality is available through
:doc:`bond style mesocnt <bond_mesocnt>` and
:doc:`angle style mesocnt <angle_mesocnt>`.
MSCG package
------------
.. deprecated:: TBD
The MSCG package has been removed from LAMMPS since it was unmaintained
for many years and instead superseded by the `OpenMSCG software
<https://software.rcc.uchicago.edu/mscg/>`_ of the Voth group at the
University of Chicago, which can be used independent from LAMMPS.
REAX package
------------

View File

@ -104,8 +104,6 @@ Lowercase directories
+-------------+------------------------------------------------------------------+
| min | energy minimization of 2d LJ melt |
+-------------+------------------------------------------------------------------+
| mscg | parameterize a multi-scale coarse-graining (MSCG) model |
+-------------+------------------------------------------------------------------+
| msst | MSST shock dynamics |
+-------------+------------------------------------------------------------------+
| multi | multi neighboring for systems with large interaction disparities |

View File

@ -88,7 +88,6 @@ page gives those details.
* :ref:`MOLECULE <PKG-MOLECULE>`
* :ref:`MOLFILE <PKG-MOLFILE>`
* :ref:`MPIIO <PKG-MPIIO>`
* :ref:`MSCG <PKG-MSCG>`
* :ref:`NETCDF <PKG-NETCDF>`
* :ref:`OPENMP <PKG-OPENMP>`
* :ref:`OPT <PKG-OPT>`
@ -2066,38 +2065,6 @@ The MPIIO package requires that LAMMPS is build in :ref:`MPI parallel mode <seri
----------
.. _PKG-MSCG:
MSCG package
------------
**Contents:**
A :doc:`fix mscg <fix_mscg>` command which can parameterize a
Multi-Scale Coarse-Graining (MSCG) model using the open-source `MS-CG library <mscg-home_>`_.
.. _mscg-home: https://github.com/uchicago-voth/MSCG-release
To use this package you must have the MS-CG library available on your
system.
**Authors:** The fix was written by Lauren Abbott (Sandia). The MS-CG
library was developed by Jacob Wagner in Greg Voth's group at the
University of Chicago.
**Install:**
This package has :ref:`specific installation instructions <mscg>` on the :doc:`Build extras <Build_extras>` page.
**Supporting info:**
* src/MSCG: filenames -> commands
* src/MSCG/README
* lib/mscg/README
* examples/mscg
----------
.. _PKG-NETCDF:
NETCDF package

View File

@ -338,11 +338,6 @@ whether an extra library is needed to build and use the package:
- :doc:`dump <dump>`
- n/a
- no
* - :ref:`MSCG <PKG-MSCG>`
- multi-scale coarse-graining wrapper
- :doc:`fix mscg <fix_mscg>`
- mscg
- ext
* - :ref:`NETCDF <PKG-NETCDF>`
- dump output via NetCDF
- :doc:`dump netcdf <dump_netcdf>`

View File

@ -268,7 +268,6 @@ accelerated styles exist.
* :doc:`momentum <fix_momentum>` - zero the linear and/or angular momentum of a group of atoms
* :doc:`momentum/chunk <fix_momentum>` - zero the linear and/or angular momentum of a chunk of atoms
* :doc:`move <fix_move>` - move atoms in a prescribed fashion
* :doc:`mscg <fix_mscg>` - apply MSCG method for force-matching to generate coarse grain models
* :doc:`msst <fix_msst>` - multi-scale shock technique (MSST) integration
* :doc:`mvv/dpd <fix_mvv_dpd>` - DPD using the modified velocity-Verlet integration algorithm
* :doc:`mvv/edpd <fix_mvv_dpd>` - constant energy DPD using the modified velocity-Verlet algorithm

View File

@ -1,141 +0,0 @@
.. index:: fix mscg
fix mscg command
================
Syntax
""""""
.. code-block:: LAMMPS
fix ID group-ID mscg N keyword args ...
* ID, group-ID are documented in :doc:`fix <fix>` command
* mscg = style name of this fix command
* N = envoke this fix every this many timesteps
* zero or more keyword/value pairs may be appended
* keyword = *range* or *name* or *max*
.. parsed-literal::
*range* arg = *on* or *off*
*on* = range finding functionality is performed
*off* = force matching functionality is performed
*name* args = name1 ... nameN
name1,...,nameN = string names for each atom type (1-Ntype)
*max* args = maxb maxa maxd
maxb,maxa,maxd = maximum bonds/angles/dihedrals per atom
Examples
""""""""
.. code-block:: LAMMPS
fix 1 all mscg 1
fix 1 all mscg 1 range name A B
fix 1 all mscg 1 max 4 8 20
Description
"""""""""""
This fix applies the Multi-Scale Coarse-Graining (MSCG) method to
snapshots from a dump file to generate potentials for coarse-grained
simulations from all-atom simulations, using a force-matching technique
(:ref:`Izvekov <Izvekov>`, :ref:`Noid <Noid>`).
It makes use of the MS-CG library, written and maintained by Greg Voth's
group at the University of Chicago, which is freely available on their
`MS-CG GitHub site <https://github.com/uchicago-voth/MSCG-release>`_.
See instructions on obtaining and installing the MS-CG library in the
src/MSCG/README file, which must be done before you build LAMMPS with
this fix command and use the command in a LAMMPS input script.
An example script using this fix is provided the examples/mscg
directory.
The general workflow for using LAMMPS in conjunction with the MS-CG
library to create a coarse-grained model and run coarse-grained
simulations is as follows:
1. Perform all-atom simulations on the system to be coarse grained.
2. Generate a trajectory mapped to the coarse-grained model.
3. Create input files for the MS-CG library.
4. Run the range finder functionality of the MS-CG library.
5. Run the force matching functionality of the MS-CG library.
6. Check the results of the force matching.
7. Run coarse-grained simulations using the new coarse-grained potentials.
This fix can perform the range finding and force matching steps 4 and 5
of the above workflow when used in conjunction with the :doc:`rerun
<rerun>` command. It does not perform steps 1-3 and 6-7.
Step 2 can be performed using a Python script (cgmap), which defines the
coarse-grained model and converts a standard LAMMPS dump file for an
all-atom simulation (step 1) into a LAMMPS dump file which has the
positions of and forces on the coarse-grained beads. To use cgmap the
following repositories need to be downloaded and installed.
#. The custom lammpsdata branch of mdtraj from https://github.com/hockyg/mdtraj/tree/lammpsdata
#. The master branch of cgmap from https://github.com/uchicago-voth/cgmap
In step 3, an input file named "control.in" is needed by the MS-CG
library which sets parameters for the range finding and force matching
functionalities. See the examples/mscg/control.in file as an example.
And see the documentation provided with the MS-CG library for more
info on this file.
When this fix is used to perform steps 4 and 5, the MS-CG library also
produces additional output files. The range finder functionality
(step 4) outputs files defining pair and bonded interaction ranges. The
force matching functionality (step 5) outputs tabulated force files for
every interaction in the system. Other diagnostic files can also be
output depending on the parameters in the MS-CG library input script.
Again, see the documentation provided with the MS-CG library for more
info.
----------
The *range* keyword specifies which MS-CG library functionality should
be invoked. If *on*, the step 4 range finder functionality is invoked.
*off*, the step 5 force matching functionality is invoked.
If the *name* keyword is used, string names are defined to associate
with the integer atom types in LAMMPS. *Ntype* names must be provided,
one for each atom type (1-Ntype).
The *max* keyword specifies the maximum number of bonds, angles, and
dihedrals a bead can have in the coarse-grained model.
Restrictions
""""""""""""
This fix is part of the MSCG package. It is only enabled if LAMMPS was
built with that package. Building the MSCG package also requires
external libraries. See the :doc:`Build_package` and :doc:`Build_extras`
pages for more info.
Currently, the MS-CG library is not set up to run in parallel with MPI,
so this fix can only be used in a serial LAMMPS build and run on a
single processor.
Related commands
""""""""""""""""
none
Default
"""""""
The default keyword settings are range off, max 4 12 36.
----------
.. _Izvekov:
**(Izvekov)** Izvekov, Voth, J Chem Phys 123, 134105 (2005).
.. _Noid:
**(Noid)** Noid, Chu, Ayton, Krishna, Izvekov, Voth, Das, Andersen, J
Chem Phys 128, 134105 (2008).

View File

@ -91,7 +91,6 @@ mesh: create_atoms mesh command
micelle: self-assembly of small lipid-like molecules into 2d bilayers
min: energy minimization of 2d LJ melt
mliap: examples for using several bundled MLIAP potentials
mscg: parameterize a multi-scale coarse-graining (MSCG) model
msst: MSST shock dynamics
nb3b: use of nonbonded 3-body harmonic pair style
neb: nudged elastic band (NEB) calculation for barrier finding

View File

@ -1,10 +0,0 @@
Running this example requires that LAMMPS be built with the MSCG
package and its fix mscg command. The fix uses the Multi-Scale
Coarse-Graining (MS-CG) library, freely available at
https://github.com/uchicago-voth/MSCG-release, to compute optimized
coarse-grained force field parameters. The MS-CG library was
developed by Jacob Wagner in Greg Voth's group at the University of
Chicago.
See the lib/mscg/README file for instructions on how to download and
install the MS-CG library for use with LAMMPS.

View File

@ -1,12 +0,0 @@
block_size 1
start_frame 1
n_frames 19
nonbonded_cutoff 10.0
basis_type 0
primary_output_style 0
output_solution_flag 1
output_spline_coeffs_flag 1
pair_nonbonded_bspline_basis_order 6
pair_nonbonded_basis_set_resolution 0.7
pair_nonbonded_output_binwidth 0.1
matrix_type 0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +0,0 @@
units real
atom_style full
pair_style zero 10.0
read_data data.meoh
pair_coeff * *
thermo 1
thermo_style custom step
# Test 1a: range finder functionality
fix 1 all mscg 1 range on
rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz
print "TEST_1a mscg range finder"
unfix 1
# Test 1b: force matching functionality
fix 1 all mscg 1
rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz
print "TEST_1b mscg force matching"
print TEST_DONE

View File

@ -1,105 +0,0 @@
LAMMPS (8 Feb 2023)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
units real
atom_style full
pair_style zero 10.0
read_data data.meoh
Reading data file ...
orthogonal box = (-20.6917 -20.6917 -20.6917) to (20.6917 20.6917 20.6917)
1 by 1 by 1 MPI processor grid
reading atoms ...
1000 atoms
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
0 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
special bonds CPU = 0.000 seconds
read_data CPU = 0.007 seconds
pair_coeff * *
thermo 1
thermo_style custom step
# Test 1a: range finder functionality
fix 1 all mscg 1 range on
rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz
WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60)
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 12
ghost atom cutoff = 12
binsize = 6, bins = 7 7 7
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair zero, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 6.045 | 6.045 | 6.045 Mbytes
Step
0
250
500
750
1000
1250
1500
1750
2000
2250
2500
2750
3000
3250
3500
3750
4000
4250
4500
Loop time of 0.245891 on 1 procs for 19 steps with 1000 atoms
print "TEST_1a mscg range finder"
TEST_1a mscg range finder
unfix 1
# Test 1b: force matching functionality
fix 1 all mscg 1
rerun dump.meoh first 0 last 4500 every 250 dump x y z fx fy fz
WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60)
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Per MPI rank memory allocation (min/avg/max) = 6.045 | 6.045 | 6.045 Mbytes
Step
0
250
500
750
1000
1250
1500
1750
2000
2250
2500
2750
3000
3250
3500
3750
4000
4250
4500
Loop time of 0.433986 on 1 procs for 19 steps with 1000 atoms
print "TEST_1b mscg force matching"
TEST_1b mscg force matching
print TEST_DONE
TEST_DONE
Total wall time: 0:00:00

View File

@ -1,71 +0,0 @@
3.000000 9.109433117503674e+00
3.100000 6.562933520937051e+00
3.200000 3.803570347770783e+00
3.300000 1.524835163098694e+00
3.400000 3.680752991750511e-02
3.500000 -6.369395346711866e-01
3.600000 -6.624341032589213e-01
3.700000 -2.983998819283989e-01
3.800000 1.996942072449469e-01
3.900000 6.507540486137935e-01
4.000000 9.561503221901252e-01
4.100000 1.082978861799261e+00
4.200000 1.046366050930359e+00
4.300000 8.917742185869113e-01
4.400000 6.773070351372578e-01
4.500000 4.561974686292022e-01
4.600000 2.640422255436971e-01
4.700000 1.180848207166380e-01
4.800000 2.124502216672507e-02
4.900000 -3.366915456585443e-02
5.000000 -5.974945208074427e-02
5.100000 -7.177537677873873e-02
5.200000 -8.204929079011507e-02
5.300000 -9.745573177789707e-02
5.400000 -1.196283642109915e-01
5.500000 -1.463411396781238e-01
5.600000 -1.729465415853768e-01
5.700000 -1.938138298537278e-01
5.800000 -2.037672856165882e-01
5.900000 -1.995060297815394e-01
6.000000 -1.805447650094144e-01
6.100000 -1.489384048916932e-01
6.200000 -1.085276302304308e-01
6.300000 -6.416601955090541e-02
6.400000 -2.094717961426480e-02
6.500000 1.656812406982645e-02
6.600000 4.511482523443927e-02
6.700000 6.322611594801032e-02
6.800000 7.107524696431811e-02
6.900000 7.005702917383723e-02
7.000000 6.235932355899154e-02
7.100000 5.053453114940768e-02
7.200000 3.707108297716843e-02
7.300000 2.397003518601587e-02
7.400000 1.245439896007831e-02
7.500000 3.015413982707119e-03
7.600000 -4.408442264121739e-03
7.700000 -1.024733994435217e-02
7.800000 -1.511598231239246e-02
7.900000 -1.962949115765983e-02
8.000000 -2.422153184874873e-02
8.100000 -2.902066868449916e-02
8.200000 -3.387453677654857e-02
8.300000 -3.843224513464188e-02
8.400000 -4.222901944115068e-02
8.500000 -4.477084482559266e-02
8.600000 -4.561910863915099e-02
8.700000 -4.447439067652353e-02
8.800000 -4.123808661911404e-02
8.900000 -3.601776131390161e-02
9.000000 -2.911033476210515e-02
9.100000 -2.098441550402311e-02
9.200000 -1.226263400387303e-02
9.300000 -3.703976034631109e-03
9.400000 3.815231963949414e-03
9.500000 9.355387087425532e-03
9.600000 1.205664749783030e-02
9.700000 1.131702059340882e-02
9.800000 6.971799313021964e-03
9.900000 -5.270015594498346e-04
10.000000 -9.931209090702869e-03

View File

@ -1,104 +0,0 @@
# Header information on force file
1_1
N 99 R 0.200000 10.000000
1 0.200000 127.263594 80.411422
2 0.300000 119.349776 77.864922
3 0.400000 111.690609 75.318423
4 0.500000 104.286092 72.771923
5 0.600000 97.136225 70.225423
6 0.700000 90.241007 67.678924
7 0.800000 83.600440 65.132424
8 0.900000 77.214522 62.585925
9 1.000000 71.083255 60.039425
10 1.100000 65.206637 57.492925
11 1.200000 59.584670 54.946426
12 1.300000 54.217352 52.399926
13 1.400000 49.104684 49.853427
14 1.500000 44.246667 47.306927
15 1.600000 39.643299 44.760427
16 1.700000 35.294581 42.213928
17 1.800000 31.200513 39.667428
18 1.900000 27.361096 37.120929
19 2.000000 23.776328 34.574429
20 2.100000 20.446210 32.027929
21 2.200000 17.370742 29.481430
22 2.300000 14.549924 26.934930
23 2.400000 11.983756 24.388431
24 2.500000 9.672238 21.841931
25 2.600000 7.615370 19.295432
26 2.700000 5.813151 16.748932
27 2.800000 4.265583 14.202432
28 2.900000 2.972665 11.655933
29 3.000000 1.934397 9.109433
30 3.100000 1.150778 6.562934
31 3.200000 0.632453 3.803570
32 3.300000 0.366033 1.524835
33 3.400000 0.287951 0.036808
34 3.500000 0.317957 -0.636940
35 3.600000 0.382926 -0.662434
36 3.700000 0.430968 -0.298400
37 3.800000 0.435903 0.199694
38 3.900000 0.393381 0.650754
39 4.000000 0.313035 0.956150
40 4.100000 0.211079 1.082979
41 4.200000 0.104612 1.046366
42 4.300000 0.007705 0.891774
43 4.400000 -0.070749 0.677307
44 4.500000 -0.127425 0.456197
45 4.600000 -0.163437 0.264042
46 4.700000 -0.182543 0.118085
47 4.800000 -0.189509 0.021245
48 4.900000 -0.188888 -0.033669
49 5.000000 -0.184217 -0.059749
50 5.100000 -0.177641 -0.071775
51 5.200000 -0.169950 -0.082049
52 5.300000 -0.160975 -0.097456
53 5.400000 -0.150120 -0.119628
54 5.500000 -0.136822 -0.146341
55 5.600000 -0.120858 -0.172947
56 5.700000 -0.102520 -0.193814
57 5.800000 -0.082640 -0.203767
58 5.900000 -0.062477 -0.199506
59 6.000000 -0.043474 -0.180545
60 6.100000 -0.027000 -0.148938
61 6.200000 -0.014127 -0.108528
62 6.300000 -0.005492 -0.064166
63 6.400000 -0.001236 -0.020947
64 6.500000 -0.001018 0.016568
65 6.600000 -0.004102 0.045115
66 6.700000 -0.009519 0.063226
67 6.800000 -0.016234 0.071075
68 6.900000 -0.023290 0.070057
69 7.000000 -0.029911 0.062359
70 7.100000 -0.035556 0.050535
71 7.200000 -0.039936 0.037071
72 7.300000 -0.042988 0.023970
73 7.400000 -0.044809 0.012454
74 7.500000 -0.045583 0.003015
75 7.600000 -0.045513 -0.004408
76 7.700000 -0.044781 -0.010247
77 7.800000 -0.043512 -0.015116
78 7.900000 -0.041775 -0.019629
79 8.000000 -0.039583 -0.024222
80 8.100000 -0.036920 -0.029021
81 8.200000 -0.033776 -0.033875
82 8.300000 -0.030160 -0.038432
83 8.400000 -0.026127 -0.042229
84 8.500000 -0.021777 -0.044771
85 8.600000 -0.017258 -0.045619
86 8.700000 -0.012753 -0.044474
87 8.800000 -0.008467 -0.041238
88 8.900000 -0.004605 -0.036018
89 9.000000 -0.001348 -0.029110
90 9.100000 0.001156 -0.020984
91 9.200000 0.002819 -0.012263
92 9.300000 0.003617 -0.003704
93 9.400000 0.003612 0.003815
94 9.500000 0.002953 0.009355
95 9.600000 0.001882 0.012057
96 9.700000 0.000714 0.011317
97 9.800000 -0.000201 0.006972
98 9.900000 -0.000523 -0.000527
99 10.000000 0.000000 -0.009931

View File

@ -1,2 +0,0 @@
n: 1 1 6 11 3.000000000000000e+00 1.000000000000000e+01
9.109454054135307e+00 6.178334150703818e+00 -6.242976259059743e+00 4.778144787445235e+00 -1.082885612852992e+00 4.521835893850554e-01 -6.477047196208028e-01 2.947887062333265e-01 -4.195609079009661e-02 1.111775827831465e-02 -8.823466147380592e-02 -1.696076806027540e-02 3.192205281984208e-02 3.656991607866288e-03 -9.931306149957592e-03

View File

@ -1 +0,0 @@
1 1 2.852369 10.000000 fm

View File

@ -1,17 +0,0 @@
fm_matrix_rows:3000; fm_matrix_columns:15;
Singular vector:
2.307693e+00
1.998418e+00
1.400114e+00
1.183608e+00
9.718949e-01
7.471241e-01
5.277965e-01
5.084369e-01
3.510398e-01
2.997000e-01
2.142454e-01
1.201800e-01
7.143923e-02
3.077326e-02
1.835581e-02

View File

@ -1,2 +0,0 @@
<EFBFBD>ٝ\
8"@<40>!D:<3A><>@<40>v<EFBFBD><76><EFBFBD><EFBFBD><18>H<EFBFBD><48><EFBFBD><EFBFBD>@H3H<33>S<7F><53>Ԗ p<><70><EFBFBD>??<3F><>俀% s<><73><EFBFBD>?:y<><79>D{<7B><><EFBFBD>z<EFBFBD>A<EFBFBD>Ć?#Tg<54><67><EFBFBD><EFBFBD><EFBFBD>l#<23><>)^<5E><><EFBFBD><EFBFBD><EFBFBD>YX<>?K<>pkD<6B>m?<3F>

View File

@ -41,8 +41,6 @@ mdi hooks to the MDI library, used by MDI package
from Taylor Barnes (MolSSI at Virginia Tech)
molfile hooks to VMD molfile plugins, used by the MOLFILE package
from Axel Kohlmeyer (Temple U) and the VMD development team
mscg hooks to the MSCG library, used by fix_mscg command
from Jacob Wagner and Greg Voth group (U Chicago)
netcdf hooks to a NetCDF library installed on your system
from Lars Pastewka (Karlsruhe Institute of Technology)
plugin settings to load styles into LAMMPS from plugins

4
lib/mscg/.gitignore vendored
View File

@ -1,4 +0,0 @@
# files to ignore
/liblink
/includelink
/MSCG-release-*

View File

@ -1,154 +0,0 @@
#!/usr/bin/env python
"""
Install.py tool to download, unpack, build, and link to the MS-CG library
used to automate the steps described in the README file in this dir
"""
from __future__ import print_function
import sys, os, subprocess, shutil, tarfile
from argparse import ArgumentParser
sys.path.append('..')
from install_helpers import fullpath, geturl, checkmd5sum, getfallback
parser = ArgumentParser(prog='Install.py',
description="LAMMPS library build wrapper script")
# settings
version = "1.7.3.1"
machine = "g++_simple"
# help message
HELP = """
Syntax from src dir: make lib-mscg args="-p [path] -m [suffix] -v [version]"
or: make lib-mscg args="-b -m [suffix]"
Syntax from lib dir: python Install.py -p [path] -m [suffix] -v [version]
Syntax from lib dir: python Install.py -b -m [suffix]
Example:
make lib-mscg args="-b -m serial " # download/build in lib/mscg/MSCG-release with settings compatible with "make serial"
make lib-mscg args="-b -m mpi " # download/build in lib/mscg/MSCG-release with settings compatible with "make mpi"
make lib-mscg args="-p /usr/local/mscg-release " # use existing MS-CG installation in /usr/local/mscg-release
"""
# known checksums for different MSCG versions. used to validate the download.
checksums = { \
'1.7.3.1' : '8c45e269ee13f60b303edd7823866a91', \
}
# parse and process arguments
pgroup = parser.add_mutually_exclusive_group()
pgroup.add_argument("-b", "--build", action="store_true",
help="download and build the MSCG library")
pgroup.add_argument("-p", "--path",
help="specify folder of existing MSCG installation")
parser.add_argument("-v", "--version", default=version, choices=checksums.keys(),
help="set version of MSCG to download and build (default: %s)" % version)
parser.add_argument("-m", "--machine", default=machine, choices=['mpi', 'serial', 'g++_simple', 'intel_simple', 'lapack', 'mac'],
help="set machine suffix specifies which src/Make/Makefile.suffix to use. (default: %s)" % machine)
args = parser.parse_args()
# print help message and exit, if neither build nor path options are given
if not args.build and not args.path:
parser.print_help()
sys.exit(HELP)
buildflag = args.build
pathflag = args.path is not None
mscgpath = args.path
msuffix = args.machine
mscgver = args.version
# settings
url = "https://github.com/uchicago-voth/MSCG-release/archive/%s.tar.gz" % mscgver
tarname = "MS-CG-%s.tar.gz" % mscgver
tardir = "MSCG-release-%s" % mscgver
homepath = fullpath('.')
homedir = os.path.join(homepath, tardir)
if pathflag:
if not os.path.isdir(mscgpath):
sys.exit("MS-CG path %s does not exist" % mscgpath)
homedir = fullpath(mscgpath)
# download and unpack MS-CG tarfile
if buildflag:
print("Downloading MS-CG ...")
tarname = os.path.join(homepath, tarname)
fallback = getfallback('mscg', url)
try:
geturl(url, tarname)
except:
geturl(fallback, tarname)
# verify downloaded archive integrity via md5 checksum, if known.
if mscgver in checksums:
if not checkmd5sum(checksums[mscgver], tarname):
print("Checksum did not match. Trying fallback URL", fallback)
geturl(fallback, tarname)
if not checkmd5sum(checksums[mscgver], tarname):
sys.exit("Checksum for LATTE library does not match for fallback, too.")
print("Unpacking MS-CG tarfile ...")
if os.path.exists(os.path.join(homepath, tardir)):
shutil.rmtree(os.path.join(homepath, tardir))
if tarfile.is_tarfile(tarname):
tgz = tarfile.open(tarname)
tgz.extractall(path=homepath)
os.remove(tarname)
else:
sys.exit("File %s is not a supported archive", tarname)
if os.path.basename(homedir) != tardir:
if os.path.exists(homedir):
shutil.rmtree(homedir)
os.rename(os.path.join(homepath, tardir), homedir)
# build MS-CG
if buildflag:
print("Building MS-CG ...")
mkf = "Makefile.%s" % msuffix
mkp = os.path.join(homedir, 'src', 'Make', mkf)
if os.path.exists(mkp):
shutil.copyfile(mkp, os.path.join(homedir, 'src', mkf))
elif os.path.exists("Makefile.%s" % msuffix):
shutil.copyfile("Makefile.%s" % msuffix, os.path.join(homedir, 'src', mkf))
else:
sys.exit("Cannot find Makefile.%s" % msuffix)
try:
cmd = 'make -C %s -f Makefile.%s' % (os.path.join(homedir, 'src'), msuffix)
txt = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
print(txt.decode('UTF-8'))
except subprocess.CalledProcessError as e:
print("Make failed with:\n %s" % e.output.decode('UTF-8'))
sys.exit(1)
if not os.path.exists("Makefile.lammps"):
print("Creating Makefile.lammps")
if os.path.exists("Makefile.lammps.%s" % msuffix):
shutil.copyfile('Makefile.lammps.%s' % msuffix, 'Makefile.lammps')
else:
shutil.copyfile('Makefile.lammps.default', 'Makefile.lammps')
else: print("Makefile.lammps exists. Please check its settings")
# create 2 links in lib/mscg to MS-CG src dir
print("Creating links to MS-CG include and lib files")
if os.path.isfile("includelink") or os.path.islink("includelink"):
os.remove("includelink")
if os.path.isfile("liblink") or os.path.islink("liblink"):
os.remove("liblink")
os.symlink(os.path.join(homedir, 'src'), 'includelink')
os.symlink(os.path.join(homedir, 'src'), 'liblink')

View File

@ -1,5 +0,0 @@
# Settings that the LAMMPS build will import when this package library is used
mscg_SYSINC =
mscg_SYSLIB = -lgsl -lgslcblas
mscg_SYSPATH =

View File

@ -1,5 +0,0 @@
# Settings that the LAMMPS build will import when this package library is used
mscg_SYSINC = -std=c++11
mscg_SYSLIB = -lm -lgsl -llapack -lgslcblas
mscg_SYSPATH =

View File

@ -1,5 +0,0 @@
# Settings that the LAMMPS build will import when this package library is used
mscg_SYSINC =
mscg_SYSLIB = -lgsl -lgslcblas
mscg_SYSPATH =

View File

@ -1,5 +0,0 @@
# Settings that the LAMMPS build will import when this package library is used
mscg_SYSINC =
mscg_SYSLIB = -lgsl -lgslcblas
mscg_SYSPATH =

View File

@ -1,104 +0,0 @@
# This Makefile is meant for use after
# module load gsl/2.2.1+gcc-6.1
# module load gcc/6.1
# It also requires LAPACK
# Module names refer to those on any of RCC's clusters at UChicago.
# This makefile does NOT include GROMACS reading or MKL (sparse matrix)
# It uses the gcc/g++ compiler (v4.9+) for C++11 support
# 1) Try this first (as it is the easiest)
NO_GRO_LIBS = -lgsl -lgslcblas
# 2) If it does not find your libraries automatically, you can specify them manually
# # A) Set the GSL_LIB to the location of your GSL library's lib directory (must be V2+)
GSL_LIB = /software/gsl-2.2.1-el6-x86_64+gcc-6.1/lib
# # B) Set the LAPACK_DIR to the location of your LAPACK library base directory
LAPACK_LIB = $(HOME)/local/lapack-3.7.0
# # C) Uncomment this next line and then run again (after cleaning up any object files)
#NO_GRO_LIBS = -L$(GSL_LIB) -L$(LAPACK_LIB) -lgsl -lgslcblas -llapack -lm
OPT = -O2
NO_GRO_LDFLAGS = $(OPT)
NO_GRO_CFLAGS = $(OPT)
DIMENSION = 3
CC = mpicc
COMMON_SOURCE = control_input.h fm_output.h force_computation.h geometry.h interaction_hashing.h interaction_model.h matrix.h splines.h topology.h trajectory_input.h misc.h mscg.h
NO_GRO_COMMON_OBJECTS = control_input.o fm_output.o force_computation.o geometry.o interaction_hashing.o interaction_model.o matrix.o splines.o topology.o trajectory_input_no_gro.o misc.o
# Target executables
# The library for LAMMPS is lib_mscg.a
libmscg.a: mscg.o $(NO_GRO_COMMON_OBJECTS)
ar rvs libmscg.a *.o
newfm_no_gro.x: newfm.o $(NO_GRO_COMMON_OBJECTS)
$(CC) $(NO_GRO_LDFLAGS) -o $@ newfm.o $(NO_GRO_COMMON_OBJECTS) -D"_exclude_gromacs=1" $(NO_GRO_LIBS)
combinefm_no_gro.x: combinefm.o batch_fm_combination.o $(NO_GRO_COMMON_OBJECTS)
$(CC) $(NO_GRO_LDFLAGS) -o $@ combinefm.o batch_fm_combination.o $(NO_GRO_COMMON_OBJECTS) -D"_exclude_gromacs=1" $(NO_GRO_LIBS)
rangefinder_no_gro.x: rangefinder.o range_finding.o $(NO_GRO_COMMON_OBJECTS)
$(CC) $(NO_GRO_LDFLAGS) -o $@ rangefinder.o range_finding.o $(NO_GRO_COMMON_OBJECTS) -D"_exclude_gromacs=1" $(NO_GRO_LIBS)
# Target objects
mscg.o: mscg.cpp $(COMMON_SOURCE) range_finding.o
$(CC) $(NO_GRO_CFLAGS) -c mscg.cpp -o mscg.o $(NO_GRO_LIBS)
newfm.o: newfm.cpp $(COMMON_SOURCE)
$(CC) $(NO_GRO_CFLAGS) -c newfm.cpp
combinefm.o: combinefm.cpp batch_fm_combination.h $(COMMON_SOURCE)
$(CC) $(NO_GRO_CFLAGS) -c combinefm.cpp
rangefinder.o: rangefinder.cpp range_finding.h $(COMMON_SOURCE)
$(CC) $(NO_GRO_CFLAGS) -c rangefinder.cpp
scalarfm.o: scalarfm.cpp $(COMMON_SOURCE)
$(CC) $(NO_GRO_CFLAGS) -c scalarfm.cpp
batch_fm_combination.o: batch_fm_combination.cpp batch_fm_combination.h external_matrix_routines.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c batch_fm_combination.cpp
control_input.o: control_input.cpp control_input.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c control_input.cpp
geometry.o: geometry.cpp geometry.h
$(CC) $(NO_GRO_CFLAGS) -c geometry.cpp -DDIMENSION=$(DIMENSION)
fm_output.o: fm_output.cpp fm_output.h force_computation.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c fm_output.cpp
force_computation.o: force_computation.cpp force_computation.h interaction_model.h matrix.h trajectory_input.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c force_computation.cpp -DDIMENSION=$(DIMENSION)
interaction_hashing.o: interaction_hashing.cpp interaction_hashing.h
$(CC) $(NO_GRO_CFLAGS) -c interaction_hashing.cpp
interaction_model.o: interaction_model.cpp interaction_model.h control_input.h interaction_hashing.h topology.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c interaction_model.cpp -DDIMENSION=$(DIMENSION)
matrix.o: matrix.cpp matrix.h control_input.h external_matrix_routines.h interaction_model.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c matrix.cpp -DDIMENSION=$(DIMENSION)
misc.o: misc.cpp misc.h
$(CC) $(NO_GRO_CFLAGS) -c misc.cpp
range_finding.o: range_finding.cpp range_finding.h force_computation.h interaction_model.h matrix.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c range_finding.cpp -DDIMENSION=$(DIMENSION)
splines.o: splines.cpp splines.h interaction_model.h
$(CC) $(NO_GRO_CFLAGS) -c splines.cpp -DDIMENSION=$(DIMENSION)
topology.o: topology.cpp topology.h interaction_model.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c topology.cpp -DDIMENSION=$(DIMENSION)
trajectory_input_no_gro.o: trajectory_input.cpp trajectory_input.h control_input.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c trajectory_input.cpp -D"_exclude_gromacs=1" -o trajectory_input_no_gro.o
# Other convenient commands
clean:
rm *.[o]
all: libmscg.a newfm_no_gro.x rangefinder_no_gro.x combinefm_no_gro.x

View File

@ -1,104 +0,0 @@
# This Makefile is meant for use after
# module load gsl/2.2.1+gcc-6.1
# module load gcc/6.1
# It also requires LAPACK
# Module names refer to those on any of RCC's clusters at UChicago.
# This makefile does NOT include GROMACS reading or MKL (sparse matrix)
# It uses the gcc/g++ compiler (v4.9+) for C++11 support
# 1) Try this first (as it is the easiest)
NO_GRO_LIBS = -lgsl -lgslcblas
# 2) If it does not find your libraries automatically, you can specify them manually
# # A) Set the GSL_LIB to the location of your GSL library's lib directory (must be V2+)
GSL_LIB = /software/gsl-2.2.1-el6-x86_64+gcc-6.1/lib
# # B) Set the LAPACK_DIR to the location of your LAPACK library base directory
LAPACK_LIB = $(HOME)/local/lapack-3.7.0
# # C) Uncomment this next line and then run again (after cleaning up any object files)
#NO_GRO_LIBS = -L$(GSL_LIB) -L$(LAPACK_LIB) -lgsl -lgslcblas -llapack -lm
OPT = -O2
NO_GRO_LDFLAGS = $(OPT)
NO_GRO_CFLAGS = $(OPT)
DIMENSION = 3
CC = g++
COMMON_SOURCE = control_input.h fm_output.h force_computation.h geometry.h interaction_hashing.h interaction_model.h matrix.h splines.h topology.h trajectory_input.h misc.h mscg.h
NO_GRO_COMMON_OBJECTS = control_input.o fm_output.o force_computation.o geometry.o interaction_hashing.o interaction_model.o matrix.o splines.o topology.o trajectory_input_no_gro.o misc.o
# Target executables
# The library for LAMMPS is lib_mscg.a
libmscg.a: mscg.o $(NO_GRO_COMMON_OBJECTS)
ar rvs libmscg.a *.o
newfm_no_gro.x: newfm.o $(NO_GRO_COMMON_OBJECTS)
$(CC) $(NO_GRO_LDFLAGS) -o $@ newfm.o $(NO_GRO_COMMON_OBJECTS) -D"_exclude_gromacs=1" $(NO_GRO_LIBS)
combinefm_no_gro.x: combinefm.o batch_fm_combination.o $(NO_GRO_COMMON_OBJECTS)
$(CC) $(NO_GRO_LDFLAGS) -o $@ combinefm.o batch_fm_combination.o $(NO_GRO_COMMON_OBJECTS) -D"_exclude_gromacs=1" $(NO_GRO_LIBS)
rangefinder_no_gro.x: rangefinder.o range_finding.o $(NO_GRO_COMMON_OBJECTS)
$(CC) $(NO_GRO_LDFLAGS) -o $@ rangefinder.o range_finding.o $(NO_GRO_COMMON_OBJECTS) -D"_exclude_gromacs=1" $(NO_GRO_LIBS)
# Target objects
mscg.o: mscg.cpp $(COMMON_SOURCE) range_finding.o
$(CC) $(NO_GRO_CFLAGS) -c mscg.cpp -o mscg.o $(NO_GRO_LIBS)
newfm.o: newfm.cpp $(COMMON_SOURCE)
$(CC) $(NO_GRO_CFLAGS) -c newfm.cpp
combinefm.o: combinefm.cpp batch_fm_combination.h $(COMMON_SOURCE)
$(CC) $(NO_GRO_CFLAGS) -c combinefm.cpp
rangefinder.o: rangefinder.cpp range_finding.h $(COMMON_SOURCE)
$(CC) $(NO_GRO_CFLAGS) -c rangefinder.cpp
scalarfm.o: scalarfm.cpp $(COMMON_SOURCE)
$(CC) $(NO_GRO_CFLAGS) -c scalarfm.cpp
batch_fm_combination.o: batch_fm_combination.cpp batch_fm_combination.h external_matrix_routines.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c batch_fm_combination.cpp
control_input.o: control_input.cpp control_input.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c control_input.cpp
geometry.o: geometry.cpp geometry.h
$(CC) $(NO_GRO_CFLAGS) -c geometry.cpp -DDIMENSION=$(DIMENSION)
fm_output.o: fm_output.cpp fm_output.h force_computation.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c fm_output.cpp
force_computation.o: force_computation.cpp force_computation.h interaction_model.h matrix.h trajectory_input.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c force_computation.cpp -DDIMENSION=$(DIMENSION)
interaction_hashing.o: interaction_hashing.cpp interaction_hashing.h
$(CC) $(NO_GRO_CFLAGS) -c interaction_hashing.cpp
interaction_model.o: interaction_model.cpp interaction_model.h control_input.h interaction_hashing.h topology.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c interaction_model.cpp -DDIMENSION=$(DIMENSION)
matrix.o: matrix.cpp matrix.h control_input.h external_matrix_routines.h interaction_model.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c matrix.cpp -DDIMENSION=$(DIMENSION)
misc.o: misc.cpp misc.h
$(CC) $(NO_GRO_CFLAGS) -c misc.cpp
range_finding.o: range_finding.cpp range_finding.h force_computation.h interaction_model.h matrix.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c range_finding.cpp -DDIMENSION=$(DIMENSION)
splines.o: splines.cpp splines.h interaction_model.h
$(CC) $(NO_GRO_CFLAGS) -c splines.cpp -DDIMENSION=$(DIMENSION)
topology.o: topology.cpp topology.h interaction_model.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c topology.cpp -DDIMENSION=$(DIMENSION)
trajectory_input_no_gro.o: trajectory_input.cpp trajectory_input.h control_input.h misc.h
$(CC) $(NO_GRO_CFLAGS) -c trajectory_input.cpp -D"_exclude_gromacs=1" -o trajectory_input_no_gro.o
# Other convenient commands
clean:
rm *.[o]
all: libmscg.a newfm_no_gro.x rangefinder_no_gro.x combinefm_no_gro.x

View File

@ -1,69 +0,0 @@
This directory contains links to the Multi-scale Coarse-graining
(MS-CG) library which is required to use the MSCG package and its fix
command in a LAMMPS input script.
The MS-CG library is available at
https://github.com/uchicago-voth/MSCG-release and was developed by
Jacob Wagner in Greg Voth's group at the University of Chicago.
This library requires a the GNU scientific library (GSL v 2.1+).
You can type "make lib-mscg" from the src directory to see help on how
to download and build this library via make commands, or you can do
the same thing by typing "python Install.py -m <machine>" from within this
directory, or you can do it manually by following the instructions
below.
-----------------
You must perform the following steps yourself.
1. Download MS-CG at https://github.com/uchicago-voth/MSCG-release
either as a tarball or via SVN, and unpack the tarball either in
this lib/mscg directory or somewhere else on your system.
2. Ensure that you have GSL installed and a compiler with support for C++11.
3. Compile MS-CG from within its home directory using your makefile of choice:
% make -f Makefile.<machine> libmscg.a
It is recommended that you start with Makefile.g++_simple for
most machines. There are also two Makefile with settings matching
the "mpi" and "serial" makefiles in the main LAMMPS folder.
4. There is no need to install MS-CG system-wide if you only wish
to use it from LAMMPS.
5. Create two soft links in this dir (lib/mscg) to the MS-CG src
directory. E.g if you built MS-CG in this dir:
% ln -s src includelink
% ln -s src liblink
These links could instead be set to the include and lib
directories created by a MS-CG install, e.g.
% ln -s /usr/local/include includelink
% ln -s /usr/local/lib liblink
6. Copy a suitable Makefile.lammps.<machine> to Makefile.lammps or
copy Makefile.lammps.default to Makefile.lammps and edit as needed.
-----------------
When these steps are complete you can build LAMMPS with the MS-CG
package installed:
% cd lammps/src
% make yes-MSCG
% make g++ (or whatever target you wish)
Note that if you download and unpack a new LAMMPS tarball, the
"includelink" and "liblink" files will be lost and you will need to
re-create them (step 4). If you built MS-CG in this directory (as
opposed to somewhere else on your system) and did not install it
somewhere else, you will also need to repeat steps 1,2,3.
The Makefile.lammps file in this directory is there for compatibility
with the way other libraries under the lib dir are linked with by
LAMMPS. MS-CG requires the GSL and LAPACK libraries as listed in
Makefile.lammps. If they are not in default locations where your
LD_LIBRARY_PATH environment settings can find them, then you should
add the approrpriate -L paths to the mscg_SYSPATH variable in
Makefile.lammps.

View File

@ -1,63 +0,0 @@
# Install/unInstall package files in LAMMPS
# mode = 0/1/2 for uninstall/install/update
mode=$1
# arg1 = file, arg2 = file it depends on
action () {
if (test $mode = 0) then
rm -f ../$1
elif (! cmp -s $1 ../$1) then
if (test -z "$2" || test -e ../$2) then
cp $1 ..
if (test $mode = 2) then
echo " updating src/$1"
fi
fi
elif (test -n "$2") then
if (test ! -e ../$2) then
rm -f ../$1
fi
fi
}
# all package files with no dependencies
for file in *.cpp *.h; do
test -f ${file} && action $file
done
# edit 2 Makefile.package files to include/exclude package info
if (test $1 = 1) then
if (test -e ../Makefile.package) then
sed -i -e 's/[^ \t]*mscg[^ \t]* //' ../Makefile.package
sed -i -e 's|^PKG_INC =[ \t]*|&-I../../lib/mscg/includelink |' ../Makefile.package
sed -i -e 's|^PKG_PATH =[ \t]*|&-L../../lib/mscg/liblink |' ../Makefile.package
sed -i -e 's|^PKG_LIB =[ \t]*|&-lmscg |' ../Makefile.package
sed -i -e 's|^PKG_SYSINC =[ \t]*|&$(mscg_SYSINC) |' ../Makefile.package
sed -i -e 's|^PKG_SYSLIB =[ \t]*|&$(mscg_SYSLIB) |' ../Makefile.package
sed -i -e 's|^PKG_SYSPATH =[ \t]*|&$(mscg_SYSPATH) |' ../Makefile.package
fi
if (test -e ../Makefile.package.settings) then
sed -i -e '/^[ \t]*include.*mscg.*$/d' ../Makefile.package.settings
# multiline form needed for BSD sed on Macs
sed -i -e '4 i \
include ..\/..\/lib\/mscg\/Makefile.lammps
' ../Makefile.package.settings
fi
elif (test $1 = 0) then
if (test -e ../Makefile.package) then
sed -i -e 's/[^ \t]*mscg[^ \t]* //' ../Makefile.package
fi
if (test -e ../Makefile.package.settings) then
sed -i -e '/^[ \t]*include.*mscg.*$/d' ../Makefile.package.settings
fi
fi

View File

@ -1,18 +0,0 @@
The MSCG package adds a fix mscg command, which carries out
multi-scale coarse-graining for the parameterization of coarse-grained
(CG) interactions.
It uses the Multi-Scale Coarse-Graining (MS-CG) library, available at
https://github.com/uchicago-voth/MSCG-release. The MSCG library was
developed by Jacob Wagner in Greg Voth's group at the University of
Chicago.
The library can be downloaded and built in lib/mscg or elsewhere on
your system, which must be done before building LAMMPS with this
package. Details of the download, build, and install process for MSCG
are given in the lib/mscg/README file. Also see the LAMMPS manual for
general information on building LAMMPS with external libraries. The
settings in the Makefile.lammps file in lib/mscg must be correct for
LAMMPS to build correctly with this package installed.
There are example scripts for using this package in examples/mscg.

View File

@ -1,329 +0,0 @@
// clang-format off
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing authors: Lauren Abbott (Sandia)
------------------------------------------------------------------------- */
#include "fix_mscg.h"
#include "atom.h"
#include "comm.h"
#include "domain.h"
#include "error.h"
#include "force.h"
#include "input.h"
#include "memory.h"
#include "modify.h"
#include "neigh_list.h"
#include "neighbor.h"
#include "region.h"
#include "update.h"
#include "variable.h"
#include <cstring>
#include "mscg.h"
using namespace LAMMPS_NS;
using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixMSCG::FixMSCG(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
{
if (narg < 4) error->all(FLERR,"Illegal fix mscg command");
nevery = utils::inumeric(FLERR,arg[3],false,lmp);
if (nevery <= 0) error->all(FLERR,"Illegal fix mscg command");
me = comm->me;
nprocs = comm->nprocs;
if (nprocs > 1) error->all(FLERR,"Fix mscg does not yet support parallel use via MPI");
if (sizeof(tagint) != sizeof(smallint))
error->all(FLERR,"Fix mscg must be used with 32-bit atom IDs");
// initialize
int natoms = atom->natoms;
int ntypes = atom->ntypes;
max_partners_bond = 4;
max_partners_angle = 12;
max_partners_dihedral = 36;
nframes = n_frames = block_size = 0;
range_flag = 0;
name_flag = 0;
f = nullptr;
type_names = new char*[natoms];
for (int i = 0; i < natoms; i++) type_names[i] = new char[24];
// parse remaining arguments
int iarg = 4;
while (iarg < narg) {
if (strcmp(arg[iarg],"range") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal fix mscg command");
range_flag = utils::logical(FLERR, arg[iarg+1], false, lmp);
iarg += 2;
} else if (strcmp(arg[iarg],"name") == 0) {
if (iarg+ntypes+1 > narg)
error->all(FLERR,"Illegal fix mscg command");
name_flag = 1;
for (int i = 0; i < ntypes; i++) {
iarg += 1;
delete[] type_names[i];
type_names[i] = utils::strdup(arg[iarg]);
}
iarg += 1;
} else if (strcmp(arg[iarg],"max") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal fix mscg command");
max_partners_bond = utils::inumeric(FLERR,arg[iarg+1],false, lmp);
max_partners_angle = utils::inumeric(FLERR,arg[iarg+2],false, lmp);
max_partners_dihedral = utils::inumeric(FLERR,arg[iarg+3],false, lmp);
iarg += 4;
} else error->all(FLERR,"Illegal fix mscg command");
}
if (name_flag == 0) {
for (int i = 0; i < natoms; i++) {
delete[] type_names[i];
type_names[i] = utils::strdup(std::to_string(i+1));
}
}
}
/* ---------------------------------------------------------------------- */
FixMSCG::~FixMSCG()
{
int natoms = atom->natoms;
for (int i = 0; i < natoms; i++) delete[] type_names[i];
delete[] type_names;
memory->destroy(f);
}
/* ---------------------------------------------------------------------- */
int FixMSCG::setmask()
{
int mask = 0;
mask |= END_OF_STEP;
return mask;
}
/* ---------------------------------------------------------------------- */
void FixMSCG::post_constructor()
{
if (domain->triclinic == 1)
error->all(FLERR,"Fix mscg does not yet support triclinic geometries");
// topology information
// sort by atom id to send to mscg lib
int natoms = atom->natoms;
int nlocal = atom->nlocal;
tagint *tag = atom->tag;
int *type = atom->type;
int *num_bond = atom->num_bond;
tagint **bond_atom = atom->bond_atom;
int *num_angle = atom->num_angle;
tagint **angle_atom1 = atom->angle_atom1;
tagint **angle_atom3 = atom->angle_atom3;
int *num_dihedral = atom->num_dihedral;
tagint **dihedral_atom1 = atom->dihedral_atom1;
tagint **dihedral_atom3 = atom->dihedral_atom3;
tagint **dihedral_atom4 = atom->dihedral_atom4;
double *prd_half = domain->prd_half;
int i,ii,j,jj,jnum,k,l;
n_cg_sites = natoms;
n_cg_types = atom->ntypes;
memory->grow(f,nlocal,3,"fix_mscg:f");
f1d = new double[n_cg_sites*3]();
x1d = new double[n_cg_sites*3]();
cg_site_types = new int[n_cg_sites]();
n_partners_bond = new unsigned[n_cg_sites]();
n_partners_angle = new unsigned[n_cg_sites]();
n_partners_dihedral = new unsigned[n_cg_sites]();
partners_bond = new unsigned*[n_cg_sites];
for (i = 0; i < n_cg_sites; i++)
partners_bond[i] = new unsigned[1*max_partners_bond]();
partners_angle = new unsigned*[n_cg_sites];
for (i = 0; i < n_cg_sites; i++)
partners_angle[i] = new unsigned[2*max_partners_angle]();
partners_dihedral = new unsigned*[n_cg_sites];
for (i = 0; i < n_cg_sites; i++)
partners_dihedral[i] = new unsigned[3*max_partners_dihedral]();
for (i = 0; i < 3; i++)
box_half_lengths[i] = prd_half[i];
for (i = 0; i < nlocal; i++) {
cg_site_types[i] = 0;
n_partners_bond[i] = 0;
n_partners_angle[i] = 0;
n_partners_dihedral[i] = 0;
}
for (ii = 0; ii < nlocal; ii++) {
i = tag[ii];
cg_site_types[i-1] = type[ii];
jnum = num_bond[ii];
for (jj = 0; jj < jnum; jj++) {
j = bond_atom[ii][jj];
if (n_partners_bond[i-1] >= max_partners_bond ||
n_partners_bond[j-1] >= max_partners_bond)
error->all(FLERR,"Bond list overflow, boost fix_mscg max");
partners_bond[i-1][n_partners_bond[i-1]] = j-1;
partners_bond[j-1][n_partners_bond[j-1]] = i-1;
n_partners_bond[i-1]++;
n_partners_bond[j-1]++;
}
jnum = num_angle[ii];
for (jj = 0; jj < jnum; jj++) {
j = angle_atom1[ii][jj];
k = angle_atom3[ii][jj];
if (n_partners_angle[j-1] >= max_partners_angle ||
n_partners_angle[k-1] >= max_partners_angle)
error->all(FLERR,"Angle list overflow, boost fix_mscg max");
partners_angle[j-1][n_partners_angle[j-1]*2] = i-1;
partners_angle[j-1][n_partners_angle[j-1]*2+1] = k-1;
partners_angle[k-1][n_partners_angle[k-1]*2] = i-1;
partners_angle[k-1][n_partners_angle[k-1]*2+1] = j-1;
n_partners_angle[j-1]++;
n_partners_angle[k-1]++;
}
jnum = num_dihedral[ii];
for (jj = 0; jj < jnum; jj++) {
j = dihedral_atom1[ii][jj];
k = dihedral_atom3[ii][jj];
l = dihedral_atom4[ii][jj];
if (n_partners_dihedral[j-1] >= max_partners_dihedral ||
n_partners_dihedral[l-1] >= max_partners_dihedral)
error->all(FLERR,"Dihedral list overflow, boost fix_mscg max");
partners_dihedral[j-1][n_partners_dihedral[j-1]*3] = i-1;
partners_dihedral[j-1][n_partners_dihedral[j-1]*3+1] = k-1;
partners_dihedral[j-1][n_partners_dihedral[j-1]*3+2] = l-1;
partners_dihedral[l-1][n_partners_dihedral[l-1]*3] = k-1;
partners_dihedral[l-1][n_partners_dihedral[l-1]*3+1] = i-1;
partners_dihedral[l-1][n_partners_dihedral[l-1]*3+2] = j-1;
n_partners_dihedral[j-1]++;
n_partners_dihedral[l-1]++;
}
}
// pass topology data to mscg code and run startup
fprintf(screen,"Initializing MSCG with topology data ...\n");
if (range_flag)
mscg_struct = rangefinder_startup_part1(mscg_struct);
else
mscg_struct = mscg_startup_part1(mscg_struct);
n_frames = get_n_frames(mscg_struct);
block_size = get_block_size(mscg_struct);
mscg_struct =
setup_topology_and_frame(mscg_struct,n_cg_sites,n_cg_types,type_names,
cg_site_types,box_half_lengths);
mscg_struct =
set_bond_topology(mscg_struct,partners_bond,n_partners_bond);
mscg_struct =
set_angle_topology(mscg_struct,partners_angle,n_partners_angle);
mscg_struct =
set_dihedral_topology(mscg_struct,partners_dihedral,n_partners_dihedral);
mscg_struct =
generate_exclusion_topology(mscg_struct);
if (range_flag)
mscg_struct = rangefinder_startup_part2(mscg_struct);
else
mscg_struct = mscg_startup_part2(mscg_struct);
}
/* ---------------------------------------------------------------------- */
void FixMSCG::init()
{
int nlocal = atom->nlocal;
double **force = atom->f;
int i;
// forces are reset to 0 before pre_force, saved here
// init called for each frame of dump in rerun command
for (i = 0; i < nlocal; i++) {
f[i][0] = force[i][0];
f[i][1] = force[i][1];
f[i][2] = force[i][2];
}
}
/* ---------------------------------------------------------------------- */
void FixMSCG::end_of_step()
{
if (domain->triclinic == 1)
error->all(FLERR,"Fix mscg does not yet support triclinic geometries");
int nlocal = atom->nlocal;
tagint *tag = atom->tag;
double **x = atom->x;
int i,ii,j;
// trajectory information
for (ii = 0; ii < nlocal; ii++) {
i = tag[ii];
for (j = 0; j < 3; j++) {
x1d[(i-1)*3+j] = x[ii][j];
f1d[(i-1)*3+j] = f[ii][j];
}
}
// pass x,f to mscg to update matrix
nframes++;
if (range_flag)
mscg_struct = rangefinder_process_frame(mscg_struct,x1d,f1d);
else
mscg_struct = mscg_process_frame(mscg_struct,x1d,f1d);
}
/* ---------------------------------------------------------------------- */
void FixMSCG::post_run()
{
// call mscg to solve matrix and generate output
fprintf(screen,"Finalizing MSCG ...\n");
if (nframes != n_frames)
error->warning(FLERR,"Fix mscg n_frames is inconsistent with control.in");
if (nframes % block_size != 0)
error->warning(FLERR,"Fix mscg n_frames is not divisible by block_size in control.in");
if (range_flag)
rangefinder_solve_and_output(mscg_struct);
else
mscg_solve_and_output(mscg_struct);
}

View File

@ -1,52 +0,0 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef FIX_CLASS
// clang-format off
FixStyle(mscg,FixMSCG);
// clang-format on
#else
#ifndef LMP_FIX_MSCG_H
#define LMP_FIX_MSCG_H
#include "fix.h"
namespace LAMMPS_NS {
class FixMSCG : public Fix {
public:
FixMSCG(class LAMMPS *, int, char **);
~FixMSCG() override;
int setmask() override;
void post_constructor() override;
void init() override;
void end_of_step() override;
void post_run() override;
private:
int range_flag, name_flag, me, nprocs;
int nframes, n_frames, block_size, n_cg_sites, n_cg_types, *cg_site_types;
int max_partners_bond, max_partners_angle, max_partners_dihedral;
unsigned *n_partners_bond, *n_partners_angle, *n_partners_dihedral;
unsigned **partners_bond, **partners_angle, **partners_dihedral;
double *x1d, *f1d, **f;
double box_half_lengths[3];
char **type_names;
void *mscg_struct;
};
} // namespace LAMMPS_NS
#endif
#endif

View File

@ -107,7 +107,6 @@ PACKAGE = \
molecule \
molfile \
mpiio \
mscg \
netcdf \
openmp \
opt \
@ -214,7 +213,6 @@ PACKLIB = \
kokkos \
lepton \
mpiio \
mscg \
poems \
python \
voronoi \
@ -252,7 +250,6 @@ PACKEXT = \
ml-pace \
ml-quip \
molfile \
mscg \
netcdf \
plumed \
qmmm \

View File

@ -51,6 +51,9 @@ FixDeprecated::FixDeprecated(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg,
} else if (my_style == "client/md") {
if (lmp->comm->me == 0)
utils::logmesg(lmp, "\nThe MESSAGE package has been replaced by the MDI package.\n\n");
} else if (my_style == "mscg") {
if (lmp->comm->me == 0)
utils::logmesg(lmp, "\nThe MSCG package has been removed from LAMMPS.\n\n");
}
error->all(FLERR, "This fix style is no longer available");
}