Skip to content

Commit

Permalink
Updated to PLUMED 2.4. Implemented CSE and renamed modules according …
Browse files Browse the repository at this point in the history
…to paper R2.
  • Loading branch information
tonigi committed Feb 12, 2018
1 parent 0f8b87e commit 628ce21
Show file tree
Hide file tree
Showing 3,501 changed files with 2,800,204 additions and 70,648 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
20 changes: 9 additions & 11 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,16 @@ your code in the future. Consequently, please be ready to answer to specific q
Finally, we are very happy to accept contributions to the documentation.

Notice that when you open a pull request you
*implictly agree to transfer the copyright of your code to the PLUMED developers*.
*implictly agree to transfer the copyright of your code to the PLUMED developers* (or to the authors
of the code that you are modifying).
We understand that you might think this unfair. However, we want to be 100% sure that in the
future we can make drastic changes to the code, including changes to the license and that we will not have to
contact all the developers that contributed a small number of lines when doing so.

If you want to contribute some large change, notice that
we prefer not to include your code directly in PLUMED. Large external contributions are difficult for us to maintain.
To be more specific, a contribution can be considered small (and maintainable) only if one
of the current PLUMED developers is able to read every single line of it and understand what it does.
We have, however, put considerable effort into making the code modular. Consequently, adding a new collective variable is often a single matter of including one additional
file. We would therefore suggest that, one option you might consider is putting your extra files on the web in some way.
In other words, you can just distribute a single cpp file together with instructions on how to include this with PLUMED.
Alternatively, and this is the option we would recommend, you can distribution a separate fork of the full PLUMED with your added code inside. Creating such forks is relatively straightforward if you use github.
In addition, if you use this second object people will be able to download a fully validated version of plumed with your extra feature,
and will, furthermore, be able to merge the latest changes of the code. On a final note, we are more than happy to put a link to your webpage/repository/whatever in the PLUMED manual so as to make it is visible to our community of users.
If you want to contribute some large change, please consider adding a new module.
Documentation about adding new modules is still limited, but you can get inspiration
from the existing ones. This procedure will allow you to keep the ownership on your code.
On the other hand, we expect that you will maintain it in the future.

Finally, notice that you can always share modified versions of PLUMED with your changes.
We are happy if you want to host on github a fork of PLUMED with additional features.
33 changes: 31 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
##### Description

<!-- describe here your pull request -->

##### Target release

<!-- please tell us where you would like your code to appear (e.g. v2.4): -->
I would like my code to appear in release __XXXXX__

##### Type of contribution

<!--
Please select the type of your contribution among these:
(Change [ ] to [X] to tick an option)
-->
- [ ] changes to code or doc authored by PLUMED developers
- [ ] changes to a module not authored by you
- [ ] new module contribution or edit of a module authored by you

##### Copyright

<!--
In case you picked one of the first two choices
MAKE SURE TO TICK ALSO THE FOLLOWING BOX
-->

- [ ] I agree to transfer the copyright of the code I have written to the PLUMED developers or to the author of the code I am modifying.

##### Tests

Make sure these boxes are checked before submitting your pull request:

