Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package votca-csg for openSUSE:Factory checked in at 2021-03-17 20:15:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/votca-csg (Old) and /work/SRC/openSUSE:Factory/.votca-csg.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "votca-csg" Wed Mar 17 20:15:22 2021 rev:23 rq:879444 version:2021 Changes: -------- --- /work/SRC/openSUSE:Factory/votca-csg/votca-csg.changes 2021-01-15 19:46:28.002043119 +0100 +++ /work/SRC/openSUSE:Factory/.votca-csg.new.2401/votca-csg.changes 2021-03-17 20:19:27.951277410 +0100 @@ -1,0 +2,61 @@ +Sat Mar 13 18:32:49 UTC 2021 - Christoph Junghans <[email protected]> + +- Update to 2021 + - fix CI on rawhide ([gh#votca/csg#642]) + - add auto-cancel workflow to GitHub Actions + ([gh#votca/csg#645]) + - namespace bind2nd to fix build on FreeBSD ([gh#votca/csg#668]) + - replace std::bind2nd by a lambda ([gh#votca/csg#673]) + +------------------------------------------------------------------- +Wed Jan 13 16:15:26 UTC 2021 - Christoph Junghans <[email protected]> + +- votca-csgapps package is now part of votca-csg +- votca-csg-doc is obsolete, no more pdf manual +- Update to 2021~rc1 + - remove topology item ([gh#votca/csg#486]) + - switch to local includes ([gh#votca/csg#487]) + - add default units to readers ([gh#votca/csg#483]) + - update bead related classes ([gh#votca/csg#475], + [gh#votca/csg#474], [gh#votca/csg#469], [gh#votca/csg#468], + [gh#votca/csg#460]) + - update boundary class ([gh#votca/csg#457]) + - fix usage of PROJECT_SOURCE_DIR in cmake ([gh#votca/csg#517]) + - document cmake options and packages ([gh#votca/csg#520]) + - drop WITH_GMX in cmake in favor of auto-detect + ([gh#votca/csg#523]) + - standardising include order and style in header files + ([gh#votca/csg#531]) + - make scripts always executable in builddir + ([gh#votca/csg#533], [gh#votca/csg#550], [gh#votca/csg#556]) + - rename REGRESSIONTEST_TOLERANCE to INTEGRATIONTEST_TOLERANCE + ([gh#votca/csg#534]) + - standardising include order and style in library files + ([gh#votca/csg#542]) + - move CI to GitHub Ations ([gh#votca/csg#551], + [gh#votca/csg#552], [gh#votca/csg#553], [gh#votca/csg#561], + [gh#votca/csg#562], [gh#votca/csg#593], [gh#votca/csg#617], + [gh#votca/csg#632]) + - format CMake internal cpp code ([gh#votca/csg#557]) + - update codacy badge ([gh#votca/csg#558]) + - convert markdown to rst format ([gh#votca/csg#559]) + - read units stored in H5MD file ([gh#votca/csg#549]) + - enable CXX only in CMake ([gh#votca/csg#560]) + - refactored tests to use files instead of data in source code + ([gh#votca/csg#572]) + - corrected max index in csg_resample ([gh#votca/csg#575]) + - add periodic extrapolation for dihedrals ([gh#votca/csg#576]) + - bump required CMake version to 3.12 ([gh#votca/csg#599]) + - Fixed boost test deprecation warnings ([gh#votca/csg#598]) + - improve error message for broken binaries ([gh#votca/csg#601]) + - Fixed memory leaks in tests and neighbourlist + ([gh#votca/csg#602]) + - format with clang-11 ([gh#votca/csg#604]) + - use unique_ptr in factory ([gh#votca/csg#603]) + - Convert remaining md files to rst ([gh#votca/csg#616]) + - merge csg-manual ([gh#votca/csg#621], [gh#votca/csg#622]) + - merge in csgapps repo ([gh#votca/csg#623]) + - Pdbs with more than 10000 resids can now be written + ([gh#votca/csg#627]) + +------------------------------------------------------------------- Old: ---- votca-csg-1.6.4.tar.gz votca-csg-manual-1.6.4.pdf votca-csg-tutorials-1.6.4.tar.gz New: ---- votca-csg-2021.tar.gz votca-csg-tutorials-2021.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ votca-csg.spec ++++++ --- /var/tmp/diff_new_pack.99VgDh/_old 2021-03-17 20:19:28.587278279 +0100 +++ /var/tmp/diff_new_pack.99VgDh/_new 2021-03-17 20:19:28.587278279 +0100 @@ -18,17 +18,16 @@ Name: votca-csg -Version: 1.6.4 +Version: 2021 Release: 0 -%define uversion %{version} -%define sover 6 +%define uversion %version +%define sover 2021 Summary: VOTCA coarse-graining engine License: Apache-2.0 Group: Productivity/Scientific/Chemistry URL: http://www.votca.org Source0: https://github.com/votca/csg/archive/v%{uversion}.tar.gz#/%{name}-%{uversion}.tar.gz Source1: https://github.com/votca/csg-tutorials/archive/v%{uversion}.tar.gz#/%{name}-tutorials-%{uversion}.tar.gz -Source2: https://github.com/votca/csg-manual/releases/download/v%{uversion}/votca-csg-manual-%{uversion}.pdf BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -40,11 +39,12 @@ BuildRequires: libboost_filesystem-devel BuildRequires: libboost_program_options-devel BuildRequires: libboost_system-devel +BuildRequires: libboost_regex-devel BuildRequires: libboost_test-devel BuildRequires: pkg-config - #for hdf5 BuildRequires: python3-txt2tags BuildRequires: votca-tools-devel = %{version} +# for hdf5 BuildRequires: zlib-devel #exact same version is needed @@ -52,6 +52,9 @@ Requires: libvotca_csg%sover = %{version} # The developer man page was wrongly shipped in the library package until votca 1.6 Conflicts: libvotca_csg5 +# no more pdf manual +Obsoletes: votca-csg-doc < 2021 +Provides: votca-csg-doc = %version-%release %description Versatile Object-oriented Toolkit for Coarse-graining Applications (VOTCA) is @@ -110,17 +113,19 @@ This package contains the tutorial documentation and sample data. -%package doc -Summary: Manual for VOTCA Coarse Graining Engine -Group: Documentation/Other -BuildArch: noarch +%package apps +Summary: VOTCA coarse-graining engine applications +Group: Productivity/Scientific/Chemistry +Obsoletes: votca-csgapps < 2021 +Provides: votca-csgapps = %version-%release -%description doc +%description apps Versatile Object-oriented Toolkit for Coarse-graining Applications (VOTCA) is a package to reduce the amount of routine work when doing systematic coarse-graining of various systems. The core is written in C++. -This package contains the PDF manual. +This package contains sample applications of the VOTCA Coarse Graining Engine. +Previously packages as votca-csgapps. %package bash Summary: Bash completion for votca @@ -146,7 +151,8 @@ tar -xzf %{S:1} %build -%{cmake} -DWITH_RC_FILES=OFF -DCMAKE_SKIP_RPATH:BOOL=OFF -DWITH_H5MD=ON -DWITH_GMX=ON -DENABLE_TESTING=ON -DREGRESSIONTEST_TOLERANCE="2.1e-5" +%{cmake} -DCMAKE_SKIP_RPATH=OFF -DBUILD_CSGAPPS=ON -DENABLE_TESTING=ON +#-DINTEGRATIONTEST_TOLERANCE="2.1e-5" %cmake_build %install @@ -158,9 +164,6 @@ cp %{buildroot}%{_datadir}/votca/rc/csg-completion.bash %{buildroot}%{_datadir}/bash_completion.d/votca %define pkgdocdir %{_docdir}/%{name} -mkdir -p %{buildroot}%{pkgdocdir} -cp %{S:2} %{buildroot}%{pkgdocdir} - mkdir -p %{buildroot}%{pkgdocdir}/examples cp -r csg-tutorials-%{uversion}/* %{buildroot}%{pkgdocdir}/examples sed -i '1s@env @@' %{buildroot}%{pkgdocdir}/examples/LJ1-LJ2/imc/svd.py @@ -168,21 +171,22 @@ %fdupes %{buildroot}%{_prefix} #check -make -C build test CTEST_OUTPUT_ON_FAILURE=1 %{?testargs} +%ctest %post -n libvotca_csg%sover -p /sbin/ldconfig %postun -n libvotca_csg%sover -p /sbin/ldconfig %files -%doc CHANGELOG.md NOTICE README.md LICENSE +%doc CHANGELOG.rst NOTICE.rst README.rst +%license LICENSE.rst %{_bindir}/csg_* +%exclude %{_bindir}/csg_{fluctuations,orientcorr,part_dist,partial_rdf,radii,sphericalorder,traj_force} %{_mandir}/man1/* %{_mandir}/man7/* %exclude %{pkgdocdir}/examples -%exclude %{pkgdocdir}/*.pdf -%files doc -%{pkgdocdir}/*.pdf +%files apps +%{_bindir}/csg_{fluctuations,orientcorr,part_dist,partial_rdf,radii,sphericalorder,traj_force} %files tutorials %{pkgdocdir}/examples @@ -191,7 +195,7 @@ %{_datadir}/votca %files -n libvotca_csg%sover -%doc LICENSE +%license LICENSE.rst %{_libdir}/libvotca_csg.so.%{sover} %files devel ++++++ votca-csg-1.6.4.tar.gz -> votca-csg-2021.tar.gz ++++++ ++++ 194426 lines of diff (skipped) ++++++ votca-csg-tutorials-1.6.4.tar.gz -> votca-csg-tutorials-2021.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/csg-tutorials-1.6.4/.github/workflows/continuous-integration-workflow.yml new/csg-tutorials-2021/.github/workflows/continuous-integration-workflow.yml --- old/csg-tutorials-1.6.4/.github/workflows/continuous-integration-workflow.yml 2021-01-12 19:26:41.000000000 +0100 +++ new/csg-tutorials-2021/.github/workflows/continuous-integration-workflow.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,80 +0,0 @@ -name: CI -on: - pull_request: - branches: - - master - - stable - -jobs: - CI: - continue-on-error: ${{ matrix.distro == 'ubuntu:devel' || matrix.distro == 'opensuse:latest' || matrix.distro == 'fedora:rawhide' || matrix.continue-on-error == true }} - strategy: - matrix: - distro: ['fedora:latest', 'fedora:rawhide', 'opensuse:latest', 'ubuntu:18.04'] - toolchain: [gnu] - cmake_build_type: [Release] - minimal: [false] - own_gmx: [false] - module_build: [false] - coverage: [false] - include: - - distro: 'fedora:nogmx' - toolchain: gnu - cmake_build_type: Release - own_gmx: true - - distro: 'fedora:latest' - toolchain: gnu - cmake_build_type: Release - module_build: true - - distro: 'fedora:gmx2019' - toolchain: gnu - cmake_build_type: Release - - distro: 'fedora:gmx2019_d' - toolchain: gnu - cmake_build_type: Release - runs-on: ubuntu-latest - container: ghcr.io/votca/buildenv/${{ matrix.distro }} - steps: - - uses: actions/[email protected] - with: - fetch-depth: 0 - - name: Run Votca Setup - id: setup - uses: votca/actions/setup@master - with: - distro: ${{ matrix.distro }} - toolchain: ${{ matrix.toolchain }} - minimal: ${{ matrix.minimal == true }} - module: ${{ matrix.module_build == true }} - own_gmx: ${{ matrix.own_gmx == true }} - regression_testing: ${{ matrix.no_regression_testing != true }} - coverage: ${{ matrix.coverage }} - cmake_build_type: ${{ matrix.cmake_build_type }} - ctest_args: ${{ matrix.ctest_args }} - cmake_args: ${{ matrix.cmake_args }} - - uses: actions/cache@v2 - with: - path: ~/.ccache - key: ${{ steps.setup.outputs.cache_key }} - restore-keys: ${{ steps.setup.outputs.cache_restore_key }} - - name: CMake - run: mkdir builddir && cd builddir && cmake ${{ steps.setup.outputs.cmake_args }} ../votca - - name: Build - run: | - ccache -z - cmake --build builddir -- -j ${{ steps.setup.outputs.jobs }} - ccache -s - - name: Tests - run: ctest --output-on-failure ${{ steps.setup.outputs.ctest_args }} - working-directory: builddir - - name: Build Sphinx - if: ${{ steps.setup.outputs.build_sphinx == 'true' }} - run: cmake --build builddir --target doc - - name: Test DESTDIR Install - if: ${{ ! matrix.module_build }} - run: DESTDIR=${PWD}/install cmake --build builddir --target install && rm -rf ${PWD}/install/usr && rmdir ${PWD}/install - - name: Install - run: sudo cmake --build builddir --target install - - name: Check for untracked files - run: git status --porcelain && git status --porcelain | sed Q1 - working-directory: votca/${{ steps.setup.outputs.module }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/csg-tutorials-1.6.4/.github/workflows/create-pr.yml new/csg-tutorials-2021/.github/workflows/create-pr.yml --- old/csg-tutorials-1.6.4/.github/workflows/create-pr.yml 2021-01-12 19:26:41.000000000 +0100 +++ new/csg-tutorials-2021/.github/workflows/create-pr.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,37 +0,0 @@ -name: Create PR -on: - push: - branches: - - stable - -jobs: - PR: - name: Create - if: github.repository_owner == 'votca' - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@master - with: - ref: ${{ github.event.ref }} - fetch-depth: 0 - token: ${{ secrets.VOTCA_BOT_TOKEN }} - - name: Try to merge master branch - run: | - git config --global user.name "Votca Bot" - git config --global user.email "[email protected]" - git checkout -b stable_fixes - git merge origin/master || true - git push origin stable_fixes - - name: Create Pull Request - uses: actions/[email protected] - with: - github-token: ${{ secrets.VOTCA_BOT_TOKEN }} - script: | - github.pulls.create({ - owner: 'votca', - repo: 'csg-tutorials', - title: 'Fixes from stable', - head: 'stable_fixes', - base: 'master' - }) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/csg-tutorials-1.6.4/.github/workflows/create-release.yml new/csg-tutorials-2021/.github/workflows/create-release.yml --- old/csg-tutorials-1.6.4/.github/workflows/create-release.yml 2021-01-12 19:26:41.000000000 +0100 +++ new/csg-tutorials-2021/.github/workflows/create-release.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -name: Make Release -on: - push: - tags: - - 'v[1-9]*' - -jobs: - release: - name: Make Release - if: github.repository_owner == 'votca' - runs-on: ubuntu-latest - steps: - - name: Create Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.VOTCA_BOT_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - prerelease: ${{ contains(github.ref, 'rc') }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/csg-tutorials-1.6.4/.github/workflows/forward-to-votca.yml new/csg-tutorials-2021/.github/workflows/forward-to-votca.yml --- old/csg-tutorials-1.6.4/.github/workflows/forward-to-votca.yml 2021-01-12 19:26:41.000000000 +0100 +++ new/csg-tutorials-2021/.github/workflows/forward-to-votca.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -name: Forward -on: - push: - branches: - - master - - stable - -jobs: - VOTCA: - if: github.repository_owner == 'votca' - runs-on: ubuntu-latest - steps: - - name: Update submodule - uses: votca/actions/forward@master - with: - module: ${{ github.repository }} - token: ${{ secrets.VOTCA_BOT_TOKEN }} - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/csg-tutorials-1.6.4/.gitignore new/csg-tutorials-2021/.gitignore --- old/csg-tutorials-1.6.4/.gitignore 2021-01-12 19:26:41.000000000 +0100 +++ new/csg-tutorials-2021/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,34 +0,0 @@ -*~ -.*.swp -*/*/step_* -*.orig - -Makefile -rules.ninja -build.ninja -.ninja_* -build -.project -.cproject -CMakeFiles -install_manifest.txt -cmake_install.cmake -cmake_uninstall.cmake -CMakeCache.txt - -topol.tpr -traj.trr -traj.xtc -md.log -mdout.mdp -state*.cpt -ener.edr -confout.gro -\#* - -*.pot.* -!*.pot.in -*.force -angle.dist.* -bond.dist.* -*.log diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/csg-tutorials-1.6.4/CMakeLists.txt new/csg-tutorials-2021/CMakeLists.txt --- old/csg-tutorials-1.6.4/CMakeLists.txt 2021-01-12 19:26:41.000000000 +0100 +++ new/csg-tutorials-2021/CMakeLists.txt 2021-03-13 02:24:23.000000000 +0100 @@ -1,22 +1,31 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.12) -project(csg-tutorials) +project(csg-tutorials LANGUAGES NONE) -set(PROJECT_VERSION "1.6.4") +set(PROJECT_VERSION "2021") # Cmake modules/macros are in a subdirectory to keep this file cleaner set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules) +# not used, but stops GNUInstallDirs.cmake from warning +set(CMAKE_INSTALL_LIBDIR "lib64") include(GNUInstallDirs) +include(FeatureSummary) option(ENABLE_REGRESSION_TESTING "Build and copy regression testing stuff" OFF) +add_feature_info(ENABLE_REGRESSION_TESTING ENABLE_REGRESSION_TESTING "Enable regression tests") if(ENABLE_REGRESSION_TESTING) option(ENABLE_EXPERIMENTAL_TESTS "Run more unstable regression tests as well" OFF) + add_feature_info(ENABLE_EXPERIMENTAL_TESTS ENABLE_EXPERIMENTAL_TESTS "Enable experimental regression tests") + enable_language(CXX) # needed by mpi for VOTCA_CSG enable_testing() find_package(LMP) + set_package_properties(LMP PROPERTIES TYPE OPTIONAL PURPOSE "Lammps binary needed to run lammps regression tests") find_package(MDRUN_MPI) + set_package_properties(MDRUN_MPI PROPERTIES TYPE OPTIONAL PURPOSE "gromacs mpi binary needed to run parallel gromacs regression tests") if(MDRUN_MPI_FOUND) find_package(MPI) + set_package_properties(MPI PROPERTIES TYPE OPTIONAL PURPOSE "mpiexec binary needed to run parallel gromacs regression tests") set(NPROCS 4 CACHE STRING "# processes for testing") if(DEFINED MPIEXEC_MAX_NUMPROCS AND NPROCS GREATER MPIEXEC_MAX_NUMPROCS) message(WARNING "NPROCS(${NPROCS}) bigger than MPIEXEC_MAX_NUMPROCS(${MPIEXEC_MAX_NUMPROCS}) appending '--oversubscribe'") @@ -24,8 +33,13 @@ endif() endif() find_package(ESPRESSO) + set_package_properties(ESPRESSO PROPERTIES TYPE OPTIONAL PURPOSE "ESPResSo MD python module needed to run ESPResSo MD regression tests") find_package(CMA) + set_package_properties(CMA PROPERTIES TYPE OPTIONAL PURPOSE "CMA python module needed to run CMA regression tests") + find_package(Gnuplot) + set_package_properties(Gnuplot PROPERTIES TYPE OPTIONAL PURPOSE "gnuplot needed to run CMA/simplex regression tests") find_package(VOTCA_CSG NO_MODULE REQUIRED) + set_package_properties(VOTCA_CSG PROPERTIES TYPE REQUIRED PURPOSE "VOTCA csg binaries used in testing") if(DEFINED VOTCA_CSG_VERSION AND NOT VOTCA_CSG_VERSION STREQUAL PROJECT_VERSION) message(FATAL_ERROR "Incompatible VOTCA CSG version found (needed ${PROJECT_VERSION}, found ${VOTCA_CSG_VERSION})") endif() @@ -58,6 +72,9 @@ if(NOT CMA_FOUND AND DIR MATCHES "cma/") continue() endif() + if(NOT Gnuplot_FOUND AND DIR MATCHES "(cma/|simplex|realtime)") + continue() + endif() if(NOT ENABLE_EXPERIMENTAL_TESTS) if(DIR MATCHES "some/broken/test") continue() @@ -105,23 +122,41 @@ message(STATUS "Use VOTCASHARE=${VOTCA_SHARE} PATH=${VOTCA_PATH}:\$PATH VOTCA_CSG_DEFAULTS=${VOTCA_CSG_DEFAULTS} for out-of-cmake testing") endif() +if(VOTCA_SPHINX_DIR) + file(GLOB RSTS ${CMAKE_CURRENT_SOURCE_DIR}/guide/*.rst) + set(MANUAL_RST_FILES) + foreach(_RST ${RSTS}) + get_filename_component(_FILE "${_RST}" NAME) + add_custom_command(OUTPUT ${VOTCA_SPHINX_DIR}/csg-tutorials/${_FILE} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${_RST} ${VOTCA_SPHINX_DIR}/csg-tutorials/${_FILE} + DEPENDS ${_RST}) + list(APPEND MANUAL_RST_FILES ${VOTCA_SPHINX_DIR}/csg-tutorials/${_FILE}) + endforeach() + add_custom_target(doc-csg-tutorials DEPENDS ${MANUAL_RST_FILES} ${MANUAL_PNG_FILES}) +endif() + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${CMAKE_INSTALL_DATADIR}/votca/csg-tutorials PATTERN ".git*" EXCLUDE PATTERN "step_*" EXCLUDE PATTERN "CMake*" EXCLUDE PATTERN "cmake_install.cmake" EXCLUDE PATTERN "install_manifest.txt" EXCLUDE PATTERN "*~" EXCLUDE PATTERN "inverse.log" EXCLUDE) -configure_file(${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake IMMEDIATE @ONLY) +configure_file(${PROJECT_SOURCE_DIR}/CMakeModules/cmake_uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake IMMEDIATE @ONLY) option(ENABLE_TESTING "Test if cmake worked" OFF) +add_feature_info(ENABLE_TESTING ENABLE_TESTING "Enable unit tests") if(ENABLE_TESTING) enable_testing() add_test(regression_UninstallExists ${CMAKE_COMMAND} -DFileToCheck=${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake -P ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/FileExists.cmake) - set_tests_properties(regression_UninstallExists PROPERTIES LABELS "regression") + set_tests_properties(regression_UninstallExists PROPERTIES LABELS "csg-tutorials;votca") endif(ENABLE_TESTING) add_custom_target(uninstall-csg-tutorials COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) if(NOT TARGET uninstall) add_custom_target(uninstall) endif() add_dependencies(uninstall uninstall-csg-tutorials) + +if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) + feature_summary(INCLUDE_QUIET_PACKAGES WHAT ALL) +endif (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/csg-tutorials-1.6.4/README new/csg-tutorials-2021/README --- old/csg-tutorials-1.6.4/README 2021-01-12 19:26:41.000000000 +0100 +++ new/csg-tutorials-2021/README 1970-01-01 01:00:00.000000000 +0100 @@ -1,95 +0,0 @@ -This is a collection of coarse-graining tutorials using the -VOTCA package. Further information on VOTCA can be found at -http://www.votca.org - -The development of VOTCA is mainly funded by academic research grants. -If you use this package, please cite the VOTCA papers: - -* Versatile Object-oriented Toolkit for Coarse-graining Applications, - V.Ruehle, C. Junghans, A. Lukyanov, K. Kremer, D. Andrienko, - J. Chem. Theo. Comp. 5 (12), 3211 (2009) - -* Hybrid approaches to coarse-graining using the VOTCA package: liquid hexane, - V. Ruehle and C. Junghans, - Macromol. Theory Simul. 20, 472 (2011) - -* Relative entropy and optimization-driven coarse-graining methods in VOTCA, - S. Y. Mashayak, M. N. Jochum, K. Koschke, N. R. Aluru, V. Ruehle, and C. Junghans, - to appear in PLoS ONE (2015) - -In case of questions, please post them in the google discussion group -for votca at http://groups.google.com/group/votca - -You can contact the VOTCA Development Team at [email protected]. - - -The following tutorials (compare with paper above) are included. They all rely -on Gromacs unless specified otherwise: - -spce/atomistic atomistic reference simulations for SPC/E water -spce/force_matching force matching for SPC/E water -spce/ibi iterative boltzmann inversion for SPC/E water -spce/ibi_pressure iterative boltzmann inversion for SPC/E water with simple pressure correction -spce/ibi_pressure_wjk iterative boltzmann inversion for SPC/E water with wjk pressure correction -spce/ibi_hoomd-blue iterative boltzmann inversion for SPC/E water using hoomd-blue -spce/ibi_dlpoly iterative boltzmann inversion for SPC/E water using dl_poly -spce/ibi_espresso iterative boltzmann inversion for SPC/E water using ESPResSo -spce/ibi_espressopp iterative boltzmann inversion for SPC/E water using ESPResSo++ -spce/ibi_lammps iterative boltzmann inversion for SPC/E water using LAMMPS -spce/ibi_gromacs-multi iterative boltzmann inversion for SPC/E water using GROMACS' multidir feature -spce/imc inverse monte carlo for SPC/E water -spce/re relative entropy method for SPC/E water -spce/re_lammps relative entropy method for SPC/E water using LAMMPS -spce/realtime iterative boltzmann inversion realtime tutorial for SPC/E water -spce/realtime_lammps iterative boltzmann inversion realtime tutorial for SPC/E water using LAMMPS -spce/simplex simplex optimization for SPC/E water -spce/simplex/simple optimizing the rdf -spce/simplex/pressure optimizing the rdf and pressure -spce/simplex/density optimizing the rdf and density -spce/cma cma optimization for SPC/E water -spce/cma/simple optimizing the rdf -spce/cma/density optimizing the rdf and the density - -methanol/atomistic atomistic simulations for methanol -methanol/force_matching force matching for methanol -methanol/ibi iterative boltzmann inversion for methanol -methanol/imc inverse monte carlo for methanol -methanol/imc_gromacs-remd inverse monte carlo for methanol with REMD (only for gromacs) during iterations - -propane/atomistic atomistic simulations for liquid propane -propane/ibi iterative boltzmann inversion for nonbonded - interactions of liquid propane -propane/imc inverse monte carlo for nonbonded - interactions of liquid propane -propane/single_chain atomistic simulations, boltzmann inversion - and force matching for a single chain of propane - -hexane/atomistic atomistic simulations for liquid hexane -hexane/force_matching force matching (bonded and nonbonded interactions of liquid hexane -hexane/ibi_all iterative boltzmann inversion for bonded and nonbonded - interactions of liquid hexane -hexane/ibi_nonbonded iterative boltzmann inversion for only nonbonded - interactions of liquid hexane -hexane/hybrid_force_matching hybrid force matching of only nonbonded interactions - (with bonded interactions from boltzmann inversion) - -methanol-water methanol-water mixture for 3 different concentrations -methanol-water/*/atomistic atomistic simulations -methanol-water/*/re relative entropy method -methanol-water/*/simplex simplex optimizing - - -urea-water/atomistic atomistic reference simulations urea-water mixture -urea-water/kb-ibi Kirkwood-Buff coarse-graining (see Ganguly et al. - J. Chem. Theo. Comp., 8, 1802 (2012) for details) -urea-water/cibi Coordination iterative??Boltzmann??inversion (see - T. E. de Oliveira et al., JCP 144, 174106 (2016) - for details) - different molarity than kb-ibi -urea-water/cibi/pre IBI preparation run for cibi -urea-water/ibi boltzmann inversion (to compare to kb-ibi) - -LJ1-LJ2/imc regularization of inverse Monte-Carlo (see Rosenberger et al. - Eur. Phys. J. Special Topics 225, 1323-1345 (2016) for details) - -Each of the tutorials contains a run.sh which lists all commands -needed to execute the tutorial. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/csg-tutorials-1.6.4/README.rst new/csg-tutorials-2021/README.rst --- old/csg-tutorials-1.6.4/README.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/csg-tutorials-2021/README.rst 2021-03-13 02:24:23.000000000 +0100 @@ -0,0 +1,132 @@ +|Codacy Badge| |codecov| |CI| |DOI| + +This is a collection of coarse-graining tutorials using the VOTCA +package. Further information on VOTCA can be found at +http://www.votca.org + +The development of VOTCA is mainly funded by academic research grants. +If you use this package, please cite the VOTCA papers: + +- | *Relative entropy and optimization-driven coarse-graining methods + in VOTCA*, + | S.Y. Mashayak, M. Jochum, K. Koschke, N.R. Aluru, V. Ruehle, and C. + Junghans, + | `PLoS one 10, e131754 + (2015) <http://dx.doi.org/10.1371/journal.pone.0131754>`__. + +- | *Hybrid approaches to coarse-graining using the VOTCA package: + liquid hexane*, + | V. Ruehle and C. Junghans, + | `Macromol. Theory Simul. 20, 472 + (2011) <http://dx.doi.org/10.1002/mats.201100011>`__. + +- | *Versatile Object-oriented Toolkit for Coarse-graining + Applications*, + | V.Ruehle, C. Junghans, A. Lukyanov, K. Kremer, and D. Andrienko, + | `J. Chem. Theo. Comp. 5 (12), 3211 + (2009) <http://dx.doi.org/10.1021/ct900369w>`__. + +In case of questions, please post them in the google discussion group +for votca at http://groups.google.com/group/votca + +You can contact the VOTCA Development Team at [email protected]. + +The following tutorials (compare with paper above) are included. They +all rely on Gromacs unless specified otherwise: + +- ``spce/atomistic``: atomistic reference simulations for SPC/E water +- ``spce/force_matching``: force matching for SPC/E water +- ``spce/ibi``: iterative boltzmann inversion for SPC/E water +- ``spce/ibi_pressure``: iterative boltzmann inversion for SPC/E water + with simple pressure correction +- ``spce/ibi_pressure_wjk``: iterative boltzmann inversion for SPC/E + water with wjk pressure correction +- ``spce/ibi_hoomd-blue``: iterative boltzmann inversion for SPC/E + water using hoomd-blue +- ``spce/ibi_dlpoly``: iterative boltzmann inversion for SPC/E water + using dl\_poly +- ``spce/ibi_espresso``: iterative boltzmann inversion for SPC/E water + using ESPResSo +- ``spce/ibi_espressopp``: iterative boltzmann inversion for SPC/E + water using ESPResSo++ +- ``spce/ibi_lammps``: iterative boltzmann inversion for SPC/E water + using LAMMPS +- ``spce/ibi_gromacs-multi``: iterative boltzmann inversion for SPC/E + water using GROMACS' multidir feature +- ``spce/imc`` inverse monte carlo for SPC/E water +- ``spce/re``: relative entropy method for SPC/E water +- ``spce/re_lammps``: relative entropy method for SPC/E water using + LAMMPS +- ``spce/realtime``: iterative boltzmann inversion realtime tutorial + for SPC/E water +- ``spce/realtime_lammps``: iterative boltzmann inversion realtime + tutorial for SPC/E water using LAMMPS +- ``spce/simplex``: simplex optimization for SPC/E water + + - ``spce/simplex/simple``: optimizing the rdf + - ``spce/simplex/pressure``: optimizing the rdf and pressure + - ``spce/simplex/density``: optimizing the rdf and density + +- ``spce/cma``: cma optimization for SPC/E water + + - ``spce/cma/simple``: optimizing the rdf + - ``spce/cma/density``: optimizing the rdf and the density + +- ``methanol/atomistic``: atomistic simulations for methanol +- ``methanol/force_matching``: force matching for methanol +- ``methanol/ibi``: iterative boltzmann inversion for methanol +- ``methanol/imc``: inverse monte carlo for methanol +- ``methanol/imc_gromacs-remd``: inverse monte carlo for methanol with + REMD (only for gromacs) during iterations + +- ``propane/atomistic``: atomistic simulations for liquid propane +- ``propane/ibi``: iterative boltzmann inversion for nonbonded + interactions of liquid propane +- ``propane/imc``: inverse monte carlo for nonbonded interactions of + liquid propane +- ``propane/single_chain``: atomistic simulations, boltzmann inversion + and force matching for a single chain of propane + +- ``hexane/atomistic``: atomistic simulations for liquid hexane +- ``hexane/force_matching``: force matching (bonded and nonbonded + interactions of liquid hexane +- ``hexane/ibi_all``: iterative boltzmann inversion for bonded and + nonbonded interactions of liquid hexane +- ``hexane/ibi_nonbonded``: iterative boltzmann inversion for only + nonbonded interactions of liquid hexane +- ``hexane/hybrid_force_matching``: hybrid force matching of only + nonbonded interactions (with bonded interactions from boltzmann + inversion) + +- ``methanol-water``: methanol-water mixture for 3 different + concentrations + + - \`methanol-water/\*/atomistic atomistic simulations + - ``methanol-water/*/re``: relative entropy method + - ``methanol-water/*/simplex``: simplex optimizing + +- ``urea-water/atomistic``: atomistic reference simulations urea-water + mixture +- ``urea-water/kb-ibi``: Kirkwood-Buff coarse-graining (see Ganguly et + al. J. Chem. Theo. Comp., 8, 1802 (2012) for details) +- ``urea-water/cibi``: Coordination iterative??Boltzmann??inversion (see + T. E. de Oliveira et al., JCP 144, 174106 (2016) for details) - + different molarity than kb-ibi +- ``urea-water/cibi/pre``: IBI preparation run for cibi +- ``urea-water/ibi``: boltzmann inversion (to compare to kb-ibi) + +- ``LJ1-LJ2/imc``: regularization of inverse Monte-Carlo (see + Rosenberger et al. Eur. Phys. J. Special Topics 225, 1323-1345 (2016) + for details) + +Each of the tutorials contains a ``run.sh`` which lists all commands +needed to execute the tutorial. + +.. |Codacy Badge| image:: https://app.codacy.com/project/badge/Grade/677ff88de55e46ee9411e2eaa6248e0c + :target: https://www.codacy.com/gh/votca/csg-tutorials?utm_source=github.com&utm_medium=referral&utm_content=votca/csg-tutorials&utm_campaign=Badge_Grade +.. |codecov| image:: https://codecov.io/gh/votca/csg-tutorials/branch/master/graph/badge.svg + :target: https://codecov.io/gh/votca/csg-tutorials +.. |CI| image:: https://github.com/votca/votca/workflows/CI/badge.svg?branch=master + :target: https://github.com/votca/votca/actions?query=workflow%3ACI+branch%3Amaster +.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3902713.svg + :target: https://doi.org/10.5281/zenodo.3902713 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/csg-tutorials-1.6.4/guide/README.md new/csg-tutorials-2021/guide/README.md --- old/csg-tutorials-1.6.4/guide/README.md 2021-01-12 19:26:41.000000000 +0100 +++ new/csg-tutorials-2021/guide/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,280 +0,0 @@ -# Votca Tutorial Guide - -(Based on the 2011-2017 CECAM meetings) - -Please pick topics you are most interested in, since finishing the tutorial might take longer than one afternoon. - -# Installation - -## Building VOTCA - -The simplest way is to use CMake: - -```bash -prefix=~/votca -version=master # or 'stable' or 'v1.4.1' -git clone -b ${version} --recursive https://github.com/votca/votca.git -cd votca -mkdir build -cd build -cmake -DCMAKE_INSTALL_PREFIX=${prefix} .. -make -j5 -make install -``` - -To build a gromacs version for VOTCA use - -```bash -cmake -DBUILD_OWN_GROMACS=ON .. -make -j5 -make install -``` - -## Using the tutorials - -All the tutorials are in the installation folder, i.e. `${prefix}/share/votca/csg-tutorials`. - -## Downloading the manual - -The corresponding version of the manual can be found on [github](https://github.com/votca/csg-manual/releases) (development version [here](http://doc.votca.org/manual.pdf)). - -# Running GROMACS - -The tutorial uses GROMACS, a molecular dynamics (MD) package, for generating the reference data. If you are not familiar with GROMACS, please read the following section for a brief overview on how to set up and run MD simulations using GROMACS. You can find all the GROMACS input files in the `atomistic` folder of each tutorial, e.g., for a box of atomistic water see `csg-tutorials/spce/atomistic/`. - -## Input files - -You will need four files to run MD simulations -* `conf.gro` - stores the coordinates of the molecule(s). It can be viewed with vmd. The default file name is `conf.gro`. -* `grompp.mdp` - stores all simulation options, such as time step, number of simulation steps, etc. -* `topol.top` - topology of the molecule -* `forcefield.itp` - description of the atomistic force-field (not always needed) - -During this tutorial, you will need to modify -* `nsteps` - number of MD steps -* `nstxout` - output frequency of coordinates to the trajectory file traj.trr -* `nstfout` - output frequency of forces to traj.trr -* `nstxout-compressed` - output frequency to the traj.xtc file, often used by the iterative Boltzmann inversion method -* `nstlog` - output frequency of the md.log file -* `nstenergy` - output frequency to the ener.edr file containing all thermodynamic information - -## MD simulations - -To run MD simulations using GROMACS, first one must create a binary topology file `topol.tpr` using the `gmx grompp` program. Then run the MD integrator using the `gmx mdrun` program. `topol.tpr` contains `conf.gro`, `grompp.mdp`, `topol.top`, and `forcefield.itp`. - -```bash -gmx grompp -c conf.gro # -c is needed if other than conf.gro file is used -gmx mdrun -v # -v (verbose) gives the estimate of the run time -``` - -# Running other MD programs - -In addition to GROMACS, VOTCA supports `ESPResSo`, `Lammps`, `dl_poly`, `HOOMD-blue`, and `ESPResSo++`. The interface to these is a bit more advanced, meaning VOTCA will allow you to do more crazy things and warn you less about settings, which might not make sense at all. Let's have a look at `csg-tutorials/spce/espressopp/`. (`ibi_lammps`, `ibi_espresso`, `ibi_dlpoly`, and `ibi_hoomd-blue` are pretty similar) - -Input files - -Here is an example of the ESPResSo++ input files to run the CG MD simulations of the Iterative Boltzmann inversion procedure. - -* `conf.gro` - stores the coordinates of the molecule(s). It can be viewed with vmd. A pdb or xyz file would be okay, too. -* `spce.py` is the simulation script which will be called by csg_inverse. It stores the whole simulation procedure. -* `topol.xml` -topology of the molecule, defined in the initial condition. This is needed as most gro/pdb/xyz files have no molecule definition in them. - - -# Mapping an atomistic trajectory onto a coarse-grained trajectory - -## SPC/E Water - -Folder: `csg-tutorials/spce/atomistic/` - -Have a look at the center of mass mapping file `water.xml` in this folder. Use `csg_map` to create a coarse-grained configuration (adjust the corresponding command in the `run.sh` script to map `conf.gro` instead of `confout.gro`). Visualize both configurations with vmd. (execute `vmd conf.gro &`) - -Create a mapping file where the center of a coarse-grained water molecule is not the center of mass, but a different one, e.g., the charge center of the atomistic one. - -Run a short MD simulation of a box of SPC/E water using GROMACS. (This is needed later for the different coarse-graining (CG) methods.) The input files are in the same folder (`csg-tutorials/spce/atomistic/`). Due to limited time, decrease the number of steps (`nsteps`) in `grompp.mdp` to a reasonable value (`5000-10000`) and adjust the output frequency of the trajectory, .log, and .edr files to, e.g., 50-100 (`nstxout`, `nstfout`, `nstlog`, nstenergy): - -```bash -gmx grompp # combines conf.gro, topol.top, and grompp.mdp, and forcefield.itp (which is in the gromos43a1.ff folder of GROMACS) into topol.tpr -gmx mdrun -v # runs MD integrator. The trajectory is saved to traj.trr -``` - -Map this short atomistic trajectory to a CG trajectory using `csg_map` (adjust the corresponding line in the `run.sh` script to map `traj.trr` onto `traj_cg.trr` instead of `conf(out).gro` to `conf_cg.gro`.) - - -# Iterative Boltzmann inversion (IBI) for SPC/E water - -Here, a one-site coarse-grained (CG) model of a rigid 3-site water molecule (SPC/E model) is constructed (see the previous section of the tutorial) using the iterative Boltzmann inversion (IBI) method. The center of the CG bead is chosen to be the center of mass (COM) of a molecule. The target radial distribution function (RDF) is calculated from the CG bead coordinates obtained by mapping the reference atomistic trajectory. In the last step, a coarse-grained potential is obtained by matching the RDFs of the atomisitc and CG systems using the IBI method. For a more detailed description, look at the following [publication](http://pubs.acs.org/doi/abs/10.1021/ct900369w). - -## Atomistic simulation - -A short atomistic MD simulation has been already run in the last part of the previous section (see folder: `csg-tutorials/spce/atomistic/`). You can extract all thermodynamic information (total energy, kinetic energy, pressure, etc.) from the binary `ener.edr` file using `gmx energy`. Running the `Extract_Energies.sh` script does this for you (see the corresponding command line in the `run.sh` script). It creates an additional subfolder `energies` with all thermodynamic information: - -```bash -./Extract_Energies.sh $equi # The argument $equi is optional. If provided, analysis will start at the corresponding time frame (in GROMACS units, ps) (e.g. 1 to 5) -``` - -## Calculation of RDF - -Once again, check the mapping file `water.xml`. Atom names listed in the definition of the COM bead should correspond to those used in the `conf.gro` file. You can use `csg_dump` to check this: - -```bash -csg_dump --top topol.tpr -``` - -Check the options file `settings.xml`. It contains the section of the corresponding non-bonded interaction (`CG-CG`). After this, calculate the center of mass RDF: - -```bash -csg_stat --top topol.tpr --trj traj.trr --cg water.xml --options settings.xml (--nt 3 --begin $equi) # ( ) denotes additional options: --nt # number of threads to run calculation in parallel with more then one threads (e.g. 3), --begin # time frame in GROMACS units (ps) to start analysis (e.g. 1 to 5) -``` -Compare your RDF with `CG-CG.dist.tgt` in `csg-tutorials/spce/ibi/` which has been calculated with a much longer atomistic simulation run. - - -## Running IBI - -Now switch to the folder: `csg-tutorials/spce/ibi/`. Reduce the number of MD steps in `grompp.mdp` and adjust the equilibration time in the settings.xml file (`cg.gromacs.equi_time`) to a lower value (time frame in GROMACS units (ps) at which the analysis of the CG trajectory is started in each IBI step). Finally, start the IBI iterations: - -```bash -csg_inverse --options settings.xml -``` - -At each iteration step, the current CG potential is `CG-CG.pot.cur`. Then, the CG-MD simulation is performed and the CG-CG RDF (`CG-CG.dist.new`) is determined. Finally, the CG potential is updated: `CG-CG.pot.new`. - -Calculate the pressure after several iterations using `gmx energy`. You can do this by copying the `Extract_Energies.sh` script from the main folder (`csg-tutorials/spce/ibi/`) to the appropriate step folder (`step_xxx`) and executing it (type `./Extract_Energies.sh`). Again, it will create a subfolder energies. You may notice that the pressure of the CG simulation is significantly too high. This can be adjusted by applying a pressure correction. To do so, add an appropriate post update option to the settings file, so that a (simple) pressure correction is applied. You can check the corresponding section of the manual. - - -# Inverse Monte Carlo (IMC) for SPC/E water - -Developing a CG potential with the inverse Monte Carlo (IMC) method works in a similar way as in the IBI example. The IMC procedure, again, requires the coarse-grained RDF of the single bead mapping based on the atomistic simulation as input. Therefore, in `csg-tutorials/spce/imc`, again, the RDF of a long atomistic simulation run is proveded: `CG-CG.dist.tgt`. - -It is required to reduce the number of MD steps in `grompp.mdp` and to adjust the equilibration time in the `settings.xml` file (`cg.gromacs.equi_time`) to a lower value. IMC converges faster than IBI, but needs a better statistical sampling in each CG step. Therefore, the number of MD steps should be larger than in the IBI tutorial. Start the IMC iterations: - -```bash -csg_inverse --options settings.xml -``` - -Again, the current CG potential is `CG-CG.pot.cur`, the CG-CG RDF is `CG-CG.dist.new` and the updated CG potential is: `CG-CG.pot.new`. - -Calculate the pressure after several iterations using `gmx energy` and compare it with the IBI tutorial. You can do this by copying the `Extract_Energies.sh` script from the main folder (`csg-tutorials/spce/ibi/`) to the appropriate step folder (`step_xxx`) and executing it. - - -# Relative entropy (RE) minimization for SPC/E water - -Relative entropy (RE) minimization based coarse-graining of SPC/E water works similar to the IBI and the IMC example above. The reference atomistic simulation and the CG mapping are the same as in the IBI example. Again, in `csg-tutorials/spce/re/`, the RDF of a long atomistic simulation run is provided: `CG-CG.dist.tgt`. In this tutorial, the water-water CG potential is modeled using a cubic B-spline functional form. An initial guess for the cubic B-spline knot values is provided in CG-CG.param.init. At each iteration step, the CG potential table is computed from the current CG parameters (`CG-CG.param.cur`), the CG-MD simulation is performed, and the CG-CG RDF (`CG-CG.dist.new`) is determined. Finally, the new CG potential parameters (`CG-CG.param.new`) are computed using the relative entropy minimization algorithm. Reduce the number of MD steps in `grompp.mdp`, adjust the equilibration time in the `settings.xml` file (`cg.gromacs.equi_time`) and start the RE iterations: - -```bash -csg_inverse --options settings.xml -``` - -Again, the current CG potential is `CG-CG.pot.cur`, the CG-CG RDF is `CG-CG.dist.new` and the updated CG potential is: `CG-CG.pot.new`. - -Calculate the pressure after several iterations using `gmx energy` and compare it with the IBI tutorial. Again, you can do this by copying the `Extract_Energies.sh` script from the main folder (`csg-tutorials/spce/ibi/`) to the appropriate step folder (`step_xxx`) and executing it. For a more detailed description of the RE method, look at the following [publication](http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0131754). - - -# Force matching for SPC/E water - -We will now derive a non-bonded CG potential for SPC/E using the force matching method. - -## Atomistic simulation - -Basis for the force matching procedure is an atomistic MD simulation. All files are found in the atomistic folder (`csg-tutorials/spce/atomistic/`). If you have done the above tutorials, you have already generated the files of the atomistic md run. If not, then do so. Adjust the number of time steps to a reasonable value (`5000-10000`) and also choose an appropriate output frequency of the trajectory. Make sure, both, coordinates and forces are written to the trajectory file (`nstxout` and `nstfout` should have the same value in `grompp.mdp`). - -## Force matching (FM) - -All files for running the actual force matching calculation can be found in `csg-tutorials/spce/force_matching/`. Have a look at the settings file (`fmatch.xml`). In the general force matching section (`cg.fmatch`), the number of frames to read in simultaneously (`frames_per_block`) and the type of LS solver (constrainedLS) are fixed (it is preferred to use constrained LS). The fmatch block of the interaction (`cg.non-bonded.fmatch`) contains the interaction range (`min` and `max`), the step size for the internal spline representation (`step`) and the output step (`out_step`). `min` and `max` have to be adjusted to be within the range of the RDF (see the calculation of RDF section of the IBI tutorial). Run the FM calculation (see also the corresponding line of the `run.sh` script): - -```bash -csg_fmatch --top ../atomistic/topol.tpr --trj ../atomistic/traj.trr --options fmatch.xml --cg water.xml (--begin $equi ) # ( ) denotes additional option: , --begin # time frame in GROMACS units (ps) to start analysis (e.g. 1 to 5) -``` - -To obtain the CG potential, the CG force has to be integrated. (see the appropriate lines in the `run.sh` script): - -```bash -csg_call table integrate CG-CG.force CG-CG.pot # integrates the table -csg_call table linearop CG-CG.pot CG-CG.pot -1 0 # multiplication of all table values by -1 (potential) -``` - -Change the spline grid (`step`), blocksize, and parameter constrainedLS. his should provide an overview of the whole procedure. - -## Running of CG simulation - -To run a CG simulation with GROMACS, the potential has to be converted to a potential table, GROMACS can read (`table_CG_CG.xvg`). (Check the inverse section in the `fmatch.xml` for the corresponding options): - -```bash -csg_call --options fmatch.xml --ia-name CG-CG --ia-type non-bonded convert_potential gromacs --clean input.pot table_CG_CG.xvg # calls convert_potential gromacs. Unsampled regions for distances smaller than the min value are extrapolated. -``` - -To run a CG simulation, you will need the `conf.gro`, `topol.top`, `index.ndx` and `grompp.mdp` files. You can use the ones of the ibi tutorial, and adjust the number of timesteps and output settings. Then run the simulation. Afterwards, you can calculate the RDF and thermodynamic data as explained in the IBI tutorial. You can also use the `Extract_Energies.sh` script of the IBI tutorial. When calculating the RDF from the CG simulation, you don't need a mapping file and the --cg option can be omitted. - -Compare the CG potential, the RDF and thermodynamics with the ones of the IBI, IMC or RE method (or any other method) and with the atomistic simulation. You will see that different methods lead to significantly different interaction potentials and a single site water model with a pair interaction potential is not capable of reproducing the RDF and thermodynamics at the same time. (Reason: three-body contributions are important but cannot be projected on a 2-body coarse-grained force-field. The incorporation of non-bonded 3-body interactions is work in progress. An extension to analytic non-bonded 3-body interactions will be released soon). - - -# Visualization of IBI updates - -Go to the folder `csg-tutorials/spce/realtime`. Execute the `run.sh` script. - - -# Coarse-graining of liquid methanol - -In the folder `csg-tutorials/methanol/`, you will find all relevant files to run an atomistic simulation of liquid methanol and obtain CG potentials with the IBI, IMC and FM method. Look at the SPC/E water tutorial to learn how to do this. You can compare the differences of the CG potentials, RDFs and thermodynamics between the different CG schemes and the atomistic simulation to the differences of the SPC/E water simulations. You will see that in the case of methanol, a pair potential is a better approximation to an ideal CG potential as in the SPC/E water case. The reason is that non-bonded 3-body effects are less important. - - -# Coarse-graining of liquid hexane - -Go to the folder `csg-tutorials/hexane/`. So far, we only considered single bead mappings. Hexane is a small alkane molecule. In this tutorial, a 3 bead CG mapping with one bond type and one angle type is chosen - -## Atomistic simulation - -Go into the `csg-tutorials/hexane/atomistic/` folder. Have a look at the mapping file `hexane.xml`. The hexane molecule is mapped to 3 beads with two different bead types with two bonds (of the same type) and one angle. You will find all relevant GROMACS input files in the folder. Have a look at the `run.sh` script. Again, adjust the number of time steps and the output frequencies in grompp.mdp and run an atomistic simulation. Extract the thermodynamic information (`./Extract_Energies.sh`) and calculate the 3 different RDFs (A-A, B-B, A-B) and the bond and angle distributions with `csg_stat`. In addition, you can compute the bond and angle distributions with `csg_boltzmann` (see `run_boltzmann.sh`) Compare the distributions to those in `csg-tutorials/hexane/ibi_all` obtained by a significantly longer atomistic MD run. You can map the (final) .gro file of the atomistic simuation to the CG one to get all necessary information for running the IBI procedure. - -## IBI for all interactions - -Go to the folder `csg-tutorials/hexane/ibi_all`. The folder contains target RDFs and bond and angle distributions from a longer atomistic MD run. Have a look at the `settings.xml` file. It contains the sections for the non-bonded and bonded interactions. The three non-bonded interactions are updated every 3rd iteration step (first A-A, then B-B and then A-B, etc., see the `cg.non-bonded.inverse.do_potential` section). The bonded interactions are updated every iteration step. Adjust the number of time steps and output frequency in the `grompp.mdp` file and the equilibration time in the `settings.xml` file (`cg.inverse.gromacs.equi_time`) and start the IBI iterations. -Calculate the pressure after several iterations using `gmx energy`. You can do this by copying the `Extract_Energies.sh` script from the main folder (`csg-tutorials/spce/ibi/`) to the appropriate step folder (`step_xxx`) and executing it. - -## IBI for non-bonded interactions only - -Go to the folder `csg-tutorials/hexane/ibi_nonbonded`. The folder contains the same target RDFs as the `csg-tutorials/hexane/ibi_all` folder. In addition, it contains the tabulated bond and angle potentials (`table_b1.xvg` and `table_a1.xvg`). They are obtained by (non-iterative) Boltzmann inversion of the bond and angle target distribution functions of a longer MD simulation run. You can compute them with `csg_boltzmann` (see the `run_boltzmann.sh` script). A lack of statistics will become most apparent at lower values of the angle. In this case you might want to adjust the min value in the `boltzmann_cmds` file. Compare your results with the pre-computed ones (`table_b1.xvg` and `table_a1.xvg`) and with the ones in the subfolder `step_001` in `csg-tutorials/hexane/ibi_all` Again, adjust the number of time steps and equilibration time and start the iteration process. -Calculate the pressure and compare the thermodynamic properties as well as the obtained non-bonded potentials with the ones of the `csg-tutorials/hexane/ibi_all tutorial`. Calculate the bond and angle distributions (This can be done with `csg_stat`, using the `settings.xml` file and the `hexane_cg.xml` mapping file of the `csg-tutorials/hexane/ibi_all` folder.) - -## FM for all interactions together - -Go to the folder `csg-tutorials/hexane/force_matching`. The folder contains the hexane mapping file with bond and angle interactions (`hexane.xml`) and the force matching options file (`fmatch.xml`). Have a look at both files and the `run.sh` script and start the force matching procedure. Basis is the atomistic trajectory with force output in `csg-tutorials/hexane/atomistic`. Integrate the force output to obtain the potentials and convert them to GROMACS tables. (see the `run.sh` script). Compare the obtained potentials to the IBI potentials. You can run CG simulations with the CG potentials, again, using the `conf.gro`, `topol.top`, `index.ndx` and `grompp.mdp` files from the `csg-tutorials/hexane/ibi_all` folder. Calculate the RDFs, bond and angle distributions. -When comparing the results to the IBI potentials, you will see that in some cases, force matching can have problems with bonded interactions, especially if the functional form of the coarse-grained force field lacks essential interactions such as bond-angle or 3-body correlations. In such cases it can help to perform force matching only on the non-bonded contributions as was shown [here](http://dx.doi.org/10.1002/mats.201100011). - -## FM for non-bonded interactions only - -The files for the tutorial can be found in `csg-tutorials/hexane/hybrid_force_matching/`. The folder should contain all necessary files to reproduce the plots from the [publication](http://dx.doi.org/10.1002/mats.201100011). To be able to parametrize only the non-bonded interactions via force matching, an atomistic trajectory has to be generated containing only forces contributing to the non-bonded interactions, meaning all other contributions need to be excluded. This is achieved by generating a second atomistic topoly file. Have a look at the topol.top file and compare it to the one in `csg-tutorials/hexane/atomistic/`. All bonded interactions have been deleted. Furthermore, all intramolecular interactions have been explicitly excluded. Generate the binary GROMACS topology file using this `topol.top` file and the `conf.gro` and `grommp.mdp` file of the reference atomistic trajectory (`csg-tutorials/hexane/atomistic/`). Then, generate the trajectory file with excluded bonded intera ctions using `gmx mdrun` with the `-rerun` option. (Have a look at the corresponding lines of the `run.sh` script). -Have a look at the `fmatch.xml` file. It now only contains the non-bonded interactions. Start the FM calculation. Afterwards, intergrate the force output and convert the potentials to GROMACS tables (see the `run.sh` script). You can run the CG simulation, using the `conf.gro`, `topol.top`, `index.ndx` and `grompp.mdp` files and the bond and angle potential (`table_b1.xvg` and `table_a1.xvg`) from the `csg-tutorials/hexane/ibi_nonbonded/` folder. Calculate the RDFs, bond and angle distributions and compare the results to the IBI results and FM of all interactions together. - - -# Regularization of the inverse Monte Carlo method - -For this tutorial go to the folder `csg-tutorials/LJ1-LJ2/imc`. Inverse Monte Carlo (IMC) needs a well defined cross-correlation matrix for which enough sampling is needed. If there is not enough sampling the algorithm might not converge to a stable solution. This might also happen if the initial potential guess for the iterative scheme is too far away from the real solution of the inverse problem. To overcome this deficiency and to stabilize the algorithm one could apply the so called Tikhonov regularization, which is a common technique to regularize ill-posed inverse problems. For further information on the Tikhonov regularization and/or ill-posed inverse problems in general don't hesitate to have a look at the manual of VOTCA-1.4 to get a short overview or for a more detailed description at this [publication](http://epjst.epj.org/articles/epjst/abs/2016/07/epjst160120/epjst160120.html) or consult any book of choice on regularization of inverse problems. - -This tutorial can be considered to be a proof of concept. It is based on the above mentioned [publication](http://epjst.epj.org/articles/epjst/abs/2016/07/epjst160120/epjst160120.html). Here the user should get familiar with the application of the Tikhonov regularization and should see its benefit. The file `run.sh` will execute a preliminary run of 10 steps of iterative Boltzmann inverson (IBI) before the IMC method is applied. The users should figure out what happens if the preliminary IBI steps are skipped and should test different regularization parameters (e.g. 10,100.300,1000). The folder also contains a short python script which performs a singular value decomposition of the cross-correlation matrix (`svd.py`). Based on this decomposition one could get an educated guess on the order of the magnitude of the regularization parameter. It should be larger than the smallest singular values squared and smaller compared to the larger ones. - - -# Additional tutorials - -Have a look in the folder `csg-tutorials`. It contains additional tutorials on propane, methanol-water and urea-water mixtures. To do the tutorials, have a look at the corresponding `run.sh` scripts. - - - -# Advanced topics - -## Extending the scripting framework - -Write a post update script, which smooths the tail of a potential by transforming `dU(r)` to `s(r)dU(r)` with - -``` -s(r) = 1 for r < rt -s(r) = 1-(rc-rt)-3(r - rt)2(3rc-rt-2r) for rt < r < rc -s(r) = 0 for r > rt -``` - -Hints: -Start from `skeleton.pl` and use `pressure_cor_simple.pl` as a template. - -## Writing an analysis tool - -VOTCA allows to write your own analysis code. There are many examples and two templates for serial and threaded analysis. If you are willing to learn how to write your own analysis in C++, ask for assistance. - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/csg-tutorials-1.6.4/guide/README.rst new/csg-tutorials-2021/guide/README.rst --- old/csg-tutorials-1.6.4/guide/README.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/csg-tutorials-2021/guide/README.rst 2021-03-13 02:24:23.000000000 +0100 @@ -0,0 +1,581 @@ +CSG Tutorial +============ + +(Based on the 2011-2017 CECAM meetings) + +Please pick topics you are most interested in, since finishing the +tutorial might take longer than one afternoon. + +Installation +------------ + +Building VOTCA +^^^^^^^^^^^^^^ + +The simplest way is to use CMake: + +.. code:: bash + + prefix=~/votca + version=master # or 'stable' or 'v1.4.1' + git clone -b ${version} --recursive https://github.com/votca/votca.git + cd votca + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=${prefix} .. + make -j5 + make install + +To build a gromacs version for VOTCA use + +.. code:: bash + + cmake -DBUILD_OWN_GROMACS=ON .. + make -j5 + make install + +Using the tutorials +^^^^^^^^^^^^^^^^^^^ + +All the tutorials are in the installation folder, i.e. +``${prefix}/share/votca/csg-tutorials``. + +Downloading the manual +^^^^^^^^^^^^^^^^^^^^^^ + +The corresponding version of the manual can be found on +`github <https://github.com/votca/csg-manual/releases>`__ (development +version `here <http://doc.votca.org/manual.pdf>`__). + +Running GROMACS +--------------- + +The tutorial uses GROMACS, a molecular dynamics (MD) package, for +generating the reference data. If you are not familiar with GROMACS, +please read the following section for a brief overview on how to set up +and run MD simulations using GROMACS. You can find all the GROMACS input +files in the ``atomistic`` folder of each tutorial, e.g., for a box of +atomistic water see ``csg-tutorials/spce/atomistic/``. + +Input files +^^^^^^^^^^^ + +You will need four files to run MD simulations \* ``conf.gro`` - stores +the coordinates of the molecule(s). It can be viewed with vmd. The +default file name is ``conf.gro``. \* ``grompp.mdp`` - stores all +simulation options, such as time step, number of simulation steps, etc. +\* ``topol.top`` - topology of the molecule \* ``forcefield.itp`` - +description of the atomistic force-field (not always needed) + +During this tutorial, you will need to modify \* ``nsteps`` - number of +MD steps \* ``nstxout`` - output frequency of coordinates to the +trajectory file traj.trr \* ``nstfout`` - output frequency of forces to +traj.trr \* ``nstxout-compressed`` - output frequency to the traj.xtc +file, often used by the iterative Boltzmann inversion method \* +``nstlog`` - output frequency of the md.log file \* ``nstenergy`` - +output frequency to the ener.edr file containing all thermodynamic +information + +MD simulations +^^^^^^^^^^^^^^ + +To run MD simulations using GROMACS, first one must create a binary +topology file ``topol.tpr`` using the ``gmx grompp`` program. Then run +the MD integrator using the ``gmx mdrun`` program. ``topol.tpr`` +contains ``conf.gro``, ``grompp.mdp``, ``topol.top``, and +``forcefield.itp``. + +.. code:: bash + + gmx grompp -c conf.gro # -c is needed if other than conf.gro file is used + gmx mdrun -v # -v (verbose) gives the estimate of the run time + +Running other MD programs +------------------------- + +In addition to GROMACS, VOTCA supports ``ESPResSo``, ``Lammps``, +``dl_poly``, ``HOOMD-blue``, and ``ESPResSo++``. The interface to these +is a bit more advanced, meaning VOTCA will allow you to do more crazy +things and warn you less about settings, which might not make sense at +all. Let's have a look at ``csg-tutorials/spce/espressopp/``. +(``ibi_lammps``, ``ibi_espresso``, ``ibi_dlpoly``, and +``ibi_hoomd-blue`` are pretty similar) + +Input files + +Here is an example of the ESPResSo++ input files to run the CG MD +simulations of the Iterative Boltzmann inversion procedure. + +- ``conf.gro`` - stores the coordinates of the molecule(s). It can be + viewed with vmd. A pdb or xyz file would be okay, too. +- ``spce.py`` is the simulation script which will be called by + csg\_inverse. It stores the whole simulation procedure. +- ``topol.xml`` -topology of the molecule, defined in the initial + condition. This is needed as most gro/pdb/xyz files have no molecule + definition in them. + +Mapping an atomistic trajectory onto a coarse-grained trajectory +---------------------------------------------------------------- + +SPC/E Water +^^^^^^^^^^^ + +Folder: ``csg-tutorials/spce/atomistic/`` + +Have a look at the center of mass mapping file ``water.xml`` in this +folder. Use ``csg_map`` to create a coarse-grained configuration (adjust +the corresponding command in the ``run.sh`` script to map ``conf.gro`` +instead of ``confout.gro``). Visualize both configurations with vmd. +(execute ``vmd conf.gro &``) + +Create a mapping file where the center of a coarse-grained water +molecule is not the center of mass, but a different one, e.g., the +charge center of the atomistic one. + +Run a short MD simulation of a box of SPC/E water using GROMACS. (This +is needed later for the different coarse-graining (CG) methods.) The +input files are in the same folder (``csg-tutorials/spce/atomistic/``). +Due to limited time, decrease the number of steps (``nsteps``) in +``grompp.mdp`` to a reasonable value (``5000-10000``) and adjust the +output frequency of the trajectory, .log, and .edr files to, e.g., +50-100 (``nstxout``, ``nstfout``, ``nstlog``, nstenergy): + +.. code:: bash + + gmx grompp # combines conf.gro, topol.top, and grompp.mdp, and forcefield.itp (which is in the gromos43a1.ff folder of GROMACS) into topol.tpr + gmx mdrun -v # runs MD integrator. The trajectory is saved to traj.trr + +Map this short atomistic trajectory to a CG trajectory using ``csg_map`` +(adjust the corresponding line in the ``run.sh`` script to map +``traj.trr`` onto ``traj_cg.trr`` instead of ``conf(out).gro`` to +``conf_cg.gro``.) + +Iterative Boltzmann inversion (IBI) for SPC/E water +--------------------------------------------------- + +Here, a one-site coarse-grained (CG) model of a rigid 3-site water +molecule (SPC/E model) is constructed (see the previous section of the +tutorial) using the iterative Boltzmann inversion (IBI) method. The +center of the CG bead is chosen to be the center of mass (COM) of a +molecule. The target radial distribution function (RDF) is calculated +from the CG bead coordinates obtained by mapping the reference atomistic +trajectory. In the last step, a coarse-grained potential is obtained by +matching the RDFs of the atomisitc and CG systems using the IBI method. +For a more detailed description, look at the following +`publication <http://pubs.acs.org/doi/abs/10.1021/ct900369w>`__. + +Atomistic simulation +^^^^^^^^^^^^^^^^^^^^ + +A short atomistic MD simulation has been already run in the last part of +the previous section (see folder: ``csg-tutorials/spce/atomistic/``). +You can extract all thermodynamic information (total energy, kinetic +energy, pressure, etc.) from the binary ``ener.edr`` file using +``gmx energy``. Running the ``Extract_Energies.sh`` script does this for +you (see the corresponding command line in the ``run.sh`` script). It +creates an additional subfolder ``energies`` with all thermodynamic +information: + +.. code:: bash + + ./Extract_Energies.sh $equi # The argument $equi is optional. If provided, analysis will start at the corresponding time frame (in GROMACS units, ps) (e.g. 1 to 5) + +Calculation of RDF +^^^^^^^^^^^^^^^^^^ + +Once again, check the mapping file ``water.xml``. Atom names listed in +the definition of the COM bead should correspond to those used in the +``conf.gro`` file. You can use ``csg_dump`` to check this: + +.. code:: bash + + csg_dump --top topol.tpr + +Check the options file ``settings.xml``. It contains the section of the +corresponding non-bonded interaction (``CG-CG``). After this, calculate +the center of mass RDF: + +.. code:: bash + + csg_stat --top topol.tpr --trj traj.trr --cg water.xml --options settings.xml (--nt 3 --begin $equi) # ( ) denotes additional options: --nt # number of threads to run calculation in parallel with more then one threads (e.g. 3), --begin # time frame in GROMACS units (ps) to start analysis (e.g. 1 to 5) + +Compare your RDF with ``CG-CG.dist.tgt`` in ``csg-tutorials/spce/ibi/`` +which has been calculated with a much longer atomistic simulation run. + +Running IBI +^^^^^^^^^^^ + +Now switch to the folder: ``csg-tutorials/spce/ibi/``. Reduce the number +of MD steps in ``grompp.mdp`` and adjust the equilibration time in the +settings.xml file (``cg.gromacs.equi_time``) to a lower value (time +frame in GROMACS units (ps) at which the analysis of the CG trajectory +is started in each IBI step). Finally, start the IBI iterations: + +.. code:: bash + + csg_inverse --options settings.xml + +At each iteration step, the current CG potential is ``CG-CG.pot.cur``. +Then, the CG-MD simulation is performed and the CG-CG RDF +(``CG-CG.dist.new``) is determined. Finally, the CG potential is +updated: ``CG-CG.pot.new``. + +Calculate the pressure after several iterations using ``gmx energy``. +You can do this by copying the ``Extract_Energies.sh`` script from the +main folder (``csg-tutorials/spce/ibi/``) to the appropriate step folder +(``step_xxx``) and executing it (type ``./Extract_Energies.sh``). Again, +it will create a subfolder energies. You may notice that the pressure of +the CG simulation is significantly too high. This can be adjusted by +applying a pressure correction. To do so, add an appropriate post update +option to the settings file, so that a (simple) pressure correction is +applied. You can check the corresponding section of the manual. + +Inverse Monte Carlo (IMC) for SPC/E water +----------------------------------------- + +Developing a CG potential with the inverse Monte Carlo (IMC) method +works in a similar way as in the IBI example. The IMC procedure, again, +requires the coarse-grained RDF of the single bead mapping based on the +atomistic simulation as input. Therefore, in ``csg-tutorials/spce/imc``, +again, the RDF of a long atomistic simulation run is proveded: +``CG-CG.dist.tgt``. + +It is required to reduce the number of MD steps in ``grompp.mdp`` and to +adjust the equilibration time in the ``settings.xml`` file +(``cg.gromacs.equi_time``) to a lower value. IMC converges faster than +IBI, but needs a better statistical sampling in each CG step. Therefore, +the number of MD steps should be larger than in the IBI tutorial. Start +the IMC iterations: + +.. code:: bash + + csg_inverse --options settings.xml + +Again, the current CG potential is ``CG-CG.pot.cur``, the CG-CG RDF is +``CG-CG.dist.new`` and the updated CG potential is: ``CG-CG.pot.new``. + +Calculate the pressure after several iterations using ``gmx energy`` and +compare it with the IBI tutorial. You can do this by copying the +``Extract_Energies.sh`` script from the main folder +(``csg-tutorials/spce/ibi/``) to the appropriate step folder +(``step_xxx``) and executing it. + +Relative entropy (RE) minimization for SPC/E water +-------------------------------------------------- + +Relative entropy (RE) minimization based coarse-graining of SPC/E water +works similar to the IBI and the IMC example above. The reference +atomistic simulation and the CG mapping are the same as in the IBI +example. Again, in ``csg-tutorials/spce/re/``, the RDF of a long +atomistic simulation run is provided: ``CG-CG.dist.tgt``. In this +tutorial, the water-water CG potential is modeled using a cubic B-spline +functional form. An initial guess for the cubic B-spline knot values is +provided in CG-CG.param.init. At each iteration step, the CG potential +table is computed from the current CG parameters (``CG-CG.param.cur``), +the CG-MD simulation is performed, and the CG-CG RDF +(``CG-CG.dist.new``) is determined. Finally, the new CG potential +parameters (``CG-CG.param.new``) are computed using the relative entropy +minimization algorithm. Reduce the number of MD steps in ``grompp.mdp``, +adjust the equilibration time in the ``settings.xml`` file +(``cg.gromacs.equi_time``) and start the RE iterations: + +.. code:: bash + + csg_inverse --options settings.xml + +Again, the current CG potential is ``CG-CG.pot.cur``, the CG-CG RDF is +``CG-CG.dist.new`` and the updated CG potential is: ``CG-CG.pot.new``. + +Calculate the pressure after several iterations using ``gmx energy`` and +compare it with the IBI tutorial. Again, you can do this by copying the +``Extract_Energies.sh`` script from the main folder +(``csg-tutorials/spce/ibi/``) to the appropriate step folder +(``step_xxx``) and executing it. For a more detailed description of the +RE method, look at the following +`publication <http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0131754>`__. + +Force matching for SPC/E water +------------------------------ + +We will now derive a non-bonded CG potential for SPC/E using the force +matching method. + +Atomistic simulation +^^^^^^^^^^^^^^^^^^^^ + +Basis for the force matching procedure is an atomistic MD simulation. +All files are found in the atomistic folder +(``csg-tutorials/spce/atomistic/``). If you have done the above +tutorials, you have already generated the files of the atomistic md run. +If not, then do so. Adjust the number of time steps to a reasonable +value (``5000-10000``) and also choose an appropriate output frequency +of the trajectory. Make sure, both, coordinates and forces are written +to the trajectory file (``nstxout`` and ``nstfout`` should have the same +value in ``grompp.mdp``). + +Force matching (FM) +^^^^^^^^^^^^^^^^^^^ + +All files for running the actual force matching calculation can be found +in ``csg-tutorials/spce/force_matching/``. Have a look at the settings +file (``fmatch.xml``). In the general force matching section +(``cg.fmatch``), the number of frames to read in simultaneously +(``frames_per_block``) and the type of LS solver (constrainedLS) are +fixed (it is preferred to use constrained LS). The fmatch block of the +interaction (``cg.non-bonded.fmatch``) contains the interaction range +(``min`` and ``max``), the step size for the internal spline +representation (``step``) and the output step (``out_step``). ``min`` +and ``max`` have to be adjusted to be within the range of the RDF (see +the calculation of RDF section of the IBI tutorial). Run the FM +calculation (see also the corresponding line of the ``run.sh`` script): + +.. code:: bash + + csg_fmatch --top ../atomistic/topol.tpr --trj ../atomistic/traj.trr --options fmatch.xml --cg water.xml (--begin $equi ) # ( ) denotes additional option: , --begin # time frame in GROMACS units (ps) to start analysis (e.g. 1 to 5) + +To obtain the CG potential, the CG force has to be integrated. (see the +appropriate lines in the ``run.sh`` script): + +.. code:: bash + + csg_call table integrate CG-CG.force CG-CG.pot # integrates the table + csg_call table linearop CG-CG.pot CG-CG.pot -1 0 # multiplication of all table values by -1 (potential) + +Change the spline grid (``step``), blocksize, and parameter +constrainedLS. his should provide an overview of the whole procedure. + +Running of CG simulation +^^^^^^^^^^^^^^^^^^^^^^^^ + +To run a CG simulation with GROMACS, the potential has to be converted +to a potential table, GROMACS can read (``table_CG_CG.xvg``). (Check the +inverse section in the ``fmatch.xml`` for the corresponding options): + +.. code:: bash + + csg_call --options fmatch.xml --ia-name CG-CG --ia-type non-bonded convert_potential gromacs --clean input.pot table_CG_CG.xvg # calls convert_potential gromacs. Unsampled regions for distances smaller than the min value are extrapolated. + +To run a CG simulation, you will need the ``conf.gro``, ``topol.top``, +``index.ndx`` and ``grompp.mdp`` files. You can use the ones of the ibi +tutorial, and adjust the number of timesteps and output settings. Then +run the simulation. Afterwards, you can calculate the RDF and +thermodynamic data as explained in the IBI tutorial. You can also use +the ``Extract_Energies.sh`` script of the IBI tutorial. When calculating +the RDF from the CG simulation, you don't need a mapping file and the +--cg option can be omitted. + +Compare the CG potential, the RDF and thermodynamics with the ones of +the IBI, IMC or RE method (or any other method) and with the atomistic +simulation. You will see that different methods lead to significantly +different interaction potentials and a single site water model with a +pair interaction potential is not capable of reproducing the RDF and +thermodynamics at the same time. (Reason: three-body contributions are +important but cannot be projected on a 2-body coarse-grained +force-field. The incorporation of non-bonded 3-body interactions is work +in progress. An extension to analytic non-bonded 3-body interactions +will be released soon). + +Visualization of IBI updates +---------------------------- + +Go to the folder ``csg-tutorials/spce/realtime``. Execute the ``run.sh`` +script. + +Coarse-graining of liquid methanol +---------------------------------- + +In the folder ``csg-tutorials/methanol/``, you will find all relevant +files to run an atomistic simulation of liquid methanol and obtain CG +potentials with the IBI, IMC and FM method. Look at the SPC/E water +tutorial to learn how to do this. You can compare the differences of the +CG potentials, RDFs and thermodynamics between the different CG schemes +and the atomistic simulation to the differences of the SPC/E water +simulations. You will see that in the case of methanol, a pair potential +is a better approximation to an ideal CG potential as in the SPC/E water +case. The reason is that non-bonded 3-body effects are less important. + +Coarse-graining of liquid hexane +-------------------------------- + +Go to the folder ``csg-tutorials/hexane/``. So far, we only considered +single bead mappings. Hexane is a small alkane molecule. In this +tutorial, a 3 bead CG mapping with one bond type and one angle type is +chosen + +Atomistic simulation +^^^^^^^^^^^^^^^^^^^^ + +Go into the ``csg-tutorials/hexane/atomistic/`` folder. Have a look at +the mapping file ``hexane.xml``. The hexane molecule is mapped to 3 +beads with two different bead types with two bonds (of the same type) +and one angle. You will find all relevant GROMACS input files in the +folder. Have a look at the ``run.sh`` script. Again, adjust the number +of time steps and the output frequencies in grompp.mdp and run an +atomistic simulation. Extract the thermodynamic information +(``./Extract_Energies.sh``) and calculate the 3 different RDFs (A-A, +B-B, A-B) and the bond and angle distributions with ``csg_stat``. In +addition, you can compute the bond and angle distributions with +``csg_boltzmann`` (see ``run_boltzmann.sh``) Compare the distributions +to those in ``csg-tutorials/hexane/ibi_all`` obtained by a significantly +longer atomistic MD run. You can map the (final) .gro file of the +atomistic simuation to the CG one to get all necessary information for +running the IBI procedure. + +IBI for all interactions +^^^^^^^^^^^^^^^^^^^^^^^^ + +Go to the folder ``csg-tutorials/hexane/ibi_all``. The folder contains +target RDFs and bond and angle distributions from a longer atomistic MD +run. Have a look at the ``settings.xml`` file. It contains the sections +for the non-bonded and bonded interactions. The three non-bonded +interactions are updated every 3rd iteration step (first A-A, then B-B +and then A-B, etc., see the ``cg.non-bonded.inverse.do_potential`` +section). The bonded interactions are updated every iteration step. +Adjust the number of time steps and output frequency in the +``grompp.mdp`` file and the equilibration time in the ``settings.xml`` +file (``cg.inverse.gromacs.equi_time``) and start the IBI iterations. +Calculate the pressure after several iterations using ``gmx energy``. +You can do this by copying the ``Extract_Energies.sh`` script from the +main folder (``csg-tutorials/spce/ibi/``) to the appropriate step folder +(``step_xxx``) and executing it. + +IBI for non-bonded interactions only +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Go to the folder ``csg-tutorials/hexane/ibi_nonbonded``. The folder +contains the same target RDFs as the ``csg-tutorials/hexane/ibi_all`` +folder. In addition, it contains the tabulated bond and angle potentials +(``table_b1.xvg`` and ``table_a1.xvg``). They are obtained by +(non-iterative) Boltzmann inversion of the bond and angle target +distribution functions of a longer MD simulation run. You can compute +them with ``csg_boltzmann`` (see the ``run_boltzmann.sh`` script). A +lack of statistics will become most apparent at lower values of the +angle. In this case you might want to adjust the min value in the +``boltzmann_cmds`` file. Compare your results with the pre-computed ones +(``table_b1.xvg`` and ``table_a1.xvg``) and with the ones in the +subfolder ``step_001`` in ``csg-tutorials/hexane/ibi_all`` Again, adjust +the number of time steps and equilibration time and start the iteration +process. Calculate the pressure and compare the thermodynamic properties +as well as the obtained non-bonded potentials with the ones of the +``csg-tutorials/hexane/ibi_all tutorial``. Calculate the bond and angle +distributions (This can be done with ``csg_stat``, using the +``settings.xml`` file and the ``hexane_cg.xml`` mapping file of the +``csg-tutorials/hexane/ibi_all`` folder.) + +FM for all interactions together +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Go to the folder ``csg-tutorials/hexane/force_matching``. The folder +contains the hexane mapping file with bond and angle interactions +(``hexane.xml``) and the force matching options file (``fmatch.xml``). +Have a look at both files and the ``run.sh`` script and start the force +matching procedure. Basis is the atomistic trajectory with force output +in ``csg-tutorials/hexane/atomistic``. Integrate the force output to +obtain the potentials and convert them to GROMACS tables. (see the +``run.sh`` script). Compare the obtained potentials to the IBI +potentials. You can run CG simulations with the CG potentials, again, +using the ``conf.gro``, ``topol.top``, ``index.ndx`` and ``grompp.mdp`` +files from the ``csg-tutorials/hexane/ibi_all`` folder. Calculate the +RDFs, bond and angle distributions. When comparing the results to the +IBI potentials, you will see that in some cases, force matching can have +problems with bonded interactions, especially if the functional form of +the coarse-grained force field lacks essential interactions such as +bond-angle or 3-body correlations. In such cases it can help to perform +force matching only on the non-bonded contributions as was shown +`here <http://dx.doi.org/10.1002/mats.201100011>`__. + +FM for non-bonded interactions only +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The files for the tutorial can be found in +``csg-tutorials/hexane/hybrid_force_matching/``. The folder should +contain all necessary files to reproduce the plots from the +`publication <http://dx.doi.org/10.1002/mats.201100011>`__. To be able +to parametrize only the non-bonded interactions via force matching, an +atomistic trajectory has to be generated containing only forces +contributing to the non-bonded interactions, meaning all other +contributions need to be excluded. This is achieved by generating a +second atomistic topoly file. Have a look at the topol.top file and +compare it to the one in ``csg-tutorials/hexane/atomistic/``. All bonded +interactions have been deleted. Furthermore, all intramolecular +interactions have been explicitly excluded. Generate the binary GROMACS +topology file using this ``topol.top`` file and the ``conf.gro`` and +``grommp.mdp`` file of the reference atomistic trajectory +(``csg-tutorials/hexane/atomistic/``). Then, generate the trajectory +file with excluded bonded interactions using ``gmx mdrun`` with the +``-rerun`` option. (Have a look at the corresponding lines of the +``run.sh`` script). Have a look at the ``fmatch.xml`` file. It now only +contains the non-bonded interactions. Start the FM calculation. +Afterwards, intergrate the force output and convert the potentials to +GROMACS tables (see the ``run.sh`` script). You can run the CG +simulation, using the ``conf.gro``, ``topol.top``, ``index.ndx`` and +``grompp.mdp`` files and the bond and angle potential (``table_b1.xvg`` +and ``table_a1.xvg``) from the ``csg-tutorials/hexane/ibi_nonbonded/`` +folder. Calculate the RDFs, bond and angle distributions and compare the +results to the IBI results and FM of all interactions together. + +Regularization of the inverse Monte Carlo method +------------------------------------------------ + +For this tutorial go to the folder ``csg-tutorials/LJ1-LJ2/imc``. +Inverse Monte Carlo (IMC) needs a well defined cross-correlation matrix +for which enough sampling is needed. If there is not enough sampling the +algorithm might not converge to a stable solution. This might also +happen if the initial potential guess for the iterative scheme is too +far away from the real solution of the inverse problem. To overcome this +deficiency and to stabilize the algorithm one could apply the so called +Tikhonov regularization, which is a common technique to regularize +ill-posed inverse problems. For further information on the Tikhonov +regularization and/or ill-posed inverse problems in general don't +hesitate to have a look at the manual of VOTCA-1.4 to get a short +overview or for a more detailed description at this +`publication <http://epjst.epj.org/articles/epjst/abs/2016/07/epjst160120/epjst160120.html>`__ +or consult any book of choice on regularization of inverse problems. + +This tutorial can be considered to be a proof of concept. It is based on +the above mentioned +`publication <http://epjst.epj.org/articles/epjst/abs/2016/07/epjst160120/epjst160120.html>`__. +Here the user should get familiar with the application of the Tikhonov +regularization and should see its benefit. The file ``run.sh`` will +execute a preliminary run of 10 steps of iterative Boltzmann inverson +(IBI) before the IMC method is applied. The users should figure out what +happens if the preliminary IBI steps are skipped and should test +different regularization parameters (e.g. 10,100.300,1000). The folder +also contains a short python script which performs a singular value +decomposition of the cross-correlation matrix (``svd.py``). Based on +this decomposition one could get an educated guess on the order of the +magnitude of the regularization parameter. It should be larger than the +smallest singular values squared and smaller compared to the larger +ones. + +Additional tutorials +-------------------- + +Have a look in the folder ``csg-tutorials``. It contains additional +tutorials on propane, methanol-water and urea-water mixtures. To do the +tutorials, have a look at the corresponding ``run.sh`` scripts. + +Advanced topics +--------------- + +Extending the scripting framework +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Write a post update script, which smooths the tail of a potential by +transforming ``dU(r)`` to ``s(r)dU(r)`` with + +:: + + s(r) = 1 for r < rt + s(r) = 1-(rc-rt)-3(r - rt)2(3rc-rt-2r) for rt < r < rc + s(r) = 0 for r > rt + +Hints: Start from ``skeleton.pl`` and use ``pressure_cor_simple.pl`` as +a template. + +Writing an analysis tool +^^^^^^^^^^^^^^^^^^^^^^^^ + +VOTCA allows to write your own analysis code. There are many examples +and two templates for serial and threaded analysis. If you are willing +to learn how to write your own analysis in C++, ask for assistance.