- [ ] I added a new regtest or modified an existing regtest to validate my changes.
- [ ] I verified that all regtests are passed succesfully on Travis.
- [ ] I agree to transfer the copyright of the code I have written to the PLUMED developers.
- [ ] I verified that all regtests are passed successfully on Travis-CI.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
*~
*.o
*.a
*.d
*.cppdep
*.cdep
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "src/stanmath/math"]
path = src/stanmath/math
path = src/curvature_autodiff/math
url = http://github.com/stan-dev/math.git
branch = origin/v2.16.0
44 changes: 25 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ matrix:
include:
# list of configurations to be attempted:
# MPI + doc
# this is the "master" one, it is going to update the manual if log contains [makedoc]
# this is the "master" one, it is going to update the manual every time
# Variable PLUMED_ALL_TESTS=yes ensures that all the regtests can be run.
# If some of them is not enabled, the whole suite will fail.
- os: linux
Expand All @@ -25,29 +25,27 @@ matrix:
- os: linux
dist: trusty
sudo: required
env: CPPCHECK=yes CPPCHECK_VERSION=1.79
env: CPPCHECK=yes CPPCHECK_VERSION=1.81
# then check with different optimization flags
- os: linux
dist: trusty
sudo: required
env: PLUMED_CC=gcc PLUMED_CXX=g++ PLUMED_CXXFLAGS=-O3 LAPACK=yes
# then I try serial compiler on UBUNTU precise
- os: linux
dist: precise
sudo: required
env: PLUMED_CC=gcc PLUMED_CXX=g++
env: PLUMED_CC=mpicc PLUMED_CXX=mpic++ PLUMED_CXXFLAGS=-O3 LAPACK=yes
# test using external blas with internal lapack
- os: linux
if: branch =~ ^test- OR type IN(pull_request)
dist: trusty
sudo: required
env: PLUMED_CC=mpicc PLUMED_CXX=mpic++ PLUMED_CXXFLAGS=-O3 LAPACK=yes CONFIG_FLAGS="--disable-external-lapack"
# test using docker image.
# currently it means ubuntu 17, with gcc6
- sudo: required
if: branch =~ ^test- OR type IN(pull_request)
services: docker
env: PLUMED_DOCKER=yes
# osx serial
- os: osx
if: branch =~ ^test- OR type IN(pull_request)
osx_image: xcode7.3
env: PLUMED_CC=clang PLUMED_CXX=clang++ PLUMED_CXXFLAGS=-O3
# this should not be required. I add it since it looks like with OSX it does not work otherwise
Expand All @@ -56,6 +54,7 @@ matrix:
- $HOME/.ccache
# osx parallel
- os: osx
if: branch =~ ^test- OR type IN(pull_request)
osx_image: xcode7.3
env: PLUMED_CC=mpicc PLUMED_CXX=mpic++ PLUMED_CXXFLAGS=-O3
# this should not be required. I add it since it looks like with OSX it does not work otherwise
Expand All @@ -64,30 +63,32 @@ matrix:
- $HOME/.ccache
# osx serial macports
- os: osx
if: branch =~ ^test- OR type IN(pull_request)
osx_image: xcode7.3
env: PLUMED_MACPORTS="plumed"
cache:
directories:
- $HOME/.macports-ci-ccache
# osx serial macports debug variant
- os: osx
if: branch =~ ^test- OR type IN(pull_request)
osx_image: xcode7.3
env: PLUMED_MACPORTS="plumed +allmodules"
cache:
directories:
- $HOME/.macports-ci-ccache
# osx serial macports debug variant
- os: osx
osx_image: xcode8.2
osx_image: xcode8.3
env: PLUMED_MACPORTS="plumed +allmodules"
cache:
directories:
- $HOME/.macports-ci-ccache
# I don't put any mpi variant with macports since it takes too long to compile
## This command can be used to allow failures:
## allow_failures:
## # I allow this to fail temporarily
## - env: CPPCHECK=yes CPPCHECK_VERSION=1.74
allow_failures:
# I allow this to fail temporarily
- env: PLUMED_DOCKER=yes
## Possible additional variables:
# VALGRIND=yes to make valgrind tests, only when log contains string [valgrind]
install:
Expand All @@ -97,19 +98,19 @@ install:
- export INCLUDE="$HOME/opt/include:$INCLUDE"
- export LIBRARY_PATH="$HOME/opt/lib:$LIBRARY_PATH"
- export LD_LIBRARY_PATH="$HOME/opt/lib:$LD_LIBRARY_PATH"
# build the manual, only if log contains string [makedoc]
# on travis, better dump stack trace in case there is an error
- export PLUMED_STACK_TRACE=yes
- export PLUMED_NUM_THREADS=2
# accept both [makedoc] and [makedocs] as an option
- ./.travis/check.log makedoc || ./.travis/check.log makedocs || MAKEDOC=no
- ./.travis/check.log valgrind || VALGRIND=no
# update packages
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && test -z "$PLUMED_MACPORTS" ; then
brew update > /dev/null ;
brew install ccache ;
export PLUMED_MPIRUN="mpirun --oversubscribe" ;
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq ; fi
# install some package - these are fast, we install them anyway
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libmatheval-dev libfftw3-dev gsl-bin libgsl0-dev ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libmatheval-dev libfftw3-dev gsl-bin libgsl0-dev libboost-serialization-dev ; fi
- if test "$PLUMED_CXX" ; then ./.travis/install.xdrfile ; fi
# cppcheck:
# I use 1.71 since 1.72 seems to report a lot of false positive
Expand Down Expand Up @@ -153,6 +154,8 @@ script:
- CONFIG_FLAGS="$CONFIG_FLAGS --enable-modules=all"
# we enable fftw, which is off by default
- CONFIG_FLAGS="$CONFIG_FLAGS --enable-fftw"
# enable boost_serialization to test drr module
- CONFIG_FLAGS="$CONFIG_FLAGS --enable-boost_serialization"
- if test "$MAKEDOC" == yes ; then CONFIG_FLAGS="$CONFIG_FLAGS --enable-pdfdoc" ; fi
- if test "$MAKEDOC" == yes ; then CONFIG_FLAGS="$CONFIG_FLAGS --enable-gcov" ; fi
# when running lcov plumed should be compiled with -O0
Expand All @@ -170,7 +173,8 @@ script:

# build using macports
- if test -n "$PLUMED_MACPORTS" ; then
sudo port -N install $PLUMED_MACPORTS ;
sudo port -N -k install $PLUMED_MACPORTS ;
plumed config show
./macports-ci ccache --save ;
fi

Expand All @@ -179,7 +183,8 @@ script:

# TEST:
- if test "$VALGRIND" == yes ; then OPT=valgrind ; else OPT="" ; fi
- if test "$PLUMED_CXX" || test -n "$PLUMED_MACPORTS" ; then make -C regtest $OPT ; fi
# --no-print-directory make it more silent
- if test "$PLUMED_CXX" ; then make --no-print-directory -C regtest $OPT ; fi

# test with gcc6
- if test "$PLUMED_DOCKER" = yes ; then docker run -v "$PWD/regtest":/home/plumed/regtest -it plumed /bin/bash -c "make -C regtest" ; fi
Expand All @@ -188,7 +193,8 @@ script:
- if test "$MAKEDOC" == yes ; then make -C regtest copytodoc ; fi
- if test "$MAKEDOC" == yes ; then make -C developer-doc coverage ; fi
- if test "$MAKEDOC" == yes ; then make doc >/dev/null ; fi
- if test "$PLUMED_CXX" || test -n "$PLUMED_MACPORTS" ; then make -C regtest checkfail ; fi
- if test "$PLUMED_CXX" ; then make -C regtest checkfail ; fi
- if test -n "$PLUMED_MACPORTS" ; then sudo port -N -d test $PLUMED_MACPORTS ; fi

# CPPCHECK:
# this is required so as to have all the include files inplace:
Expand Down
9 changes: 7 additions & 2 deletions .travis/install.cppcheck
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e
set -x

cd "$(mktemp -d)"
cd "$(mktemp -dt plumed.XXXXXX)"

git clone https://github.com/danmar/cppcheck.git
cd cppcheck
Expand All @@ -16,8 +16,13 @@ else
version=$(git tag | tail -n 1)
fi

# pick native architecture
native="$($CC -march=native -Q --help=target | grep march= | awk '{print $2}')"
# this is required so that when running the job on a different architecture ccache understand
# the object file should not be recycled

git checkout $version
make -j 4 install CFGDIR="$HOME/opt/share/cppcheck/" CXXFLAGS="-O2 -march=native -mtune=native -Wunreachable-code" PREFIX="$HOME/opt"
make -j 4 install CFGDIR="$HOME/opt/share/cppcheck/" CXXFLAGS="-O2 -march="$native" -mtune="$native" -Wunreachable-code" PREFIX="$HOME/opt"
cd ../

cppcheck --version
Expand Down
2 changes: 1 addition & 1 deletion .travis/install.doxygen
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e
set -x

cd "$(mktemp -d)"
cd "$(mktemp -dt plumed.XXXXXX)"

git clone https://github.com/doxygen/doxygen.git

Expand Down
2 changes: 1 addition & 1 deletion .travis/install.gawk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e
set -x

cd "$(mktemp -d)"
cd "$(mktemp -dt plumed.XXXXXX)"

version=4.1.4

Expand Down
2 changes: 1 addition & 1 deletion .travis/install.lcov
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e
set -x

cd "$(mktemp -d)"
cd "$(mktemp -dt plumed.XXXXXX)"

git clone https://github.com/linux-test-project/lcov.git

Expand Down
2 changes: 1 addition & 1 deletion .travis/install.xdrfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e
set -x

cd "$(mktemp -d)"
cd "$(mktemp -dt plumed.XXXXXX)"

echo "installing xdrfile library"
# wget ftp://ftp.gromacs.org/pub/contrib/xdrfile-1.1.4.tar.gz
Expand Down
51 changes: 34 additions & 17 deletions .travis/pushdoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@
set -e
set -x

if [[ "$TRAVIS_BRANCH" =~ ^v2\.[0-9]+$ ]] ; then
# TODO: this should be made automatic by reading the CHANGES/*.txt files:
if [ "$TRAVIS_BRANCH" = v2.0 ] || [ "$TRAVIS_BRANCH" = v2.1 ] || [ "$TRAVIS_BRANCH" = v2.2 ] ; then
branchtype=unsupported
GIT_OWNER=$( echo $TRAVIS_REPO_SLUG | sed "s/\/.*$//" )
GIT_REPO=$( echo $TRAVIS_REPO_SLUG | sed "s/^.*\///" )

if [ "$GIT_OWNER" = plumed ] ; then
if [[ "$TRAVIS_BRANCH" =~ ^v2\.[0-9]+$ ]] ; then
if test -f CHANGES/"$TRAVIS_BRANCH".md && grep -q plumednotmaintained CHANGES/"$TRAVIS_BRANCH".md ; then
branchtype=unsupported
else
branchtype=official
fi
elif [ "$TRAVIS_BRANCH" = master ] ; then
branchtype=master
else
branchtype=official
branchtype=unofficial
fi
elif [ "$TRAVIS_BRANCH" = master ] ; then
branchtype=master
else
else
branchtype=unofficial
fi

Expand Down Expand Up @@ -47,34 +53,44 @@ This is an auto redirect page.
</html>
EOF

if test -z "${GIT_BOT}"
then
export GIT_BOT=plumedbot
fi

if test -z "${GIT_BOT_EMAIL}"
then
export GIT_BOT_EMAIL=giovanni.bussi+plumedbot@gmail.com
fi

git init
git config user.email "giovanni.bussi+plumedbot@gmail.com"
git config user.name "plumedbot"
git config user.email "${GIT_BOT_EMAIL}"
git config user.name "${GIT_BOT}"
git checkout -b gh-pages
# this is not to show the GIT_TOKEN on Travis log
set +x
git remote add doc https://plumedbot:$GIT_TOKEN@github.com/plumed/doc-${TRAVIS_BRANCH}.git
git remote add doc https://${GIT_BOT}:$GIT_TOKEN@github.com/$GIT_OWNER/doc-${TRAVIS_BRANCH}.git
set -x
cat > README.md << EOF
Precompiled manual for PLUMED ${TRAVIS_BRANCH}
-----------------------------
This repository hosts a precompiled manual for [PLUMED](http://www.plumed.org) ${TRAVIS_BRANCH},
git revision [$hash](https://github.com/plumed/plumed2/commit/$hash).
git revision [$hash](https://github.com/${GIT_OWNER}/${GIT_REPO}/commit/$hash).
This manual has been compiled on [travis](http://travis-ci.org/plumed/plumed2) on $(date).
This manual has been compiled on [travis](http://travis-ci.org/${GIT_OWNER}/${GIT_REPO}) on $(date).
To browse the manual you should go [here](http://plumed.github.io/doc-${TRAVIS_BRANCH}).
To browse the manual you should go [here](http://${GIT_OWNER}.github.io/doc-${TRAVIS_BRANCH}).
You can also download a full copy of the manual for offline access
at [this link](http://github.com/plumed/doc-${TRAVIS_BRANCH}/archive/gh-pages.zip).
at [this link](http://github.com/${GIT_OWNER}/doc-${TRAVIS_BRANCH}/archive/gh-pages.zip).
EOF

case "$branchtype" in
(official) echo "This is the manual for an official and supported PLUMED branch." >> README.md ;;
(unsupported) echo "This is the manual for an official but unsupported PLUMED branch. It will not appear on search engines." >> README.md ;;
(master) echo "This is the manual for an the development PLUMED branch." >> README.md ;;
(master) echo "This is the manual for the development PLUMED branch." >> README.md ;;
(unofficial) echo "This is the manual for an unofficial PLUMED branch. It will not appear on search engines." >> README.md ;;
esac

Expand All @@ -99,6 +115,7 @@ set -x
esac

git add --all .
git commit -m "Update to plumed/plumed2@$hash"
# >/dev/null to avoid excessive noise on travis log
git commit -m "Update to ${GIT_OWNER}/${GIT_REPO}@$hash" >/dev/null
# -q and 2> is not to show the GIT_TOKEN on Travis log
git push -q -f doc gh-pages 2> /dev/null
Loading

0 comments on commit 628ce21

Please sign in to comment.